ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/applySelection.cc
Revision: 1.53
Committed: Tue Jul 24 11:54:17 2012 UTC (12 years, 9 months ago) by dkralph
Content type: text/plain
Branch: MAIN
Changes since 1.52: +41 -40 lines
Log Message:
Fix bug in trigger info gettage.

File Contents

# Content
1 //
2 // System headers
3 //
4 #include <vector> // STL vector class
5 #include <iostream> // standard I/O
6 #include <iomanip> // functions to format standard I/O
7 #include <bitset>
8 #include <map>
9 using namespace std;
10
11 //
12 // root headers
13 //
14 #include <TFile.h>
15 #include <TTree.h>
16 #include <TChain.h>
17 #include <TBranch.h>
18 #include <TClonesArray.h>
19
20
21 //
22 // TMVA
23 //
24 #include "TMVA/Reader.h"
25 #include "TMVA/Tools.h"
26 #include "TMVA/Config.h"
27 #include "TMVA/MethodBDT.h"
28
29 //
30 // ntuple format headers
31 //
32 #include "EventHeader.h"
33 #include "Electron.h"
34 #include "Muon.h"
35 #include "Vertex.h"
36 #include "PFMet.h"
37 #include "PFCandidate.h"
38 #include "PFCandidateCol.h"
39 #include "PileupInfoCol.h"
40 #include "PileupEnergyDensity.h"
41 #include "MCParticle.h"
42 #include "TriggerMask.h"
43 #include "TriggerTable.h"
44 #include "TriggerObject.h"
45 #include "TriggerObjectRel.h"
46 #include "Names.h"
47 #include "BaseMod.h"
48 #include "TriggerObjectsTable.h"
49
50 //
51 // our headers
52 //
53 #include "ParseArgs.h"
54 #include "MuonSelection.h"
55 #include "ElectronSelection.h"
56 #include "IsolationSelection.h"
57 #include "ReferenceSelection.h"
58
59 #include "TriggerUtils.h"
60 #include "PassHLT.h"
61 #include "Angles.h"
62 #include "KinematicsStruct.h"
63 #include "InfoStruct.h"
64 #include "GenInfoStruct.h"
65 #include "WeightStruct.h"
66 #include "AngleTuple.h"
67 #include "FOTuple.h"
68
69 #include "RunLumiRangeMap.h"
70 #include "SampleWeight.h"
71 #include "EfficiencyWeightsInterface.h"
72 #include "SelectionFuncs.h"
73
74 #include "SimpleLepton.h"
75
76 #ifndef CMSSW_BASE
77 #define CMSSW_BASE "../"
78 #endif
79
80 using namespace mithep;
81
82 //
83 // globals
84 //----------------------------------------------------------------------------
85 TH1D *hpu_2011, *hpu_2012;
86 RunLumiRangeMap rlrm;
87 vector<SimpleLepton> failingLeptons ; // for fake estimation
88 vector<SimpleLepton> passingLeptons; // for fake estimation
89 vector<unsigned> cutvec;
90 vector<vector<unsigned> > zcutvec;
91 vector<vector<unsigned> > zzcutvec;
92 map<unsigned,float> evtrhoMap;
93 vector<string> cutstrs;
94 bool passes_HLT_MC,passes_HLT;
95 vector<bool> PFnoPUflag;;
96
97 //
98 // prototypes
99 //----------------------------------------------------------------------------
100 void initRunLumiRangeMap(ControlFlags &ctrl);
101 //----------------------------------------------------------------------------
102
103
104 //
105 // MAIN
106 //----------------------------------------------------------------------------
107 int main(int argc, char** argv)
108 //----------------------------------------------------------------------------
109 {
110 cutstrs.push_back(string("skim0")); //0
111 cutstrs.push_back(string("skim1")); //1
112 cutstrs.push_back(string("skim2")); //1
113 cutstrs.push_back(string("trigger")); //2
114 // -------------------------------------------------
115 cutstrs.push_back(string("Z candidate")); //3
116 cutstrs.push_back(string("good Z1")); //4
117 // -------------------------------------------------
118 cutstrs.push_back(string("4l")); //5
119 cutstrs.push_back(string("ZZ candidate")); //6
120 cutstrs.push_back(string("good Z2")); //7
121 cutstrs.push_back(string("ZZ 20/10")); //8
122 cutstrs.push_back(string("resonance")); //9
123 cutstrs.push_back(string("m4l>70")); //10
124 cutstrs.push_back(string("m4l>100, mZ2 > 12")); //11
125
126
127
128
129 string cmsswpath(CMSSW_BASE);
130 cmsswpath.append("/src");
131 std::bitset<1024> triggerBits;
132 vector<vector<string> > inputFiles;
133 inputFiles.push_back(vector<string>());
134 map<string,unsigned> entrymap; // number of unskimmed entries in each file
135 for( int i=0; i<cutstrs.size(); i++ ) cutvec.push_back(0);
136 for( int i=0; i<2; i++ ) {
137 zcutvec.push_back(vector<unsigned>());
138 for( int j=0; j<cutstrs.size(); j++ ) zcutvec[i].push_back(0);
139 }
140 for( int i=0; i<3; i++ ) {
141 zzcutvec.push_back(vector<unsigned>());
142 for( int j=0; j<cutstrs.size(); j++ ) zzcutvec[i].push_back(0);
143 }
144
145
146 //
147 // args
148 //--------------------------------------------------------------------------------------------------------------
149 ControlFlags ctrl;
150 parse_args( argc, argv, ctrl );
151 if( ctrl.inputfiles.empty() &&ctrl.inputfile.empty() )
152 {
153 cerr << "usage: applySelection.exe <flags> " << endl;
154 cerr << "\tmandoatory flags : " << endl;
155 cerr << "\t--inputfiles | file containing a list of ntuples to run over" << endl;
156 cerr << "\t--inputfile | a file to run over" << endl;
157 cerr << "\t--outputfile | file to store selected evet" << endl;
158 return 1;
159 }
160 ctrl.dump();
161
162
163
164 //
165 // File I/O
166 //--------------------------------------------------------------------------------------------------------------
167 TChain * chain = new TChain("Events");
168 TChain * hltchain = new TChain("HLT");
169 TChain * runchain = new TChain(Names::gkRunTreeName);
170
171 string fname;
172 unsigned total_unskimmed=0;
173 if( !ctrl.inputfiles.empty() ) {
174 ifstream f(ctrl.inputfiles.c_str());
175 while (f >> fname) {
176 if( !(strncmp( fname.c_str(), "#", 1 ) ) ) continue; // skip commented lines
177 cout << "adding inputfile : " << fname.c_str() << endl;
178 entrymap[string(fname.c_str())] = unskimmedEntries(fname.c_str());
179 cout << "unskimmed entries: " << entrymap[string(fname.c_str())] << endl;
180 total_unskimmed += entrymap[string(fname.c_str())];
181 chain->AddFile(fname.c_str());
182 hltchain->AddFile(fname.c_str());
183 runchain->AddFile(fname.c_str());
184 }
185 } else {
186 cout << "adding inputfile : " << ctrl.inputfile.c_str() << endl;
187 unsigned unsk_ents = unskimmedEntries(ctrl.inputfile.c_str());
188 entrymap[string(ctrl.inputfile.c_str())] = unsk_ents;
189 cout << "unskimmed entries: " << unsk_ents << endl;
190 total_unskimmed += unsk_ents;
191 chain->AddFile(ctrl.inputfile.c_str());
192 hltchain->AddFile(ctrl.inputfile.c_str());
193 runchain->AddFile(ctrl.inputfile.c_str());
194 }
195 // // write the total number of unskimmed events that went into making this output file to a text file
196 writeEntries(ctrl,total_unskimmed);
197
198 const char * ofname;
199 if( strcmp( ctrl.outputfile.c_str(), "") ) {
200 ofname = ctrl.outputfile.c_str();
201 } else {
202 ofname = "tmp.root";
203 }
204 // table of cross section values
205 string xspath = (cmsswpath+string("/MitPhysics/data/xs.dat"));
206 cout << "xspath: " << xspath.c_str() << endl;
207 SimpleTable xstab(xspath.c_str());
208
209
210
211 //
212 // Setup
213 //--------------------------------------------------------------------------------------------------------------
214 Angles angles;
215 KinematicsStruct kinematics;
216 InfoStruct evtinfo;
217 WeightStruct weights;
218 GenInfoStruct geninfo;
219
220 AngleTuple nt( (const char*)ofname, (const char*)"zznt");
221 nt.makeAngleBranch(angles);
222 nt.makeKinematicsBranch(kinematics);
223 nt.makeInfoBranch(evtinfo);
224
225
226 FOTuple foTree( nt.getFile(), (const char*)"FOtree");
227 foTree.makeInfoBranch(evtinfo);
228 foTree.makeFailedLeptonBranch(failingLeptons);
229 foTree.makePassedLeptonBranch(passingLeptons);
230
231 TH1F * h_wf11_hpt;
232 if(ctrl.mc) {
233 nt.makeWeightBranch(weights);
234 if(ctrl.fillGen ) nt.makeGenInfoBranch(geninfo);
235 initEfficiencyWeights();
236 initPUWeights();
237
238 // Higgs only, pt reweighting
239 if( ctrl.mH <= 140 ) {
240 char wptname[256];
241 sprintf( wptname, "/data/blue/pharris/Flat/ntupler/root/weight_ptH_%i.root", ctrl.mH );
242 TFile * f_hpt = new TFile(wptname);
243 f_hpt->Print();
244 sprintf(wptname, "weight_hqt_fehipro_fit_%i", ctrl.mH);
245 h_wf11_hpt = (TH1F*)(f_hpt->FindObjectAny(wptname));
246 }
247
248 } else {
249 initRunLumiRangeMap(ctrl);
250 }
251
252 // initMuonIDMVA();
253 initElectronIDMVAV1();
254 initTrigger();
255 TrigInfo ti;
256 initAnalysisTriggers(ti);
257
258 //
259 // Setup tree I/O
260 //--------------------------------------------------------------------------------------------------------------
261 TFile *inputFile=0;
262 TTree *eventTree=0;
263 string currentFile("");
264
265 UInt_t fNMaxTriggers = 1024;
266 mithep::EventHeader *info = new mithep::EventHeader();
267 mithep::Array<mithep::PFMet> *metArr = new mithep::Array<mithep::PFMet>();
268 mithep::Array<mithep::Electron> *electronArr = new mithep::Array<mithep::Electron>();
269 mithep::Array<mithep::Muon> *muonArr = new mithep::Array<mithep::Muon>();
270 mithep::Array<mithep::Vertex> *vtxArr = new mithep::Array<mithep::Vertex>();
271 mithep::Array<mithep::PFCandidate> *pfArr = new mithep::Array<mithep::PFCandidate>();
272 mithep::Array<mithep::PileupInfo> *puArr = new mithep::Array<mithep::PileupInfo>();
273 mithep::Array<mithep::PileupEnergyDensity> *puDArr = new mithep::Array<mithep::PileupEnergyDensity>();
274 mithep::Array<mithep::Track> *trkArr = new mithep::Array<mithep::Track>();
275 mithep::Array<mithep::MCParticle> *mcArr = new mithep::Array<mithep::MCParticle>();
276 mithep::MCEventInfo *mcEvtInfo = new mithep::MCEventInfo();
277 mithep::TriggerMask *trigMask = new mithep::TriggerMask();
278 mithep::TriggerTable *hltTable = new mithep::TriggerTable(fNMaxTriggers);
279 vector<string> *hltTableStrings = new vector<string>();
280 vector<string> *hltLabelStrings = new vector<string>();
281 mithep::Array<mithep::TriggerObject> *hltObjArr = new mithep::Array<mithep::TriggerObject>();
282 mithep::Array<mithep::TriggerObjectRel> *hltRelsArr = new mithep::Array<mithep::TriggerObjectRel>();
283 std::vector<std::string> *hltTab = new vector<string>();
284 std::vector<std::string> *hltLab = new vector<string>();
285 TriggerObjectsTable *fTrigObjs = new TriggerObjectsTable(hltTable,fNMaxTriggers);
286
287 RunInfo *runInfo = new RunInfo();
288
289 TString fElectronName(Names::gkElectronBrn);
290 TString fMuonName(Names::gkMuonBrn);
291 TString fInfoName(Names::gkEvtHeaderBrn);
292 TString fPFMetName("PFMet");
293 TString fPrimVtxName(Names::gkPVBrn);
294 TString fPFCandidateName(Names::gkPFCandidatesBrn);
295 TString fPileupInfoName(Names::gkPileupInfoBrn);
296 TString fPileupEnergyDensityName(Names::gkPileupEnergyDensityBrn);
297 TString fTrackName(Names::gkTrackBrn);
298 TString fMCParticleName(Names::gkMCPartBrn);
299 TString fMCEvtInfoName(Names::gkMCEvtInfoBrn);
300 TString fTriggerMaskName(Names::gkHltBitBrn);
301 TString fTriggerTableName(Names::gkHltTableBrn);
302 TString fTriggerLabelName(Names::gkHltLabelBrn);
303 TString fTriggerObjectName(Names::gkHltObjBrn);
304 TString fTriggerObjectRelsName(Form("HLTObjectsRelation"));
305
306 // TString fHLTLabName(Names::gkHltLabelBrn);
307 // TString fHLTTabName(Names::gkHltTableBrn);
308 // TString fHLTTabNamePub(Form("%sFwk",fHLTTabName.Data()));
309 // TString fHLTLabNamePub(Form("%sFwk",fHLTLabName.Data()));
310 // TString fObjsNamePub(Form("%sFwk",fTriggerObjectName.Data()));
311
312
313
314 chain->SetBranchAddress(fInfoName, &info);
315 chain->SetBranchAddress(fPFMetName, &metArr);
316 chain->SetBranchAddress(fElectronName, &electronArr);
317 chain->SetBranchAddress(fMuonName, &muonArr);
318 chain->SetBranchAddress(fPrimVtxName, &vtxArr);
319 chain->SetBranchAddress(fPFCandidateName, &pfArr);
320 if( ctrl.mc ) {
321 chain->SetBranchAddress(fPileupInfoName, &puArr);
322 chain->SetBranchAddress(fMCParticleName, &mcArr);
323 chain->SetBranchAddress(fMCEvtInfoName, &mcEvtInfo);
324 }
325 chain->SetBranchAddress(fPileupEnergyDensityName, &puDArr);
326 chain->SetBranchAddress(fTrackName, &trkArr);
327 chain->SetBranchAddress(fTriggerMaskName, &trigMask);
328 chain->SetBranchAddress(fTriggerObjectName, &hltObjArr);
329 chain->SetBranchAddress(fTriggerObjectRelsName, &hltRelsArr);
330 // chain->SetBranchAddress(fHLTTabNamePub, &hltTab);
331 // chain->SetBranchAddress(fHLTLabNamePub, &hltLab);
332
333 cout << "hlttable: " << fTriggerTableName << endl;
334 hltchain->SetBranchAddress(fTriggerTableName, &hltTableStrings);
335 hltchain->SetBranchAddress(fTriggerLabelName, &hltLabelStrings);
336
337 runchain->SetBranchAddress(Names::gkRunInfoBrn, &runInfo);
338
339 mithep::Vertex vtx; // best primary vertex in the event
340
341 // ginfo = NULL;
342 // if( ctrl.mc ) { chain->SetBranchAddress("Gen", &ginfo);}
343
344 int count=0, pass=0;
345 float passcorr=0., passcorr_errup=0., passcorr_errdown=0.;
346 float denom[3]={0.,0.,0.};
347 float numer[3]={0.,0.,0.};
348 float numercorr[3]={0.,0.,0.};
349
350 // only 1 HLT table / file ???
351 hltchain->GetEntry(0);
352
353 int imax = chain->GetEntries();
354 cout << "nEntries: " << imax << endl;
355
356 //
357 // Loop !!!!!!!!!
358 //--------------------------------------------------------------------------------------------------------------
359 int lastHltEntry=-2;
360 for(UInt_t ientry=0; ientry<imax; ientry++)
361 {
362 chain->GetEntry(ientry);
363 if(!(ientry%1000)) cerr << "entry: " << ientry << endl;
364
365 if( ctrl.debug ) {
366 cout << "-----------------------------------------------------------------" << endl;
367 cout << "-----------------------------------------------------------------" << endl;
368 cout << "Run: " << info->RunNum()
369 << "\tEvt: " << info->EvtNum()
370 << "\tLumi: " << info->LumiSec()
371 << endl;
372 cerr << "Run: " << info->RunNum()
373 << "\tEvt: " << info->EvtNum()
374 << "\tLumi: " << info->LumiSec()
375 << endl;
376 cout << "-----------------------------------------------------------------" << endl;
377 }
378
379 runchain->GetEvent(info->RunEntry());
380 hltchain->GetEntry(runInfo->HltEntry());
381 hltTable->Clear();
382 fillTriggerNames(hltTable, hltTableStrings );
383 if(ctrl.debug && (lastHltEntry != runInfo->HltEntry())) hltTable->Print();
384 lastHltEntry = runInfo->HltEntry();
385 fillTriggerBits( hltTable, trigMask, triggerBits );
386 setHLTObjectRelations( hltObjArr, hltRelsArr, hltTableStrings, hltLabelStrings, fTrigObjs );
387 // printTriggerObjs( hltTable, fTrigObjs);
388
389 string fname = string(chain->GetFile()->GetEndpointUrl()->GetFile());
390 if(ctrl.debug) cout << "era is " << ctrl.era << endl;
391 if( ctrl.era == 0 ) {
392 setEra( fname, ctrl );
393 if(ctrl.debug) cout << "era is now " << ctrl.era << endl;
394 }
395
396 //
397 // pfNoPU
398 //
399 //mithep::Array<PFCandidate> pfNoPileUp;
400 PFnoPUflag.clear();
401 int pfnopu_size = makePFnoPUArray( pfArr, PFnoPUflag, vtxArr );
402 assert(pfnopu_size == pfArr->GetEntries());
403
404 //
405 // trigger
406 //
407 if( string(chain->GetFile()->GetEndpointUrl()->GetFile()) != currentFile ) {
408 currentFile = string(chain->GetFile()->GetEndpointUrl()->GetFile());
409 }
410 if( ctrl.debug ) cout << "file is : " << currentFile << endl;
411
412 //
413 // data/MC
414 //
415 if(ctrl.mc) {
416 //
417 // gen info
418 //
419 if( ctrl.fillGen )
420 fillGenInfo( mcArr, mcEvtInfo, geninfo, ESampleType::kHZZ, ctrl);
421
422 //
423 // xsec & PU weights
424 //
425 weights.w = getWeight(xstab,entrymap,chain)/ctrl.totalMC;
426 cout << "xsec weight: " << weights.w << endl;
427
428 unsigned npu = getNPU(puArr, 0);
429 weights.npu = npu;
430 weights.npuw = getPUWeight(ctrl.era,npu);
431 cerr << "weights.npuw: " << weights.npuw << endl;
432
433 //
434 // pt reweighting for Higgs < 140, F11
435 //
436 if( ctrl.fillGen ) {
437 if( (fname.find("f11-h115zz4l") != string::npos) ||
438 (fname.find("f11-h120zz4l") != string::npos) ||
439 (fname.find("f11-h130zz4l") != string::npos) ) {
440 weights.w *= h_wf11_hpt->GetBinContent(h_wf11_hpt->FindBin(geninfo.pt_zz));
441 }
442 }
443
444 // trigger
445 passes_HLT_MC = true; // passed to apply as extern global, just for sync
446 if( !passHLTMC(triggerBits, info->RunNum(), info->EvtNum(), k2012_MC ) ) {
447 passes_HLT_MC = false;
448 }
449
450 } else {
451 //
452 // JSON
453 //
454 if(!(ctrl.noJSON) ) {
455 RunLumiRangeMap::RunLumiPairType rl(info->RunNum(), info->LumiSec());
456 if( !(rlrm.HasRunLumi(rl)) ) {
457 if( ctrl.debug ) cout << "fails JSON" << endl;
458 continue;
459 }
460 }
461
462 // trigger
463 passes_HLT = true;
464 if( !passHLT(ctrl, triggerBits,ti,info->RunNum()) ) {
465 passes_HLT = false;
466 }
467
468 }
469
470 //
471 // lepton/kinematic selection ...
472 //
473 failingLeptons.clear();
474 passingLeptons.clear();
475 EventData ret4l =
476
477
478 // reference
479 apply_HZZ4L_reference_selection(ctrl, info,
480 vtxArr,
481 pfArr,
482 puDArr,
483 electronArr,
484 &electronReferencePreSelection,
485 &electronReferenceIDMVASelectionV1,
486 &electronReferenceIsoSelection,
487 muonArr,
488 &muonReferencePreSelection,
489 &muonIDPFSelection,
490 &muonReferenceIsoSelection);
491
492 if( ctrl.debug ) cout << endl;
493
494
495 int Z1type=0, Z2type=0;
496 if( ret4l.status.selectionBits.to_ulong() >= PASS_ZCANDIDATE ) {
497 if( abs(ret4l.Z1leptons[0].type) == 11 ) Z1type = 11;
498 if( abs(ret4l.Z1leptons[0].type) == 13 ) Z1type = 13;
499 }
500 if( ret4l.status.selectionBits.to_ulong() >= PASS_ZZCANDIDATE ) {
501 if( abs(ret4l.Z2leptons[0].type) == 11 ) Z2type = 11;
502 if( abs(ret4l.Z2leptons[0].type) == 13 ) Z2type = 13;
503 }
504
505 if( ret4l.status.pass() ) {
506 fillAngles(ret4l,angles);
507 fillKinematics(ret4l,kinematics);
508 fillMassErrors(ret4l,muonArr,electronArr,kinematics);
509 TLorentzVector pfmet; pfmet.SetPxPyPzE(metArr->At(0)->Mex(),metArr->At(0)->Mey(),0,0);
510 fillEventInfo( info, pfmet, evtinfo, ctrl.mc ? getNPU(puArr) : 0);
511 if( ctrl.mc) {
512 setEffiencyWeights(ctrl.era, ret4l, triggerBits, hltTable, hltObjArr, fTrigObjs, weights);
513 if(ctrl.debug)
514 cout << "w: " << weights.w << "\t"
515 << "npuw: " << weights.npuw << "\t"
516 << "won: " << weights.won << "\t"
517 << "woff: " << weights.woff << endl;
518 }
519
520
521 nt.Fill();
522
523 cerr << "PASS:: "
524 << "\trun: " << evtinfo.run
525 << "\tevt: " << evtinfo.evt
526 << "\tlumi: " << evtinfo.lumi
527 << "\tchannel: " << kinematics.channel
528 << "\tm4l: " << kinematics.m4l
529 << "\tmZ1: " << kinematics.mZ1
530 << "\tmZ2: " << kinematics.mZ2
531 << endl;
532 pass++;
533 // if( pass > 3 ) break;
534
535 } else if( ret4l.status.selectionBits.test(PASS_GOODZ1) &&
536 ret4l.status.selectionBits.to_ulong() < (1UL<<PASS_4L)) { // save for fakes ...
537 if(ctrl.debug) {
538 cout << "failingLeptons : " << failingLeptons.size() << endl;
539 for( int f=0; f<failingLeptons.size(); f++ ) {
540 SimpleLepton l = failingLeptons[f];
541 cout << "f: " << f << "\t"
542 << "type: " << l.type << "\t"
543 << "pT: " << l.vec.Pt() << "\t"
544 << "eta: " << l.vec.Eta()
545 << endl;
546 }
547 }
548 TLorentzVector pfmet; pfmet.SetPxPyPzE(metArr->At(0)->Mex(),metArr->At(0)->Mey(),0,0);
549 fillEventInfo( info, pfmet, evtinfo, ctrl.mc ? getNPU(puArr) : 0);
550 foTree.Fill();
551 } else {
552 if(ctrl.debug)
553 cout << "failing with some other code : " << ret4l.status.selectionBits << endl;
554 }
555 if(ctrl.debug)
556 cout << "passes HLT: " << passes_HLT << endl;
557 }
558
559
560 foTree.getFile()->cd();
561 foTree.getTree()->Write();
562 nt.WriteClose();
563
564 if(ctrl.debug)
565 cout << endl << endl;
566 for( int i=0; i<cutvec.size(); i++ ) {
567 cout << "cut: " << i << "\t"
568 << "pass: " << cutvec[i];
569
570 if( i>PASS_TRIGGER&&i<=PASS_GOODZ1 )
571 cout << "\t2e: " << zcutvec[0][i]
572 << "\t2m: " << zcutvec[1][i];
573
574 if( i>PASS_ZCANDIDATE )
575 cout << "\t4e: " << zzcutvec[0][i]
576 << "\t4m: " << zzcutvec[1][i]
577 << "\t2e2m: " << zzcutvec[2][i];
578
579 cout << "\t" << cutstrs[i] << endl;
580
581 cout << endl;
582 }
583
584 }
585
586
587 //----------------------------------------------------------------------------
588 void initRunLumiRangeMap(ControlFlags &ctrl)
589 //----------------------------------------------------------------------------
590 {
591 /*
592 rlrm.AddJSONFile(std::string("./data/Cert_136033-149442_7TeV_Apr21ReReco_Collisions10_JSON.txt"));
593 // rlrm.AddJSONFile(std::string("./data/Cert_160404-173244_7TeV_PromptReco_Collisions11_JSON_v2.txt"));
594 rlrm.AddJSONFile(std::string("./data/Cert_160404-178078_7TeV_PromptReco_Collisions11_JSON.txt"));
595 rlrm.AddJSONFile(std::string("./data/Cert_160404-163869_7TeV_May10ReReco_Collisions11_JSON_v3.txt"));
596 rlrm.AddJSONFile(std::string("./data/Cert_170249-172619_7TeV_ReReco5Aug_Collisions11_JSON.txt"));
597 // r11b
598 rlrm.AddJSONFile(std::string("./data/Cert_160404-180252_7TeV_PromptReco_Collisions11_JSON.txt"));
599 */
600
601 // 2012 only for now ...
602 std::string jsonFile;
603 if(ctrl.jsonFile=="")
604 jsonFile = "./data/Cert_190456-194479_8TeV_PromptReco_Collisions12_JSON.txt";
605 else
606 jsonFile = ctrl.jsonFile;
607 rlrm.AddJSONFile(jsonFile);
608 };