CMS 3D CMS Logo

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 (DQMStore::IBooker &ibooker)
 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::JetTagCollectionbtagCSV_
 
double btagCSVWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT< reco::JetTagCollectionbtagPur_
 
double btagPurWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagVtx_
 
double btagVtxWP_
 
std::string directory_
 
double eidCutValue_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
 
std::unique_ptr< 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::JetIDValueMapjetIDLabel_
 jetID as an extra selection type More...
 
std::unique_ptr< 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...
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
 
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
 
edm::EDConsumerBase tmpConsumerBase
 
std::vector< std::string > triggerPaths_
 
edm::EDGetTokenT< edm::TriggerResultstriggerTable_
 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 btagCSV_, btagCSVWP_, DEBUG, directory_, eidCutValue_, elecIso_, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), includeBTag_, jetCorrector_, jetIDLabel_, jetIDSelect_, jets_, jetSelect_, lowerEdge_, mets_, TtFullHadSignalSelMVATrainTreeSaver_cff::monitoring, 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_(nullptr),
27  elecSelect_(nullptr),
28  pvSelect_(nullptr),
29  muonIso_(nullptr),
30  muonSelect_(nullptr),
31  jetIDSelect_(nullptr),
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")) {
122  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 
142  edm::ParameterSet btagCSV =
143  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
144  .getParameter<edm::ParameterSet>("cvsVertex");
146  btagCSV.getParameter<edm::InputTag>("label"));
147  btagCSVWP_ = btagCSV.getParameter<double>("workingPoint");
148  }
149  }
150 
151  // triggerExtras are optional; they may be omitted or empty
152  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
153  edm::ParameterSet triggerExtras =
154  cfg.getParameter<edm::ParameterSet>("triggerExtras");
156  triggerExtras.getParameter<edm::InputTag>("src"));
157  triggerPaths_ =
158  triggerExtras.getParameter<std::vector<std::string> >("paths");
159  }
160 
161  // massExtras is optional; in case it's not found no mass
162  // window cuts are applied for the same flavor monitor
163  // histograms
164  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
165  edm::ParameterSet massExtras =
166  cfg.getParameter<edm::ParameterSet>("massExtras");
167  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
168  upperEdge_ = massExtras.getParameter<double>("upperEdge");
169  }
170 
171  // setup the verbosity level for booking histograms;
172  // per default the verbosity level will be set to
173  // STANDARD. This will also be the chosen level in
174  // the case when the monitoring PSet is not found
176  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
178  cfg.getParameter<edm::ParameterSet>("monitoring");
179  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
180  verbosity_ = DEBUG;
181  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
182  verbosity_ = VERBOSE;
183  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
184  verbosity_ = STANDARD;
185  }
186  // and don't forget to do the histogram booking
187  directory_ = cfg.getParameter<std::string>("directory");
188  // book(ibooker);
189 }
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
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:186
std::vector< std::string > triggerPaths_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
Level verbosity_
verbosity level for booking
double lowerEdge_
mass window upper and lower edge
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
std::string label_
instance label
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
std::string jetCorrector_
jetCorrector
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonIso_
extra isolation criterion on muon
TopSingleLepton::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 66 of file TopSingleLeptonDQM.h.

References book(), fill(), and GeneralSetup::setup().

66 {};

Member Function Documentation

void MonitorEnsemble::book ( DQMStore::IBooker ibooker)

book histograms in subdirectory directory

Definition at line 191 of file TopSingleLeptonDQM.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), directory_, SiPixelPhase1TrackClustersV_cfi::e3, vertexPlots::e4, hists_, label_, DQMStore::IBooker::setCurrentFolder(), STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, triggerBinLabels(), triggerPaths_, VERBOSE, and verbosity_.

Referenced by ~MonitorEnsemble().

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

References btagCSV_, btagCSVWP_, JetCorrector::correction(), mitigatedMETSequence_cff::corrector, eidCutValue_, elecIso_, PatTopSelectionAnalyzer_cfi::elecs, elecs_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::EventSetup::find(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), hists_, training_settings::idx, includeBTag_, edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, jetCorrector_, jetIDLabel_, jetIDSelect_, fwrapper::jets, jets_, jetSelect_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), edm::eventsetup::EventSetupRecordKey::makeKey(), SiStripPI::max, RazorAnalyzer::met, mets_, muonIso_, extraflags_cff::muons, muons_, muonSelect_, EnergyCorrector::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), pvs_, pvSelect_, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), triggerObjects_cff::sel, triggerPaths_, triggerTable_, upperEdge_, and pseudoTop_cfi::wMass.

Referenced by fill(), selectionPath(), and ~MonitorEnsemble().

350  {
351  // fetch trigger event if configured such
353 
355  if (!event.getByToken(triggerTable_, triggerTable)) return;
356  }
357 
358  /*
359  ------------------------------------------------------------
360 
361  Primary Vertex Monitoring
362 
363  ------------------------------------------------------------
364  */
365  // fill monitoring plots for primary verices
367  if (!event.getByToken(pvs_, pvs)) return;
368  unsigned int pvMult = 0;
369  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
370  pv != pvs->end(); ++pv) {
371  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
372  }
373  fill("pvMult_", pvMult);
374 
375  /*
376  ------------------------------------------------------------
377 
378  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
379  value=5.0)
380 
381  ------------------------------------------------------------
382  */
383  if (!event.eventAuxiliary().run()) return;
384  fill("RunNumb_", event.eventAuxiliary().run());
385 
386  double dummy = 5.;
387  fill("InstLumi_", dummy);
388 
389  /*
390  ------------------------------------------------------------
391 
392  Electron Monitoring
393 
394  ------------------------------------------------------------
395  */
396 
397  // fill monitoring plots for electrons
399  if (!event.getByToken(elecs_, elecs)) return;
400 
401  // check availability of electron id
403  if (!electronId_.isUninitialized()) {
404  if (!event.getByToken(electronId_, electronId)) return;
405  }
406 
407  // loop electron collection
408  unsigned int eMult = 0, eMultIso = 0;
409  std::vector<const reco::PFCandidate*> isoElecs;
410  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin();
411  elec != elecs->end(); ++elec) {
412  if (elec->gsfElectronRef().isNull()) {
413  continue;
414  }
415  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
416  // restrict to electrons with good electronId
417  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >=
418  eidCutValue_)) {
419  if (!elecSelect_ || (*elecSelect_)(*elec)) {
420 
421  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
422  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
423  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
424  double el_pfRelIso =
425  (el_ChHadIso +
426  max(0., el_NeHadIso + el_PhIso -
427  0.5 * gsf_el->pfIsolationVariables().sumPUPt)) /
428  gsf_el->pt();
429  if (eMult == 0) {
430  // restrict to the leading electron
431  fill("elecPt_", elec->pt());
432  fill("elecEta_", elec->eta());
433  fill("elecRelIso_", el_pfRelIso);
434  fill("elecChHadIso_", el_ChHadIso);
435  fill("elecNeHadIso_", el_NeHadIso);
436  fill("elecPhIso_", el_PhIso);
437  }
438  // in addition to the multiplicity counter buffer the iso
439  // electron candidates for later overlap check with jets
440  ++eMult;
441  if (!elecIso_ || (*elecIso_)(*elec)) {
442  isoElecs.push_back(&(*elec));
443  ++eMultIso;
444  }
445  }
446  }
447  }
448  fill("elecMult_", eMult);
449  fill("elecMultIso_", eMultIso);
450 
451  /*
452  ------------------------------------------------------------
453 
454  Muon Monitoring
455 
456  ------------------------------------------------------------
457  */
458 
459  // fill monitoring plots for muons
460  unsigned int mMult = 0, mMultIso = 0;
461 
464 
465  if (!event.getByToken(muons_, muons)) return;
466 
467  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin();
468  muonit != muons->end(); ++muonit) {
469 
470  if (muonit->muonRef().isNull()) continue;
471  reco::MuonRef muon = muonit->muonRef();
472 
473  // restrict to globalMuons
474  if (muon->isGlobalMuon()) {
475  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
476  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
477 
478  // apply preselection
479  if (!muonSelect_ || (*muonSelect_)(*muonit)) {
480 
481  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
482  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
483  double phoEt = muon->pfIsolationR04().sumPhotonEt;
484 
485  double pfRelIso =
486  (chHadPt +
487  max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
488  muon->pt(); // CB dBeta corrected iso!
489 
490  if (mMult == 0) {
491  // restrict to leading muon
492  fill("muonPt_", muon->pt());
493  fill("muonEta_", muon->eta());
494 
495  fill("muonRelIso_", pfRelIso);
496 
497  fill("muonChHadIso_", chHadPt);
498  fill("muonNeHadIso_", neHadEt);
499  fill("muonPhIso_", phoEt);
500  }
501  ++mMult;
502  if (!muonIso_ || (*muonIso_)(*muonit)) ++mMultIso;
503  }
504  }
505  }
506  fill("muonMult_", mMult);
507  fill("muonMultIso_", mMultIso);
508 
509  /*
510  ------------------------------------------------------------
511 
512  Jet Monitoring
513 
514  ------------------------------------------------------------
515  */
516 
517  // check availability of the btaggers
518  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCSV;
519  if (includeBTag_) {
520 
521  if (!event.getByToken(btagCSV_, btagCSV)) return;
522  }
523  // load jet corrector if configured such
524  const JetCorrector* corrector = 0;
525  if (!jetCorrector_.empty()) {
526  // check whether a jet correcto is in the event setup or not
528  JetCorrectionsRecord>())) {
529  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
530  } else {
531  edm::LogVerbatim("TopSingleLeptonDQM")
532  << "\n"
533  << "-----------------------------------------------------------------"
534  "-------------------- \n"
535  << " No JetCorrectionsRecord available from EventSetup: "
536  " \n"
537  << " - Jets will not be corrected. "
538  " \n"
539  << " - If you want to change this add the following lines to your "
540  "cfg file: \n"
541  << " "
542  " \n"
543  << " ## load jet corrections "
544  " \n"
545  << " "
546  "process.load(\"JetMETCorrections.Configuration."
547  "JetCorrectionServicesAllAlgos_cff\") \n"
548  << " process.prefer(\"ak5CaloL2L3\") "
549  " \n"
550  << " "
551  " \n"
552  << "-----------------------------------------------------------------"
553  "-------------------- \n";
554  }
555  }
556 
557  // loop jet collection
558  std::vector<reco::Jet> correctedJets;
559  std::vector<double> JetTagValues;
560  unsigned int mult = 0, multCSV = 0;
561 
563  if (!event.getByToken(jets_, jets)) {
564  return;
565  }
566 
568  if (jetIDSelect_) {
569  if (!event.getByToken(jetIDLabel_, jetID)) return;
570  }
571 
572  for (edm::View<reco::Jet>::const_iterator jet = jets->begin();
573  jet != jets->end(); ++jet) {
574  // check jetID for calo jets
575  unsigned int idx = jet - jets->begin();
576  if (jetIDSelect_ &&
577  dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
578  if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
579  }
580  // chekc additional jet selection for calo, pf and bare reco jets
581  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
582  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
583  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
585  if (!jetSelect(sel)) {
586  continue;
587  }
588  } else if (dynamic_cast<const reco::PFJet*>(&*jet)) {
589  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
590  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
592  if (!jetSelect(sel)) continue;
593  } else {
594  reco::Jet sel = *jet;
595  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
597  if (!jetSelect(sel)) continue;
598  }
599 
600  // prepare jet to fill monitor histograms
601  reco::Jet monitorJet = *jet;
602  monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
603  correctedJets.push_back(monitorJet);
604  ++mult; // determine jet multiplicity
605  if (includeBTag_) {
606  // fill b-discriminators
607  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
608 
609  fill("jetBCVtx_", (*btagCSV)[jetRef]);
610  if ((*btagCSV)[jetRef] > btagCSVWP_) ++multCSV;
611 
612  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV
613  // tagger
614  JetTagValues.push_back((*btagCSV)[jetRef]);
615  }
616  // fill pt (raw or L2L3) for the leading four jets
617  if (idx == 0) {
618  fill("jet1Pt_", monitorJet.pt());
619  fill("jet1PtRaw_", jet->pt());
620  fill("jet1Eta_", monitorJet.eta());
621  };
622  if (idx == 1) {
623  fill("jet2Pt_", monitorJet.pt());
624  fill("jet2PtRaw_", jet->pt());
625  fill("jet2Eta_", monitorJet.eta());
626  }
627  if (idx == 2) {
628  fill("jet3Pt_", monitorJet.pt());
629  fill("jet3PtRaw_", jet->pt());
630  fill("jet3Eta_", monitorJet.eta());
631  }
632  if (idx == 3) {
633  fill("jet4Pt_", monitorJet.pt());
634  fill("jet4PtRaw_", jet->pt());
635  fill("jet4Eta_", monitorJet.eta());
636  }
637  }
638  fill("jetMult_", mult);
639 
640  fill("jetMultCSVtx_", multCSV);
641 
642  /*
643  ------------------------------------------------------------
644 
645  MET Monitoring
646 
647  ------------------------------------------------------------
648  */
649 
650  // fill monitoring histograms for met
651  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >::const_iterator
652  met_ = mets_.begin();
653  met_ != mets_.end(); ++met_) {
655  if (!event.getByToken(*met_, met)) continue;
656  if (met->begin() != met->end()) {
657  unsigned int idx = met_ - mets_.begin();
658  if (idx == 0) fill("metCalo_", met->begin()->et());
659  if (idx == 1) fill("metTC_", met->begin()->et());
660  if (idx == 2) fill("metPflow_", met->begin()->et());
661  }
662  }
663 
664  /*
665  ------------------------------------------------------------
666 
667  Event Monitoring
668 
669  ------------------------------------------------------------
670  */
671 
672  // fill W boson and top mass estimates
673 
674  Calculate eventKinematics(MAXJETS, WMASS);
675  double wMass = eventKinematics.massWBoson(correctedJets);
676  double topMass = eventKinematics.massTopQuark(correctedJets);
677  if (wMass >= 0 && topMass >= 0) {
678  fill("massW_", wMass);
679  fill("massTop_", topMass);
680  }
681 
682  // Fill M3 with Btag (CSV Tight) requirement
683 
684  if (!includeBTag_) return;
685  if (correctedJets.size() != JetTagValues.size()) return;
686  double btopMass =
687  eventKinematics.massBTopQuark(correctedJets, JetTagValues, btagCSVWP_);
688  if (btopMass >= 0) fill("massBTop_", btopMass);
689 
690  // fill plots for trigger monitoring
691  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
692  (lowerEdge_ < wMass && wMass < upperEdge_)) {
694  fill(event, *triggerTable, "trigger", triggerPaths_);
695  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
696  // log runnumber, lumi block, event number & some
697  // more pysics infomation for interesting events
698  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
699  fill("eventLogger_", 1.5, logged_ + 0.5,
700  event.eventAuxiliary().luminosityBlock());
701  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
702  if (correctedJets.size() > 0)
703  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
704  if (correctedJets.size() > 1)
705  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
706  if (correctedJets.size() > 2)
707  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
708  if (correctedJets.size() > 3)
709  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
710  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
711  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
712  ++logged_;
713  }
714  }
715 }
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
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:83
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
double eta() const final
momentum pseudorapidity
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
std::vector< std::string > triggerPaths_
Base class for all types of Jets.
Definition: Jet.h:20
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
RunNumber_t run() const
double pt() const final
transverse momentum
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
Jets made from PFObjects.
Definition: PFJet.h:21
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
LuminosityBlockNumber_t luminosityBlock() const
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:91
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.
vector< PseudoJet > jets
def pv(vc)
Definition: MetAnalyzer.py:6
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
met
===> hadronic RAZOR
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
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
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:73
std::string jetCorrector_
jetCorrector
static const unsigned int MAXJETS
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventNumber_t event() const
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonIso_
extra isolation criterion on muon
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 204 of file TopSingleLeptonDQM.h.

References accept(), fill(), hists_, training_settings::idx, monitorPath(), and selectionPath().

207  {
208  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
209  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
210  fill((channel + "Mon_").c_str(), idx + 0.5);
211  // take care to fill triggerMon_ before evts is being called
212  int evts = hists_.find((channel + "Mon_").c_str())
213  ->second->getBinContent(idx + 1);
214  double value = hists_.find((channel + "Eff_").c_str())
215  ->second->getBinContent(idx + 1);
216  fill(
217  (channel + "Eff_").c_str(), idx + 0.5,
218  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
219  value));
220  }
221  }
222 }
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:30
Definition: value.py:1
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)
Definition: value.py:1
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.

References fill(), tablePrinter::labels, AlCaHLTBitMon_QueryRunRegistry::string, and triggerBinLabels().

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 192 of file TopSingleLeptonDQM.h.

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

Referenced by book(), and selectionPath().

193  {
194  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
195  hists_[(channel + "Mon_").c_str()]
196  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
197  hists_[(channel + "Eff_").c_str()]
198  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
199  monitorPath(labels[idx]) + "]",
200  1);
201  }
202 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
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.

double TopSingleLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 178 of file TopSingleLeptonDQM.h.

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

Definition at line 175 of file TopSingleLeptonDQM.h.

double TopSingleLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 178 of file TopSingleLeptonDQM.h.

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

Definition at line 175 of file TopSingleLeptonDQM.h.

double TopSingleLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 178 of file TopSingleLeptonDQM.h.

std::string TopSingleLepton::MonitorEnsemble::directory_
private

Definition at line 189 of file TopSingleLeptonDQM.h.

Referenced by book(), 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().

std::unique_ptr<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().

std::unique_ptr<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 186 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().

std::unique_ptr<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().

std::unique_ptr<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().

std::unique_ptr<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().

std::unique_ptr<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().

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

Definition at line 187 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().