1 |
bendavid |
1.7 |
// $Id: runHgg.C,v 1.6 2012/04/03 08:23:23 mingyang Exp $
|
2 |
bendavid |
1.1 |
#if !defined(__CINT__) || defined(__MAKECINT__)
|
3 |
|
|
#include <TSystem.h>
|
4 |
|
|
#include <TProfile.h>
|
5 |
|
|
#include "MitAna/DataUtil/interface/Debug.h"
|
6 |
|
|
#include "MitAna/Catalog/interface/Catalog.h"
|
7 |
|
|
#include "MitAna/TreeMod/interface/Analysis.h"
|
8 |
|
|
#include "MitAna/TreeMod/interface/HLTMod.h"
|
9 |
|
|
#include "MitAna/PhysicsMod/interface/RunLumiSelectionMod.h"
|
10 |
|
|
#include "MitAna/PhysicsMod/interface/MCProcessSelectionMod.h"
|
11 |
|
|
#include "MitAna/PhysicsMod/interface/PublisherMod.h"
|
12 |
|
|
#include "MitAna/DataTree/interface/JetCol.h"
|
13 |
|
|
#include "MitAna/DataTree/interface/PFJetCol.h"
|
14 |
|
|
#include "MitPhysics/Init/interface/ModNames.h"
|
15 |
|
|
#include "MitPhysics/Mods/interface/GoodPVFilterMod.h"
|
16 |
|
|
#include "MitPhysics/Mods/interface/MuonIDMod.h"
|
17 |
|
|
#include "MitPhysics/Mods/interface/ElectronIDMod.h"
|
18 |
|
|
#include "MitPhysics/Mods/interface/ElectronCleaningMod.h"
|
19 |
|
|
#include "MitPhysics/Mods/interface/PhotonIDMod.h"
|
20 |
|
|
#include "MitPhysics/Mods/interface/PhotonPairSelector.h"
|
21 |
|
|
#include "MitPhysics/Mods/interface/PhotonTreeWriter.h"
|
22 |
|
|
#include "MitPhysics/Mods/interface/PhotonCleaningMod.h"
|
23 |
|
|
#include "MitPhysics/Mods/interface/MergeLeptonsMod.h"
|
24 |
|
|
#include "MitPhysics/Mods/interface/JetCorrectionMod.h"
|
25 |
|
|
#include "MitPhysics/Mods/interface/PhotonMvaMod.h"
|
26 |
|
|
#include "MitPhysics/Mods/interface/MVASystematicsMod.h"
|
27 |
|
|
|
28 |
|
|
#endif
|
29 |
|
|
|
30 |
|
|
//--------------------------------------------------------------------------------------------------
|
31 |
mingyang |
1.6 |
void runHgg(const char *fileset = "0000",
|
32 |
|
|
const char *skim = "noskim",
|
33 |
bendavid |
1.7 |
const char *dataset = "f11--h123gg-gf-v14b-pu",
|
34 |
|
|
//const char *dataset = "r11a-pho-j16-v1",
|
35 |
mingyang |
1.6 |
const char *book = "local/filefi/025",
|
36 |
|
|
const char *catalogDir = "/home/cmsprod/catalog",
|
37 |
|
|
const char *outputName = "hgg",
|
38 |
|
|
int nEvents = 2000)
|
39 |
bendavid |
1.1 |
{
|
40 |
|
|
//------------------------------------------------------------------------------------------------
|
41 |
|
|
// some parameters get passed through the environment
|
42 |
|
|
//------------------------------------------------------------------------------------------------
|
43 |
|
|
char json[1024], overlap[1024];
|
44 |
|
|
float overlapCut = -1;
|
45 |
|
|
|
46 |
|
|
if (gSystem->Getenv("MIT_PROD_JSON"))
|
47 |
|
|
sprintf(json, "%s",gSystem->Getenv("MIT_PROD_JSON"));
|
48 |
|
|
else {
|
49 |
|
|
sprintf(json, "%s", "~");
|
50 |
|
|
//printf(" JSON file was not properly defined. EXIT!\n");
|
51 |
|
|
//return;
|
52 |
|
|
}
|
53 |
|
|
|
54 |
mingyang |
1.6 |
TString jsonFile = TString("/home/mingyang/cms/json/") + TString(json);
|
55 |
|
|
//TString jsonFile = TString("/home/mingyang/cms/json/") + TString("Cert_136033-149442_7TeV_Dec22ReReco_Collisions10_JSON_v4.txt");
|
56 |
|
|
Bool_t isData = ( (jsonFile.CompareTo("/home/mingyang/cms/json/~") != 0) );
|
57 |
bendavid |
1.5 |
|
58 |
bendavid |
1.1 |
if (gSystem->Getenv("MIT_PROD_OVERLAP")) {
|
59 |
|
|
sprintf(overlap,"%s",gSystem->Getenv("MIT_PROD_OVERLAP"));
|
60 |
|
|
if (EOF == sscanf(overlap,"%f",&overlapCut)) {
|
61 |
|
|
printf(" Overlap was not properly defined. EXIT!\n");
|
62 |
|
|
return;
|
63 |
|
|
}
|
64 |
|
|
}
|
65 |
|
|
else {
|
66 |
|
|
sprintf(overlap,"%s", "-1.0");
|
67 |
|
|
//printf(" OVERLAP file was not properly defined. EXIT!\n");
|
68 |
|
|
//return;
|
69 |
|
|
}
|
70 |
|
|
|
71 |
|
|
printf("\n Initialization worked. \n\n");
|
72 |
|
|
|
73 |
|
|
//------------------------------------------------------------------------------------------------
|
74 |
|
|
// some global setups
|
75 |
|
|
//------------------------------------------------------------------------------------------------
|
76 |
|
|
using namespace mithep;
|
77 |
|
|
gDebugMask = Debug::kGeneral;
|
78 |
|
|
gDebugLevel = 3;
|
79 |
|
|
|
80 |
|
|
//------------------------------------------------------------------------------------------------
|
81 |
|
|
// set up information
|
82 |
|
|
//------------------------------------------------------------------------------------------------
|
83 |
|
|
RunLumiSelectionMod *runLumiSel = new RunLumiSelectionMod;
|
84 |
|
|
runLumiSel->SetAcceptMC(kTRUE); // Monte Carlo events are always accepted
|
85 |
|
|
|
86 |
|
|
MCProcessSelectionMod *mcselmod = new MCProcessSelectionMod;
|
87 |
|
|
|
88 |
|
|
MVASystematicsMod *sysMod = new MVASystematicsMod;
|
89 |
bendavid |
1.5 |
sysMod->SetMCR9Scale(1.0035, 1.0035);
|
90 |
bendavid |
1.1 |
sysMod->SetIsData(isData);
|
91 |
|
|
|
92 |
|
|
// only select on run- and lumisection numbers when valid json file present
|
93 |
mingyang |
1.6 |
if ((jsonFile.CompareTo("/home/mingyang/cms/json/~") != 0) &&
|
94 |
|
|
(jsonFile.CompareTo("/home/mingyang/cms/json/-") != 0) ) {
|
95 |
bendavid |
1.1 |
runLumiSel->AddJSONFile(jsonFile.Data());
|
96 |
|
|
}
|
97 |
mingyang |
1.6 |
if ((jsonFile.CompareTo("/home/mingyang/cms/json/-") == 0) ) {
|
98 |
bendavid |
1.1 |
printf("\n WARNING -- Looking at data without JSON file: always accept.\n\n");
|
99 |
|
|
runLumiSel->SetAbortIfNotAccepted(kFALSE); // accept all events if there is no valid JSON file
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
printf("\n Run lumi worked. \n\n");
|
103 |
|
|
|
104 |
|
|
//------------------------------------------------------------------------------------------------
|
105 |
|
|
// HLT information
|
106 |
|
|
//------------------------------------------------------------------------------------------------
|
107 |
|
|
HLTMod *hltModM = new HLTMod("HLTModM");
|
108 |
|
|
hltModM->AddTrigger("HLT_Mu9");
|
109 |
|
|
hltModM->AddTrigger("HLT_Mu11");
|
110 |
|
|
hltModM->AddTrigger("HLT_Mu15_v1");
|
111 |
|
|
hltModM->SetTrigObjsName("MyHltMuonObjs");
|
112 |
|
|
hltModM->SetAbortIfNotAccepted(kFALSE);
|
113 |
|
|
|
114 |
|
|
HLTMod *hltModE = new HLTMod("HLTModE");
|
115 |
|
|
// hltModE->AddTrigger("HLT_Photon10_L1R",132440,137028);
|
116 |
|
|
// hltModE->AddTrigger("HLT_Photon15_Cleaned_L1R",138564,140401);
|
117 |
|
|
// hltModE->AddTrigger("HLT_Ele15_SW_CaloEleId_L1R",141956,144114);
|
118 |
|
|
// hltModE->AddTrigger("HLT_Ele17_SW_CaloEleId_L1R",144115,147145);
|
119 |
|
|
// hltModE->AddTrigger("HLT_Ele17_SW_TightEleId_L1R",147146,148102);
|
120 |
|
|
// hltModE->AddTrigger("HLT_Ele27_SW_TightCaloEleIdTrack_L1R_v1",147146,148102);
|
121 |
|
|
// hltModE->AddTrigger("HLT_Ele22_SW_TighterCaloIdIsol_L1R_v1",148103,159999);
|
122 |
|
|
// hltModE->AddTrigger("HLT_Ele22_SW_TighterCaloIdIsol_L1R_v2",148103,159999);
|
123 |
|
|
// hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v1",160000,999999);
|
124 |
|
|
// hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v2",160000,999999);
|
125 |
|
|
// hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v3",160000,999999);
|
126 |
|
|
// hltModE->AddTrigger("HLT_Ele15_LW_L1R",1,1);
|
127 |
|
|
// hltModE->AddTrigger("HLT_Ele17_SW_CaloEleId_L1R",1,1);
|
128 |
|
|
// hltModE->AddTrigger("HLT_Ele22_SW_TighterCaloIdIsol_L1R_v2",1,1);
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v1",150000,161176);
|
132 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v2",161179,163261);
|
133 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v3",163262,164237);
|
134 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v4",165085,165888);
|
135 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v5",165900,166967);
|
136 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v6",166968,170053);
|
137 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v6",170054,170759);
|
138 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v7",170760,173198);
|
139 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v8",173199,178380);
|
140 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v9",178381,179889);
|
141 |
|
|
hltModE->AddTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v10",179890,999999);
|
142 |
|
|
hltModE->SetTrigObjsName("MyHltElecObjs");
|
143 |
|
|
hltModE->SetAbortIfNotAccepted(isData);
|
144 |
|
|
|
145 |
|
|
HLTMod *hltModES = new HLTMod("HLTModES");
|
146 |
|
|
hltModES->AddTrigger("HLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v*",160000,999999);
|
147 |
|
|
hltModES->AddTrigger("HLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v2",160000,999999);
|
148 |
|
|
hltModES->AddTrigger("HLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v3",160000,999999);
|
149 |
|
|
hltModES->AddTrigger("HLT_Ele25_WP80_PFMT40_v*",160000,999999);
|
150 |
|
|
hltModES->AddTrigger("HLT_Ele27_WP80_PFMT50_v*",160000,999999);
|
151 |
|
|
hltModES->SetTrigObjsName("MyHltElecSObjs");
|
152 |
|
|
hltModES->SetAbortIfNotAccepted(isData);
|
153 |
|
|
|
154 |
|
|
HLTMod *hltModP = new HLTMod("HLTModP");
|
155 |
|
|
|
156 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdL_IsoVL_Photon18_CaloIdL_IsoVL_v*",160000,161176);
|
157 |
|
|
|
158 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdL_IsoVL_Photon18_CaloIdL_IsoVL_v*",161216,165633);
|
159 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdL_IsoVL_Photon18_R9Id_v*",161216,165633);
|
160 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9Id_Photon18_CaloIdL_IsoVL_v*",161216,165633);
|
161 |
|
|
hltModP->AddTrigger("HLT_Photon20_R9Id_Photon18_R9Id_v*",161216,165633);
|
162 |
|
|
|
163 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdL_IsoVL_Photon18_CaloIdL_IsoVL_v*",165970,173198);
|
164 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdL_IsoVL_Photon18_R9Id_v*",165970,173198);
|
165 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9Id_Photon18_CaloIdL_IsoVL_v*",165970,173198);
|
166 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9Id_Photon18_R9Id_v*",165970,173198);
|
167 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_CaloIdL_IsoVL_v*",165970,173198);
|
168 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_CaloIdL_IsoVL_v*",165970,173198);
|
169 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_R9Id_v*",165970,173198);
|
170 |
|
|
|
171 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloId_IsoVL_Photon22_R9Id_v*",165970,166967);
|
172 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_R9Id_v*",167039,173198);
|
173 |
|
|
|
174 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdXL_IsoXL_Photon18_CaloIdXL_IsoXL_v*",173236,178380);
|
175 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdXL_IsoXL_Photon18_R9Id_v*",173236,178380);
|
176 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9Id_Photon18_CaloIdXL_IsoXL_v*",173236,178380);
|
177 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9Id_Photon18_R9Id_v*",173236,178380);
|
178 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_CaloIdL_IsoVL_v*",173236,178380);
|
179 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_R9Id_v*",173236,178380);
|
180 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_CaloIdL_IsoVL_v*",173236,178380);
|
181 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_R9Id_v*",173236,178380);
|
182 |
|
|
|
183 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdXL_IsoXL_Photon18_CaloIdXL_IsoXL_Mass60_v*",178420,999999);
|
184 |
|
|
hltModP->AddTrigger("HLT_Photon26_CaloIdXL_IsoXL_Photon18_R9IdT_Mass60_v*",178420,999999);
|
185 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9IdT_Photon18_CaloIdXL_IsoXL_Mass60_v*",178420,999999);
|
186 |
|
|
hltModP->AddTrigger("HLT_Photon26_R9IdT_Photon18_R9IdT_Mass60_v*",178420,999999);
|
187 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_CaloIdL_IsoVL_v*",178420,999999);
|
188 |
|
|
hltModP->AddTrigger("HLT_Photon36_CaloIdL_IsoVL_Photon22_R9Id_v*",178420,999999);
|
189 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_CaloIdL_IsoVL_v*",178420,999999);
|
190 |
|
|
hltModP->AddTrigger("HLT_Photon36_R9Id_Photon22_R9Id_v*",178420,999999);
|
191 |
|
|
|
192 |
|
|
hltModP->SetTrigObjsName("MyHltPhotObjs");
|
193 |
|
|
hltModP->SetAbortIfNotAccepted(isData);
|
194 |
|
|
|
195 |
|
|
//------------------------------------------------------------------------------------------------
|
196 |
|
|
// select events with a good primary vertex
|
197 |
|
|
//------------------------------------------------------------------------------------------------
|
198 |
|
|
GoodPVFilterMod *goodPVFilterMod = new GoodPVFilterMod;
|
199 |
|
|
goodPVFilterMod->SetMinVertexNTracks(0);
|
200 |
|
|
goodPVFilterMod->SetMinNDof (4.0);
|
201 |
|
|
goodPVFilterMod->SetMaxAbsZ (24.0);
|
202 |
|
|
goodPVFilterMod->SetMaxRho (2.0);
|
203 |
|
|
goodPVFilterMod->SetAbortIfNotAccepted(kFALSE);
|
204 |
|
|
goodPVFilterMod->SetIsMC(!isData);
|
205 |
|
|
|
206 |
|
|
GoodPVFilterMod *goodPVFilterModE = new GoodPVFilterMod("GoodPVFilterModE");
|
207 |
|
|
goodPVFilterModE->SetOutputName("GoodVertexesE");
|
208 |
|
|
goodPVFilterModE->SetMinVertexNTracks(0);
|
209 |
|
|
goodPVFilterModE->SetMinNDof (4.0);
|
210 |
|
|
goodPVFilterModE->SetMaxAbsZ (24.0);
|
211 |
|
|
goodPVFilterModE->SetMaxRho (2.0);
|
212 |
|
|
goodPVFilterModE->SetIsMC(!isData);
|
213 |
|
|
|
214 |
|
|
GoodPVFilterMod *goodPVFilterModES = new GoodPVFilterMod("GoodPVFilterModES");
|
215 |
|
|
goodPVFilterModES->SetOutputName("GoodVertexesES");
|
216 |
|
|
goodPVFilterModES->SetMinVertexNTracks(0);
|
217 |
|
|
goodPVFilterModES->SetMinNDof (4.0);
|
218 |
|
|
goodPVFilterModES->SetMaxAbsZ (24.0);
|
219 |
|
|
goodPVFilterModES->SetMaxRho (2.0);
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
//------------------------------------------------------------------------------------------------
|
223 |
|
|
// object id and cleaning sequence
|
224 |
|
|
//------------------------------------------------------------------------------------------------
|
225 |
|
|
MuonIDMod *muonId = new MuonIDMod;
|
226 |
|
|
muonId->SetClassType ("Global");
|
227 |
|
|
muonId->SetIDType ("ZMuId");
|
228 |
|
|
muonId->SetIsoType ("TrackCaloSliding");
|
229 |
|
|
muonId->SetApplyD0Cut(kTRUE);
|
230 |
|
|
|
231 |
|
|
ElectronIDMod *elecId = new ElectronIDMod;
|
232 |
|
|
elecId->SetVertexName(goodPVFilterModE->GetOutputName());
|
233 |
|
|
elecId->SetIDType ("VBTFWorkingPointLowPtId");
|
234 |
|
|
elecId->SetIsoType ("PFIso");
|
235 |
|
|
elecId->SetNExpectedHitsInnerCut (0);
|
236 |
|
|
elecId->SetEtaMax(999.);
|
237 |
|
|
elecId->SetChargeFilter(kFALSE);
|
238 |
|
|
elecId->SetApplySpikeRemoval(kFALSE);
|
239 |
|
|
elecId->SetApplyEcalFiducial(kTRUE);
|
240 |
|
|
elecId->SetApplyEcalSeeded(kTRUE);
|
241 |
|
|
elecId->SetPtMin(20.0);
|
242 |
|
|
|
243 |
|
|
ElectronIDMod *elecIdS = new ElectronIDMod("ElectronIDModS");
|
244 |
|
|
elecIdS->SetVertexName(goodPVFilterModES->GetOutputName());
|
245 |
|
|
elecIdS->SetIDType ("VBTFWorkingPoint70Id");
|
246 |
|
|
elecIdS->SetIsoType ("VBTFWorkingPoint70Iso");
|
247 |
|
|
elecIdS->SetNExpectedHitsInnerCut (0);
|
248 |
|
|
elecIdS->SetEtaMax(999.);
|
249 |
|
|
elecIdS->SetChargeFilter(kFALSE);
|
250 |
|
|
elecIdS->SetApplySpikeRemoval(kFALSE);
|
251 |
|
|
elecIdS->SetApplyEcalFiducial(kTRUE);
|
252 |
|
|
elecIdS->SetApplyEcalSeeded(kTRUE);
|
253 |
|
|
elecIdS->SetPtMin(20.0);
|
254 |
|
|
elecIdS->SetOutputName("GoodElectronsS");
|
255 |
|
|
|
256 |
|
|
PublisherMod<PFJet,Jet> *pubJet = new PublisherMod<PFJet,Jet>("JetPub");
|
257 |
|
|
pubJet->SetInputName("AKt5PFJets");
|
258 |
|
|
pubJet->SetOutputName("PubAKt5PFJets");
|
259 |
|
|
|
260 |
|
|
PublisherMod<PFJet,Jet> *pubJetOpen = new PublisherMod<PFJet,Jet>("JetPubOpen");
|
261 |
|
|
pubJetOpen->SetInputName("AKt5PFJets");
|
262 |
|
|
pubJetOpen->SetOutputName("PubAKt5PFJetsOpen");
|
263 |
|
|
|
264 |
|
|
JetCorrectionMod *jetCorr = new JetCorrectionMod;
|
265 |
|
|
jetCorr->AddCorrectionFromFile(std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/START42_V12_AK5PF_L1FastJet.txt")).Data()));
|
266 |
|
|
jetCorr->AddCorrectionFromFile(std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/START42_V12_AK5PF_L2Relative.txt")).Data()));
|
267 |
|
|
jetCorr->AddCorrectionFromFile(std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/START42_V12_AK5PF_L3Absolute.txt")).Data()));
|
268 |
|
|
if(isData){
|
269 |
|
|
jetCorr->AddCorrectionFromFile(std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/START42_V12_AK5PF_L2L3Residual.txt")).Data()));
|
270 |
|
|
}
|
271 |
|
|
jetCorr->SetInputName(pubJet->GetOutputName());
|
272 |
|
|
jetCorr->SetCorrectedName("CorrectedJets");
|
273 |
|
|
|
274 |
|
|
Bool_t excludedoubleprompt = kFALSE;
|
275 |
|
|
if (TString(dataset).Contains("-pj")) {
|
276 |
|
|
mcselmod->ExcludeProcess(18);
|
277 |
|
|
mcselmod->ExcludeProcess(114);
|
278 |
|
|
excludedoubleprompt = kTRUE;
|
279 |
|
|
}
|
280 |
|
|
|
281 |
|
|
if (TString(dataset).Contains("-qcd2em") || TString(dataset).Contains("-qcd-2em")) {
|
282 |
|
|
excludedoubleprompt = kTRUE;
|
283 |
|
|
}
|
284 |
|
|
|
285 |
|
|
PhotonMvaMod *photreg = new PhotonMvaMod;
|
286 |
|
|
photreg->SetOutputName("GoodPhotonsRegr");
|
287 |
|
|
photreg->SetIsData(isData);
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
PhotonPairSelector *photcic = new PhotonPairSelector("PhotonPairSelectorCiC");
|
291 |
|
|
photcic->SetOutputName("GoodPhotonsCIC");
|
292 |
|
|
photcic->SetPhotonSelType("CiCSelection");
|
293 |
|
|
photcic->SetVertexSelType("CiCMVASelection");
|
294 |
|
|
photcic->DoMCSmear(kTRUE);
|
295 |
|
|
photcic->DoDataEneCorr(kTRUE);
|
296 |
|
|
photcic->SetPhotonsFromBranch(kFALSE);
|
297 |
|
|
photcic->SetInputPhotonsName(photreg->GetOutputName());
|
298 |
|
|
photcic->SetMCSmearFactors(0.0089, 0.0089, 0.0109, 0.0156, 0.0203,0.0303,0.0326,0.0318,0.0331);
|
299 |
|
|
photcic->AddEnCorrPerRun(160000,167913,0.9905,0.9905,0.9971,0.9976,1.0094,0.9994,1.0044,0.9968,1.0079);
|
300 |
|
|
photcic->AddEnCorrPerRun(170249,172619,0.9909,0.9909,0.9975,0.9994,1.0112,0.9962,1.0012,0.9962,1.0072);
|
301 |
|
|
photcic->AddEnCorrPerRun(172620,173692,0.9909,0.9909,0.9975,0.9977,1.0096,0.9963,1.0013,0.9947,1.0057);
|
302 |
|
|
photcic->AddEnCorrPerRun(175860,177139,0.9911,0.9911,0.9977,0.9990,1.0109,0.9922,0.9973,0.9967,1.0077);
|
303 |
|
|
photcic->AddEnCorrPerRun(177140,178421,0.9910,0.9910,0.9975,0.9987,1.0105,0.9921,0.9972,0.9975,1.0085);
|
304 |
|
|
photcic->AddEnCorrPerRun(178424,999999,0.9903,0.9903,0.9969,0.9976,1.0095,0.9889,0.9940,0.9976,1.0086);
|
305 |
|
|
photcic->SetDoMCR9Scaling(kTRUE);
|
306 |
|
|
photcic->SetMCR9Scale(1.0048, 1.00492);
|
307 |
|
|
photcic->SetDoMCErrScaling(kTRUE);
|
308 |
bendavid |
1.5 |
photcic->SetMCErrScale(1.07, 1.045);
|
309 |
bendavid |
1.1 |
photcic->SetIsData(isData);
|
310 |
|
|
|
311 |
|
|
PhotonPairSelector *photcicnoeleveto = new PhotonPairSelector("PhotonPairSelectorCiCNoEleVeto");
|
312 |
|
|
photcicnoeleveto->SetOutputName("GoodPhotonsCICNoEleVeto");
|
313 |
|
|
photcicnoeleveto->SetPhotonSelType("CiCSelection");
|
314 |
|
|
photcicnoeleveto->SetVertexSelType("CiCMVASelection");
|
315 |
|
|
photcicnoeleveto->DoMCSmear(kTRUE);
|
316 |
|
|
photcicnoeleveto->DoDataEneCorr(kTRUE);
|
317 |
|
|
photcicnoeleveto->SetPhotonsFromBranch(kFALSE);
|
318 |
|
|
photcicnoeleveto->SetInputPhotonsName(photreg->GetOutputName());
|
319 |
|
|
photcicnoeleveto->SetMCSmearFactors(0.0089, 0.0089, 0.0109, 0.0156, 0.0203,0.0303,0.0326,0.0318,0.0331);
|
320 |
|
|
photcicnoeleveto->AddEnCorrPerRun(160000,167913,0.9905,0.9905,0.9971,0.9976,1.0094,0.9994,1.0044,0.9968,1.0079);
|
321 |
|
|
photcicnoeleveto->AddEnCorrPerRun(170249,172619,0.9909,0.9909,0.9975,0.9994,1.0112,0.9962,1.0012,0.9962,1.0072);
|
322 |
|
|
photcicnoeleveto->AddEnCorrPerRun(172620,173692,0.9909,0.9909,0.9975,0.9977,1.0096,0.9963,1.0013,0.9947,1.0057);
|
323 |
|
|
photcicnoeleveto->AddEnCorrPerRun(175860,177139,0.9911,0.9911,0.9977,0.9990,1.0109,0.9922,0.9973,0.9967,1.0077);
|
324 |
|
|
photcicnoeleveto->AddEnCorrPerRun(177140,178421,0.9910,0.9910,0.9975,0.9987,1.0105,0.9921,0.9972,0.9975,1.0085);
|
325 |
|
|
photcicnoeleveto->AddEnCorrPerRun(178424,999999,0.9903,0.9903,0.9969,0.9976,1.0095,0.9889,0.9940,0.9976,1.0086);
|
326 |
|
|
photcicnoeleveto->SetDoMCR9Scaling(kTRUE);
|
327 |
|
|
photcicnoeleveto->SetMCR9Scale(1.0048, 1.00492);
|
328 |
|
|
photcicnoeleveto->SetDoMCErrScaling(kTRUE);
|
329 |
bendavid |
1.5 |
photcicnoeleveto->SetMCErrScale(1.07, 1.045);
|
330 |
bendavid |
1.1 |
photcicnoeleveto->SetApplyEleVeto(kFALSE);
|
331 |
|
|
photcicnoeleveto->SetIsData(isData);
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
PhotonPairSelector *photpresel = new PhotonPairSelector("PhotonPairSelectorPresel");
|
335 |
|
|
photpresel->SetOutputName("GoodPhotonsPresel");
|
336 |
|
|
photpresel->SetPhotonSelType("MITSelection");
|
337 |
|
|
photpresel->SetVertexSelType("CiCMVASelection");
|
338 |
|
|
photpresel->DoMCSmear(kTRUE);
|
339 |
|
|
photpresel->DoDataEneCorr(kTRUE);
|
340 |
|
|
photpresel->SetPhotonsFromBranch(kFALSE);
|
341 |
|
|
photpresel->SetInputPhotonsName(photreg->GetOutputName());
|
342 |
mingyang |
1.6 |
//photpresel->SetMCSmearFactors(0.0045, 0.0084, 0.0109, 0.0156, 0.0203,0.0303,0.0326,0.0318,0.0331);
|
343 |
|
|
photpresel->SetMCSmearFactors(0.0067,0.0077,0.0096,0.0141,0.0196,0.0268,0.0279,0.0293,0.0301);//ming:smear(sigE/E)
|
344 |
|
|
//photpresel->AddEnCorrPerRun(160000,167913,0.9905,0.9905,0.9971,0.9976,1.0094,0.9994,1.0044,0.9968,1.0079);
|
345 |
|
|
//photpresel->AddEnCorrPerRun(170249,172619,0.9909,0.9909,0.9975,0.9994,1.0112,0.9962,1.0012,0.9962,1.0072);
|
346 |
|
|
//photpresel->AddEnCorrPerRun(172620,173692,0.9909,0.9909,0.9975,0.9977,1.0096,0.9963,1.0013,0.9947,1.0057);
|
347 |
|
|
//photpresel->AddEnCorrPerRun(175860,177139,0.9911,0.9911,0.9977,0.9990,1.0109,0.9922,0.9973,0.9967,1.0077);
|
348 |
|
|
//photpresel->AddEnCorrPerRun(177140,178421,0.9910,0.9910,0.9975,0.9987,1.0105,0.9921,0.9972,0.9975,1.0085);
|
349 |
|
|
//photpresel->AddEnCorrPerRun(178424,999999,0.9903,0.9903,0.9969,0.9976,1.0095,0.9889,0.9940,0.9976,1.0086);
|
350 |
|
|
photpresel->AddEnCorrPerRun(160431,167913,0.9941,0.9941,1.0004,0.9916,1.0045,1.0033,1.0082,0.9958,1.0064);//ming:Emc/Edata
|
351 |
|
|
photpresel->AddEnCorrPerRun(170000,172619,0.9954,0.9954,1.0016,0.9937,1.0066,0.9976,1.0025,0.9940,1.0046);
|
352 |
|
|
photpresel->AddEnCorrPerRun(172620,173692,0.9955,0.9955,1.0017,0.9929,1.0058,0.9986,1.0035,0.9923,1.0029);
|
353 |
|
|
photpresel->AddEnCorrPerRun(175830,177139,0.9958,0.9958,1.0021,0.9944,1.0073,0.9968,1.0017,0.9933,1.004);
|
354 |
|
|
photpresel->AddEnCorrPerRun(177140,178421,0.9962,0.9962,1.0025,0.9946,1.0075,0.9960,1.0010,0.9944,1.005);
|
355 |
|
|
photpresel->AddEnCorrPerRun(178424,180252,0.9961,0.9961,1.0024,0.9942,1.0071,0.9921,0.9970,0.9953,1.0059);
|
356 |
bendavid |
1.1 |
photpresel->SetDoMCR9Scaling(kTRUE);
|
357 |
bendavid |
1.3 |
photpresel->SetMCR9Scale(1.0035, 1.0035);
|
358 |
|
|
photpresel->SetDoMCSigIEtaIEtaScaling(kTRUE);
|
359 |
bendavid |
1.4 |
photpresel->SetDoMCWidthScaling(kTRUE);
|
360 |
bendavid |
1.1 |
photpresel->SetDoMCErrScaling(kTRUE);
|
361 |
bendavid |
1.5 |
photpresel->SetMCErrScale(1.07, 1.045);
|
362 |
bendavid |
1.1 |
photpresel->SetIsData(isData);
|
363 |
|
|
|
364 |
|
|
PhotonPairSelector *photpreselinverteleveto = new PhotonPairSelector("PhotonPairSelectorPreselInvertEleVeto");
|
365 |
|
|
photpreselinverteleveto->SetOutputName("GoodPhotonsPreselInvertEleVeto");
|
366 |
|
|
photpreselinverteleveto->SetPhotonSelType("MITSelection");
|
367 |
|
|
photpreselinverteleveto->SetVertexSelType("CiCMVASelection");
|
368 |
|
|
photpreselinverteleveto->DoMCSmear(kTRUE);
|
369 |
|
|
photpreselinverteleveto->DoDataEneCorr(kTRUE);
|
370 |
|
|
photpreselinverteleveto->SetPhotonsFromBranch(kFALSE);
|
371 |
|
|
photpreselinverteleveto->SetInputPhotonsName(photreg->GetOutputName());
|
372 |
|
|
photpreselinverteleveto->SetMCSmearFactors(0.0045, 0.0084, 0.0109, 0.0156, 0.0203,0.0303,0.0326,0.0318,0.0331);
|
373 |
bendavid |
1.5 |
photpreselinverteleveto->AddEnCorrPerRun(160000,167913,0.9905,0.9905,0.9971,0.9976,1.0094,0.9994,1.0044,0.9968,1.0079);
|
374 |
|
|
photpreselinverteleveto->AddEnCorrPerRun(170249,172619,0.9909,0.9909,0.9975,0.9994,1.0112,0.9962,1.0012,0.9962,1.0072);
|
375 |
|
|
photpreselinverteleveto->AddEnCorrPerRun(172620,173692,0.9909,0.9909,0.9975,0.9977,1.0096,0.9963,1.0013,0.9947,1.0057);
|
376 |
|
|
photpreselinverteleveto->AddEnCorrPerRun(175860,177139,0.9911,0.9911,0.9977,0.9990,1.0109,0.9922,0.9973,0.9967,1.0077);
|
377 |
|
|
photpreselinverteleveto->AddEnCorrPerRun(177140,178421,0.9910,0.9910,0.9975,0.9987,1.0105,0.9921,0.9972,0.9975,1.0085);
|
378 |
|
|
photpreselinverteleveto->AddEnCorrPerRun(178424,999999,0.9903,0.9903,0.9969,0.9976,1.0095,0.9889,0.9940,0.9976,1.0086);
|
379 |
bendavid |
1.1 |
photpreselinverteleveto->SetDoMCR9Scaling(kTRUE);
|
380 |
bendavid |
1.3 |
photpreselinverteleveto->SetMCR9Scale(1.0035, 1.0035);
|
381 |
|
|
photpreselinverteleveto->SetDoMCSigIEtaIEtaScaling(kTRUE);
|
382 |
bendavid |
1.4 |
photpreselinverteleveto->SetDoMCWidthScaling(kTRUE);
|
383 |
bendavid |
1.1 |
photpreselinverteleveto->SetDoMCErrScaling(kTRUE);
|
384 |
bendavid |
1.5 |
photpreselinverteleveto->SetMCErrScale(1.07, 1.045);
|
385 |
bendavid |
1.1 |
photpreselinverteleveto->SetApplyEleVeto(kFALSE);
|
386 |
|
|
photpreselinverteleveto->SetInvertElectronVeto(kTRUE);
|
387 |
|
|
photpreselinverteleveto->SetIsData(isData);
|
388 |
|
|
|
389 |
bendavid |
1.3 |
PhotonPairSelector *photpreselnosmear = new PhotonPairSelector("PhotonPairSelectorPreselNoSmear");
|
390 |
|
|
photpreselnosmear->SetOutputName("GoodPhotonsPreselNoSmear");
|
391 |
|
|
photpreselnosmear->SetPhotonSelType("MITSelection");
|
392 |
|
|
photpreselnosmear->SetVertexSelType("CiCMVASelection");
|
393 |
|
|
photpreselnosmear->SetPhotonsFromBranch(kFALSE);
|
394 |
|
|
photpreselnosmear->SetInputPhotonsName(photreg->GetOutputName());
|
395 |
|
|
photpreselnosmear->SetIsData(isData);
|
396 |
|
|
|
397 |
|
|
|
398 |
bendavid |
1.1 |
PhotonTreeWriter *phottreecic = new PhotonTreeWriter("PhotonTreeWriterCiC");
|
399 |
|
|
phottreecic->SetPhotonsFromBranch(kFALSE);
|
400 |
|
|
phottreecic->SetInputPhotonsName(photcic->GetOutputName());
|
401 |
|
|
phottreecic->SetEnableJets(kTRUE);
|
402 |
|
|
phottreecic->SetPFJetsFromBranch(kFALSE);
|
403 |
|
|
phottreecic->SetPFJetName(jetCorr->GetOutputName());
|
404 |
|
|
phottreecic->SetExcludeDoublePrompt(excludedoubleprompt);
|
405 |
|
|
phottreecic->SetIsData(isData);
|
406 |
|
|
|
407 |
|
|
PhotonTreeWriter *phottreecicnoeleveto = new PhotonTreeWriter("PhotonTreeWriterCiCNoEleVeto");
|
408 |
|
|
phottreecicnoeleveto->SetPhotonsFromBranch(kFALSE);
|
409 |
|
|
phottreecicnoeleveto->SetInputPhotonsName(photcicnoeleveto->GetOutputName());
|
410 |
|
|
phottreecicnoeleveto->SetEnableJets(kTRUE);
|
411 |
|
|
phottreecicnoeleveto->SetPFJetsFromBranch(kFALSE);
|
412 |
|
|
phottreecicnoeleveto->SetPFJetName(jetCorr->GetOutputName());
|
413 |
|
|
phottreecicnoeleveto->SetApplyElectronVeto(kFALSE);
|
414 |
|
|
phottreecicnoeleveto->SetExcludeDoublePrompt(excludedoubleprompt);
|
415 |
|
|
phottreecicnoeleveto->SetIsData(isData);
|
416 |
|
|
|
417 |
|
|
PhotonTreeWriter *phottreepresel = new PhotonTreeWriter("PhotonTreeWriterPresel");
|
418 |
|
|
phottreepresel->SetPhotonsFromBranch(kFALSE);
|
419 |
|
|
phottreepresel->SetInputPhotonsName(photpresel->GetOutputName());
|
420 |
|
|
phottreepresel->SetEnableJets(kTRUE);
|
421 |
|
|
phottreepresel->SetPFJetsFromBranch(kFALSE);
|
422 |
|
|
phottreepresel->SetPFJetName(jetCorr->GetOutputName());
|
423 |
|
|
phottreepresel->SetExcludeDoublePrompt(excludedoubleprompt);
|
424 |
|
|
phottreepresel->SetIsData(isData);
|
425 |
|
|
|
426 |
|
|
PhotonTreeWriter *phottreepreselinverteleveto = new PhotonTreeWriter("PhotonTreeWriterPreselInvertEleVeto");
|
427 |
|
|
phottreepreselinverteleveto->SetPhotonsFromBranch(kFALSE);
|
428 |
|
|
phottreepreselinverteleveto->SetInputPhotonsName(photpreselinverteleveto->GetOutputName());
|
429 |
|
|
phottreepreselinverteleveto->SetEnableJets(kTRUE);
|
430 |
|
|
phottreepreselinverteleveto->SetPFJetsFromBranch(kFALSE);
|
431 |
|
|
phottreepreselinverteleveto->SetPFJetName(jetCorr->GetOutputName());
|
432 |
|
|
phottreepreselinverteleveto->SetApplyElectronVeto(kFALSE);
|
433 |
|
|
phottreepreselinverteleveto->SetExcludeDoublePrompt(excludedoubleprompt);
|
434 |
bendavid |
1.3 |
phottreepreselinverteleveto->SetIsData(isData);
|
435 |
|
|
|
436 |
|
|
PhotonTreeWriter *phottreepreselnosmear = new PhotonTreeWriter("PhotonTreeWriterPreselNoSmear");
|
437 |
|
|
phottreepreselnosmear->SetPhotonsFromBranch(kFALSE);
|
438 |
|
|
phottreepreselnosmear->SetInputPhotonsName(photpreselnosmear->GetOutputName());
|
439 |
|
|
phottreepreselnosmear->SetEnableJets(kTRUE);
|
440 |
|
|
phottreepreselnosmear->SetPFJetsFromBranch(kFALSE);
|
441 |
|
|
phottreepreselnosmear->SetPFJetName(jetCorr->GetOutputName());
|
442 |
|
|
phottreepreselnosmear->SetExcludeDoublePrompt(excludedoubleprompt);
|
443 |
|
|
phottreepreselnosmear->SetIsData(isData);
|
444 |
bendavid |
1.1 |
|
445 |
|
|
|
446 |
|
|
PhotonIDMod *photidcic = new PhotonIDMod("PhotonIDModPresel");
|
447 |
|
|
photidcic->SetPtMin(25.0);
|
448 |
|
|
photidcic->SetOutputName("GoodPhotonsPreselid");
|
449 |
|
|
photidcic->SetOutputName("MITSelection");
|
450 |
|
|
photidcic->SetApplyElectronVeto(kTRUE);
|
451 |
|
|
photidcic->SetIsData(isData);
|
452 |
|
|
|
453 |
|
|
PhotonTreeWriter *phottreesingle = new PhotonTreeWriter("PhotonTreeWriterSingle");
|
454 |
|
|
phottreesingle->SetWriteDiphotonTree(kFALSE);
|
455 |
|
|
phottreesingle->SetPhotonsFromBranch(kFALSE);
|
456 |
|
|
phottreesingle->SetInputPhotonsName(photidcic->GetOutputName());
|
457 |
|
|
phottreesingle->SetIsData(isData);
|
458 |
|
|
|
459 |
|
|
PhotonTreeWriter *phottreeE = new PhotonTreeWriter("PhotonTreeWriterE");
|
460 |
|
|
phottreeE->SetGoodElectronsFromBranch(kFALSE);
|
461 |
|
|
phottreeE->SetGoodElectronName(elecId->GetOutputName());
|
462 |
|
|
phottreeE->SetLoopOnGoodElectrons(kTRUE);
|
463 |
|
|
phottreeE->SetApplyElectronVeto(kFALSE);
|
464 |
|
|
phottreeE->SetIsData(isData);
|
465 |
|
|
|
466 |
|
|
PhotonTreeWriter *phottreeES = new PhotonTreeWriter("PhotonTreeWriterES");
|
467 |
|
|
phottreeES->SetWriteDiphotonTree(kFALSE);
|
468 |
|
|
phottreeES->SetGoodElectronsFromBranch(kFALSE);
|
469 |
|
|
phottreeES->SetGoodElectronName(elecIdS->GetOutputName());
|
470 |
|
|
phottreeES->SetLoopOnGoodElectrons(kTRUE);
|
471 |
|
|
phottreeES->SetApplyElectronVeto(kFALSE);
|
472 |
|
|
phottreeES->SetIsData(isData);
|
473 |
|
|
|
474 |
|
|
|
475 |
|
|
//------------------------------------------------------------------------------------------------
|
476 |
|
|
// making analysis chain
|
477 |
|
|
//------------------------------------------------------------------------------------------------
|
478 |
|
|
// this is how it always starts
|
479 |
|
|
runLumiSel ->Add(mcselmod);
|
480 |
|
|
|
481 |
|
|
if (TString(dataset).Contains("-h")) {
|
482 |
|
|
mcselmod ->Add(sysMod);
|
483 |
|
|
}
|
484 |
|
|
|
485 |
|
|
// high level trigger is always first
|
486 |
mingyang |
1.6 |
//mcselmod ->Add(hltModE);
|
487 |
|
|
//mcselmod ->Add(hltModES);
|
488 |
bendavid |
1.1 |
mcselmod ->Add(hltModP);
|
489 |
|
|
|
490 |
|
|
hltModP ->Add(goodPVFilterMod);
|
491 |
mingyang |
1.6 |
//hltModE ->Add(goodPVFilterModE);
|
492 |
bendavid |
1.1 |
//hltModES ->Add(goodPVFilterModES);
|
493 |
|
|
|
494 |
|
|
//goodPVFilterMod ->Add(muonId);
|
495 |
|
|
goodPVFilterMod->Add(photreg);
|
496 |
|
|
photreg->Add(pubJet);
|
497 |
|
|
pubJet->Add(jetCorr);
|
498 |
|
|
|
499 |
|
|
// simple object id modules
|
500 |
mingyang |
1.6 |
//goodPVFilterModE ->Add(elecId);
|
501 |
bendavid |
1.1 |
//goodPVFilterModES ->Add(elecIdS);
|
502 |
|
|
|
503 |
|
|
|
504 |
mingyang |
1.6 |
//jetCorr ->Add(photcic);
|
505 |
|
|
//jetCorr ->Add(photcicnoeleveto);
|
506 |
bendavid |
1.1 |
jetCorr ->Add(photpresel);
|
507 |
mingyang |
1.6 |
//jetCorr ->Add(photpreselinverteleveto);
|
508 |
|
|
//jetCorr ->Add(photpreselnosmear);
|
509 |
bendavid |
1.1 |
|
510 |
mingyang |
1.6 |
//photcic ->Add(phottreecic);
|
511 |
|
|
//photcicnoeleveto ->Add(phottreecicnoeleveto);
|
512 |
bendavid |
1.1 |
photpresel ->Add(phottreepresel);
|
513 |
mingyang |
1.6 |
//photpreselinverteleveto ->Add(phottreepreselinverteleveto);
|
514 |
|
|
//photpreselnosmear ->Add(phottreepreselnosmear);
|
515 |
bendavid |
1.3 |
|
516 |
bendavid |
1.1 |
|
517 |
mingyang |
1.6 |
//jetCorr ->Add(photidcic);
|
518 |
|
|
//photidcic ->Add(phottreesingle);
|
519 |
bendavid |
1.1 |
|
520 |
mingyang |
1.6 |
//elecId->Add(phottreeE);
|
521 |
bendavid |
1.1 |
//elecIdS->Add(phottreeES);
|
522 |
|
|
|
523 |
|
|
|
524 |
bendavid |
1.4 |
TFile::SetOpenTimeout(0);
|
525 |
|
|
TFile::SetCacheFileDir("./rootfilecache",kTRUE,kTRUE);
|
526 |
bendavid |
1.1 |
TFile::SetReadaheadSize(128*1024*1024);
|
527 |
|
|
|
528 |
|
|
//------------------------------------------------------------------------------------------------
|
529 |
|
|
// setup analysis
|
530 |
|
|
//------------------------------------------------------------------------------------------------
|
531 |
|
|
Analysis *ana = new Analysis;
|
532 |
|
|
ana->SetUseHLT(kTRUE);
|
533 |
|
|
ana->SetKeepHierarchy(kTRUE);
|
534 |
|
|
ana->SetSuperModule(runLumiSel);
|
535 |
|
|
ana->SetPrintScale(100);
|
536 |
|
|
if (nEvents >= 0)
|
537 |
|
|
ana->SetProcessNEvents(nEvents);
|
538 |
|
|
|
539 |
|
|
//------------------------------------------------------------------------------------------------
|
540 |
|
|
// organize input
|
541 |
|
|
//------------------------------------------------------------------------------------------------
|
542 |
|
|
Catalog *c = new Catalog(catalogDir);
|
543 |
|
|
TString skimdataset = TString(dataset)+TString("/") +TString(skim);
|
544 |
|
|
Dataset *d = NULL;
|
545 |
|
|
TString bookstr = book;
|
546 |
|
|
//if (TString(dataset).Contains("s11-h")) bookstr.ReplaceAll("local","t2mit");
|
547 |
|
|
if (TString(skim).CompareTo("noskim") == 0)
|
548 |
|
|
d = c->FindDataset(bookstr,dataset,fileset);
|
549 |
|
|
else
|
550 |
|
|
d = c->FindDataset(bookstr,skimdataset.Data(),fileset);
|
551 |
|
|
ana->AddDataset(d);
|
552 |
bendavid |
1.5 |
//ana->AddFile("/mnt/hadoop/cmsprod/filefi/025/r11b-pho-n30-v1/4863E9D1-BC1C-E111-99BA-001A92810AF4.root");
|
553 |
bendavid |
1.1 |
|
554 |
|
|
//------------------------------------------------------------------------------------------------
|
555 |
|
|
// organize output
|
556 |
|
|
//------------------------------------------------------------------------------------------------
|
557 |
|
|
TString rootFile = TString(outputName);
|
558 |
|
|
rootFile += TString("_") + TString(dataset) + TString("_") + TString(skim);
|
559 |
|
|
if (TString(fileset) != TString(""))
|
560 |
|
|
rootFile += TString("_") + TString(fileset);
|
561 |
|
|
rootFile += TString(".root");
|
562 |
|
|
ana->SetOutputName(rootFile.Data());
|
563 |
|
|
//ana->SetCacheSize(64*1024*1024);
|
564 |
|
|
ana->SetCacheSize(0);
|
565 |
|
|
|
566 |
|
|
//------------------------------------------------------------------------------------------------
|
567 |
|
|
// Say what we are doing
|
568 |
|
|
//------------------------------------------------------------------------------------------------
|
569 |
|
|
printf("\n==== PARAMETER SUMMARY FOR THIS JOB ====\n");
|
570 |
|
|
printf("\n JSON file: %s\n and overlap cut: %f (%s)\n",jsonFile.Data(),overlapCut,overlap);
|
571 |
|
|
printf("\n Rely on Catalog: %s\n",catalogDir);
|
572 |
|
|
printf(" -> Book: %s Dataset: %s Skim: %s Fileset: %s <-\n",book,dataset,skim,fileset);
|
573 |
|
|
printf("\n Root output: %s\n\n",rootFile.Data());
|
574 |
|
|
printf("\n========================================\n");
|
575 |
|
|
|
576 |
|
|
//------------------------------------------------------------------------------------------------
|
577 |
|
|
// run the analysis after successful initialisation
|
578 |
|
|
//------------------------------------------------------------------------------------------------
|
579 |
|
|
ana->Run(!gROOT->IsBatch());
|
580 |
|
|
|
581 |
|
|
return;
|
582 |
|
|
}
|