CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLTMuonPlotter.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Muon_HLTMuonPlotter_H
2 #define HLTriggerOffline_Muon_HLTMuonPlotter_H
3 
13 
19 
26 
33 
35 
37 
38 #include <algorithm>
39 #include <cctype>
40 #include <iostream>
41 #include <map>
42 #include <set>
43 #include <tuple>
44 #include <vector>
45 
46 #include "TPRegexp.h"
47 
48 const unsigned int kNull = (unsigned int)-1;
49 
51 public:
55 
58  const std::vector<std::string> &,
59  const std::vector<std::string> &,
63  const ESTokens &);
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  static std::tuple<edm::ESGetToken<MagneticField, IdealMagneticFieldRecord>,
85 
86 private:
87  struct MatchStruct {
89  const l1t::Muon *candL1;
90  std::vector<const reco::RecoChargedCandidate *> candHlt;
92  candBase = nullptr;
93  candL1 = nullptr;
94  }
96  candBase = cand;
97  candL1 = nullptr;
98  }
99  bool operator<(MatchStruct match) { return candBase->pt() < match.candBase->pt(); }
100  bool operator>(MatchStruct match) { return candBase->pt() > match.candBase->pt(); }
101  };
103  bool operator()(MatchStruct a, MatchStruct b) { return a.candBase->pt() > b.candBase->pt(); }
104  };
105 
106  void analyzePath(const edm::Event &,
107  const std::string &,
108  const std::string &,
109  const std::vector<MatchStruct> &,
111  void findMatches(std::vector<MatchStruct> &,
112  const l1t::MuonVectorRef &candsL1,
113  const std::vector<std::vector<const reco::RecoChargedCandidate *>> &);
115 
118 
119  std::vector<std::string> moduleLabels_;
120  std::vector<std::string> stepLabels_;
121 
125 
126  std::vector<double> parametersEta_;
127  std::vector<double> parametersPhi_;
128  std::vector<double> parametersTurnOn_;
129 
130  double cutMinPt_;
131  double cutMaxEta_;
132  unsigned int cutMotherId_;
133  std::vector<double> cutsDr_;
136 
139 
141 
142  std::map<std::string, MonitorElement *> elements_;
143 };
144 
145 #endif
hltriggeroffline::L1MuonMatcherAlgo l1Matcher_
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 >> &, const ESTokens &)
MatchStruct(const reco::Candidate *cand)
PropagateToMuon::ESTokens ESTokens
virtual double pt() const =0
transverse momentum
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
std::string hltPath_
bool operator>(MatchStruct match)
unsigned int cutMotherId_
std::vector< double > parametersEta_
bool operator<(MatchStruct match)
std::string genMuonCut_
std::vector< std::string > moduleLabels_
std::vector< MuonRef > MuonVectorRef
Definition: Muon.h:15
std::string recMuonCut_
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate * >> &)
std::vector< double > cutsDr_
const unsigned int kNull
std::vector< const reco::RecoChargedCandidate * > candHlt
edm::EDGetTokenT< reco::MuonCollection > recMuonLabel_
void analyzePath(const edm::Event &, const std::string &, const std::string &, const std::vector< MatchStruct > &, edm::Handle< trigger::TriggerEventWithRefs >)
void analyze(const edm::Event &, const edm::EventSetup &)
StringCutObjectSelector< reco::GenParticle > * genMuonSelector_
hltriggeroffline::L1MuonMatcherAlgo::ESTokens ESTokens
const reco::Candidate * candBase
dqm::legacy::MonitorElement MonitorElement
Definition: Muon.h:21
std::vector< std::string > stepLabels_
const l1t::Muon * candL1
void bookHist(DQMStore::IBooker &, std::string, std::string, std::string, std::string)
double b
Definition: hdecay.h:118
bool operator()(MatchStruct a, MatchStruct b)
StringCutObjectSelector< reco::Muon > * recMuonSelector_
std::vector< double > parametersPhi_
double a
Definition: hdecay.h:119
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::map< std::string, MonitorElement * > elements_
std::string hltProcessName_
dqm::legacy::DQMStore DQMStore
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
static std::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection > > getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
std::vector< double > parametersTurnOn_
static std::tuple< edm::ESGetToken< MagneticField, IdealMagneticFieldRecord >, edm::ESGetToken< Propagator, TrackingComponentsRecord >, edm::ESGetToken< Propagator, TrackingComponentsRecord >, edm::ESGetToken< Propagator, TrackingComponentsRecord >, edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > > getESTokens(edm::ConsumesCollector)
Definition: Run.h:45