forked from tswilliams/NTupler
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathworkflowOutline.txt
183 lines (134 loc) · 7.49 KB
/
workflowOutline.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
NB - because all code is in PATNTupler directory, this part of path is never stated.
1: miniAOD ---> ntuples
=======================
CURRENT EXAMPLE NTUPLES
/pnfs/pp.rl.ac.uk/data/cms/store/user/taylor/ntuples_*
source code: plugins/RALMiniAnalyzer.cc
CMSSW config 2016 MC: plugins/nTupleProduction.py
CMSSW config 2016 Data: plugins/nTupleProduction_Data.py
CMSSW config 2017 MC: plugins/nTupleProduction2017.py
CMSSW config 2017 Data: plugins/nTupleProduction_Data2017.py
crab config 2016 MC: plugins/crabConfig_nTupleProd_VJ.py
crab config 2016 Data: plugins/crabConfig_nTupleProd_data_VJ.py
crab config 2017 MC: plugins/crabConfig_nTupleProd2017_VJ.py
crab config 2017 Data: plugins/crabConfig_nTupleProd_data2017_VJ.py
2016 golden JSON: plugins/Cert_271036-284044_13TeV_23Sep2016ReReco_Collisions16_JSON.txt
2017 golden JSON: plugins/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON_v1.txt
additional files: plugins/puppiCorr.root (used as a correction to the soft-drop mass: https://github.com/cms-jet/PuppiSoftdropMassCorr)
additional files: plugins/plugins/L1PrefiringMaps_new.root (contains prefire weightings)
additional files: plugins/quickSignalSubmit_crab.py (explained in quickSignalSubmitInfo.txt)
NOTE: has hack available (plugins/quickSignalSubmit_crab.py) for mass signal submission, see quickSignalSubmitInfo.txt
Once the ntuples are finished, their filepaths need storing in lists.
e.g. fileLists/8_0_32/*.list and fileLists/9_4_9/*.list
Make the lists with the python script: batchJobs/makeFileLists.py
2: ntuples ---> flatTrees (and applies pre-selection)
=========================
CURRENT EXAMPLE FLATTREES
/opt/ppd/scratch/xap79297/Analysis_boostedNmssmHiggs/flatTrees_2019_01_01/*
Note how signal samples have full name, e.g. mH30p0_mSusy800p0_ratio0p99_splitting0p1
source code: main/mainNMSSM.cc
compilation: $ gmake nTupAnaNMSSM
execution: $ ./nTupAnaNMSSM <outputRootFilename> <pathToListOfInputFiles> <sampleType> <yearOfRun> <runInstructionString>
where
<sampleType> = DATA, SIGNAL, TTJETS, OTHER_MC (this changes the systematics applied)
<year> = 2016, 2017
<runInstructionString> = local, batch
This is batchified using the python script: main/submitCondorNtupleJobs_VJ.py
Note that it does not set off the jobs.
EITHER cd into outputDirectory/tmp to set them off with $ ./submitCondorJobs_nTupAnaNMSSM.sh
OR use the script: batchJobs/setoffJobs.py
NOTE
In order to keep things slim can impose a HT cut at this stage:
https://github.com/joseph-taylor/NTupler/blob/joeTestEdit_master/PATNTupler/main/mainNMSSM.cc#L1032-L1033
(obvs can only have it compiled one way at a time)
You can see which samples I have done this to in the example flatTrees^^
NOTE
If you want to create a signal sample that only has squarks, can uncomment toggle which vetos gluinos
NOTE
calls apon systematic & SF info in:
interface/DoubleBTagSF.h
interface/SoftDropPuppiSF.h
interface/IsrWeights.h
after the jobs are finished,
hadd the output files together with the script: batchJobs/haddBatchOutput.py
NOTE: has hack available (main/quickSignalSubmit_flatTrees.py) for mass signal submission, see quickSignalSubmitInfo.txt
3a: flatTrees ---> plots
========================
MAKE PLOTS DIRECTLY FROM FLATTREES
this is how all plots NOT in the "30 bin search region" format are made
this is all achieved in a few lines using the following classes:
src_macros/PlotEntry.cc (think of object as an elaborate 1d histogram)
src_macros/PlotEntry2D.cc (think of object as an elaborate 2d histogram)
src_macros/Plotter.cc (takes vectors of PlotEntry objects, give it a few simple commands, you get the plots)
EXAMPLE MACROs:
macros/plotting_compareDifferentCuts.cc (same samples, different cuts)
macros/plotting_compareDifferentSamples.cc (same cuts, different samples)
macros/plotting_compare2D.cc (2D scatter plots, *a bit buggy due to class destructor)
macros/triggerEff.cc (trigger specific efficiency plots)
TIP 1: if you look any of my current plots in /opt/ppd/scratch/xap79297/Analysis_boostedNmssmHiggs/plots_2019_01_01/
they have the code used to produce them alongside (NB a few plots have required hacking of src_macros/Plotter.cc)
TIP 2: the following file might be useful to look at...
macros/old/plotting_exampleOfHowToUsePlottingClasses.cc
3b: flatTrees ---> histos
=========================
****
NOTE
these are not generic histograms
they are special histograms that handle the "30 bin search region" format
****
========================
CURRENT EXAMPLES OF HISTOS
/opt/ppd/scratch/xap79297/Analysis_boostedNmssmHiggs/histos_2019_01_01/MassCutsV09/
(like with the plots, each histo has code used to create it alongside)
Note how signal samples have redcued name name, e.g. mH30_mSusy800
source code: macros/histos_create.cc
The eight different things that need configuring are clearly labelled.
One non-trivial configuration is the MassRegionCuts object: src_macros/MassRegionCuts.cc
compilation: $ gmake histos_create
execution: ./histos_create batch
NOTE: has hack available (quickSignalSubmit_histos.py) for mass signal submission, see quickSignalSubmitInfo.txt
4a: histos ---> plots
=====================
source code: macros/histos_plot.cc
compilcation: $ gmake histos_plot
execution: ./histos_plot
This again uses src_macros/Plotter.cc to make plots
Now you pass it a vector of regular ROOT histograms (created in stage 3b)
These histograms are grabbed by a map that takes a string argument.
Some examples (one change at a time):
h16_["S_anti_data"] = S-mass regions, anti-tag double-b-tag, data, 2016
h17_["S_anti_data"] = S-mass regions, anti-tag double-b-tag, data, 2017
h17_["S_tag_data"] = S-mass regions, tag double-b-tag, data, 2017
h17_["S_tag_TTJets0L"] = S-mass regions, tag double-b-tag, hadronic ttbar, 2017
h16_["S_tag_TTJets"] = S-mass regions, tag double-b-tag, all ttbar, 2016
h16_["S_tag_mH70_mSusy2000"] = S-mass regions, tag double-b-tag, signal: mH=70GeV mSusy=2000GeV, 2016
h16_["UnD_tag_mH70_mSusy2000"] = U+D sideband mass regions, tag double-b-tag, signal mH=70GeV mSusy=2000GeV, 2016
h16_["UnD_tag_mH70_mSusy2000_dbtTagUp"] = As above but with double-b-tag scale factor shifted up
Some examples (focussing on ABCD estimation method):
h16_["S_control_data"] = S-mass regions, control double-b-tag, data, 2016
h16_["predOld_control_data"] = Prediction using abcd method: S-mass regions, control double-b-tag, data, 2016
h16_["predNew_control_data"] = Prediction using abcd method WITH FANCY F_i factors: S-mass regions, control double-b-tag, data, 2016
Fancy F_i factors come from: interface/QcdSidebandCorr.h
^How to derive them is described in: integrals.txt
4b: histos ---> dataCards
=========================
makes datacards for higgs combined tool
CURRENT EXAMPLES OF CARDS (and how they are structured):
/opt/ppd/scratch/xap79297/Analysis_boostedNmssmHiggs/combinedDataCards_2019_01_01/withGluino/allSys/
source code: macros/makeCombineDataCardsBOTHYEARS.cc
compilation: $ gmake makeCombineDataCardsBOTHYEARS
execution: ./makeCombineDataCardsBOTHYEARS
The six different things that need configuring are clearly labelled.
^Look at example data cards to understand what the code does.
5: dataCards ---> results
=========================
code: macros/runCombinedBatch.py
execution: $ python $CMSSW_BASE/src/NTupler/PATNTupler/macros/runCombinedBatch.py
^FROM THE LOCATION WHERE YOU WISH TO GET THE OUTPUT
outputs a ROOT file for each signal mass point.
Can freeze nuisance parameters in the code if you want
But that is currently the only option
Can then make limit plots with the following code:
macros/limits_2d.py
macros/limits_2d_overlay.py
macros/plotting_brazil.cc