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),
36 hltPath_(pathName, hltProcess, doRefAnalysis_, HLTCP) {
51 "Accepted Events per filter;;entries",
66 iBooker,
"L2TrigTauEtEffNum",
"L2 #tau p_{T} efficiency;Ref #tau p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
68 "L2TrigTauEtEffDenom",
69 "L2 #tau p_{T} denominator;Ref #tau p_{T};Efficiency",
76 "L2 #tau #eta efficiency;Ref #tau #eta;entries",
82 "L2TrigTauEtaEffDenom",
83 "L2 #tau #eta denominator;Ref #tau #eta;Efficiency",
90 "L2 #tau #phi efficiency;Ref #tau #phi;entries",
96 iBooker,
"L2TrigTauPhiEffDenom",
"L2 #tau #phi denominator;Ref #tau #phi;Efficiency",
phibins_, -3.2, 3.2);
98 "L2TrigTauHighEtEffNum",
99 "L2 #tau p_{T} efficiency (high p_{T});Ref #tau p_{T};entries",
105 "L2TrigTauHighEtEffDenom",
106 "L2 #tau p_{T} denominator (high p_{T});Ref #tau p_{T};Efficiency",
116 "L3 #tau p_{T} efficiency;Ref #tau p_{T};entries",
122 "L3TrigTauEtEffDenom",
123 "L3 #tau p_{T} denominator;Ref #tau p_{T};Efficiency",
129 iBooker,
"L3TrigTauEtaEffNum",
"L3 #tau #eta efficiency;Ref #tau #eta;entries",
etabins_, -2.5, 2.5,
kVital);
131 "L3TrigTauEtaEffDenom",
132 "L3 #tau #eta denominator;Ref #tau #eta;Efficiency",
138 "L3TrigTauPhiEffNum",
139 "L3 #tau #phi efficiency;Ref #tau #phi;entries",
145 "L3TrigTauPhiEffDenom",
146 "L3 #tau #phi denominator;Ref #tau #phi;Efficiency",
152 "L3TrigTauHighEtEffNum",
153 "L3 #tau p_{T} efficiency (high p_{T});Ref #tau p_{T};entries",
159 "L3TrigTauHighEtEffDenom",
160 "L3 #tau p_{T} denominator (high p_{T});Ref #tau p_{T};Efficiency",
166 "L3TrigTauEtaPhiEffNum",
167 "L3 efficiency in eta-phi plane",
176 "L3TrigTauEtaPhiEffDenom",
177 "L3 denominator in eta-phi plane",
191 "L2TrigElectronEtEffNum",
192 "L2 electron p_{T} efficiency;Ref electron p_{T};entries",
198 "L2TrigElectronEtEffDenom",
199 "L2 electron p_{T} denominator;Ref electron p_{T};Efficiency",
205 "L2TrigElectronEtaEffNum",
206 "L2 electron #eta efficiency;Ref electron #eta;entries",
212 "L2TrigElectronEtaEffDenom",
213 "L2 electron #eta denominator;Ref electron #eta;Efficiency",
219 "L2TrigElectronPhiEffNum",
220 "L2 electron #phi efficiency;Ref electron #phi;entries",
226 "L2TrigElectronPhiEffDenom",
227 "L2 electron #phi denominator;Ref electron #phi;Efficiency",
236 "L3TrigElectronEtEffNum",
237 "L3 electron p_{T} efficiency;Ref electron p_{T};entries",
243 "L3TrigElectronEtEffDenom",
244 "L3 electron p_{T} denominator;Ref electron p_{T};Efficiency",
250 "L3TrigElectronEtaEffNum",
251 "L3 electron #eta efficiency;Ref electron #eta;entries",
257 "L3TrigElectronEtaEffDenom",
258 "L3 electron #eta denominator;Ref electron #eta;Efficiency",
264 "L3TrigElectronPhiEffNum",
265 "L3 electron #phi efficiency;Ref electron #phi;entries",
271 "L3TrigElectronPhiEffDenom",
272 "L3 electron #phi denominator;Ref electron #phi;Efficiency",
281 iBooker,
"L2TrigMuonEtEffNum",
"L2 muon p_{T} efficiency;Ref muon p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
283 "L2TrigMuonEtEffDenom",
284 "L2 muon p_{T} denominator;Ref muon p_{T};Efficiency",
290 iBooker,
"L2TrigMuonEtaEffNum",
"L2 muon #eta efficiency;Ref muon #eta;entries",
etabins_, -2.5, 2.5,
kVital);
292 "L2TrigMuonEtaEffDenom",
293 "L2 muon #eta denominator;Ref muon #eta;Efficiency",
299 "L2TrigMuonPhiEffNum",
300 "L2 muon #phi efficiency;Ref muon #phi;entries",
306 "L2TrigMuonPhiEffDenom",
307 "L2 muon #phi denominator;Ref muon #phi;Efficiency",
316 iBooker,
"L3TrigMuonEtEffNum",
"L3 muon p_{T} efficiency;Ref muon p_{T};entries",
ptbins_, 0,
ptmax_,
kVital);
318 "L3TrigMuonEtEffDenom",
319 "L3 muon p_{T} denominator;Ref muon p_{T};Efficiency",
325 "L3TrigMuonEtaEffNum",
326 "L3 muon #eta efficiency;Ref muon #eta;entries",
332 "L3TrigMuonEtaEffDenom",
333 "L3 muon #eta denominator;Ref muon #eta;Efficiency",
339 "L3TrigMuonPhiEffNum",
340 "L3 muon #phi efficiency;Ref muon #phi;entries",
346 "L3TrigMuonPhiEffDenom",
347 "L3 muon #phi denominator;Ref muon #phi;Efficiency",
356 iBooker,
"L2TrigMETEtEffNum",
"L2 MET efficiency;Ref MET;entries",
ptbins_, 0,
ptmax_,
kVital);
358 iBooker,
"L2TrigMETEtEffDenom",
"L2 MET denominator;Ref MET;Efficiency",
ptbins_, 0,
ptmax_,
kVital);
372 int lastMatchedMETFilter = -1;
375 lastMatchedMETFilter =
i;
377 if (lastMatchedMETFilter >= 0)
380 if (
name ==
"tau-met") {
383 "Transverse mass of reference " +
name +
";Reference transverse mass;entries",
390 "Invariant mass of reference " +
name +
";Reference invariant mass;entries",
397 << neles <<
" muons " << nmus;
400 iWrapper.
book1D(iBooker,
"TrigTauEt",
"Triggered #tau p_{T};#tau p_{T};entries",
ptbins_, 0,
ptmax_);
402 iWrapper.
book1D(iBooker,
"TrigTauEta",
"Triggered #tau #eta;#tau #eta;entries",
etabins_, -2.5, 2.5);
404 iWrapper.
book1D(iBooker,
"TrigTauPhi",
"Triggered #tau #phi;#tau #phi;entries",
phibins_, -3.2, 3.2);
408 iBooker,
"TrigElectronEt",
"Triggered electron p_{T};electron p_{T};entries",
ptbins_, 0,
ptmax_);
410 iBooker,
"TrigElectronEta",
"Triggered electron #eta;electron #eta;entries",
etabins_, -2.5, 2.5);
412 iBooker,
"TrigElectronPhi",
"Triggered electron #phi;electron #phi;entries",
phibins_, -3.2, 3.2);
416 iWrapper.
book1D(iBooker,
"TrigMuonEt",
"Triggered muon p_{T};muon p_{T};entries",
ptbins_, 0,
ptmax_);
418 iWrapper.
book1D(iBooker,
"TrigMuonEta",
"Triggered muon #eta;muon #eta;entries",
etabins_, -2.5, 2.5);
420 iWrapper.
book1D(iBooker,
"TrigMuonPhi",
"Triggered muon #phi;muon #phi;entries",
phibins_, -3.2, 3.2);
426 if (ntaus == 2 && neles == 0 && nmus == 0 && nmet == 0)
428 if (ntaus == 1 && neles == 1 && nmus == 0 && nmet == 0)
430 if (ntaus == 1 && neles == 0 && nmus == 1 && nmet == 0)
432 if (ntaus == 1 && neles == 0 && nmus == 0 && nmet == 1)
442 std::vector<HLTTauDQMPath::Object> triggerObjs;
443 std::vector<HLTTauDQMPath::Object> matchedTriggerObjs;
448 int lastMatchedFilter = -1;
449 int lastMatchedMETFilter = -1;
450 int lastMatchedElectronFilter = -1;
451 int lastMatchedMuonFilter = -1;
452 int lastMatchedTauFilter = -1;
453 int firstMatchedMETFilter = -1;
457 for (
int i = 0;
i <= lastPassedFilter; ++
i) {
459 matchedTriggerObjs.clear();
460 matchedOfflineObjs.
clear();
472 lastMatchedFilter =
i;
474 lastMatchedMETFilter =
i;
476 lastMatchedMuonFilter =
i;
478 lastMatchedElectronFilter =
i;
483 lastMatchedTauFilter =
i;
485 firstMatchedMETFilter =
i;
488 for (
int i = 0;
i <= lastPassedFilter; ++
i) {
500 for (
const LV&
tau : refCollection.
taus) {
515 matchedTriggerObjs.clear();
516 matchedOfflineObjs.
clear();
525 for (
const LV&
tau : matchedOfflineObjs.
taus) {
543 for (
const LV&
tau : refCollection.
taus) {
560 matchedTriggerObjs.clear();
561 matchedOfflineObjs.
clear();
570 for (
const LV&
tau : matchedOfflineObjs.
taus) {
603 matchedTriggerObjs.clear();
604 matchedOfflineObjs.
clear();
642 matchedTriggerObjs.clear();
643 matchedOfflineObjs.
clear();
681 matchedTriggerObjs.clear();
682 matchedOfflineObjs.
clear();
720 matchedTriggerObjs.clear();
721 matchedOfflineObjs.
clear();
753 matchedTriggerObjs.clear();
754 matchedOfflineObjs.
clear();
772 matchedTriggerObjs.clear();
773 matchedOfflineObjs.
clear();
775 if (lastMatchedMETFilter >= 0)
777 if (lastMatchedMuonFilter >= 0)
779 if (lastMatchedElectronFilter >= 0)
782 if (lastMatchedTauFilter >= 0)
787 lastPassedFilter, triggerObjs, refCollection,
hltMatchDr_, matchedTriggerObjs, matchedOfflineObjs);
810 double taupt = matchedOfflineObjs.
taus[0].Pt();
811 double tauphi = matchedOfflineObjs.
taus[0].Phi();
812 double met = matchedOfflineObjs.
met[0].Pt();
813 double metphi = matchedOfflineObjs.
met[0].Phi();
814 double mT =
sqrt(2 * taupt * met * (1 -
cos(tauphi - metphi)));
size_t getLastL2TauFilterIndex() const
MonitorElement * hL3TrigTauEtEffDenom_
MonitorElement * hTrigElectronEta_
bool hasL3Electrons() const
MonitorElement * hL3TrigTauPhiEffDenom_
MonitorElement * hL2TrigTauPhiEffDenom_
MonitorElement * hL3TrigMuonPhiEffNum_
MonitorElement * hL3TrigMuonEtaEffDenom_
MonitorElement * hL2TrigTauEtEffDenom_
MonitorElement * hTrigTauEt_
std::vector< LV > electrons
The single EDProduct to be saved for each event (AOD case)
virtual void setCurrentFolder(std::string const &fullpath)
size_t getLastL3ElectronFilterIndex() 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)
virtual void setOption(const char *option)
math::XYZTLorentzVectorD LV
size_t getLastL3MuonFilterIndex() const
MonitorElement * hTrigElectronPhi_
MonitorElement * hL3TrigTauEtEffNum_
int lastPassedFilter(const edm::TriggerResults &triggerResults) const
MonitorElement * hL2TrigMuonEtaEffNum_
const std::string & triggerTag() const
MonitorElement * hL3TrigMuonEtaEffNum_
MonitorElement * hL2TrigTauEtEffNum_
MonitorElement * hAcceptedEvents_
MonitorElement * hL2TrigElectronEtEffNum_
MonitorElement * hL2TrigMuonPhiEffNum_
int getFilterNElectrons(size_t i) const
int getFilterNTaus(size_t i) const
bool isFirstFilterL1Seed() const
MonitorElement * hL2TrigTauPhiEffNum_
MonitorElement * hL3TrigTauEtaPhiEffDenom_
size_t getLastFilterBeforeL3TauIndex() const
MonitorElement * hL3TrigMuonEtEffNum_
MonitorElement * hL2TrigMuonEtEffDenom_
void getFilterObjects(const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
const std::string & getFilterType(size_t i) const
bool hasL2CaloMET() const
MonitorElement * hL3TrigTauHighEtEffNum_
MonitorElement * hL3TrigElectronEtaEffNum_
MonitorElement * hL2TrigElectronPhiEffDenom_
MonitorElement * hL3TrigTauEtaEffDenom_
int getFilterNMuons(size_t i) const
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker)
MonitorElement * hL3TrigTauEtaPhiEffNum_
MonitorElement * hL2TrigMuonEtaEffDenom_
MonitorElement * hL2TrigMETEtEffDenom_
size_t getLastFilterBeforeL3ElectronIndex() const
Cos< T >::type cos(const T &t)
size_t filtersSize() const
size_t getLastFilterBeforeL2MuonIndex() const
MonitorElement * hL3TrigElectronEtEffDenom_
MonitorElement * hL3TrigTauPhiEffNum_
MonitorElement * hTrigMETEt_
const bool doRefAnalysis_
MonitorElement * hL3TrigTauEtaEffNum_
size_t getLastL2CaloMETFilterIndex() const
void analyze(const edm::TriggerResults &triggerResults, const trigger::TriggerEvent &triggerEvent, const HLTTauDQMOfflineObjects &refCollection)
MonitorElement * hTrigMETPhi_
size_t getLastL2MuonFilterIndex() const
MonitorElement * book1D(DQMStore::IBooker &iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level=kEverything)
static std::string const triggerResults
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)
MonitorElement * hL2TrigMETEtEffNum_
size_t getLastFilterBeforeL3MuonIndex() const
size_t getLastL3TauFilterIndex() const
MonitorElement * hL2TrigTauHighEtEffNum_
bool offlineMatching(size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
MonitorElement * hL3TrigElectronEtEffNum_
MonitorElement * hL3TrigElectronEtaEffDenom_
MonitorElement * hL2TrigElectronPhiEffNum_
MonitorElement * hTrigTauPhi_
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)
const std::string & getFilterName(size_t i) const
bool fired(const edm::TriggerResults &triggerResults) const
size_t getLastL2ElectronFilterIndex() const
MonitorElement * hTrigMuonEta_
size_t getLastFilterBeforeL2TauIndex() const
int getFilterMET(size_t i) const
size_t getLastFilterBeforeL2ElectronIndex() const
const std::string & getPathName() const
MonitorElement * hL2TrigTauEtaEffNum_
MonitorElement * hL2TrigTauHighEtEffDenom_
size_t getFirstFilterBeforeL2CaloMETIndex() const
MonitorElement * hL3TrigElectronPhiEffDenom_
bool hasL2Electrons() const
MonitorElement * hTrigTauEta_
MonitorElement * hL2TrigTauEtaEffDenom_
MonitorElement * hL3TrigMuonEtEffDenom_
MonitorElement * hL2TrigElectronEtEffDenom_
MonitorElement * hL2TrigElectronEtaEffNum_
MonitorElement * hTrigMuonPhi_
MonitorElement * hL3TrigElectronPhiEffNum_
MonitorElement * hL2TrigMuonPhiEffDenom_
MonitorElement * hL3TrigTauHighEtEffDenom_
MonitorElement * hL2TrigMuonEtEffNum_