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 "boost/tuple/tuple.hpp"
41 #include <algorithm>
42 #include <cctype>
43 #include <iostream>
44 #include <map>
45 #include <set>
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 boost::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 
116  edm::EDGetTokenT<reco::GenParticleCollection> genParticleLabel_;
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(const edm::ParameterSet &, std::string, const std::vector< std::string > &, const std::vector< std::string > &, const boost::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection >> &)
MatchStruct(const reco::Candidate *cand)
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)
L1MuonMatcherAlgo l1Matcher_
std::string genMuonCut_
std::vector< std::string > moduleLabels_
std::vector< MuonRef > MuonVectorRef
Definition: Muon.h:15
static boost::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection > > getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
std::string recMuonCut_
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate * >> &)
std::vector< double > cutsDr_
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_
const reco::Candidate * candBase
dqm::legacy::MonitorElement MonitorElement
Definition: Muon.h:21
std::vector< std::string > stepLabels_
const l1t::Muon * candL1
const unsigned int kNull
virtual double pt() const =0
transverse momentum
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
Matcher of reconstructed objects to L1 Muons.
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_
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
std::vector< double > parametersTurnOn_
Definition: Run.h:45