test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
B2GHadronicHLTValidation.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTriggerOffline/B2G
4 // Class: B2GHadronicHLTValidation
5 //
13 //
14 // Original Author: Elvire Bouvier
15 // Created: Thu, 16 Jan 2014 16:27:35 GMT
16 //
17 //
18 #ifndef B2GHADRONICHLTVALIDATION
19 #define B2GHADRONICHLTVALIDATION
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
74  // Jets
78  double ptJets_;
79  double ptJets0_;
80  double ptJets1_;
81  double etaJets_;
82  unsigned int minJets_;
83  double htMin_;
84  // Trigger
87  std::vector<std::string> vsPaths_;
88  // Flags
89  bool isAll_ = false;
90  bool isSel_ = false;
91 
92 };
93 
94 inline void B2GHadronicHLTValidation::triggerBinLabels(const std::vector<std::string>& labels)
95 {
96  for(unsigned int idx=0; idx<labels.size(); ++idx){
97  hNumTriggerMon->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
98  hDenTriggerMon->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
99  }
100 }
101 
102 //
103 // constants, enums and typedefs
104 //
105 
106 //
107 // static data member definitions
108 //
109 
110 //
111 // constructors and destructor
112 //
114  sDir_(iConfig.getUntrackedParameter<std::string>("sDir","HLTValidation/B2G/Efficiencies/")),
115  sJets_(iConfig.getUntrackedParameter<std::string>("sJets","ak5PFJets")),
116  ptJets_(iConfig.getUntrackedParameter<double>("ptJets",0.)),
117  ptJets0_(iConfig.getUntrackedParameter<double>("ptJets0",0.)),
118  ptJets1_(iConfig.getUntrackedParameter<double>("ptJets1",0.)),
119  etaJets_(iConfig.getUntrackedParameter<double>("etaJets",0.)),
120  minJets_(iConfig.getUntrackedParameter<unsigned int>("minJets",0)),
121  htMin_(iConfig.getUntrackedParameter<double>("htMin",0.0)),
122  sTrigger_(iConfig.getUntrackedParameter<std::string>("sTrigger","TriggerResults")),
123  vsPaths_(iConfig.getUntrackedParameter< std::vector<std::string> >("vsPaths"))
124 
125 {
126  // Jets
127  tokJets_ = consumes< edm::View<reco::Jet> >(edm::InputTag(sJets_));
128  // Trigger
129  tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
130 }
131 
132 
134 {
135 
136  // do anything here that needs to be done at desctruction time
137  // (e.g. close files, deallocate resources etc.)
138 
139 }
140 #endif
141 
142 //define this as a plug-in
B2GHadronicHLTValidation(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
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)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< edm::TriggerResults > tokTrigger_
void triggerBinLabels(const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
std::string monitorPath(const std::string &label) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::EDGetTokenT< edm::View< reco::Jet > > tokJets_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< std::string > vsPaths_
Definition: Run.h:43