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 
40 
41 
42 #include <vector>
43 #include <set>
44 #include <map>
45 #include <iostream>
46 #include <algorithm>
47 #include <cctype>
48 #include "boost/tuple/tuple.hpp"
49 
50 #include "TPRegexp.h"
51 
52 
53 
54 const unsigned int kNull = (unsigned int) -1;
55 
56 
57 
59 
60  public:
62  const std::vector<std::string>&,
63  const std::vector<std::string>&,
67  );
68 
70  delete genMuonSelector_;
71  delete recMuonSelector_;
72  }
73 
74  void beginJob();
75  void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
76  void analyze(const edm::Event &, const edm::EventSetup &);
77 
78  static boost::tuple<
82 
83  private:
84 
85  struct MatchStruct {
87  const l1t::Muon * candL1;
88  std::vector<const reco::RecoChargedCandidate *> candHlt;
90  candBase = nullptr;
91  candL1 = nullptr;
92  }
94  candBase = cand;
95  candL1 = nullptr;
96  }
98  return candBase->pt() < match.candBase->pt();
99  }
101  return candBase->pt() > match.candBase->pt();
102  }
103  };
105  bool operator() (MatchStruct a, MatchStruct b) {
106  return a.candBase->pt() > b.candBase->pt();
107  }
108  };
109 
110  void analyzePath(const edm::Event &,
111  const std::string &, const std::string &,
112  const std::vector<MatchStruct>&,
114  void findMatches(
115  std::vector<MatchStruct> &,
116  const l1t::MuonVectorRef& candsL1,
117  const std::vector< std::vector< const reco::RecoChargedCandidate *> >&
118  );
121 
124 
125  std::vector<std::string> moduleLabels_;
126  std::vector<std::string> stepLabels_;
127 
128  edm::EDGetTokenT<trigger::TriggerEventWithRefs> hltTriggerSummaryRAW_;
129  edm::EDGetTokenT<reco::GenParticleCollection> genParticleLabel_;
131 
132  std::vector<double> parametersEta_;
133  std::vector<double> parametersPhi_;
134  std::vector<double> parametersTurnOn_;
135 
136  double cutMinPt_;
137  double cutMaxEta_;
138  unsigned int cutMotherId_;
139  std::vector<double> cutsDr_;
142 
145 
147 
148  std::map<std::string, MonitorElement *> elements_;
149 
150 };
151 
152 #endif
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_
StringCutObjectSelector< reco::Muon > * recMuonSelector_
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
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:120
std::vector< double > parametersPhi_
double a
Definition: hdecay.h:121
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_
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate * > > &)
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 > > &)
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
std::vector< double > parametersTurnOn_
Definition: Run.h:43