CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopSingleLeptonHLTValidation.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTriggerOffline/Top
4 // Class: TopSingleLeptonHLTValidation
5 //
13 //
14 // Original Author: Elvire Bouvier
15 // Created: Thu, 16 Jan 2014 16:27:35 GMT
16 //
17 //
18 #ifndef TOPSINGLELEPTONHLTVALIDATION
19 #define TOPSINGLELEPTONHLTVALIDATION
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
30 
34 
37 
43 
44 //
45 // class declaration
46 //
47 
49  public:
52 
53  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
54 
55 
56  private:
57  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
58  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
61  std::string monitorPath(const std::string& label) const { return label.substr(label.find(':')+1); };
63  void triggerBinLabels(const std::vector<std::string>& labels);
64 
65  // ----------member data ---------------------------
66  // DQM
78  // Electrons
82  double ptElectrons_;
83  double etaElectrons_;
84  double isoElectrons_;
85  unsigned int minElectrons_;
86  // Muons
87  const reco::Muon *mu_;
90  double ptMuons_;
91  double etaMuons_;
92  double isoMuons_;
93  unsigned int minMuons_;
94  // Jets
95  const reco::Jet *jet_;
98  double ptJets_;
99  double etaJets_;
100  unsigned int minJets_;
101  // Trigger
104  std::vector<std::string> vsPaths_;
105  // Flags
106  bool isAll_ = false;
107  bool isSel_ = false;
108 
109 };
110 
111 inline void TopSingleLeptonHLTValidation::triggerBinLabels(const std::vector<std::string>& labels)
112 {
113  for(unsigned int idx=0; idx<labels.size(); ++idx){
114  hNumTriggerMon->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
115  hDenTriggerMon->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
116  }
117 }
118 
119 //
120 // constants, enums and typedefs
121 //
122 
123 //
124 // static data member definitions
125 //
126 
127 //
128 // constructors and destructor
129 //
131  sDir_(iConfig.getUntrackedParameter<std::string>("sDir","HLTValidation/Top/Efficiencies/")),
132  sElectrons_(iConfig.getUntrackedParameter<std::string>("sElectrons","gsfElectrons")),
133  ptElectrons_(iConfig.getUntrackedParameter<double>("ptElectrons",0.)),
134  etaElectrons_(iConfig.getUntrackedParameter<double>("etaElectrons",0.)),
135  isoElectrons_(iConfig.getUntrackedParameter<double>("isoElectrons",0.)),
136  minElectrons_(iConfig.getUntrackedParameter<unsigned int>("minElectrons",0)),
137  sMuons_(iConfig.getUntrackedParameter<std::string>("sMuons","muons")),
138  ptMuons_(iConfig.getUntrackedParameter<double>("ptMuons",0.)),
139  etaMuons_(iConfig.getUntrackedParameter<double>("etaMuons",0.)),
140  isoMuons_(iConfig.getUntrackedParameter<double>("isoMuons",0.)),
141  minMuons_(iConfig.getUntrackedParameter<unsigned int>("minMuons",0)),
142  sJets_(iConfig.getUntrackedParameter<std::string>("sJets","ak5PFJets")),
143  ptJets_(iConfig.getUntrackedParameter<double>("ptJets",0.)),
144  etaJets_(iConfig.getUntrackedParameter<double>("etaJets",0.)),
145  minJets_(iConfig.getUntrackedParameter<unsigned int>("minJets",0)),
146  iTrigger_(iConfig.getUntrackedParameter<edm::InputTag>("iTrigger")),
147  vsPaths_(iConfig.getUntrackedParameter< std::vector<std::string> >("vsPaths"))
148 
149 {
150  // Electrons
151  tokElectrons_ = consumes< edm::View<reco::GsfElectron> >(edm::InputTag(sElectrons_));
152  // Muons
153  tokMuons_ = consumes< edm::View<reco::Muon> >(edm::InputTag(sMuons_));
154  // Jets
155  tokJets_ = consumes< edm::View<reco::Jet> >(edm::InputTag(sJets_));
156  // Trigger
157  tokTrigger_ = consumes<edm::TriggerResults>(iTrigger_);
158 }
159 
160 
162 {
163 
164  // do anything here that needs to be done at desctruction time
165  // (e.g. close files, deallocate resources etc.)
166 
167 }
168 #endif
169 
170 //define this as a plug-in
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
Base class for all types of Jets.
Definition: Jet.h:20
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::EDGetTokenT< edm::View< reco::Jet > > tokJets_
TopSingleLeptonHLTValidation(const edm::ParameterSet &)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::TriggerResults > tokTrigger_
void triggerBinLabels(const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::EDGetTokenT< edm::View< reco::Muon > > tokMuons_
std::string monitorPath(const std::string &label) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< edm::View< reco::GsfElectron > > tokElectrons_
Definition: Run.h:43