2 #ifndef HLTriggerOffline_HLTEffCalculator_H
3 #define HLTriggerOffline_HLTEffCalculator_H
48 #include "TDirectory.h"
51 #include "TLorentzVector.h"
63 int nPaths = (int)pathnames.size();
64 efficiencies=
new TH1D(
name.c_str(),
"efficiencies per path",nPaths,-0.5,(double)nPaths-0.5);
66 for(
int i = 0;
i < nPaths;
i++){
68 efficiencies->GetXaxis()->SetBinLabel(
i+1,pathnames.at(
i).c_str());
71 numerator.push_back(
new TH1D((s.str()+
"_num").c_str(),(s.str()+
"_num").c_str(),1,-0.5,0.5));
72 denominator.push_back(
new TH1D((s.str()+
"_den").c_str(),(s.str()+
"_den").c_str(),1,-0.5,0.5));
87 std::cout<<
"NULL directory! Cannot write!"<<std::endl;
91 std::cout<<
"HLT path numbers mismatch!"<<std::endl;
95 double eff = (double)
numerator.at(
s)->GetEntries();
edm::EDGetTokenT< edm::TriggerResults > HLTresCollectionToken_
bool acceptHLT(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
EfficiencyHandler * myEffHandler
std::vector< TH1 * > denominator
std::vector< TH1 * > numerator
HLTEffCalculator(const edm::ParameterSet &)
std::string outputFileName
std::vector< std::string > pathNames
void Fill(const edm::Event &event, const edm::TriggerResults &triggerTable)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void WriteAll(TDirectory *d)
EfficiencyHandler(std::string Name, const std::vector< std::string > &pathnames, int verb=0)
edm::InputTag HLTresCollection