CMS 3D CMS Logo

B2GDoubleLeptonHLTValidation.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTriggerOffline/B2G
4 // Class: B2GDoubleLeptonHLTValidation
5 //
15 //
16 // Original Author: Elvire Bouvier
17 // Created: Thu, 16 Jan 2014 16:27:35 GMT
18 //
19 //
20 #ifndef B2GSINGLELEPTONHLTVALIDATION
21 #define B2GSINGLELEPTONHLTVALIDATION
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:
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  // Electrons
78  double ptElectrons_;
79  double etaElectrons_;
80  double isoElectrons_;
81  unsigned int minElectrons_;
82  // Muons
86  double ptMuons_;
87  double etaMuons_;
88  double isoMuons_;
89  unsigned int minMuons_;
90 
91  // leptons
92  unsigned int minLeptons_;
93 
94  // Trigger
97  std::vector<std::string> vsPaths_;
98  // Flags
99  bool isAll_ = false;
100  bool isSel_ = false;
101 };
102 
103 inline void B2GDoubleLeptonHLTValidation::triggerBinLabels(const std::vector<std::string> &labels) {
104  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
105  hNumTriggerMon->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
106  hDenTriggerMon->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
107  }
108 }
109 
110 //
111 // constants, enums and typedefs
112 //
113 
114 //
115 // static data member definitions
116 //
117 
118 //
119 // constructors and destructor
120 //
122  : sDir_(iConfig.getUntrackedParameter<std::string>("sDir", "HLTValidation/B2G/Efficiencies/")),
123  sElectrons_(iConfig.getUntrackedParameter<std::string>("sElectrons", "gsfElectrons")),
124  ptElectrons_(iConfig.getUntrackedParameter<double>("ptElectrons", 0.)),
125  etaElectrons_(iConfig.getUntrackedParameter<double>("etaElectrons", 0.)),
126  isoElectrons_(iConfig.getUntrackedParameter<double>("isoElectrons", 0.)),
127  minElectrons_(iConfig.getUntrackedParameter<unsigned int>("minElectrons", 0)),
128  sMuons_(iConfig.getUntrackedParameter<std::string>("sMuons", "muons")),
129  ptMuons_(iConfig.getUntrackedParameter<double>("ptMuons", 0.)),
130  etaMuons_(iConfig.getUntrackedParameter<double>("etaMuons", 0.)),
131  isoMuons_(iConfig.getUntrackedParameter<double>("isoMuons", 0.)),
132  minMuons_(iConfig.getUntrackedParameter<unsigned int>("minMuons", 0)),
133  minLeptons_(iConfig.getUntrackedParameter<unsigned int>("minLeptons", 0)),
134  sTrigger_(iConfig.getUntrackedParameter<std::string>("sTrigger", "TriggerResults")),
135  vsPaths_(iConfig.getUntrackedParameter<std::vector<std::string>>("vsPaths"))
136 
137 {
138  // Electrons
139  tokElectrons_ = consumes<edm::View<reco::GsfElectron>>(edm::InputTag(sElectrons_));
140  // Muons
141  tokMuons_ = consumes<edm::View<reco::Muon>>(edm::InputTag(sMuons_));
142  // Trigger
143  tokTrigger_ = consumes<edm::TriggerResults>(edm::InputTag(sTrigger_, "", "HLT"));
144 }
145 
147  // do anything here that needs to be done at desctruction time
148  // (e.g. close files, deallocate resources etc.)
149 }
150 #endif
151 
152 // define this as a plug-in
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
Muon.h
MessageLogger.h
B2GDoubleLeptonHLTValidation::elec_
edm::Ptr< reco::GsfElectron > elec_
Definition: B2GDoubleLeptonHLTValidation.h:75
TriggerResults.h
B2GDoubleLeptonHLTValidation::sMuons_
std::string sMuons_
Definition: B2GDoubleLeptonHLTValidation.h:84
edm::Run
Definition: Run.h:45
B2GDoubleLeptonHLTValidation::minLeptons_
unsigned int minLeptons_
Definition: B2GDoubleLeptonHLTValidation.h:92
edm::EDGetTokenT
Definition: EDGetToken.h:33
B2GDoubleLeptonHLTValidation::isoMuons_
double isoMuons_
Definition: B2GDoubleLeptonHLTValidation.h:88
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
B2GDoubleLeptonHLTValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: B2GDoubleLeptonHLTValidation.cc:46
DQMStore.h
Jet.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
B2GDoubleLeptonHLTValidation::~B2GDoubleLeptonHLTValidation
~B2GDoubleLeptonHLTValidation() override
Definition: B2GDoubleLeptonHLTValidation.h:146
B2GDoubleLeptonHLTValidation::isoElectrons_
double isoElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:80
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
B2GDoubleLeptonHLTValidation::ptElectrons_
double ptElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:78
B2GDoubleLeptonHLTValidation::hNumLeptonEta
MonitorElement * hNumLeptonEta
Definition: B2GDoubleLeptonHLTValidation.h:70
B2GDoubleLeptonHLTValidation::ptMuons_
double ptMuons_
Definition: B2GDoubleLeptonHLTValidation.h:86
MakerMacros.h
B2GDoubleLeptonHLTValidation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: B2GDoubleLeptonHLTValidation.cc:164
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
B2GDoubleLeptonHLTValidation
Definition: B2GDoubleLeptonHLTValidation.h:49
B2GDoubleLeptonHLTValidation::etaMuons_
double etaMuons_
Definition: B2GDoubleLeptonHLTValidation.h:87
GsfElectron.h
B2GDoubleLeptonHLTValidation::vsPaths_
std::vector< std::string > vsPaths_
Definition: B2GDoubleLeptonHLTValidation.h:97
DQMEDAnalyzer.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
B2GDoubleLeptonHLTValidation::hDenTriggerMon
MonitorElement * hDenTriggerMon
Definition: B2GDoubleLeptonHLTValidation.h:73
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
B2GDoubleLeptonHLTValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: B2GDoubleLeptonHLTValidation.cc:147
B2GDoubleLeptonHLTValidation::hDenLeptonEta
MonitorElement * hDenLeptonEta
Definition: B2GDoubleLeptonHLTValidation.h:71
edm::ParameterSet
Definition: ParameterSet.h:47
B2GDoubleLeptonHLTValidation::mu_
edm::Ptr< reco::Muon > mu_
Definition: B2GDoubleLeptonHLTValidation.h:83
Event.h
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:762
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
B2GDoubleLeptonHLTValidation::tokTrigger_
edm::EDGetTokenT< edm::TriggerResults > tokTrigger_
Definition: B2GDoubleLeptonHLTValidation.h:96
B2GDoubleLeptonHLTValidation::minElectrons_
unsigned int minElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:81
B2GDoubleLeptonHLTValidation::monitorPath
std::string monitorPath(const std::string &label) const
Definition: B2GDoubleLeptonHLTValidation.h:61
edm::EventSetup
Definition: EventSetup.h:58
B2GDoubleLeptonHLTValidation::sTrigger_
std::string sTrigger_
Definition: B2GDoubleLeptonHLTValidation.h:95
HLTConfigProvider.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Ptr< reco::GsfElectron >
std
Definition: JetResolutionObject.h:76
B2GDoubleLeptonHLTValidation::hDenLeptonPt
MonitorElement * hDenLeptonPt
Definition: B2GDoubleLeptonHLTValidation.h:69
B2GDoubleLeptonHLTValidation::minMuons_
unsigned int minMuons_
Definition: B2GDoubleLeptonHLTValidation.h:89
B2GDoubleLeptonHLTValidation::etaElectrons_
double etaElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:79
Frameworkfwd.h
B2GDoubleLeptonHLTValidation::triggerBinLabels
void triggerBinLabels(const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
Definition: B2GDoubleLeptonHLTValidation.h:103
B2GDoubleLeptonHLTValidation::tokMuons_
edm::EDGetTokenT< edm::View< reco::Muon > > tokMuons_
Definition: B2GDoubleLeptonHLTValidation.h:85
B2GDoubleLeptonHLTValidation::isSel_
bool isSel_
Definition: B2GDoubleLeptonHLTValidation.h:100
dqm::implementation::IBooker
Definition: DQMStore.h:43
B2GDoubleLeptonHLTValidation::B2GDoubleLeptonHLTValidation
B2GDoubleLeptonHLTValidation(const edm::ParameterSet &)
Definition: B2GDoubleLeptonHLTValidation.h:121
B2GDoubleLeptonHLTValidation::isAll_
bool isAll_
Definition: B2GDoubleLeptonHLTValidation.h:99
B2GDoubleLeptonHLTValidation::tokElectrons_
edm::EDGetTokenT< edm::View< reco::GsfElectron > > tokElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:77
ParameterSet.h
edm::Event
Definition: Event.h:73
B2GDoubleLeptonHLTValidation::hNumTriggerMon
MonitorElement * hNumTriggerMon
Definition: B2GDoubleLeptonHLTValidation.h:72
B2GDoubleLeptonHLTValidation::sDir_
std::string sDir_
Definition: B2GDoubleLeptonHLTValidation.h:67
B2GDoubleLeptonHLTValidation::sElectrons_
std::string sElectrons_
Definition: B2GDoubleLeptonHLTValidation.h:76
edm::InputTag
Definition: InputTag.h:15
B2GDoubleLeptonHLTValidation::hNumLeptonPt
MonitorElement * hNumLeptonPt
Definition: B2GDoubleLeptonHLTValidation.h:68
label
const char * label
Definition: PFTauDecayModeTools.cc:11