225 |
|
TH1F * h_wf11_hpt; |
226 |
|
if(ctrl.mc) { |
227 |
|
nt.makeWeightBranch(weights); |
228 |
< |
// nt.makeGenInfoBranch(geninfo); |
228 |
> |
if(ctrl.fillGen ) nt.makeGenInfoBranch(geninfo); |
229 |
|
initEfficiencyWeights(); |
230 |
|
initPUWeights(); |
231 |
|
|
328 |
|
chain->GetEntry(ientry); |
329 |
|
if(!(ientry%1000)) cerr << "entry: " << ientry << endl; |
330 |
|
|
331 |
– |
#ifdef HACKED_RHOS |
332 |
– |
float rho = evtrhoMap[info->EvtNum()]; |
333 |
– |
#endif |
331 |
|
string fname = string(chain->GetFile()->GetEndpointUrl()->GetFile()); |
332 |
|
setEra( fname, ctrl ); |
333 |
|
|
386 |
|
fillTriggerNames(hltTable, hltTableStrings ); |
387 |
|
} |
388 |
|
if( ctrl.debug ) cout << "file is : " << currentFile << endl; |
389 |
< |
fillTriggerNames( hltTable, trigMask, triggerBits ); |
389 |
> |
fillTriggerBits( hltTable, trigMask, triggerBits ); |
390 |
|
passes_HLT_MC = true; // passed to apply as extern global, just for sync |
391 |
|
if( !passHLTMC(triggerBits, info->RunNum(), info->EvtNum(), k2012_MC ) ) { |
392 |
|
passes_HLT_MC = false; |
395 |
|
// |
396 |
|
// JSON |
397 |
|
// |
398 |
< |
/* |
399 |
< |
RunLumiRangeMap::RunLumiPairType rl(info->RunNum(), info->LumiSec()); |
400 |
< |
if( !(rlrm.HasRunLumi(rl)) ) { |
401 |
< |
if( ctrl.debug ) cout << "\tfails JSON" << endl; |
402 |
< |
continue; |
398 |
> |
if(!(ctrl.noJSON) ) { |
399 |
> |
RunLumiRangeMap::RunLumiPairType rl(info->RunNum(), info->LumiSec()); |
400 |
> |
if( !(rlrm.HasRunLumi(rl)) ) { |
401 |
> |
if( ctrl.debug ) cout << "\tfails JSON" << endl; |
402 |
> |
continue; |
403 |
> |
} |
404 |
|
} |
405 |
< |
*/ |
405 |
> |
|
406 |
|
// |
407 |
|
// trigger |
408 |
|
// |
415 |
|
} |
416 |
|
if( ctrl.debug ) cout << "file is : " << currentFile << endl; |
417 |
|
/* |
418 |
< |
fillTriggerNames( hltTable, trigMask, triggerBits ); |
418 |
> |
fillTriggerBits( hltTable, trigMask, triggerBits ); |
419 |
|
if( !passHLT(triggerBits, info->RunNum(), info->EvtNum() ) ) { |
420 |
|
if( ctrl.debug ) cout << "\tfails trigger ... " << endl; |
421 |
|
continue; |
435 |
|
apply_HZZ4L_reference_selection(ctrl, info, |
436 |
|
vtxArr, |
437 |
|
pfArr, |
440 |
– |
#ifdef HACKED_RHOS |
441 |
– |
rho, |
442 |
– |
#else |
438 |
|
puDArr, |
444 |
– |
#endif |
439 |
|
electronArr, |
440 |
|
&electronReferencePreSelection, |
441 |
|
&electronReferenceIDMVASelectionV1, |
494 |
|
// if( pass > 3 ) break; |
495 |
|
|
496 |
|
} else if( ret4l.status.selectionBits.test(PASS_GOODZ1) && |
497 |
< |
ret4l.status.selectionBits.to_ulong() < PASS_4L) { // save for fakes ... |
498 |
< |
// if(ctrl.debug) { |
497 |
> |
ret4l.status.selectionBits.to_ulong() < (1UL<<PASS_4L)) { // save for fakes ... |
498 |
> |
if(ctrl.debug) { |
499 |
|
cout << "failingLeptons : " << failingLeptons.size() << endl; |
500 |
|
for( int f=0; f<failingLeptons.size(); f++ ) { |
501 |
|
SimpleLepton l = failingLeptons[f]; |
504 |
|
<< "pT: " << l.vec.Pt() << "\t" |
505 |
|
<< "eta: " << l.vec.Eta() |
506 |
|
<< endl; |
507 |
< |
// } |
507 |
> |
} |
508 |
|
} |
509 |
|
foTree.Fill(); |
510 |
+ |
} else { |
511 |
+ |
cout << "failing with some other code : " << ret4l.status.selectionBits << endl; |
512 |
|
} |
513 |
|
} |
514 |
|
|
603 |
|
// r11b |
604 |
|
rlrm.AddJSONFile(std::string("./data/Cert_160404-180252_7TeV_PromptReco_Collisions11_JSON.txt")); |
605 |
|
*/ |
606 |
+ |
|
607 |
+ |
// 2012 only for now ... |
608 |
+ |
rlrm.AddJSONFile(std::string("./data/Cert_190456-194479_8TeV_PromptReco_Collisions12_JSON.txt")); |
609 |
+ |
|
610 |
|
}; |
611 |
|
|
612 |
|
|