CMS 3D CMS Logo

B2GHadronicHLTValidation.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTriggerOffline/B2G
4 // Class: B2GHadronicHLTValidation
5 //
15 //
16 // Original Author: Elvire Bouvier
17 // Created: Thu, 16 Jan 2014 16:27:35 GMT
18 //
19 //
20 #ifndef B2GHADRONICHLTVALIDATION
21 #define B2GHADRONICHLTVALIDATION
22 
23 // system include files
24 #include <memory>
25 
26 // user include files
29 
32 
36 
38 
44 
45 //
46 // class declaration
47 //
48 
50 public:
52  ~B2GHadronicHLTValidation() override;
53 
54  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
55 
56 private:
57  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 inline void B2GHadronicHLTValidation::triggerBinLabels(const std::vector<std::string> &labels) {
94  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
95  hNumTriggerMon->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
96  hDenTriggerMon->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
97  }
98 }
99 
100 //
101 // constants, enums and typedefs
102 //
103 
104 //
105 // static data member definitions
106 //
107 
108 //
109 // constructors and destructor
110 //
112  : sDir_(iConfig.getUntrackedParameter<std::string>("sDir", "HLTValidation/B2G/Efficiencies/")),
113  sJets_(iConfig.getUntrackedParameter<std::string>("sJets", "ak5PFJets")),
114  ptJets_(iConfig.getUntrackedParameter<double>("ptJets", 0.)),
115  ptJets0_(iConfig.getUntrackedParameter<double>("ptJets0", 0.)),
116  ptJets1_(iConfig.getUntrackedParameter<double>("ptJets1", 0.)),
117  etaJets_(iConfig.getUntrackedParameter<double>("etaJets", 0.)),
118  minJets_(iConfig.getUntrackedParameter<unsigned int>("minJets", 0)),
119  htMin_(iConfig.getUntrackedParameter<double>("htMin", 0.0)),
120  sTrigger_(iConfig.getUntrackedParameter<std::string>("sTrigger", "TriggerResults")),
121  vsPaths_(iConfig.getUntrackedParameter<std::vector<std::string>>("vsPaths"))
122 
123 {
124  // Jets
125  tokJets_ = consumes<edm::View<reco::Jet>>(edm::InputTag(sJets_));
126  // Trigger
127  tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
128 }
129 
131  // do anything here that needs to be done at desctruction time
132  // (e.g. close files, deallocate resources etc.)
133 }
134 #endif
135 
136 // define this as a plug-in
B2GHadronicHLTValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: B2GHadronicHLTValidation.cc:135
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
B2GHadronicHLTValidation::htMin_
double htMin_
Definition: B2GHadronicHLTValidation.h:83
B2GHadronicHLTValidation::sDir_
std::string sDir_
Definition: B2GHadronicHLTValidation.h:67
Muon.h
MessageLogger.h
B2GHadronicHLTValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: B2GHadronicHLTValidation.cc:45
TriggerResults.h
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
B2GHadronicHLTValidation::B2GHadronicHLTValidation
B2GHadronicHLTValidation(const edm::ParameterSet &)
Definition: B2GHadronicHLTValidation.h:111
B2GHadronicHLTValidation::monitorPath
std::string monitorPath(const std::string &label) const
Definition: B2GHadronicHLTValidation.h:61
B2GHadronicHLTValidation::triggerBinLabels
void triggerBinLabels(const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
Definition: B2GHadronicHLTValidation.h:93
B2GHadronicHLTValidation::minJets_
unsigned int minJets_
Definition: B2GHadronicHLTValidation.h:82
B2GHadronicHLTValidation::hNumJetEta
MonitorElement * hNumJetEta
Definition: B2GHadronicHLTValidation.h:70
DQMStore.h
Jet.h
B2GHadronicHLTValidation::etaJets_
double etaJets_
Definition: B2GHadronicHLTValidation.h:81
B2GHadronicHLTValidation::tokTrigger_
edm::EDGetTokenT< edm::TriggerResults > tokTrigger_
Definition: B2GHadronicHLTValidation.h:86
training_settings.idx
idx
Definition: training_settings.py:16
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
B2GHadronicHLTValidation::ptJets_
double ptJets_
Definition: B2GHadronicHLTValidation.h:78
B2GHadronicHLTValidation::hDenJetPt
MonitorElement * hDenJetPt
Definition: B2GHadronicHLTValidation.h:69
GsfElectron.h
B2GHadronicHLTValidation::ptJets0_
double ptJets0_
Definition: B2GHadronicHLTValidation.h:79
DQMEDAnalyzer.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
B2GHadronicHLTValidation::hNumTriggerMon
MonitorElement * hNumTriggerMon
Definition: B2GHadronicHLTValidation.h:72
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
B2GHadronicHLTValidation::ptJets1_
double ptJets1_
Definition: B2GHadronicHLTValidation.h:80
B2GHadronicHLTValidation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: B2GHadronicHLTValidation.cc:152
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
B2GHadronicHLTValidation
Definition: B2GHadronicHLTValidation.h:49
B2GHadronicHLTValidation::sJets_
std::string sJets_
Definition: B2GHadronicHLTValidation.h:76
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
B2GHadronicHLTValidation::tokJets_
edm::EDGetTokenT< edm::View< reco::Jet > > tokJets_
Definition: B2GHadronicHLTValidation.h:77
B2GHadronicHLTValidation::hDenJetEta
MonitorElement * hDenJetEta
Definition: B2GHadronicHLTValidation.h:71
B2GHadronicHLTValidation::vsPaths_
std::vector< std::string > vsPaths_
Definition: B2GHadronicHLTValidation.h:87
B2GHadronicHLTValidation::isAll_
bool isAll_
Definition: B2GHadronicHLTValidation.h:89
createfilelist.int
int
Definition: createfilelist.py:10
dqm::impl::MonitorElement::setBinLabel
virtual 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)
Definition: MonitorElement.cc:771
B2GHadronicHLTValidation::sTrigger_
std::string sTrigger_
Definition: B2GHadronicHLTValidation.h:85
edm::EventSetup
Definition: EventSetup.h:57
HLTConfigProvider.h
edm::Ptr< reco::Jet >
B2GHadronicHLTValidation::isSel_
bool isSel_
Definition: B2GHadronicHLTValidation.h:90
std
Definition: JetResolutionObject.h:76
B2GHadronicHLTValidation::hNumJetPt
MonitorElement * hNumJetPt
Definition: B2GHadronicHLTValidation.h:68
Frameworkfwd.h
B2GHadronicHLTValidation::jet_
edm::Ptr< reco::Jet > jet_
Definition: B2GHadronicHLTValidation.h:75
B2GHadronicHLTValidation::hDenTriggerMon
MonitorElement * hDenTriggerMon
Definition: B2GHadronicHLTValidation.h:73
dqm::implementation::IBooker
Definition: DQMStore.h:43
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
B2GHadronicHLTValidation::~B2GHadronicHLTValidation
~B2GHadronicHLTValidation() override
Definition: B2GHadronicHLTValidation.h:130