CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTMuonPlotter.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Muon_HLTMuonPlotter_H
2 #define HLTriggerOffline_Muon_HLTMuonPlotter_H
3 
13 
21 
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 
69  void beginJob();
70  void beginRun(const edm::Run &, const edm::EventSetup &);
71  void analyze(const edm::Event &, const edm::EventSetup &);
72 
73  static boost::tuple<
77 
78  private:
79 
80  struct MatchStruct {
83  std::vector<const reco::RecoChargedCandidate *> candHlt;
85  candBase = 0;
86  candL1 = 0;
87  }
88  MatchStruct(const reco::Candidate * cand) {
89  candBase = cand;
90  candL1 = 0;
91  }
93  return candBase->pt() < match.candBase->pt();
94  }
96  return candBase->pt() > match.candBase->pt();
97  }
98  };
101  return a.candBase->pt() > b.candBase->pt();
102  }
103  };
104 
105  void analyzePath(const edm::Event &,
106  const std::string &, const std::string &,
107  const std::vector<MatchStruct>&,
109  void findMatches(
110  std::vector<MatchStruct> &,
111  const std::vector<l1extra::L1MuonParticleRef>&,
112  const std::vector< std::vector< const reco::RecoChargedCandidate *> >&
113  );
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 
143  std::map<std::string, MonitorElement *> elements_;
144 
145 };
146 
147 #endif
MatchStruct(const reco::Candidate *cand)
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_
void beginRun(const edm::Run &, const edm::EventSetup &)
static boost::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection > > getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
std::string recMuonCut_
virtual float pt() const =0
transverse momentum
StringCutObjectSelector< reco::Muon > * recMuonSelector_
std::vector< double > cutsDr_
const unsigned int kNull
void bookHist(std::string, std::string, std::string, std::string)
const l1extra::L1MuonParticle * candL1
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
std::vector< std::string > stepLabels_
void findMatches(std::vector< MatchStruct > &, const std::vector< l1extra::L1MuonParticleRef > &, const std::vector< std::vector< const reco::RecoChargedCandidate * > > &)
double b
Definition: hdecay.h:120
bool operator()(MatchStruct a, MatchStruct b)
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:6
std::map< std::string, MonitorElement * > elements_
std::string hltProcessName_
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
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:41
DQMStore * dbe_