CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TopSingleLepton::MonitorEnsemble Class Reference

#include <TopSingleLeptonDQM.h>

Public Types

enum  Level { STANDARD, VERBOSE, DEBUG }
 different verbosity levels More...
 

Public Member Functions

void book (std::string directory)
 book histograms in subdirectory directory More...
 
void fill (const edm::Event &event, const edm::EventSetup &setup)
 fill monitor histograms with electronId and jetCorrections More...
 
 MonitorEnsemble (const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 default contructor More...
 
 ~MonitorEnsemble ()
 default destructor More...
 

Private Member Functions

bool booked (const std::string histName) const
 check if histogram was booked More...
 
void fill (const edm::Event &event, const edm::TriggerResults &triggerTable, std::string channel, const std::vector< std::string > labels) const
 fill trigger monitoring histograms More...
 
void fill (const std::string histName, double value) const
 fill histogram if it had been booked before More...
 
void fill (const std::string histName, double xValue, double yValue) const
 fill histogram if it had been booked before (2-dim version) More...
 
void fill (const std::string histName, double xValue, double yValue, double zValue) const
 fill histogram if it had been booked before (2-dim version) More...
 
std::string monitorPath (const std::string &label) const
 
std::string selectionPath (const std::string &label) const
 
void triggerBinLabels (std::string channel, const std::vector< std::string > labels)
 set configurable labels for trigger monitoring histograms More...
 

Private Attributes

edm::EDGetTokenT
< reco::JetTagCollection
btagCSV_
 
double btagCSVWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT
< reco::JetTagCollection
btagPur_
 
double btagPurWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagVtx_
 
double btagVtxWP_
 
double eidCutValue_
 
StringCutObjectSelector
< reco::PFCandidate > * 
elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View
< reco::PFCandidate > > 
elecs_
 
StringCutObjectSelector
< reco::PFCandidate > * 
elecSelect_
 extra selection on electrons More...
 
edm::EDGetTokenT
< edm::ValueMap< float > > 
electronId_
 electronId label More...
 
std::map< std::string,
MonitorElement * > 
hists_
 histogram container More...
 
bool includeBTag_
 
std::string jetCorrector_
 jetCorrector More...
 
edm::EDGetTokenT
< reco::JetIDValueMap
jetIDLabel_
 jetID as an extra selection type More...
 
StringCutObjectSelector
< reco::JetID > * 
jetIDSelect_
 extra jetID selection on calo jets More...
 
edm::EDGetTokenT< edm::View
< reco::Jet > > 
jets_
 input sources for monitoring More...
 
std::string jetSelect_
 
std::string label_
 instance label More...
 
int logged_
 number of logged interesting events More...
 
double lowerEdge_
 mass window upper and lower edge More...
 
std::vector< edm::EDGetTokenT
< edm::View< reco::MET > > > 
mets_
 considers a vector of METs More...
 
StringCutObjectSelector
< reco::PFCandidate > * 
muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View
< reco::PFCandidate > > 
muons_
 
StringCutObjectSelector
< reco::PFCandidate > * 
muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::View
< reco::Vertex > > 
pvs_
 
StringCutObjectSelector
< reco::Vertex > * 
pvSelect_
 
DQMStorestore_
 storage manager More...
 
edm::EDConsumerBase tmpConsumerBase
 
std::vector< std::string > triggerPaths_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerTable_
 trigger table More...
 
double upperEdge_
 
Level verbosity_
 verbosity level for booking More...
 

Detailed Description

Definition at line 52 of file TopSingleLeptonDQM.h.

Member Enumeration Documentation

different verbosity levels

Enumerator
STANDARD 
VERBOSE 
DEBUG 

Definition at line 55 of file TopSingleLeptonDQM.h.

Constructor & Destructor Documentation

MonitorEnsemble::MonitorEnsemble ( const char *  label,
const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)

default contructor

Definition at line 22 of file TopSingleLeptonDQM.cc.

References book(), btagCSV_, btagCSVWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, DEBUG, eidCutValue_, elecIso_, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), includeBTag_, jetCorrector_, bTagSequences_cff::jetID, jetIDLabel_, jetIDSelect_, jets_, jetSelect_, lowerEdge_, mets_, muonIso_, muons_, muonSelect_, pvs_, pvSelect_, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, triggerPaths_, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

25  : label_(label),
26  elecIso_(0),
27  elecSelect_(0),
28  pvSelect_(0),
29  muonIso_(0),
30  muonSelect_(0),
31  jetIDSelect_(0),
32  includeBTag_(false),
33  lowerEdge_(-1.),
34  upperEdge_(-1.),
35  logged_(0) {
36 
37  // sources have to be given; this PSet is not optional
38  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
40  sources.getParameter<edm::InputTag>("muons"));
42  sources.getParameter<edm::InputTag>("elecs"));
44  sources.getParameter<edm::InputTag>("pvs"));
46  sources.getParameter<edm::InputTag>("jets"));
47  for (edm::InputTag const& tag :
48  sources.getParameter<std::vector<edm::InputTag> >("mets"))
49  mets_.push_back(iC.consumes<edm::View<reco::MET> >(tag));
50  // electronExtras are optional; they may be omitted or
51  // empty
52  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
53  // rho for PF isolation with EA corrections
54  // eventrhoToken_ =
55  // iC.consumes<double>(edm::InputTag("fixedGridRhoFastjetAll"));
56 
57  edm::ParameterSet elecExtras =
58  cfg.getParameter<edm::ParameterSet>("elecExtras");
59  // select is optional; in case it's not found no
60  // selection will be applied
61  if (elecExtras.existsAs<std::string>("select")) {
63  elecExtras.getParameter<std::string>("select"));
64  }
65  // isolation is optional; in case it's not found no
66  // isolation will be applied
67  if (elecExtras.existsAs<std::string>("isolation")) {
69  elecExtras.getParameter<std::string>("isolation"));
70  }
71  // electronId is optional; in case it's not found the
72  // InputTag will remain empty
73  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
74  edm::ParameterSet elecId =
75  elecExtras.getParameter<edm::ParameterSet>("electronId");
77  elecId.getParameter<edm::InputTag>("src"));
78  eidCutValue_ = elecId.getParameter<double>("cutValue");
79  }
80  }
81  // pvExtras are opetional; they may be omitted or empty
82  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
83  edm::ParameterSet pvExtras =
84  cfg.getParameter<edm::ParameterSet>("pvExtras");
85  // select is optional; in case it's not found no
86  // selection will be applied
87  if (pvExtras.existsAs<std::string>("select")) {
89  pvExtras.getParameter<std::string>("select"));
90  }
91  }
92  // muonExtras are optional; they may be omitted or empty
93  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
94  edm::ParameterSet muonExtras =
95  cfg.getParameter<edm::ParameterSet>("muonExtras");
96  // select is optional; in case it's not found no
97  // selection will be applied
98  if (muonExtras.existsAs<std::string>("select")) {
100  muonExtras.getParameter<std::string>("select"));
101  }
102  // isolation is optional; in case it's not found no
103  // isolation will be applied
104  if (muonExtras.existsAs<std::string>("isolation")) {
106  muonExtras.getParameter<std::string>("isolation"));
107  }
108  }
109 
110  // jetExtras are optional; they may be omitted or
111  // empty
112  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
113  edm::ParameterSet jetExtras =
114  cfg.getParameter<edm::ParameterSet>("jetExtras");
115  // jetCorrector is optional; in case it's not found
116  // the InputTag will remain empty
117  if (jetExtras.existsAs<std::string>("jetCorrector")) {
118  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
119  }
120  // read jetID information if it exists
121  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
123  jetExtras.getParameter<edm::ParameterSet>("jetID");
125  jetID.getParameter<edm::InputTag>("label"));
127  jetID.getParameter<std::string>("select"));
128  }
129  // select is optional; in case it's not found no
130  // selection will be applied (only implemented for
131  // CaloJets at the moment)
132  if (jetExtras.existsAs<std::string>("select")) {
133  jetSelect_ = jetExtras.getParameter<std::string>("select");
134  }
135  // jetBDiscriminators are optional; in case they are
136  // not found the InputTag will remain empty; they
137  // consist of pairs of edm::JetFlavorAssociation's &
138  // corresponding working points
139  includeBTag_ = jetExtras.existsAs<edm::ParameterSet>("jetBTaggers");
140  if (includeBTag_) {
141  edm::ParameterSet btagEff =
142  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
143  .getParameter<edm::ParameterSet>("trackCountingEff");
145  btagEff.getParameter<edm::InputTag>("label"));
146  btagEffWP_ = btagEff.getParameter<double>("workingPoint");
147  edm::ParameterSet btagPur =
148  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
149  .getParameter<edm::ParameterSet>("trackCountingPur");
151  btagPur.getParameter<edm::InputTag>("label"));
152  btagPurWP_ = btagPur.getParameter<double>("workingPoint");
153  edm::ParameterSet btagVtx =
154  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
155  .getParameter<edm::ParameterSet>("secondaryVertex");
157  btagVtx.getParameter<edm::InputTag>("label"));
158  btagVtxWP_ = btagVtx.getParameter<double>("workingPoint");
159  edm::ParameterSet btagCSV =
160  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
161  .getParameter<edm::ParameterSet>("cvsVertex");
163  btagCSV.getParameter<edm::InputTag>("label"));
164  btagCSVWP_ = btagCSV.getParameter<double>("workingPoint");
165  }
166  }
167 
168  // triggerExtras are optional; they may be omitted or empty
169  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
170  edm::ParameterSet triggerExtras =
171  cfg.getParameter<edm::ParameterSet>("triggerExtras");
173  triggerExtras.getParameter<edm::InputTag>("src"));
174  triggerPaths_ =
175  triggerExtras.getParameter<std::vector<std::string> >("paths");
176  }
177 
178  // massExtras is optional; in case it's not found no mass
179  // window cuts are applied for the same flavor monitor
180  // histograms
181  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
182  edm::ParameterSet massExtras =
183  cfg.getParameter<edm::ParameterSet>("massExtras");
184  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
185  upperEdge_ = massExtras.getParameter<double>("upperEdge");
186  }
187 
188  // setup the verbosity level for booking histograms;
189  // per default the verbosity level will be set to
190  // STANDARD. This will also be the chosen level in
191  // the case when the monitoring PSet is not found
193  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
194  edm::ParameterSet monitoring =
195  cfg.getParameter<edm::ParameterSet>("monitoring");
196  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
197  verbosity_ = DEBUG;
198  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
200  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
202  }
203  // and don't forget to do the histogram booking
204  book(cfg.getParameter<std::string>("directory"));
205 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double btagEffWP_
btag working points
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
std::vector< std::string > triggerPaths_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
StringCutObjectSelector< reco::PFCandidate > * elecIso_
extra isolation criterion on electron
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
StringCutObjectSelector< reco::PFCandidate > * muonIso_
extra isolation criterion on muon
Level verbosity_
verbosity level for booking
StringCutObjectSelector< reco::Vertex > * pvSelect_
double lowerEdge_
mass window upper and lower edge
StringCutObjectSelector< reco::PFCandidate > * elecSelect_
extra selection on electrons
void book(std::string directory)
book histograms in subdirectory directory
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
std::string label_
instance label
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
StringCutObjectSelector< reco::PFCandidate > * muonSelect_
extra selection on muons
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
std::string jetCorrector_
jetCorrector
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
TopSingleLepton::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 66 of file TopSingleLeptonDQM.h.

66 {};

Member Function Documentation

void MonitorEnsemble::book ( std::string  directory)

book histograms in subdirectory directory

Definition at line 207 of file TopSingleLeptonDQM.cc.

References cond::rpcobimon::current, hists_, label_, cppFunctionSkipper::operator, STANDARD, store_, AlCaHLTBitMon_QueryRunRegistry::string, triggerBinLabels(), triggerPaths_, VERBOSE, and verbosity_.

Referenced by MonitorEnsemble().

207  {
208  // set up the current directory path
210  current += label_;
212  store_->setCurrentFolder(current);
213 
214  // determine number of bins for trigger monitoring
215  unsigned int nPaths = triggerPaths_.size();
216 
217  // --- [STANDARD] --- //
218  // Run Number
219  hists_["RunNumb_"] =
220  store_->book1D("RunNumber", "Run Nr.", 1.e4, 1.5e5, 3.e5);
221  // instantaneous luminosity
222  hists_["InstLumi_"] =
223  store_->book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3);
224  // number of selected primary vertices
225  hists_["pvMult_"] = store_->book1D("PvMult", "N_{pvs}", 100, 0., 100.);
226  // pt of the leading muon
227  hists_["muonPt_"] = store_->book1D("MuonPt", "pt(#mu)", 50, 0., 250.);
228  // muon multiplicity before std isolation
229  hists_["muonMult_"] = store_->book1D("MuonMult", "N_{All}(#mu)", 10, 0., 10.);
230  // muon multiplicity after std isolation
231  hists_["muonMultIso_"] =
232  store_->book1D("MuonMultIso", "N_{Iso}(#mu)", 10, 0., 10.);
233  // pt of the leading electron
234  hists_["elecPt_"] = store_->book1D("ElecPt", "pt(e)", 50, 0., 250.);
235  // electron multiplicity before std isolation
236  hists_["elecMult_"] = store_->book1D("ElecMult", "N_{All}(e)", 10, 0., 10.);
237  // electron multiplicity after std isolation
238  hists_["elecMultIso_"] =
239  store_->book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.);
240  // multiplicity of jets with pt>20 (corrected to L2+L3)
241  hists_["jetMult_"] = store_->book1D("JetMult", "N_{30}(jet)", 10, 0., 10.);
242  // trigger efficiency estimates for single lepton triggers
243  hists_["triggerEff_"] =
244  store_->book1D("TriggerEff", "Eff(trigger)", nPaths, 0., nPaths);
245  // monitored trigger occupancy for single lepton triggers
246  hists_["triggerMon_"] =
247  store_->book1D("TriggerMon", "Mon(trigger)", nPaths, 0., nPaths);
248  // MET (calo)
249  hists_["metCalo_"] = store_->book1D("METCalo", "MET_{Calo}", 50, 0., 200.);
250  // W mass estimate
251  hists_["massW_"] = store_->book1D("MassW", "M(W)", 60, 0., 300.);
252  // Top mass estimate
253  hists_["massTop_"] = store_->book1D("MassTop", "M(Top)", 50, 0., 500.);
254  // b-tagged Top mass
255  hists_["massBTop_"] =
256  store_->book1D("MassBTop", "M(Top, 1 b-tag)", 50, 0., 500.);
257  // set bin labels for trigger monitoring
259 
260  if (verbosity_ == STANDARD) return;
261 
262  // --- [VERBOSE] --- //
263  // eta of the leading muon
264  hists_["muonEta_"] = store_->book1D("MuonEta", "#eta(#mu)", 30, -3., 3.);
265  // relative isolation of the candidate muon (depending on the decay channel)
266  hists_["muonRelIso_"] = store_->book1D(
267  "MuonRelIso", "Iso_{Rel}(#mu) (#Delta#beta Corrected)", 50, 0., 1.);
268  // eta of the leading electron
269  hists_["elecEta_"] = store_->book1D("ElecEta", "#eta(e)", 30, -3., 3.);
270  // std isolation variable of the leading electron
271  hists_["elecRelIso_"] =
272  store_->book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.);
273  // multiplicity of btagged jets (for track counting high efficiency) with
274  // pt(L2L3)>30
275  hists_["jetMultBEff_"] =
276  store_->book1D("JetMultBEff", "N_{30}(TCHE)", 10, 0., 10.);
277  // btag discriminator for track counting high efficiency for jets with
278  // pt(L2L3)>30
279  hists_["jetBDiscEff_"] =
280  store_->book1D("JetBDiscEff", "Disc_{TCHE}(jet)", 100, 0., 10.);
281  // eta of the 1. leading jet (corrected to L2+L3)
282  hists_["jet1Eta_"] =
283  store_->book1D("Jet1Eta", "#eta_{L2L3}(jet1)", 60, -3., 3.);
284  // pt of the 1. leading jet (corrected to L2+L3)
285  hists_["jet1Pt_"] = store_->book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.);
286  // eta of the 2. leading jet (corrected to L2+L3)
287  hists_["jet2Eta_"] =
288  store_->book1D("Jet2Eta", "#eta_{L2L3}(jet2)", 60, -3., 3.);
289  // pt of the 2. leading jet (corrected to L2+L3)
290  hists_["jet2Pt_"] = store_->book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.);
291  // eta of the 3. leading jet (corrected to L2+L3)
292  hists_["jet3Eta_"] =
293  store_->book1D("Jet3Eta", "#eta_{L2L3}(jet3)", 60, -3., 3.);
294  // pt of the 3. leading jet (corrected to L2+L3)
295  hists_["jet3Pt_"] = store_->book1D("Jet3Pt", "pt_{L2L3}(jet3)", 60, 0., 300.);
296  // eta of the 4. leading jet (corrected to L2+L3)
297  hists_["jet4Eta_"] =
298  store_->book1D("Jet4Eta", "#eta_{L2L3}(jet4)", 60, -3., 3.);
299  // pt of the 4. leading jet (corrected to L2+L3)
300  hists_["jet4Pt_"] = store_->book1D("Jet4Pt", "pt_{L2L3}(jet4)", 60, 0., 300.);
301  // MET (tc)
302  hists_["metTC_"] = store_->book1D("METTC", "MET_{TC}", 50, 0., 200.);
303  // MET (pflow)
304  hists_["metPflow_"] = store_->book1D("METPflow", "MET_{Pflow}", 50, 0., 200.);
305  // dz for muons (to suppress cosmis)
306  hists_["muonDelZ_"] = store_->book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
307  // dxy for muons (to suppress cosmics)
308  hists_["muonDelXY_"] =
309  store_->book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
310 
311  // set axes titles for dxy for muons
312  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
313  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
314 
315  if (verbosity_ == VERBOSE) return;
316 
317  // --- [DEBUG] --- //
318  // charged hadron isolation component of the candidate muon (depending on the
319  // decay channel)
320  hists_["muonChHadIso_"] = store_->book1D(
321  "MuonChHadIsoComp", "ChHad_{IsoComponent}(#mu)", 50, 0., 5.);
322  // neutral hadron isolation component of the candidate muon (depending on the
323  // decay channel)
324  hists_["muonNeHadIso_"] = store_->book1D(
325  "MuonNeHadIsoComp", "NeHad_{IsoComponent}(#mu)", 50, 0., 5.);
326  // photon isolation component of the candidate muon (depending on the decay
327  // channel)
328  hists_["muonPhIso_"] =
329  store_->book1D("MuonPhIsoComp", "Photon_{IsoComponent}(#mu)", 50, 0., 5.);
330  // charged hadron isolation component of the candidate electron (depending on
331  // the decay channel)
332  hists_["elecChHadIso_"] = store_->book1D(
333  "ElectronChHadIsoComp", "ChHad_{IsoComponent}(e)", 50, 0., 5.);
334  // neutral hadron isolation component of the candidate electron (depending on
335  // the decay channel)
336  hists_["elecNeHadIso_"] = store_->book1D(
337  "ElectronNeHadIsoComp", "NeHad_{IsoComponent}(e)", 50, 0., 5.);
338  // photon isolation component of the candidate electron (depending on the
339  // decay channel)
340  hists_["elecPhIso_"] = store_->book1D("ElectronPhIsoComp",
341  "Photon_{IsoComponent}(e)", 50, 0., 5.);
342  // multiplicity of btagged jets (for track counting high purity) with
343  // pt(L2L3)>30
344  hists_["jetMultBPur_"] =
345  store_->book1D("JetMultBPur", "N_{30}(TCHP)", 10, 0., 10.);
346  // btag discriminator for track counting high purity
347  hists_["jetBDiscPur_"] =
348  store_->book1D("JetBDiscPur", "Disc_{TCHP}(Jet)", 100, 0., 10.);
349  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
350  hists_["jetMultBVtx_"] =
351  store_->book1D("JetMultBVtx", "N_{30}(SSVHE)", 10, 0., 10.);
352  // btag discriminator for simple secondary vertex
353  hists_["jetBDiscVtx_"] =
354  store_->book1D("JetBDiscVtx", "Disc_{SSVHE}(Jet)", 35, -1., 6.);
355  // multiplicity for combined secondary vertex
356  hists_["jetMultCSVtx_"] =
357  store_->book1D("JetMultCSV", "N_{30}(CSV)", 10, 0., 10.);
358  // btag discriminator for combined secondary vertex
359  hists_["jetBCVtx_"] =
360  store_->book1D("JetDiscCSV", "Disc_{CSV}(JET)", 100, -1., 2.);
361  // pt of the 1. leading jet (uncorrected)
362  hists_["jet1PtRaw_"] =
363  store_->book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
364  // pt of the 2. leading jet (uncorrected)
365  hists_["jet2PtRaw_"] =
366  store_->book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
367  // pt of the 3. leading jet (uncorrected)
368  hists_["jet3PtRaw_"] =
369  store_->book1D("Jet3PtRaw", "pt_{Raw}(jet3)", 60, 0., 300.);
370  // pt of the 4. leading jet (uncorrected)
371  hists_["jet4PtRaw_"] =
372  store_->book1D("Jet4PtRaw", "pt_{Raw}(jet4)", 60, 0., 300.);
373  // selected events
374  hists_["eventLogger_"] =
375  store_->book2D("EventLogger", "Logged Events", 9, 0., 9., 10, 0., 10.);
376 
377  // set axes titles for selected events
378  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
379  hists_["eventLogger_"]->setBinLabel(1, "Run", 1);
380  hists_["eventLogger_"]->setBinLabel(2, "Block", 1);
381  hists_["eventLogger_"]->setBinLabel(3, "Event", 1);
382  hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1);
383  hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1);
384  hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1);
385  hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1);
386  hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1);
387  hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1);
388  hists_["eventLogger_"]->setAxisTitle("logged evts", 2);
389  return;
390 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::vector< std::string > triggerPaths_
Level verbosity_
verbosity level for booking
std::string label_
instance label
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
DQMStore * store_
storage manager
bool TopSingleLepton::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 93 of file TopSingleLeptonDQM.h.

References hists_.

Referenced by fill().

93  {
94  return hists_.find(histName.c_str()) != hists_.end();
95  };
std::map< std::string, MonitorElement * > hists_
histogram container
void MonitorEnsemble::fill ( const edm::Event event,
const edm::EventSetup setup 
)

fill monitor histograms with electronId and jetCorrections

Definition at line 392 of file TopSingleLeptonDQM.cc.

References btagCSV_, btagCSVWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, JetCorrector::correction(), eidCutValue_, elecIso_, elecs_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::EventSetup::find(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), hists_, customizeTrackingMonitorSeedNumber::idx, includeBTag_, edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, jetCorrector_, bTagSequences_cff::jetID, jetIDLabel_, jetIDSelect_, fwrapper::jets, jets_, jetSelect_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), edm::eventsetup::EventSetupRecordKey::makeKey(), Calculate::massBTopQuark(), Calculate::massTopQuark(), Calculate::massWBoson(), max(), TopSingleLepton::MAXJETS, caloMETBenchmarkGeneric_cfi::met, mets_, VarParsing::mult, trackingTruthProducerFastSim_cfi::muon, muonIso_, patZpeak::muons, muons_, muonSelect_, RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), pvs_, pvSelect_, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), EgammaValidation_Wenu_cff::sel, triggerPaths_, triggerTable_, upperEdge_, and TopSingleLepton::WMASS.

Referenced by fill().

393  {
394  // fetch trigger event if configured such
396 
398  if (!event.getByToken(triggerTable_, triggerTable)) return;
399  }
400 
401  /*
402  ------------------------------------------------------------
403 
404  Primary Vertex Monitoring
405 
406  ------------------------------------------------------------
407  */
408  // fill monitoring plots for primary verices
410  if (!event.getByToken(pvs_, pvs)) return;
411  unsigned int pvMult = 0;
412  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
413  pv != pvs->end(); ++pv) {
414  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
415  }
416  fill("pvMult_", pvMult);
417 
418  /*
419  ------------------------------------------------------------
420 
421  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
422  value=5.0)
423 
424  ------------------------------------------------------------
425  */
426  if (!event.eventAuxiliary().run()) return;
427  fill("RunNumb_", event.eventAuxiliary().run());
428 
429  double dummy = 5.;
430  fill("InstLumi_", dummy);
431 
432  /*
433  ------------------------------------------------------------
434 
435  Electron Monitoring
436 
437  ------------------------------------------------------------
438  */
439 
440  // fill monitoring plots for electrons
442  if (!event.getByToken(elecs_, elecs)) return;
443 
444  // check availability of electron id
446  if (!electronId_.isUninitialized()) {
447  if (!event.getByToken(electronId_, electronId)) return;
448  }
449 
450  // loop electron collection
451  unsigned int eMult = 0, eMultIso = 0;
452  std::vector<const reco::PFCandidate*> isoElecs;
453  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin();
454  elec != elecs->end(); ++elec) {
455  if (elec->gsfElectronRef().isNull()) {
456  continue;
457  }
458  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
459  // restrict to electrons with good electronId
460  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >=
461  eidCutValue_)) {
462  if (!elecSelect_ || (*elecSelect_)(*elec)) {
463 
464  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
465  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
466  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
467  double el_pfRelIso =
468  (el_ChHadIso +
469  max(0., el_NeHadIso + el_PhIso -
470  0.5 * gsf_el->pfIsolationVariables().sumPUPt)) /
471  gsf_el->pt();
472  if (eMult == 0) {
473  // restrict to the leading electron
474  fill("elecPt_", elec->pt());
475  fill("elecEta_", elec->eta());
476  fill("elecRelIso_", el_pfRelIso);
477  fill("elecChHadIso_", el_ChHadIso);
478  fill("elecNeHadIso_", el_NeHadIso);
479  fill("elecPhIso_", el_PhIso);
480  }
481  // in addition to the multiplicity counter buffer the iso
482  // electron candidates for later overlap check with jets
483  ++eMult;
484  if (!elecIso_ || (*elecIso_)(*elec)) {
485  isoElecs.push_back(&(*elec));
486  ++eMultIso;
487  }
488  }
489  }
490  }
491  fill("elecMult_", eMult);
492  fill("elecMultIso_", eMultIso);
493 
494  /*
495  ------------------------------------------------------------
496 
497  Muon Monitoring
498 
499  ------------------------------------------------------------
500  */
501 
502  // fill monitoring plots for muons
503  unsigned int mMult = 0, mMultIso = 0;
504 
507 
508  if (!event.getByToken(muons_, muons)) return;
509 
510  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin();
511  muonit != muons->end(); ++muonit) {
512 
513  if (muonit->muonRef().isNull()) continue;
514  reco::MuonRef muon = muonit->muonRef();
515 
516  // restrict to globalMuons
517  if (muon->isGlobalMuon()) {
518  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
519  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
520 
521  // apply preselection
522  if (!muonSelect_ || (*muonSelect_)(*muonit)) {
523 
524  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
525  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
526  double phoEt = muon->pfIsolationR04().sumPhotonEt;
527 
528  double pfRelIso =
529  (chHadPt +
530  max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
531  muon->pt(); // CB dBeta corrected iso!
532 
533  if (mMult == 0) {
534  // restrict to leading muon
535  fill("muonPt_", muon->pt());
536  fill("muonEta_", muon->eta());
537 
538  fill("muonRelIso_", pfRelIso);
539 
540  fill("muonChHadIso_", chHadPt);
541  fill("muonNeHadIso_", neHadEt);
542  fill("muonPhIso_", phoEt);
543  }
544  ++mMult;
545  if (!muonIso_ || (*muonIso_)(*muonit)) ++mMultIso;
546  }
547  }
548  }
549  fill("muonMult_", mMult);
550  fill("muonMultIso_", mMultIso);
551 
552  /*
553  ------------------------------------------------------------
554 
555  Jet Monitoring
556 
557  ------------------------------------------------------------
558  */
559 
560  // check availability of the btaggers
561  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCSV;
562  if (includeBTag_) {
563  if (!event.getByToken(btagEff_, btagEff)) return;
564  if (!event.getByToken(btagPur_, btagPur)) return;
565  if (!event.getByToken(btagVtx_, btagVtx)) return;
566  if (!event.getByToken(btagCSV_, btagCSV)) return;
567  }
568  // load jet corrector if configured such
569  const JetCorrector* corrector = 0;
570  if (!jetCorrector_.empty()) {
571  // check whether a jet correcto is in the event setup or not
573  JetCorrectionsRecord>())) {
574  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
575  } else {
576  edm::LogVerbatim("TopSingleLeptonDQM")
577  << "\n"
578  << "-----------------------------------------------------------------"
579  "-------------------- \n"
580  << " No JetCorrectionsRecord available from EventSetup: "
581  " \n"
582  << " - Jets will not be corrected. "
583  " \n"
584  << " - If you want to change this add the following lines to your "
585  "cfg file: \n"
586  << " "
587  " \n"
588  << " ## load jet corrections "
589  " \n"
590  << " "
591  "process.load(\"JetMETCorrections.Configuration."
592  "JetCorrectionServicesAllAlgos_cff\") \n"
593  << " process.prefer(\"ak5CaloL2L3\") "
594  " \n"
595  << " "
596  " \n"
597  << "-----------------------------------------------------------------"
598  "-------------------- \n";
599  }
600  }
601 
602  // loop jet collection
603  std::vector<reco::Jet> correctedJets;
604  std::vector<double> JetTagValues;
605  unsigned int mult = 0, multBEff = 0, multBPur = 0, multBVtx = 0, multCSV = 0;
606 
608  if (!event.getByToken(jets_, jets)) {
609  return;
610  }
611 
613  if (jetIDSelect_) {
614  if (!event.getByToken(jetIDLabel_, jetID)) return;
615  }
616 
617  for (edm::View<reco::Jet>::const_iterator jet = jets->begin();
618  jet != jets->end(); ++jet) {
619  // check jetID for calo jets
620  unsigned int idx = jet - jets->begin();
621  if (jetIDSelect_ &&
622  dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
623  if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
624  }
625  // chekc additional jet selection for calo, pf and bare reco jets
626  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
627  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
628  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
630  if (!jetSelect(sel)) {
631  continue;
632  }
633  } else if (dynamic_cast<const reco::PFJet*>(&*jet)) {
634  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
635  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
637  if (!jetSelect(sel)) continue;
638  } else {
639  reco::Jet sel = *jet;
640  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
642  if (!jetSelect(sel)) continue;
643  }
644 
645  // prepare jet to fill monitor histograms
646  reco::Jet monitorJet = *jet;
647  monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
648  correctedJets.push_back(monitorJet);
649  ++mult; // determine jet multiplicity
650  if (includeBTag_) {
651  // fill b-discriminators
652  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
653  fill("jetBDiscEff_", (*btagEff)[jetRef]);
654  if ((*btagEff)[jetRef] > btagEffWP_) ++multBEff;
655  fill("jetBDiscPur_", (*btagPur)[jetRef]);
656  if ((*btagPur)[jetRef] > btagPurWP_) ++multBPur;
657  fill("jetBDiscVtx_", (*btagVtx)[jetRef]);
658  if ((*btagVtx)[jetRef] > btagVtxWP_) ++multBVtx;
659  fill("jetBCVtx_", (*btagCSV)[jetRef]);
660  if ((*btagCSV)[jetRef] > btagCSVWP_) ++multCSV;
661 
662  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV
663  // tagger
664  JetTagValues.push_back((*btagCSV)[jetRef]);
665  }
666  // fill pt (raw or L2L3) for the leading four jets
667  if (idx == 0) {
668  fill("jet1Pt_", monitorJet.pt());
669  fill("jet1PtRaw_", jet->pt());
670  fill("jet1Eta_", monitorJet.eta());
671  };
672  if (idx == 1) {
673  fill("jet2Pt_", monitorJet.pt());
674  fill("jet2PtRaw_", jet->pt());
675  fill("jet2Eta_", monitorJet.eta());
676  }
677  if (idx == 2) {
678  fill("jet3Pt_", monitorJet.pt());
679  fill("jet3PtRaw_", jet->pt());
680  fill("jet3Eta_", monitorJet.eta());
681  }
682  if (idx == 3) {
683  fill("jet4Pt_", monitorJet.pt());
684  fill("jet4PtRaw_", jet->pt());
685  fill("jet4Eta_", monitorJet.eta());
686  }
687  }
688  fill("jetMult_", mult);
689  fill("jetMultBEff_", multBEff);
690  fill("jetMultBPur_", multBPur);
691  fill("jetMultBVtx_", multBVtx);
692  fill("jetMultCSVtx_", multCSV);
693 
694  /*
695  ------------------------------------------------------------
696 
697  MET Monitoring
698 
699  ------------------------------------------------------------
700  */
701 
702  // fill monitoring histograms for met
703  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >::const_iterator
704  met_ = mets_.begin();
705  met_ != mets_.end(); ++met_) {
707  if (!event.getByToken(*met_, met)) continue;
708  if (met->begin() != met->end()) {
709  unsigned int idx = met_ - mets_.begin();
710  if (idx == 0) fill("metCalo_", met->begin()->et());
711  if (idx == 1) fill("metTC_", met->begin()->et());
712  if (idx == 2) fill("metPflow_", met->begin()->et());
713  }
714  }
715 
716  /*
717  ------------------------------------------------------------
718 
719  Event Monitoring
720 
721  ------------------------------------------------------------
722  */
723 
724  // fill W boson and top mass estimates
725 
726  Calculate eventKinematics(MAXJETS, WMASS);
727  double wMass = eventKinematics.massWBoson(correctedJets);
728  double topMass = eventKinematics.massTopQuark(correctedJets);
729  if (wMass >= 0 && topMass >= 0) {
730  fill("massW_", wMass);
731  fill("massTop_", topMass);
732  }
733 
734  // Fill M3 with Btag (CSV Tight) requirement
735 
736  if (!includeBTag_) return;
737  if (correctedJets.size() != JetTagValues.size()) return;
738  double btopMass =
739  eventKinematics.massBTopQuark(correctedJets, JetTagValues, btagCSVWP_);
740  if (btopMass >= 0) fill("massBTop_", btopMass);
741 
742  // fill plots for trigger monitoring
743  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
744  (lowerEdge_ < wMass && wMass < upperEdge_)) {
746  fill(event, *triggerTable, "trigger", triggerPaths_);
747  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
748  // log runnumber, lumi block, event number & some
749  // more pysics infomation for interesting events
750  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
751  fill("eventLogger_", 1.5, logged_ + 0.5,
752  event.eventAuxiliary().luminosityBlock());
753  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
754  if (correctedJets.size() > 0)
755  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
756  if (correctedJets.size() > 1)
757  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
758  if (correctedJets.size() > 2)
759  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
760  if (correctedJets.size() > 3)
761  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
762  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
763  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
764  ++logged_;
765  }
766  }
767 }
std::map< std::string, MonitorElement * > hists_
histogram container
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double btagEffWP_
btag working points
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
std::vector< std::string > triggerPaths_
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
Definition: Jet.h:20
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
RunNumber_t run() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:444
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
Jets made from PFObjects.
Definition: PFJet.h:21
StringCutObjectSelector< reco::PFCandidate > * elecIso_
extra isolation criterion on electron
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
LuminosityBlockNumber_t luminosityBlock() const
StringCutObjectSelector< reco::PFCandidate > * muonIso_
extra isolation criterion on muon
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
StringCutObjectSelector< reco::Vertex > * pvSelect_
static const double WMASS
double lowerEdge_
mass window upper and lower edge
Helper class for the calculation of a top and a W boson mass estime.
Definition: TopDQMHelpers.h:68
StringCutObjectSelector< reco::PFCandidate > * elecSelect_
extra selection on electrons
const T & max(const T &a, const T &b)
virtual float eta() const
momentum pseudorapidity
vector< PseudoJet > jets
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:69
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
StringCutObjectSelector< reco::PFCandidate > * muonSelect_
extra selection on muons
tuple muons
Definition: patZpeak.py:38
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
static EventSetupRecordKey makeKey()
bool isUninitialized() const
Definition: EDGetToken.h:71
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
std::string jetCorrector_
jetCorrector
static const unsigned int MAXJETS
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventNumber_t event() const
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
void MonitorEnsemble::fill ( const edm::Event event,
const edm::TriggerResults triggerTable,
std::string  channel,
const std::vector< std::string >  labels 
) const
inlineprivate

fill trigger monitoring histograms

Definition at line 203 of file TopSingleLeptonDQM.h.

References accept(), fill(), hists_, customizeTrackingMonitorSeedNumber::idx, monitorPath(), selectionPath(), and relativeConstraints::value.

206  {
207  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
208  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
209  fill((channel + "Mon_").c_str(), idx + 0.5);
210  // take care to fill triggerMon_ before evts is being called
211  int evts = hists_.find((channel + "Mon_").c_str())
212  ->second->getBinContent(idx + 1);
213  double value = hists_.find((channel + "Eff_").c_str())
214  ->second->getBinContent(idx + 1);
215  fill(
216  (channel + "Eff_").c_str(), idx + 0.5,
217  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
218  value));
219  }
220  }
221 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:25
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::string monitorPath(const std::string &label) const
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 97 of file TopSingleLeptonDQM.h.

References booked(), hists_, and edm::second().

97  {
98  if (booked(histName.c_str()))
99  hists_.find(histName.c_str())->second->Fill(value);
100  };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  xValue,
double  yValue 
) const
inlineprivate

fill histogram if it had been booked before (2-dim version)

Definition at line 102 of file TopSingleLeptonDQM.h.

References booked(), hists_, and edm::second().

102  {
103  if (booked(histName.c_str()))
104  hists_.find(histName.c_str())->second->Fill(xValue, yValue);
105  };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  xValue,
double  yValue,
double  zValue 
) const
inlineprivate

fill histogram if it had been booked before (2-dim version)

Definition at line 107 of file TopSingleLeptonDQM.h.

References booked(), hists_, and edm::second().

108  {
109  if (booked(histName.c_str()))
110  hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue);
111  };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
std::string TopSingleLepton::MonitorEnsemble::monitorPath ( const std::string &  label) const
inlineprivate

deduce monitorPath from label, the label is expected to be of type 'selectionPath:monitorPath'

Definition at line 76 of file TopSingleLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

76  {
77  return label.substr(label.find(':') + 1);
78  };
std::string TopSingleLepton::MonitorEnsemble::selectionPath ( const std::string &  label) const
inlineprivate

deduce selectionPath from label, the label is expected to be of type 'selectionPath:monitorPath'

Definition at line 81 of file TopSingleLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

81  {
82  return label.substr(0, label.find(':'));
83  };
void MonitorEnsemble::triggerBinLabels ( std::string  channel,
const std::vector< std::string >  labels 
)
inlineprivate

set configurable labels for trigger monitoring histograms

Definition at line 191 of file TopSingleLeptonDQM.h.

References hists_, customizeTrackingMonitorSeedNumber::idx, monitorPath(), and selectionPath().

Referenced by book().

192  {
193  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
194  hists_[(channel + "Mon_").c_str()]
195  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
196  hists_[(channel + "Eff_").c_str()]
197  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
198  monitorPath(labels[idx]) + "]",
199  1);
200  }
201 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::string monitorPath(const std::string &label) const

Member Data Documentation

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagCSV_
private

Definition at line 175 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagCSVWP_
private

Definition at line 178 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagEff_
private

btag discriminator labels

Definition at line 175 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 178 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagPur_
private

Definition at line 175 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 178 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagVtx_
private

Definition at line 175 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 178 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::eidCutValue_
private

electronId pattern we expect the following pattern: 0: fails 1: passes electron ID only 2: passes electron Isolation only 3: passes electron ID and Isolation only 4: passes conversion rejection 5: passes conversion rejection and ID 6: passes conversion rejection and Isolation 7: passes the whole selection As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID

Definition at line 146 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::PFCandidate>* TopSingleLepton::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 148 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::PFCandidate> > TopSingleLepton::MonitorEnsemble::elecs_
private

Definition at line 123 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::PFCandidate>* TopSingleLepton::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 150 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::ValueMap<float> > TopSingleLepton::MonitorEnsemble::electronId_
private

electronId label

Definition at line 132 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::map<std::string, MonitorElement*> TopSingleLepton::MonitorEnsemble::hists_
private

histogram container

Definition at line 187 of file TopSingleLeptonDQM.h.

Referenced by book(), booked(), fill(), and triggerBinLabels().

bool TopSingleLepton::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 173 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 163 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetIDValueMap> TopSingleLepton::MonitorEnsemble::jetIDLabel_
private

jetID as an extra selection type

Definition at line 165 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::JetID>* TopSingleLepton::MonitorEnsemble::jetIDSelect_
private

extra jetID selection on calo jets

Definition at line 167 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::Jet> > TopSingleLepton::MonitorEnsemble::jets_
private

input sources for monitoring

Definition at line 121 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::jetSelect_
private

extra selection on jets (here given as std::string as it depends on the the jet type, which selections are valid and which not)

Definition at line 170 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::label_
private
int TopSingleLepton::MonitorEnsemble::logged_
private

number of logged interesting events

Definition at line 183 of file TopSingleLeptonDQM.h.

Referenced by fill().

double TopSingleLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 180 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::vector<edm::EDGetTokenT<edm::View<reco::MET> > > TopSingleLepton::MonitorEnsemble::mets_
private

considers a vector of METs

Definition at line 119 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::PFCandidate>* TopSingleLepton::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 157 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::PFCandidate> > TopSingleLepton::MonitorEnsemble::muons_
private

Definition at line 122 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::PFCandidate>* TopSingleLepton::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 160 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::Vertex> > TopSingleLepton::MonitorEnsemble::pvs_
private

Definition at line 124 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::Vertex>* TopSingleLepton::MonitorEnsemble::pvSelect_
private

extra selection on primary vertices; meant to investigate the pile-up effect

Definition at line 154 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

DQMStore* TopSingleLepton::MonitorEnsemble::store_
private

storage manager

Definition at line 185 of file TopSingleLeptonDQM.h.

Referenced by book().

edm::EDConsumerBase TopSingleLepton::MonitorEnsemble::tmpConsumerBase
private

Definition at line 188 of file TopSingleLeptonDQM.h.

std::vector<std::string> TopSingleLepton::MonitorEnsemble::triggerPaths_
private

trigger paths for monitoring, expected to be of form signalPath:MonitorPath

Definition at line 129 of file TopSingleLeptonDQM.h.

Referenced by book(), fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::TriggerResults> TopSingleLepton::MonitorEnsemble::triggerTable_
private

trigger table

Definition at line 126 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::upperEdge_
private

Definition at line 180 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level TopSingleLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 111 of file TopSingleLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().