8 size_t versionStart =
pathName.rfind(
"_v");
9 if (versionStart == std::string::npos)
11 return pathName.substr(0, versionStart);
32 highptmax_(highptmax),
33 l1MatchDr_(l1MatchDr),
34 hltMatchDr_(hltMatchDr),
35 doRefAnalysis_(doRefAnalysis),
52 "Accepted Events per filter;;entries",
72 iBooker,
"L2TrigTauEtEffNum",
"L2 #tau p_{T} efficiency;Ref #tau p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
74 "L2TrigTauEtEffDenom",
75 "L2 #tau p_{T} denominator;Ref #tau p_{T};Efficiency",
82 "L2 #tau #eta efficiency;Ref #tau #eta;entries",
88 "L2TrigTauEtaEffDenom",
89 "L2 #tau #eta denominator;Ref #tau #eta;Efficiency",
96 "L2 #tau #phi efficiency;Ref #tau #phi;entries",
102 iBooker,
"L2TrigTauPhiEffDenom",
"L2 #tau #phi denominator;Ref #tau #phi;Efficiency",
phibins_, -3.2, 3.2);
104 "L2TrigTauHighEtEffNum",
105 "L2 #tau p_{T} efficiency (high p_{T});Ref #tau p_{T};entries",
111 "L2TrigTauHighEtEffDenom",
112 "L2 #tau p_{T} denominator (high p_{T});Ref #tau p_{T};Efficiency",
121 iBooker,
"L3TrigTauEtEffNum",
"L3 #tau p_{T} efficiency;Ref #tau p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
123 "L3TrigTauEtEffDenom",
124 "L3 #tau p_{T} denominator;Ref #tau p_{T};Efficiency",
130 iBooker,
"L3TrigTauEtaEffNum",
"L3 #tau #eta efficiency;Ref #tau #eta;entries",
etabins_, -2.5, 2.5,
kVital);
132 "L3TrigTauEtaEffDenom",
133 "L3 #tau #eta denominator;Ref #tau #eta;Efficiency",
139 "L3TrigTauPhiEffNum",
140 "L3 #tau #phi efficiency;Ref #tau #phi;entries",
146 "L3TrigTauPhiEffDenom",
147 "L3 #tau #phi denominator;Ref #tau #phi;Efficiency",
153 "L3TrigTauHighEtEffNum",
154 "L3 #tau p_{T} efficiency (high p_{T});Ref #tau p_{T};entries",
160 "L3TrigTauHighEtEffDenom",
161 "L3 #tau p_{T} denominator (high p_{T});Ref #tau p_{T};Efficiency",
167 "L3TrigTauEtaPhiEffNum",
168 "L3 efficiency in eta-phi plane",
177 "L3TrigTauEtaPhiEffDenom",
178 "L3 denominator in eta-phi plane",
192 "L2TrigElectronEtEffNum",
193 "L2 electron p_{T} efficiency;Ref electron p_{T};entries",
199 "L2TrigElectronEtEffDenom",
200 "L2 electron p_{T} denominator;Ref electron p_{T};Efficiency",
206 "L2TrigElectronEtaEffNum",
207 "L2 electron #eta efficiency;Ref electron #eta;entries",
213 "L2TrigElectronEtaEffDenom",
214 "L2 electron #eta denominator;Ref electron #eta;Efficiency",
220 "L2TrigElectronPhiEffNum",
221 "L2 electron #phi efficiency;Ref electron #phi;entries",
227 "L2TrigElectronPhiEffDenom",
228 "L2 electron #phi denominator;Ref electron #phi;Efficiency",
237 "L3TrigElectronEtEffNum",
238 "L3 electron p_{T} efficiency;Ref electron p_{T};entries",
244 "L3TrigElectronEtEffDenom",
245 "L3 electron p_{T} denominator;Ref electron p_{T};Efficiency",
251 "L3TrigElectronEtaEffNum",
252 "L3 electron #eta efficiency;Ref electron #eta;entries",
258 "L3TrigElectronEtaEffDenom",
259 "L3 electron #eta denominator;Ref electron #eta;Efficiency",
265 "L3TrigElectronPhiEffNum",
266 "L3 electron #phi efficiency;Ref electron #phi;entries",
272 "L3TrigElectronPhiEffDenom",
273 "L3 electron #phi denominator;Ref electron #phi;Efficiency",
282 iBooker,
"L2TrigMuonEtEffNum",
"L2 muon p_{T} efficiency;Ref muon p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
284 "L2TrigMuonEtEffDenom",
285 "L2 muon p_{T} denominator;Ref muon p_{T};Efficiency",
291 iBooker,
"L2TrigMuonEtaEffNum",
"L2 muon #eta efficiency;Ref muon #eta;entries",
etabins_, -2.5, 2.5,
kVital);
293 "L2TrigMuonEtaEffDenom",
294 "L2 muon #eta denominator;Ref muon #eta;Efficiency",
300 "L2TrigMuonPhiEffNum",
301 "L2 muon #phi efficiency;Ref muon #phi;entries",
307 "L2TrigMuonPhiEffDenom",
308 "L2 muon #phi denominator;Ref muon #phi;Efficiency",
317 iBooker,
"L3TrigMuonEtEffNum",
"L3 muon p_{T} efficiency;Ref muon p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
319 "L3TrigMuonEtEffDenom",
320 "L3 muon p_{T} denominator;Ref muon p_{T};Efficiency",
326 "L3TrigMuonEtaEffNum",
327 "L3 muon #eta efficiency;Ref muon #eta;entries",
333 "L3TrigMuonEtaEffDenom",
334 "L3 muon #eta denominator;Ref muon #eta;Efficiency",
340 "L3TrigMuonPhiEffNum",
341 "L3 muon #phi efficiency;Ref muon #phi;entries",
347 "L3TrigMuonPhiEffDenom",
348 "L3 muon #phi denominator;Ref muon #phi;Efficiency",
357 iBooker,
"L2TrigMETEtEffNum",
"L2 MET efficiency;Ref MET;entries",
ptbins_, 0,
ptmax_,
kVital);
359 iBooker,
"L2TrigMETEtEffDenom",
"L2 MET denominator;Ref MET;Efficiency",
ptbins_, 0,
ptmax_,
kVital);
373 int lastMatchedMETFilter = -1;
376 lastMatchedMETFilter =
i;
378 if (lastMatchedMETFilter >= 0)
381 if (
name ==
"tau-met") {
384 "Transverse mass of reference " +
name +
";Reference transverse mass;entries",
391 "Invariant mass of reference " +
name +
";Reference invariant mass;entries",
398 << neles <<
" muons " <<
nmus;
401 iWrapper.
book1D(iBooker,
"TrigTauEt",
"Triggered #tau p_{T};#tau p_{T};entries",
ptbins_, 0,
ptmax_);
403 iWrapper.
book1D(iBooker,
"TrigTauEta",
"Triggered #tau #eta;#tau #eta;entries",
etabins_, -2.5, 2.5);
405 iWrapper.
book1D(iBooker,
"TrigTauPhi",
"Triggered #tau #phi;#tau #phi;entries",
phibins_, -3.2, 3.2);
409 iBooker,
"TrigElectronEt",
"Triggered electron p_{T};electron p_{T};entries",
ptbins_, 0,
ptmax_);
411 iBooker,
"TrigElectronEta",
"Triggered electron #eta;electron #eta;entries",
etabins_, -2.5, 2.5);
413 iBooker,
"TrigElectronPhi",
"Triggered electron #phi;electron #phi;entries",
phibins_, -3.2, 3.2);
417 iWrapper.
book1D(iBooker,
"TrigMuonEt",
"Triggered muon p_{T};muon p_{T};entries",
ptbins_, 0,
ptmax_);
419 iWrapper.
book1D(iBooker,
"TrigMuonEta",
"Triggered muon #eta;muon #eta;entries",
etabins_, -2.5, 2.5);
421 iWrapper.
book1D(iBooker,
"TrigMuonPhi",
"Triggered muon #phi;muon #phi;entries",
phibins_, -3.2, 3.2);
427 if (
ntaus == 2 && neles == 0 &&
nmus == 0 && nmet == 0)
429 if (
ntaus == 1 && neles == 1 &&
nmus == 0 && nmet == 0)
431 if (
ntaus == 1 && neles == 0 &&
nmus == 1 && nmet == 0)
433 if (
ntaus == 1 && neles == 0 &&
nmus == 0 && nmet == 1)
443 std::vector<HLTTauDQMPath::Object> triggerObjs;
444 std::vector<HLTTauDQMPath::Object> matchedTriggerObjs;
449 int lastMatchedFilter = -1;
450 int lastMatchedMETFilter = -1;
451 int lastMatchedElectronFilter = -1;
452 int lastMatchedMuonFilter = -1;
453 int lastMatchedTauFilter = -1;
454 int firstMatchedMETFilter = -1;
457 if (refCollection.
taus.size() > 0) {
466 for (
int i = 0;
i <= lastPassedFilter; ++
i) {
468 matchedTriggerObjs.clear();
469 matchedOfflineObjs.
clear();
481 lastMatchedFilter =
i;
483 lastMatchedMETFilter =
i;
485 lastMatchedMuonFilter =
i;
487 lastMatchedElectronFilter =
i;
493 lastMatchedTauFilter =
i;
495 firstMatchedMETFilter =
i;
498 for (
int i = 0;
i <= lastPassedFilter; ++
i) {
510 for (
const LV&
tau : refCollection.
taus) {
525 matchedTriggerObjs.clear();
526 matchedOfflineObjs.
clear();
535 for (
const LV&
tau : matchedOfflineObjs.
taus) {
553 for (
const LV&
tau : refCollection.
taus) {
570 matchedTriggerObjs.clear();
571 matchedOfflineObjs.
clear();
580 for (
const LV&
tau : matchedOfflineObjs.
taus) {
613 matchedTriggerObjs.clear();
614 matchedOfflineObjs.
clear();
652 matchedTriggerObjs.clear();
653 matchedOfflineObjs.
clear();
691 matchedTriggerObjs.clear();
692 matchedOfflineObjs.
clear();
730 matchedTriggerObjs.clear();
731 matchedOfflineObjs.
clear();
763 matchedTriggerObjs.clear();
764 matchedOfflineObjs.
clear();
782 matchedTriggerObjs.clear();
783 matchedOfflineObjs.
clear();
785 if (lastMatchedMETFilter >= 0)
787 if (lastMatchedMuonFilter >= 0)
789 if (lastMatchedElectronFilter >= 0)
792 if (lastMatchedTauFilter >= 0)
797 lastPassedFilter, triggerObjs, refCollection,
hltMatchDr_, matchedTriggerObjs, matchedOfflineObjs);
820 double taupt = matchedOfflineObjs.
taus[0].Pt();
821 double tauphi = matchedOfflineObjs.
taus[0].Phi();
822 double met = matchedOfflineObjs.
met[0].Pt();
823 double metphi = matchedOfflineObjs.
met[0].Phi();
MonitorElement * hL3TrigTauEtEffDenom_
MonitorElement * hTrigElectronEta_
MonitorElement * hL3TrigTauPhiEffDenom_
MonitorElement * hL2TrigTauPhiEffDenom_
MonitorElement * hL3TrigMuonPhiEffNum_
size_t getLastFilterBeforeL3MuonIndex() const
MonitorElement * hL3TrigMuonEtaEffDenom_
MonitorElement * hL2TrigTauEtEffDenom_
MonitorElement * hTrigTauEt_
std::vector< LV > electrons
size_t getLastFilterBeforeL2ElectronIndex() const
The single EDProduct to be saved for each event (AOD case)
def create(alignables, pedeDump, additionalData, outputFile, config)
virtual void setCurrentFolder(std::string const &fullpath)
int getFilterNElectrons(size_t i) const
HLTTauDQMPathPlotter(const std::string &pathName, const HLTConfigProvider &HLTCP, bool doRefAnalysis, const std::string &dqmBaseFolder, const std::string &hltProcess, int ptbins, int etabins, int phibins, double ptmax, double highptmax, double l1MatchDr, double hltMatchDr)
const std::string & getFilterType(size_t i) const
virtual void setOption(const char *option)
math::XYZTLorentzVectorD LV
MonitorElement * hTrigElectronPhi_
size_t getLastFilterBeforeL3TauIndex() const
MonitorElement * hL3TrigTauEtEffNum_
MonitorElement * hL2TrigMuonEtaEffNum_
const std::string & getPathName() const
MonitorElement * hL3TrigMuonEtaEffNum_
MonitorElement * hL2TrigTauEtEffNum_
MonitorElement * hAcceptedEvents_
MonitorElement * hL2TrigElectronEtEffNum_
MonitorElement * hL2TrigMuonPhiEffNum_
size_t getLastL2ElectronFilterIndex() const
size_t getLastL3TauFilterIndex() const
MonitorElement * hL2TrigTauPhiEffNum_
MonitorElement * hL3TrigTauEtaPhiEffDenom_
size_t getLastFilterBeforeL2TauIndex() const
MonitorElement * hL3TrigMuonEtEffNum_
MonitorElement * hL2TrigMuonEtEffDenom_
MonitorElement * hL3TrigTauHighEtEffNum_
MonitorElement * hL3TrigElectronEtaEffNum_
MonitorElement * hL2TrigElectronPhiEffDenom_
MonitorElement * hL3TrigTauEtaEffDenom_
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker)
MonitorElement * hCounter_
MonitorElement * hL3TrigTauEtaPhiEffNum_
MonitorElement * hL2TrigMuonEtaEffDenom_
MonitorElement * hL2TrigMETEtEffDenom_
size_t filtersSize() const
size_t getLastL3MuonFilterIndex() const
Cos< T >::type cos(const T &t)
MonitorElement * hL3TrigElectronEtEffDenom_
size_t getLastFilterBeforeL3ElectronIndex() const
MonitorElement * hL3TrigTauPhiEffNum_
MonitorElement * hTrigMETEt_
const bool doRefAnalysis_
MonitorElement * hL3TrigTauEtaEffNum_
bool hasL2CaloMET() const
void analyze(const edm::TriggerResults &triggerResults, const trigger::TriggerEvent &triggerEvent, const HLTTauDQMOfflineObjects &refCollection)
int getFilterMET(size_t i) const
MonitorElement * hTrigMETPhi_
MonitorElement * book1D(DQMStore::IBooker &iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level=kEverything)
int getFilterNMuons(size_t i) const
static std::string const triggerResults
size_t getLastL2MuonFilterIndex() const
MonitorElement * hTrigMuonEt_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
size_t getLastL2CaloMETFilterIndex() const
MonitorElement * hL2TrigMETEtEffNum_
MonitorElement * hL2TrigTauHighEtEffNum_
MonitorElement * hL3TrigElectronEtEffNum_
MonitorElement * hL3TrigElectronEtaEffDenom_
size_t getLastL3ElectronFilterIndex() const
bool hasL2Electrons() const
MonitorElement * hL2TrigElectronPhiEffNum_
MonitorElement * hTrigTauPhi_
bool hasL3Electrons() const
MonitorElement * hL2TrigElectronEtaEffDenom_
MonitorElement * hTrigElectronEt_
MonitorElement * hL3TrigMuonPhiEffDenom_
MonitorElement * book2D(DQMStore::IBooker &iBooker, TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int level=kEverything)
int getFilterNTaus(size_t i) const
void getFilterObjects(const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
MonitorElement * hTrigMuonEta_
size_t getLastFilterBeforeL2MuonIndex() const
size_t getLastL2TauFilterIndex() const
MonitorElement * hL2TrigTauEtaEffNum_
bool isFirstFilterL1Seed() const
MonitorElement * hL2TrigTauHighEtEffDenom_
MonitorElement * hL3TrigElectronPhiEffDenom_
MonitorElement * hTrigTauEta_
int lastPassedFilter(const edm::TriggerResults &triggerResults) const
MonitorElement * hL2TrigTauEtaEffDenom_
MonitorElement * hL3TrigMuonEtEffDenom_
const std::string & getFilterName(size_t i) const
const std::string & triggerTag() const
bool fired(const edm::TriggerResults &triggerResults) const
MonitorElement * hL2TrigElectronEtEffDenom_
MonitorElement * hL2TrigElectronEtaEffNum_
MonitorElement * hTrigMuonPhi_
MonitorElement * hL3TrigElectronPhiEffNum_
MonitorElement * hL2TrigMuonPhiEffDenom_
MonitorElement * hL3TrigTauHighEtEffDenom_
size_t getFirstFilterBeforeL2CaloMETIndex() const
bool offlineMatching(size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
MonitorElement * hL2TrigMuonEtEffNum_