90 |
|
vector<vector<unsigned> > zzcutvec; |
91 |
|
map<unsigned,float> evtrhoMap; |
92 |
|
vector<string> cutstrs; |
93 |
+ |
bool passes_HLT_MC; |
94 |
|
|
95 |
|
// |
96 |
|
// prototypes |
112 |
|
{ |
113 |
|
cutstrs.push_back(string("skim0")); //0 |
114 |
|
cutstrs.push_back(string("skim1")); //1 |
115 |
+ |
cutstrs.push_back(string("trigger")); //2 |
116 |
|
// ------------------------------------------------- |
117 |
< |
cutstrs.push_back(string("Z candidate")); //2 |
118 |
< |
cutstrs.push_back(string("good Z1")); //3 |
117 |
> |
cutstrs.push_back(string("Z candidate")); //3 |
118 |
> |
cutstrs.push_back(string("good Z1")); //4 |
119 |
|
// ------------------------------------------------- |
120 |
< |
cutstrs.push_back(string("4l")); //4 |
121 |
< |
cutstrs.push_back(string("ZZ candidate")); //5 |
122 |
< |
cutstrs.push_back(string("good Z2")); //6 |
123 |
< |
cutstrs.push_back(string("ZZ 20/10")); //7 |
124 |
< |
cutstrs.push_back(string("resonance")); //8 |
125 |
< |
cutstrs.push_back(string("m4l>70")); //9 |
126 |
< |
cutstrs.push_back(string("m4l>100")); //10 |
120 |
> |
cutstrs.push_back(string("4l")); //5 |
121 |
> |
cutstrs.push_back(string("ZZ candidate")); //6 |
122 |
> |
cutstrs.push_back(string("good Z2")); //7 |
123 |
> |
cutstrs.push_back(string("ZZ 20/10")); //8 |
124 |
> |
cutstrs.push_back(string("resonance")); //9 |
125 |
> |
cutstrs.push_back(string("m4l>70")); //10 |
126 |
> |
cutstrs.push_back(string("m4l>100")); //11 |
127 |
|
|
128 |
|
|
129 |
|
|
134 |
|
vector<vector<string> > inputFiles; |
135 |
|
inputFiles.push_back(vector<string>()); |
136 |
|
map<string,unsigned> entrymap; // number of unskimmed entries in each file |
137 |
< |
for( int i=0; i<11; i++ ) cutvec.push_back(0); |
137 |
> |
for( int i=0; i<cutstrs.size(); i++ ) cutvec.push_back(0); |
138 |
|
for( int i=0; i<2; i++ ) { |
139 |
|
zcutvec.push_back(vector<unsigned>()); |
140 |
< |
for( int j=0; j<11; j++ ) zcutvec[i].push_back(0); |
140 |
> |
for( int j=0; j<cutstrs.size(); j++ ) zcutvec[i].push_back(0); |
141 |
|
} |
142 |
|
for( int i=0; i<3; i++ ) { |
143 |
|
zzcutvec.push_back(vector<unsigned>()); |
144 |
< |
for( int j=0; j<11; j++ ) zzcutvec[i].push_back(0); |
144 |
> |
for( int j=0; j<cutstrs.size(); j++ ) zzcutvec[i].push_back(0); |
145 |
|
} |
146 |
|
|
147 |
|
|
357 |
|
} |
358 |
|
if( ctrl.debug ) cout << "file is : " << currentFile << endl; |
359 |
|
fillTriggerBits( hltTable, trigMask, triggerBits ); |
360 |
< |
if( !passHLT(triggerBits, info->RunNum(), info->EvtNum() ) ) { |
361 |
< |
if( ctrl.debug ) cout << "\tfails trigger ... " << endl; |
362 |
< |
continue; |
360 |
> |
passes_HLT_MC = true; // passed to apply as extern global, just for sync |
361 |
> |
if( !passHLTMC(triggerBits, info->RunNum(), info->EvtNum() ) ) { |
362 |
> |
passes_HLT_MC = false; |
363 |
|
} |
364 |
|
} else { |
365 |
|
// |
383 |
|
fillTriggerBits(hltTable, hltTableStrings ); |
384 |
|
} |
385 |
|
if( ctrl.debug ) cout << "file is : " << currentFile << endl; |
386 |
+ |
/* |
387 |
|
fillTriggerBits( hltTable, trigMask, triggerBits ); |
388 |
|
if( !passHLT(triggerBits, info->RunNum(), info->EvtNum() ) ) { |
389 |
|
if( ctrl.debug ) cout << "\tfails trigger ... " << endl; |
390 |
|
continue; |
391 |
|
} |
392 |
+ |
*/ |
393 |
|
} |
394 |
|
|
395 |
|
// |
398 |
|
failingLeptons.clear(); |
399 |
|
passingLeptons.clear(); |
400 |
|
EventData ret4l = |
401 |
+ |
|
402 |
+ |
/* |
403 |
|
apply_HZZ4L_reference2_selection(ctrl, info, |
404 |
|
vtx, |
405 |
|
pfArr, |
400 |
– |
// evtrhoMap[info->EvtNum()], |
406 |
|
puDArr, |
407 |
|
electronArr, |
408 |
|
&electronReferencePreSelection, |
412 |
|
&muonReferencePreSelection, |
413 |
|
&muonIDPFSelection, |
414 |
|
&muonReferenceIsoSelection); |
415 |
< |
/* |
416 |
< |
apply_HZZ4L_reference_selection(ctrl, info, |
415 |
> |
*/ |
416 |
> |
apply_HZZ4L_reference2_selection(ctrl, info, |
417 |
|
vtx, |
418 |
|
pfArr, |
419 |
< |
puArr, |
419 |
> |
puDArr, |
420 |
|
electronArr, |
421 |
< |
&electronPreSelection, |
422 |
< |
&electronIDMVASelection, |
421 |
> |
&electronReferencePreSelection, |
422 |
> |
&electronReferenceIDMVASelection, |
423 |
|
&electronIsoMVASelection, |
424 |
|
muonArr, |
425 |
< |
&muonPreSelection, |
425 |
> |
&muonReferencePreSelection, |
426 |
|
&muonIDPFSelection, |
427 |
|
&muonIsoMVASelection); |
428 |
< |
*/ |
428 |
> |
|
429 |
> |
|
430 |
|
|
431 |
|
if( ctrl.debug ) cout << endl; |
432 |
|
|
479 |
|
pass++; |
480 |
|
// if( pass > 3 ) break; |
481 |
|
|
482 |
< |
} else if( ret4l.status.selectionBits.test(PASS_ZCANDIDATE) ) { // save for fakes ... |
483 |
< |
if(ctrl.debug) { |
482 |
> |
} else if( ret4l.status.selectionBits.test(PASS_GOODZ1) ) { // save for fakes ... |
483 |
> |
// if(ctrl.debug) { |
484 |
|
cout << "failingLeptons : " << failingLeptons.size() << endl; |
485 |
|
for( int f=0; f<failingLeptons.size(); f++ ) { |
486 |
|
SimpleLepton l = failingLeptons[f]; |
489 |
|
<< "pT: " << l.vec.Pt() << "\t" |
490 |
|
<< "eta: " << l.vec.Eta() |
491 |
|
<< endl; |
492 |
< |
} |
492 |
> |
// } |
493 |
|
} |
494 |
|
foTree.Fill(); |
495 |
|
} |
506 |
|
cout << "cut: " << i << "\t" |
507 |
|
<< "pass: " << cutvec[i]; |
508 |
|
|
509 |
< |
if( i>1&&i<=3 ) |
509 |
> |
if( i>PASS_TRIGGER&&i<=PASS_GOODZ1 ) |
510 |
|
cout << "\t2e: " << zcutvec[0][i] |
511 |
|
<< "\t2m: " << zcutvec[1][i]; |
512 |
|
|
513 |
< |
if( i>3 ) |
513 |
> |
if( i>PASS_ZCANDIDATE ) |
514 |
|
cout << "\t4e: " << zzcutvec[0][i] |
515 |
|
<< "\t4m: " << zzcutvec[1][i] |
516 |
|
<< "\t2e2m: " << zzcutvec[2][i]; |