CMS 3D CMS Logo

HLTMuonPlotter.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Muon_HLTMuonPlotter_H
2 #define HLTriggerOffline_Muon_HLTMuonPlotter_H
3 
13 
21 
28 
35 
37 
39 
40 #include <algorithm>
41 #include <cctype>
42 #include <iostream>
43 #include <map>
44 #include <set>
45 #include <tuple>
46 #include <vector>
47 
48 #include "TPRegexp.h"
49 
50 const unsigned int kNull = (unsigned int)-1;
51 
53 public:
56 
59  const std::vector<std::string> &,
60  const std::vector<std::string> &,
64 
66  delete genMuonSelector_;
67  delete recMuonSelector_;
68  }
69 
70  void beginJob();
71  void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
72  void analyze(const edm::Event &, const edm::EventSetup &);
73 
74  static std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
78 
79 private:
80  struct MatchStruct {
82  const l1t::Muon *candL1;
83  std::vector<const reco::RecoChargedCandidate *> candHlt;
85  candBase = nullptr;
86  candL1 = nullptr;
87  }
89  candBase = cand;
90  candL1 = nullptr;
91  }
92  bool operator<(MatchStruct match) { return candBase->pt() < match.candBase->pt(); }
93  bool operator>(MatchStruct match) { return candBase->pt() > match.candBase->pt(); }
94  };
96  bool operator()(MatchStruct a, MatchStruct b) { return a.candBase->pt() > b.candBase->pt(); }
97  };
98 
99  void analyzePath(const edm::Event &,
100  const std::string &,
101  const std::string &,
102  const std::vector<MatchStruct> &,
104  void findMatches(std::vector<MatchStruct> &,
105  const l1t::MuonVectorRef &candsL1,
106  const std::vector<std::vector<const reco::RecoChargedCandidate *>> &);
108 
111 
112  std::vector<std::string> moduleLabels_;
113  std::vector<std::string> stepLabels_;
114 
118 
119  std::vector<double> parametersEta_;
120  std::vector<double> parametersPhi_;
121  std::vector<double> parametersTurnOn_;
122 
123  double cutMinPt_;
124  double cutMaxEta_;
125  unsigned int cutMotherId_;
126  std::vector<double> cutsDr_;
129 
132 
134 
135  std::map<std::string, MonitorElement *> elements_;
136 };
137 
138 #endif
HLTMuonPlotter::parametersEta_
std::vector< double > parametersEta_
Definition: HLTMuonPlotter.h:119
HLTMuonPlotter::HLTMuonPlotter
HLTMuonPlotter(const edm::ParameterSet &, std::string, const std::vector< std::string > &, const std::vector< std::string > &, const std::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection >> &)
Definition: HLTMuonPlotter.cc:27
Muon.h
HLTMuonPlotter::cutMinPt_
double cutMinPt_
Definition: HLTMuonPlotter.h:123
edm::Run
Definition: Run.h:45
HLTMuonPlotter::matchesByDescendingPt
Definition: HLTMuonPlotter.h:95
TriggerEvent.h
edm::EDGetTokenT< trigger::TriggerEventWithRefs >
HLTMuonPlotter::moduleLabels_
std::vector< std::string > moduleLabels_
Definition: HLTMuonPlotter.h:112
Muon.h
HLTMuonPlotter::analyzePath
void analyzePath(const edm::Event &, const std::string &, const std::string &, const std::vector< MatchStruct > &, edm::Handle< trigger::TriggerEventWithRefs >)
HLTMuonPlotter::cutMaxEta_
double cutMaxEta_
Definition: HLTMuonPlotter.h:124
HLTMuonPlotter::MatchStruct::operator<
bool operator<(MatchStruct match)
Definition: HLTMuonPlotter.h:92
TriggerEventWithRefs.h
reco::Candidate::pt
virtual double pt() const =0
transverse momentum
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
HLTMuonPlotter::MatchStruct::candHlt
std::vector< const reco::RecoChargedCandidate * > candHlt
Definition: HLTMuonPlotter.h:83
EDAnalyzer.h
HLTMuonPlotter::hltTriggerSummaryRAW_
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
Definition: HLTMuonPlotter.h:115
edm::Handle< trigger::TriggerEventWithRefs >
HLTMuonPlotter::MatchStruct
Definition: HLTMuonPlotter.h:80
HLTMuonPlotter::recMuonCut_
std::string recMuonCut_
Definition: HLTMuonPlotter.h:128
HLTMuonPlotter::~HLTMuonPlotter
~HLTMuonPlotter()
Definition: HLTMuonPlotter.h:65
GenParticle.h
HLTMuonPlotter::MatchStruct::operator>
bool operator>(MatchStruct match)
Definition: HLTMuonPlotter.h:93
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
MakerMacros.h
HLTMuonPlotter::getTokens
static std::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection > > getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
Definition: HLTMuonPlotter.cc:264
Track.h
HLTMuonPlotter::genMuonCut_
std::string genMuonCut_
Definition: HLTMuonPlotter.h:127
dqm::legacy::DQMStore
Definition: DQMStore.h:727
MuonFwd.h
HLTMuonPlotter::matchesByDescendingPt::operator()
bool operator()(MatchStruct a, MatchStruct b)
Definition: HLTMuonPlotter.h:96
HLTMuonPlotter::stepLabels_
std::vector< std::string > stepLabels_
Definition: HLTMuonPlotter.h:113
Particle.h
b
double b
Definition: hdecay.h:118
RefToBase.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTMuonPlotter::beginRun
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
Definition: HLTMuonPlotter.cc:62
edm::ParameterSet
Definition: ParameterSet.h:36
a
double a
Definition: hdecay.h:119
Event.h
HLTMuonPlotter::hltProcessName_
std::string hltProcessName_
Definition: HLTMuonPlotter.h:110
HLTMuonPlotter::MatchStruct::MatchStruct
MatchStruct(const reco::Candidate *cand)
Definition: HLTMuonPlotter.h:88
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
cand
Definition: decayParser.h:34
HLTMuonPlotter::recMuonSelector_
StringCutObjectSelector< reco::Muon > * recMuonSelector_
Definition: HLTMuonPlotter.h:131
createfilelist.int
int
Definition: createfilelist.py:10
HLTMuonPlotter::genMuonSelector_
StringCutObjectSelector< reco::GenParticle > * genMuonSelector_
Definition: HLTMuonPlotter.h:130
HLTMuonPlotter::MatchStruct::candL1
const l1t::Muon * candL1
Definition: HLTMuonPlotter.h:82
edm::EventSetup
Definition: EventSetup.h:57
HLTMuonPlotter::genParticleLabel_
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
Definition: HLTMuonPlotter.h:116
HLTMuonPlotter::recMuonLabel_
edm::EDGetTokenT< reco::MuonCollection > recMuonLabel_
Definition: HLTMuonPlotter.h:117
InputTag.h
reco::Candidate
Definition: Candidate.h:27
HLTMuonPlotter::l1Matcher_
L1MuonMatcherAlgo l1Matcher_
Definition: HLTMuonPlotter.h:133
HLTMuonPlotter::beginJob
void beginJob()
Definition: HLTMuonPlotter.cc:60
StringCutObjectSelector.h
HLTMuonPlotter::cutsDr_
std::vector< double > cutsDr_
Definition: HLTMuonPlotter.h:126
RecoChargedCandidate.h
Frameworkfwd.h
HLTMuonPlotter::MatchStruct::candBase
const reco::Candidate * candBase
Definition: HLTMuonPlotter.h:81
StringCutObjectSelector< reco::GenParticle >
HLTMuonPlotter::elements_
std::map< std::string, MonitorElement * > elements_
Definition: HLTMuonPlotter.h:135
HLTMuonPlotter::MatchStruct::MatchStruct
MatchStruct()
Definition: HLTMuonPlotter.h:84
kNull
const unsigned int kNull
Definition: HLTMuonPlotter.h:50
HLTMuonPlotter::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: HLTMuonPlotter.h:55
HLTMuonPlotter::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: HLTMuonPlotter.h:54
l1t::MuonVectorRef
std::vector< MuonRef > MuonVectorRef
Definition: Muon.h:15
HLTMuonPlotter::analyze
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: HLTMuonPlotter.cc:110
HLTMuonPlotter::bookHist
void bookHist(DQMStore::IBooker &, std::string, std::string, std::string, std::string)
Definition: HLTMuonPlotter.cc:350
ConsumesCollector.h
Candidate.h
HLTMuonPlotter::findMatches
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate * >> &)
Definition: HLTMuonPlotter.cc:280
ParameterSet.h
HLTMuonPlotter
Definition: HLTMuonPlotter.h:52
L1MuonMatcherAlgo.h
l1t::Muon
Definition: Muon.h:21
edm::Event
Definition: Event.h:73
RecoChargedCandidateFwd.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
HLTMuonPlotter::hltPath_
std::string hltPath_
Definition: HLTMuonPlotter.h:109
HLTMuonPlotter::parametersPhi_
std::vector< double > parametersPhi_
Definition: HLTMuonPlotter.h:120
L1MuonMatcherAlgo
Matcher of reconstructed objects to L1 Muons.
Definition: L1MuonMatcherAlgo.h:26
HLTMuonPlotter::parametersTurnOn_
std::vector< double > parametersTurnOn_
Definition: HLTMuonPlotter.h:121
HLTMuonPlotter::cutMotherId_
unsigned int cutMotherId_
Definition: HLTMuonPlotter.h:125