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 
15 
22 
36 
38 
40 
43 
44 
45 #include <vector>
46 #include <set>
47 #include <map>
48 #include <iostream>
49 #include <algorithm>
50 #include <cctype>
51 
52 #include "TPRegexp.h"
53 
54 
55 
56 const unsigned int kNull = (unsigned int) -1;
57 
58 
59 
61 
62  public:
64  virtual void beginJob();
65  virtual void beginRun(const edm::Run &, const edm::EventSetup &);
66  virtual void analyze(const edm::Event &, const edm::EventSetup &);
67 
68  private:
69 
70  struct MatchStruct {
73  std::vector<const reco::RecoChargedCandidate *> candHlt;
75  candBase = 0;
76  candL1 = 0;
77  }
78  MatchStruct(const reco::Candidate * cand) {
79  candBase = cand;
80  candL1 = 0;
81  }
83  return candBase->pt() < match.candBase->pt();
84  }
86  return candBase->pt() > match.candBase->pt();
87  }
88  };
91  return a.candBase->pt() > b.candBase->pt();
92  }
93  };
94 
95  void initializeHists();
96  void analyzePath(const edm::Event &,
97  const std::string &, const std::string &,
98  const std::vector<MatchStruct>&,
100  void findMatches(
101  std::vector<MatchStruct> &,
102  std::vector<l1extra::L1MuonParticleRef>,
103  std::vector< std::vector< const reco::RecoChargedCandidate *> >
104  );
106 
108 
109  std::vector<std::string> hltPathsToCheck_;
110  std::set <std::string> hltPaths_;
111  std::map <std::string, std::vector<std::string> > filterLabels_;
112 
118 
119  std::vector<double> parametersEta_;
120  std::vector<double> parametersPhi_;
121  std::vector<double> parametersTurnOn_;
122 
123  std::map<std::string, double> cutsMinPt_;
124 
125  double cutMaxEta_;
126  unsigned int cutMotherId_;
127  std::vector<double> cutsDr_;
130 
133 
135 
137 
139  std::map<std::string, MonitorElement *> elements_;
140  std::map<std::string, std::vector<std::string> > stepLabels_;
141 
142 };
143 
144 #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:36