CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TopSingleLepton_miniAOD::MonitorEnsemble Class Reference

#include <TopSingleLeptonDQM_miniAOD.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< pat::Electron > > elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
 
std::unique_ptr< StringCutObjectSelector< pat::Electron > > 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< pat::Jet > > jets_
 input sources for monitoring More...
 
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
 
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< pat::MET > > > mets_
 considers a vector of METs More...
 
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
 
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
 
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
 
edm::InputTag rhoTag
 
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 32 of file TopSingleLeptonDQM_miniAOD.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

default contructor

Definition at line 29 of file TopSingleLeptonDQM_miniAOD.cc.

References DEBUG, directory_, eidCutValue_, elecIso_, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), jetCorrector_, jetIDLabel_, jetIDSelect_, jets_, jetSelect, jetSelect_, lowerEdge_, mets_, TtFullHadSignalSelMVATrainTreeSaver_cff::monitoring, muonIso_, muons_, muonSelect_, pvs_, pvSelect_, rhoTag, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, triggerPaths_, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

32  : label_(label),
33  elecIso_(nullptr),
34  elecSelect_(nullptr),
35  pvSelect_(nullptr),
36  muonIso_(nullptr),
37  muonSelect_(nullptr),
38  jetIDSelect_(nullptr),
39  jetSelect(nullptr),
40  includeBTag_(false),
41  lowerEdge_(-1.),
42  upperEdge_(-1.),
43  logged_(0) {
44 
45  // sources have to be given; this PSet is not optional
46  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
47  // muons_ = iC.consumes<edm::View<reco::PFCandidate> >(
48  // sources.getParameter<edm::InputTag>("muons"));
49 
50 
52  sources.getParameter<edm::InputTag>("muons"));
53 
54 
56  sources.getParameter<edm::InputTag>("elecs"));
58  sources.getParameter<edm::InputTag>("pvs"));
60  sources.getParameter<edm::InputTag>("jets"));
61  for (edm::InputTag const& tag :
62  sources.getParameter<std::vector<edm::InputTag> >("mets"))
63  mets_.push_back(iC.consumes<edm::View<pat::MET> >(tag));
64  // electronExtras are optional; they may be omitted or
65  // empty
66  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
67 
68 
69  edm::ParameterSet elecExtras =
70  cfg.getParameter<edm::ParameterSet>("elecExtras");
71  // select is optional; in case it's not found no
72  // selection will be applied
73  if (elecExtras.existsAs<std::string>("select")) {
75  elecExtras.getParameter<std::string>("select")));
76  }
77  // isolation is optional; in case it's not found no
78  // isolation will be applied
79  if (elecExtras.existsAs<std::string>("isolation")) {
81  elecExtras.getParameter<std::string>("isolation")));
82  }
83 
84  if (elecExtras.existsAs<std::string>("rho")) {
85  rhoTag = elecExtras.getParameter<edm::InputTag>("rho");
86  }
87  // electronId is optional; in case it's not found the
88  // InputTag will remain empty
89  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
90  edm::ParameterSet elecId =
91  elecExtras.getParameter<edm::ParameterSet>("electronId");
93  elecId.getParameter<edm::InputTag>("src"));
94  eidCutValue_ = elecId.getParameter<double>("cutValue");
95  }
96  }
97  // pvExtras are opetional; they may be omitted or empty
98  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
99  edm::ParameterSet pvExtras =
100  cfg.getParameter<edm::ParameterSet>("pvExtras");
101  // select is optional; in case it's not found no
102  // selection will be applied
103  if (pvExtras.existsAs<std::string>("select")) {
105  pvExtras.getParameter<std::string>("select")));
106  }
107  }
108  // muonExtras are optional; they may be omitted or empty
109  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
110  edm::ParameterSet muonExtras =
111  cfg.getParameter<edm::ParameterSet>("muonExtras");
112  // select is optional; in case it's not found no
113  // selection will be applied
114  if (muonExtras.existsAs<std::string>("select")) {
116  muonExtras.getParameter<std::string>("select")));
117  }
118  // isolation is optional; in case it's not found no
119  // isolation will be applied
120  if (muonExtras.existsAs<std::string>("isolation")) {
122  muonExtras.getParameter<std::string>("isolation")));
123  }
124  }
125 
126  // jetExtras are optional; they may be omitted or
127  // empty
128  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
129  edm::ParameterSet jetExtras =
130  cfg.getParameter<edm::ParameterSet>("jetExtras");
131  // jetCorrector is optional; in case it's not found
132  // the InputTag will remain empty
133  if (jetExtras.existsAs<std::string>("jetCorrector")) {
134  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
135  }
136  // read jetID information if it exists
137  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
138  edm::ParameterSet jetID =
139  jetExtras.getParameter<edm::ParameterSet>("jetID");
141  jetID.getParameter<edm::InputTag>("label"));
143  jetID.getParameter<std::string>("select")));
144  }
145  // select is optional; in case it's not found no
146  // selection will be applied (only implemented for
147  // CaloJets at the moment)
148  if (jetExtras.existsAs<std::string>("select")) {
149  jetSelect_ = jetExtras.getParameter<std::string>("select");
151  }
152  }
153 
154  // triggerExtras are optional; they may be omitted or empty
155  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
156  edm::ParameterSet triggerExtras =
157  cfg.getParameter<edm::ParameterSet>("triggerExtras");
159  triggerExtras.getParameter<edm::InputTag>("src"));
160  triggerPaths_ =
161  triggerExtras.getParameter<std::vector<std::string> >("paths");
162  }
163 
164  // massExtras is optional; in case it's not found no mass
165  // window cuts are applied for the same flavor monitor
166  // histograms
167  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
168  edm::ParameterSet massExtras =
169  cfg.getParameter<edm::ParameterSet>("massExtras");
170  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
171  upperEdge_ = massExtras.getParameter<double>("upperEdge");
172  }
173 
174  // setup the verbosity level for booking histograms;
175  // per default the verbosity level will be set to
176  // STANDARD. This will also be the chosen level in
177  // the case when the monitoring PSet is not found
179  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
181  cfg.getParameter<edm::ParameterSet>("monitoring");
182  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
183  verbosity_ = DEBUG;
184  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
185  verbosity_ = VERBOSE;
186  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
187  verbosity_ = STANDARD;
188  }
189  // and don't forget to do the histogram booking
190  directory_ = cfg.getParameter<std::string>("directory");
191  // book(ibooker);
192 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonIso_
extra isolation criterion on muon
T getParameter(std::string const &) const
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
std::vector< edm::EDGetTokenT< edm::View< pat::MET > > > mets_
considers a vector of METs
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
extra selection on muons
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:161
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecIso_
extra isolation criterion on electron
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
char const * label
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
double lowerEdge_
mass window upper and lower edge
int logged_
number of logged interesting events
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecSelect_
extra selection on electrons
Level verbosity_
verbosity level for booking
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
TopSingleLepton_miniAOD::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 46 of file TopSingleLeptonDQM_miniAOD.h.

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

46 {};

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 194 of file TopSingleLeptonDQM_miniAOD.cc.

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

Referenced by ~MonitorEnsemble().

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

check if histogram was booked

Definition at line 73 of file TopSingleLeptonDQM_miniAOD.h.

References hists_.

Referenced by fill().

73  {
74  return hists_.find(histName.c_str()) != hists_.end();
75  };
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 377 of file TopSingleLeptonDQM_miniAOD.cc.

References funct::abs(), pat::Jet::bDiscriminator(), pat::Jet::chargedEmEnergyFraction(), pat::Jet::chargedHadronEnergyFraction(), pat::Jet::chargedMultiplicity(), PatTopSelectionAnalyzer_cfi::elecs, elecs_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), objects.autophobj::float, edm::Event::getByToken(), hists_, training_settings::idx, edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), metsig::jet, fwrapper::jets, jets_, jetSelect, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), SiStripPI::max, RazorAnalyzer::met, mets_, metsig::muon, extraflags_cff::muons, muons_, muonSelect_, pat::Jet::neutralEmEnergyFraction(), pat::Jet::neutralHadronEnergyFraction(), pat::Jet::neutralMultiplicity(), reco::Vertex::position(), EnergyCorrector::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), pvs_, rhoTag, edm::EventAuxiliary::run(), triggerObjects_cff::sel, triggerPaths_, triggerTable_, upperEdge_, and pseudoTop_cfi::wMass.

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

378  {
379  // fetch trigger event if configured such
381 
383  if (!event.getByToken(triggerTable_, triggerTable)) return;
384  }
385 
386  /*
387  ------------------------------------------------------------
388 
389  Primary Vertex Monitoring
390 
391  ------------------------------------------------------------
392  */
393  // fill monitoring plots for primary verices
395  if (!event.getByToken(pvs_, pvs)) return;
396  const reco::Vertex& pver= pvs->front();
397 
398  unsigned int pvMult = 0;
399  if(pvs.isValid()){
400  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
401  pv != pvs->end(); ++pv) {
402 
403  bool isGood = ( !(pv->isFake()) &&
404  (pv->ndof() > 4.0) &&
405  (abs(pv->z()) < 24.0) &&
406  (abs(pv->position().Rho()) < 2.0)
407  );
408  if( !isGood ) continue;
409  pvMult++;
410  }
411  //std::cout<<" npv "<<testn<<endl;
412  }
413 
414  fill("pvMult_", pvMult);
415 
416  /*
417  ------------------------------------------------------------
418 
419  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
420  value=5.0)
421 
422  ------------------------------------------------------------
423  */
424 
425  //if (!event.eventAuxiliary().run()) return;
426 
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  edm::Handle< double > _rhoHandle;
445  event.getByLabel(rhoTag,_rhoHandle);
446  //if (!event.getByToken(elecs_, elecs)) return;
447 
448 
449  // check availability of electron id
451  if (!electronId_.isUninitialized()) {
452  if (!event.getByToken(electronId_, electronId)) return;
453  }
454 
455  // loop electron collection
456  unsigned int eMultIso = 0, eMult = 0;
457  std::vector<const pat::Electron*> isoElecs;
458 
459 
460  for (edm::View<pat::Electron>::const_iterator elec = elecs->begin();
461  elec != elecs->end(); ++elec) {
462 
463  if(true){//loose id
464  if (!elecSelect_ || (*elecSelect_)(*elec)) {
465 
466  double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt;
467  double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt;
468  double el_PhIso = elec->pfIsolationVariables().sumPhotonEt;
469 
470  double rho = _rhoHandle.isValid() ? (float)(*_rhoHandle) : 0;
471  double absEta = abs(elec->superCluster()->eta());
472  double eA = 0;
473  if (absEta < 1.000) eA = 0.1703;
474  else if (absEta < 1.479) eA = 0.1715;
475  else if (absEta < 2.000) eA = 0.1213;
476  else if (absEta < 2.200) eA = 0.1230;
477  else if (absEta < 2.300) eA = 0.1635;
478  else if (absEta < 2.400) eA = 0.1937;
479  else if (absEta < 5.000) eA = 0.2393;
480 
481 
482  double el_pfRelIso = (el_ChHadIso + max(0., el_NeHadIso + el_PhIso - rho * eA)) /elec->pt();
483 
484  ++eMult;
485 
486  if(eMult==1){
487  fill("elecRelIso_", el_pfRelIso);
488  fill("elecChHadIso_", el_ChHadIso);
489  fill("elecNeHadIso_", el_NeHadIso);
490  fill("elecPhIso_", el_PhIso);
491  }
492  //loose Iso
493  //if(!((el_pfRelIso<0.0994 && absEta<1.479)||(el_pfRelIso<0.107 && absEta>1.479)))continue;
494 
495  //tight Iso
496  if(!((el_pfRelIso<0.0588 && absEta<1.479)||(el_pfRelIso<0.0571 && absEta>1.479)))continue;
497  ++eMultIso;
498 
499  if (eMultIso == 1) {
500  // restrict to the leading electron
501  fill("elecPt_", elec->pt());
502  fill("elecEta_", elec->eta());
503  fill("elecPhi_", elec->phi());
504  }
505  }
506  }
507  }
508  //fill("elecMult_", eMult);
509  fill("elecMultTight_", eMultIso);
510 
511 
512 
513 
514 
515  /*
516  ------------------------------------------------------------
517 
518  Muon Monitoring
519 
520  ------------------------------------------------------------
521  */
522 
523  // fill monitoring plots for muons
524  unsigned int mMult = 0, mTight=0;
525 
528 
529  if (!event.getByToken(muons_, muons)) return;
530 
531  for (edm::View<pat::Muon>::const_iterator muon = muons->begin();
532  muon != muons->end(); ++muon) {
533 
534 
535  // restrict to globalMuons
536  if (muon->isGlobalMuon()) {
537  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
538  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
539 
540 
541 
542  // apply preselection loose muon
543  if (!muonSelect_ || (*muonSelect_)(*muon)) {
544 
545  //loose muon count
546  ++mMult;
547 
548  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
549  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
550  double phoEt = muon->pfIsolationR04().sumPhotonEt;
551 
552  double pfRelIso = (chHadPt + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) / muon->pt(); // CB dBeta corrected iso!
553 
554  if(!(muon->isGlobalMuon() && muon->isPFMuon() && muon->globalTrack()->normalizedChi2() < 10. && muon->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && muon->numberOfMatchedStations() > 1 && fabs(muon->muonBestTrack()->dxy(pver.position())) < 0.2 && fabs(muon->muonBestTrack()->dz(pver.position())) < 0.5 && muon->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 && muon->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 ) )continue;
555 
556  if (mMult == 1) {
557  // restrict to leading muon
558  fill("muonRelIso_", pfRelIso);
559  fill("muonChHadIso_", chHadPt);
560  fill("muonNeHadIso_", neHadEt);
561  fill("muonPhIso_", phoEt);
562  fill("muonRelIso_",pfRelIso);
563 
564  }
565 
566  if(!(pfRelIso<0.15))continue;
567 
568 
569  ++mTight;
570 
571 
572  //tight id
573  if (mTight == 1) {
574  // restrict to leading muon
575 
576  fill("muonPt_", muon->pt());
577  fill("muonEta_", muon->eta());
578  fill("muonPhi_", muon->phi());
579 
580  }
581  }
582  }
583  }
584  fill("muonMult_", mMult); //loose
585  fill("muonMultTight_", mTight); //tight id & iso
586 
587  /*
588  ------------------------------------------------------------
589 
590  Jet Monitoring
591 
592  ------------------------------------------------------------
593  */
594 
595 
596 
597  // loop jet collection
598  std::vector<pat::Jet> correctedJets;
599  std::vector<double> JetTagValues;
600  unsigned int mult = 0, loosemult=0, multBCSVM = 0;
601 
603  if (!event.getByToken(jets_, jets)) {
604  return;
605  }
606 
607  for (edm::View<pat::Jet>::const_iterator jet = jets->begin();
608  jet != jets->end(); ++jet) {
609  // check jetID for calo jets
610  //unsigned int idx = jet - jets->begin();
611 
612  pat::Jet sel = *jet;
613 
614  if(!(*jetSelect)(sel))continue;
615 // if (!jetSelect(sel)) continue;
616 
617  // prepare jet to fill monitor histograms
618  pat::Jet monitorJet = *jet;
619 
620 
621  ++mult;
622 
623  if(monitorJet.chargedHadronEnergyFraction()>0 && monitorJet.chargedMultiplicity()>0 && monitorJet.chargedEmEnergyFraction()<0.99 && monitorJet.neutralHadronEnergyFraction()<0.99 && monitorJet.neutralEmEnergyFraction()<0.99 && (monitorJet.chargedMultiplicity()+monitorJet.neutralMultiplicity())>1 ){
624 
625  correctedJets.push_back(monitorJet);
626  ++loosemult; // determine jet multiplicity
627 
628  fill("jetBCSV_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now.
629  if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBCSVM;
630 
631 
632  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV
633  // tagger
634  JetTagValues.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
635  // }
636  // fill pt (raw or L2L3) for the leading four jets
637  if (loosemult == 1) {
638  //cout<<" jet id= "<<monitorJet.chargedHadronEnergyFraction()<<endl;
639 
640  fill("jet1Pt_", monitorJet.pt());
641  //fill("jet1PtRaw_", jet->pt());
642  fill("jet1Eta_", monitorJet.eta());
643  };
644  if (loosemult == 2) {
645  fill("jet2Pt_", monitorJet.pt());
646  //fill("jet2PtRaw_", jet->pt());
647  fill("jet2Eta_", monitorJet.eta());
648  }
649  if (loosemult == 3) {
650  fill("jet3Pt_", monitorJet.pt());
651  //fill("jet3PtRaw_", jet->pt());
652  fill("jet3Eta_", monitorJet.eta());
653  }
654  if (loosemult == 4) {
655  fill("jet4Pt_", monitorJet.pt());
656  //fill("jet4PtRaw_", jet->pt());
657  fill("jet4Eta_", monitorJet.eta());
658  }
659 
660  }
661  }
662  fill("jetMult_", mult);
663  fill("jetLooseMult_", loosemult);
664  fill("jetMultBCSVM_", multBCSVM);
665 
666  /*
667  ------------------------------------------------------------
668 
669  MET Monitoring
670 
671  ------------------------------------------------------------
672  */
673 
674  // fill monitoring histograms for met
675  for (std::vector<edm::EDGetTokenT<edm::View<pat::MET> > >::const_iterator
676  met_ = mets_.begin();
677  met_ != mets_.end(); ++met_) {
679  if (!event.getByToken(*met_, met)) continue;
680  if (met->begin() != met->end()) {
681  unsigned int idx = met_ - mets_.begin();
682  if (idx == 0) fill("slimmedMETs_", met->begin()->et());
683  if (idx == 1) fill("slimmedMETsNoHF_", met->begin()->et());
684  if (idx == 2) fill("slimmedMETsPuppi_", met->begin()->et());
685  }
686  }
687 
688  /*
689  ------------------------------------------------------------
690 
691  Event Monitoring
692 
693  ------------------------------------------------------------
694  */
695 
696  // fill W boson and top mass estimates
697 
698  Calculate_miniAOD eventKinematics(MAXJETS, WMASS);
699  double wMass = eventKinematics.massWBoson(correctedJets);
700  double topMass = eventKinematics.massTopQuark(correctedJets);
701  if (wMass >= 0 && topMass >= 0) {
702  fill("massW_", wMass);
703  fill("massTop_", topMass);
704  }
705 
706  // Fill M3 with Btag (CSV Tight) requirement
707 
708  // if (!includeBTag_) return;
709  if (correctedJets.size() != JetTagValues.size()) return;
710  double btopMass =
711  eventKinematics.massBTopQuark(correctedJets, JetTagValues, 0.89); //hard coded CSVv2 value
712 
713  if (btopMass >= 0) fill("massBTop_", btopMass);
714 
715  // fill plots for trigger monitoring
716  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
717  (lowerEdge_ < wMass && wMass < upperEdge_)) {
719  fill(event, *triggerTable, "trigger", triggerPaths_);
720  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
721  // log runnumber, lumi block, event number & some
722  // more pysics infomation for interesting events
723  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
724  fill("eventLogger_", 1.5, logged_ + 0.5,
725  event.eventAuxiliary().luminosityBlock());
726  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
727  //if (correctedJets.size() > 0)
728  if(!correctedJets.empty())fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
729  if (correctedJets.size() > 1)fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
730  if (correctedJets.size() > 2)fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
731  if (correctedJets.size() > 3)fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
732  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
733  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
734  ++logged_;
735  }
736  }
737 
738 
739 
740 
741 
742 }
std::vector< edm::EDGetTokenT< edm::View< pat::MET > > > mets_
considers a vector of METs
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:377
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
extra selection on muons
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:92
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:375
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:379
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
static const unsigned int MAXJETS
RunNumber_t run() const
double pt() const final
transverse momentum
int neutralMultiplicity() const
neutralMultiplicity
Definition: Jet.h:425
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
const Point & position() const
position
Definition: Vertex.h:109
LuminosityBlockNumber_t luminosityBlock() const
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
vector< PseudoJet > jets
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::map< std::string, MonitorElement * > hists_
histogram container
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
met
===> hadronic RAZOR
double lowerEdge_
mass window upper and lower edge
Analysis-level calorimeter jet class.
Definition: Jet.h:80
int logged_
number of logged interesting events
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
bool isUninitialized() const
Definition: EDGetToken.h:70
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecSelect_
extra selection on electrons
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:381
int chargedMultiplicity() const
chargedMultiplicity
Definition: Jet.h:693
EventNumber_t event() const
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 174 of file TopSingleLeptonDQM_miniAOD.h.

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

177  {
178  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
179  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
180  fill((channel + "Mon_").c_str(), idx + 0.5);
181  // take care to fill triggerMon_ before evts is being called
182  int evts = hists_.find((channel + "Mon_").c_str())
183  ->second->getBinContent(idx + 1);
184  double value = hists_.find((channel + "Eff_").c_str())
185  ->second->getBinContent(idx + 1);
186  fill(
187  (channel + "Eff_").c_str(), idx + 0.5,
188  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
189  value));
190  }
191  }
192 }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::string monitorPath(const std::string &label) const
std::map< std::string, MonitorElement * > hists_
histogram container
Definition: value.py:1
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::string selectionPath(const std::string &label) const
void TopSingleLepton_miniAOD::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 77 of file TopSingleLeptonDQM_miniAOD.h.

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

77  {
78  if (booked(histName.c_str()))
79  hists_.find(histName.c_str())->second->Fill(value);
80  };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
Definition: value.py:1
void TopSingleLepton_miniAOD::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 82 of file TopSingleLeptonDQM_miniAOD.h.

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

82  {
83  if (booked(histName.c_str()))
84  hists_.find(histName.c_str())->second->Fill(xValue, yValue);
85  };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
void TopSingleLepton_miniAOD::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 87 of file TopSingleLeptonDQM_miniAOD.h.

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

88  {
89  if (booked(histName.c_str()))
90  hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue);
91  };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
std::string TopSingleLepton_miniAOD::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 56 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and triggerBinLabels().

56  {
57  return label.substr(label.find(':') + 1);
58  };
char const * label
std::string TopSingleLepton_miniAOD::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 61 of file TopSingleLeptonDQM_miniAOD.h.

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

Referenced by fill(), and triggerBinLabels().

61  {
62  return label.substr(0, label.find(':'));
63  };
char const * label
void MonitorEnsemble::triggerBinLabels ( std::string  channel,
const std::vector< std::string >  labels 
)
inlineprivate

set configurable labels for trigger monitoring histograms

Definition at line 162 of file TopSingleLeptonDQM_miniAOD.h.

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

Referenced by book(), and selectionPath().

163  {
164  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
165  hists_[(channel + "Mon_").c_str()]
166  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
167  hists_[(channel + "Eff_").c_str()]
168  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
169  monitorPath(labels[idx]) + "]",
170  1);
171  }
172 }
std::string monitorPath(const std::string &label) const
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const

Member Data Documentation

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

Definition at line 146 of file TopSingleLeptonDQM_miniAOD.h.

double TopSingleLepton_miniAOD::MonitorEnsemble::btagCSVWP_
private

Definition at line 149 of file TopSingleLeptonDQM_miniAOD.h.

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

btag discriminator labels

Definition at line 146 of file TopSingleLeptonDQM_miniAOD.h.

double TopSingleLepton_miniAOD::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 149 of file TopSingleLeptonDQM_miniAOD.h.

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

Definition at line 146 of file TopSingleLeptonDQM_miniAOD.h.

double TopSingleLepton_miniAOD::MonitorEnsemble::btagPurWP_
private

Definition at line 149 of file TopSingleLeptonDQM_miniAOD.h.

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

Definition at line 146 of file TopSingleLeptonDQM_miniAOD.h.

double TopSingleLepton_miniAOD::MonitorEnsemble::btagVtxWP_
private

Definition at line 149 of file TopSingleLeptonDQM_miniAOD.h.

std::string TopSingleLepton_miniAOD::MonitorEnsemble::directory_
private

Definition at line 159 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().

double TopSingleLepton_miniAOD::MonitorEnsemble::eidCutValue_
private

Definition at line 116 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Electron> > TopSingleLepton_miniAOD::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 118 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

edm::EDGetTokenT<edm::View<pat::Electron> > TopSingleLepton_miniAOD::MonitorEnsemble::elecs_
private

Definition at line 103 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Electron> > TopSingleLepton_miniAOD::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 120 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

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

electronId label

Definition at line 114 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

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

histogram container

Definition at line 157 of file TopSingleLeptonDQM_miniAOD.h.

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

bool TopSingleLepton_miniAOD::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 144 of file TopSingleLeptonDQM_miniAOD.h.

std::string TopSingleLepton_miniAOD::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 133 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

jetID as an extra selection type

Definition at line 135 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::JetID> > TopSingleLepton_miniAOD::MonitorEnsemble::jetIDSelect_
private

extra jetID selection on calo jets

Definition at line 137 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

edm::EDGetTokenT<edm::View<pat::Jet> > TopSingleLepton_miniAOD::MonitorEnsemble::jets_
private

input sources for monitoring

Definition at line 101 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Jet> > TopSingleLepton_miniAOD::MonitorEnsemble::jetSelect
private

Definition at line 141 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton_miniAOD::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 140 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

number of logged interesting events

Definition at line 154 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill().

double TopSingleLepton_miniAOD::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 151 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::vector<edm::EDGetTokenT<edm::View<pat::MET> > > TopSingleLepton_miniAOD::MonitorEnsemble::mets_
private

considers a vector of METs

Definition at line 99 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Muon> > TopSingleLepton_miniAOD::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 127 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

edm::EDGetTokenT<edm::View<pat::Muon> > TopSingleLepton_miniAOD::MonitorEnsemble::muons_
private

Definition at line 102 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Muon> > TopSingleLepton_miniAOD::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 130 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 104 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::Vertex> > TopSingleLepton_miniAOD::MonitorEnsemble::pvSelect_
private

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

Definition at line 124 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

edm::InputTag TopSingleLepton_miniAOD::MonitorEnsemble::rhoTag
private

Definition at line 111 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDConsumerBase TopSingleLepton_miniAOD::MonitorEnsemble::tmpConsumerBase
private

Definition at line 158 of file TopSingleLeptonDQM_miniAOD.h.

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

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

Definition at line 109 of file TopSingleLeptonDQM_miniAOD.h.

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

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

trigger table

Definition at line 106 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton_miniAOD::MonitorEnsemble::upperEdge_
private

Definition at line 151 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

Level TopSingleLepton_miniAOD::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 91 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().