CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTMuonValidator.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Muon_HLTMuonValidator_H
2 #define HLTriggerOffline_Muon_HLTMuonValidator_H
3 
13 
20 
34 
36 
38 
41 
42 
43 #include <vector>
44 #include <set>
45 #include <map>
46 #include <iostream>
47 #include <algorithm>
48 #include <cctype>
49 
50 #include "TPRegexp.h"
51 
52 
53 
54 const unsigned int kNull = (unsigned int) -1;
55 
56 
57 
59 
60  public:
62  virtual void beginJob();
63  virtual void beginRun(const edm::Run &, const edm::EventSetup &);
64  virtual void analyze(const edm::Event &, const edm::EventSetup &);
65 
66  private:
67 
68  struct MatchStruct {
71  std::vector<const reco::RecoChargedCandidate *> candHlt;
73  candBase = 0;
74  candL1 = 0;
75  }
76  MatchStruct(const reco::Candidate * cand) {
77  candBase = cand;
78  candL1 = 0;
79  }
81  return candBase->pt() < match.candBase->pt();
82  }
84  return candBase->pt() > match.candBase->pt();
85  }
86  };
89  return a.candBase->pt() > b.candBase->pt();
90  }
91  };
92 
93  void initializeHists();
94  void analyzePath(const edm::Event &,
95  const std::string &, const std::string &,
96  const std::vector<MatchStruct>&,
98  void findMatches(
99  std::vector<MatchStruct> &,
100  std::vector<l1extra::L1MuonParticleRef>,
101  std::vector< std::vector< const reco::RecoChargedCandidate *> >
102  );
104 
106 
107  std::vector<std::string> hltPathsToCheck_;
108  std::set <std::string> hltPaths_;
109  std::map <std::string, std::vector<std::string> > filterLabels_;
110 
116 
117  std::vector<double> parametersEta_;
118  std::vector<double> parametersPhi_;
119  std::vector<double> parametersTurnOn_;
120 
121  std::map<std::string, double> cutsMinPt_;
122 
123  double cutMaxEta_;
124  unsigned int cutMotherId_;
125  std::vector<double> cutsDr_;
128 
131 
133 
135 
137  std::map<std::string, MonitorElement *> elements_;
138  std::map<std::string, std::vector<std::string> > stepLabels_;
139 
140 };
141 
142 #endif
unsigned int cutMotherId_
const l1extra::L1MuonParticle * candL1
std::map< std::string, std::vector< std::string > > stepLabels_
std::string recMuonLabel_
bool operator>(MatchStruct match)
const reco::Candidate * candBase
std::set< std::string > hltPaths_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< double > cutsDr_
std::string l2CandLabel_
std::vector< const reco::RecoChargedCandidate * > candHlt
StringCutObjectSelector< reco::GenParticle > * genMuonSelector_
std::vector< double > parametersPhi_
virtual float pt() const =0
transverse momentum
MatchStruct(const reco::Candidate *cand)
L1MuonMatcherAlgo l1Matcher_
const unsigned int kNull
std::map< std::string, MonitorElement * > elements_
virtual void beginJob()
StringCutObjectSelector< reco::Muon > * recMuonSelector_
std::map< std::string, std::vector< std::string > > filterLabels_
bool operator<(MatchStruct match)
std::string l3CandLabel_
HLTConfigProvider hltConfig_
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
std::string recMuonCut_
std::string genParticleLabel_
double b
Definition: hdecay.h:120
bool operator()(MatchStruct a, MatchStruct b)
std::vector< double > parametersTurnOn_
void bookHist(std::string, std::string, std::string, std::string)
std::string genMuonCut_
std::string hltProcessName_
std::vector< double > parametersEta_
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::string l1CandLabel_
void findMatches(std::vector< MatchStruct > &, std::vector< l1extra::L1MuonParticleRef >, std::vector< std::vector< const reco::RecoChargedCandidate * > >)
void initializeHists()
std::map< std::string, double > cutsMinPt_
HLTMuonValidator(const edm::ParameterSet &)
std::vector< std::string > hltPathsToCheck_
void analyzePath(const edm::Event &, const std::string &, const std::string &, const std::vector< MatchStruct > &, edm::Handle< trigger::TriggerEventWithRefs >)
Definition: Run.h:41