642 |
|
clog << "Listing run:lumi:event in file findEvents.txt for events that pass full selection (of any channel)." << endl; |
643 |
|
} |
644 |
|
|
645 |
+ |
isFirstEvent_ = true; |
646 |
+ |
|
647 |
|
} // end constructor OSUAnalysis::OSUAnalysis() |
648 |
|
|
649 |
|
|
656 |
|
delete cutFlows_.at(currentChannel); |
657 |
|
} |
658 |
|
|
659 |
< |
if (findEventsLog) findEventsLog->close(); |
659 |
> |
if (printEventInfo_ && findEventsLog) findEventsLog->close(); |
660 |
|
|
661 |
|
clog << "=============================================" << endl; |
662 |
|
clog << "Successfully completed OSUAnalysis." << endl; |
732 |
|
//get pile-up event weight |
733 |
|
if (doPileupReweighting_ && datasetType_ != "data") { |
734 |
|
//for "data" datasets, the numTruePV is always set to -1 |
735 |
< |
if (events->at(0).numTruePV < 0) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0. Turning off pile-up reweighting." << endl; |
735 |
> |
if (events->at(0).numTruePV < 0 && isFirstEvent_) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0. Turning off pile-up reweighting." << endl; |
736 |
|
else masterScaleFactor *= puWeight_->at (events->at (0).numTruePV); |
737 |
|
} |
738 |
|
|
1357 |
|
|
1358 |
|
event.put (channelDecisions, "channelDecisions"); |
1359 |
|
|
1360 |
< |
} // end void OSUAnalysis::analyze (const edm::Event &event, const edm::EventSetup &setup) |
1360 |
> |
isFirstEvent_ = false; |
1361 |
> |
|
1362 |
> |
} // end void OSUAnalysis::produce (const edm::Event &event, const edm::EventSetup &setup) |
1363 |
|
|
1364 |
|
|
1365 |
|
|
2291 |
|
} |
2292 |
|
} |
2293 |
|
|
2294 |
< |
else if(variable == "looseID"){ |
2294 |
> |
else if(variable == "looseID_MVA"){ |
2295 |
|
value = object->pt > 10 |
2296 |
|
&& object->mvaNonTrigV0 > 0; |
2297 |
|
} |
2793 |
|
else if(variable == "dZwrtBS") value = object->dZ - events->at(0).BSz; |
2794 |
|
else if(variable == "depTrkRp5MinusPt"){ |
2795 |
|
if ( (object->depTrkRp5 - object->pt) < 0 ) { |
2796 |
+ |
// cout << "Warning: found track with depTrkRp5 < pt: depTrkRp5=" << object->depTrkRp5 |
2797 |
+ |
// << "; pt=" << object->pt |
2798 |
+ |
// << "; object->depTrkRp5 - object->pt = " << object->depTrkRp5 - object->pt |
2799 |
+ |
// << endl; |
2800 |
|
value = 0; |
2801 |
|
} |
2802 |
|
else value = (object->depTrkRp5 - object->pt); |