test
CMS 3D CMS Logo

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

#include <SingleTopTChannelLeptonDQM_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, const edm::VParameterSet &vcfg, edm::ConsumesCollector &&iC)
 default contructor More...
 
 ~MonitorEnsemble ()
 default destructor More...
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT
< reco::JetTagCollection
btagCombVtx_
 
double btagCombVtxWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT
< reco::JetTagCollection
btagPur_
 
double btagPurWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagVtx_
 
double btagVtxWP_
 
std::string directory_
 
double eidCutValue_
 
std::unique_ptr
< StringCutObjectSelector
< pat::Electron, true > > 
elecIso
 
std::string elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View
< pat::Muon > > 
elecs_
 
edm::EDGetTokenT< edm::View
< pat::Electron > > 
elecs_gsf_
 
std::unique_ptr
< StringCutObjectSelector
< pat::Electron, true > > 
elecSelect
 
std::string elecSelect_
 extra selection on electrons More...
 
edm::EDGetTokenT
< edm::ValueMap< float > > 
electronId_
 electronId label More...
 
std::map< std::string,
MonitorElement * > 
hists_
 
bool includeBTag_
 
std::string jetCorrector_
 jetCorrector More...
 
edm::EDGetTokenT
< reco::JetIDValueMap
jetIDLabel_
 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::string jetSelect_
 
std::unique_ptr
< StringCutObjectSelector
< reco::CaloJet > > 
jetSelectCalo
 
std::unique_ptr
< StringCutObjectSelector
< pat::Jet > > 
jetSelectJet
 
std::unique_ptr
< StringCutObjectSelector
< reco::PFJet > > 
jetSelectPF
 
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, true > > 
muonIso
 
std::string muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View
< pat::Muon > > 
muons_
 
std::unique_ptr
< StringCutObjectSelector
< pat::Muon, true > > 
muonSelect
 
std::string 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::TriggerResults
triggerTable_
 trigger table More...
 
double upperEdge_
 
Level verbosity_
 verbosity level for booking More...
 

Detailed Description

Definition at line 28 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

default contructor

Definition at line 25 of file SingleTopTChannelLeptonDQM_miniAOD.cc.

References DEBUG, directory_, eidCutValue_, elecIso, elecIso_, elecs_gsf_, elecSelect, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), jetCorrector_, jetIDLabel_, jetIDSelect_, jets_, jetSelect_, lowerEdge_, mets_, muonIso, muonIso_, muons_, muonSelect, muonSelect_, pvs_, pvSelect_, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, triggerPaths_, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

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

default destructor

Definition at line 42 of file SingleTopTChannelLeptonDQM_miniAOD.h.

42 {}

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 184 of file SingleTopTChannelLeptonDQM_miniAOD.cc.

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

184  {
185  // set up the current directory path
186  std::string current(directory_);
187  current += label_;
188  ibooker.setCurrentFolder(current);
189 
190  // determine number of bins for trigger monitoring
191  unsigned int nPaths = triggerPaths_.size();
192 
193  // --- [STANDARD] --- //
194  // number of selected primary vertices
195  hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{pvs}", 100, 0., 100.);
196  // pt of the leading muon
197  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 250.);
198  // muon multiplicity before std isolation
199  hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{20}(#mu)", 10, 0., 10.);
200  // muon multiplicity after std isolation
201  hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", "N_{Iso}(#mu)", 10, 0., 10.);
202  // pt of the leading electron
203  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 250.);
204  // electron multiplicity before std isolation
205  hists_["elecMult_"] = ibooker.book1D("ElecMult", "N_{30}(e)", 10, 0., 10.);
206  // electron multiplicity after std isolation
207  hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.);
208  // multiplicity of jets with pt>20 (corrected to L2+L3)
209  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.);
210  // trigger efficiency estimates for single lepton triggers
211  hists_["triggerEff_"] = ibooker.book1D("TriggerEff",
212  "Eff(trigger)", nPaths, 0., nPaths);
213  // monitored trigger occupancy for single lepton triggers
214  hists_["triggerMon_"] = ibooker.book1D("TriggerMon",
215  "Mon(trigger)", nPaths, 0., nPaths);
216 
217  hists_["slimmedMETs_"] = ibooker.book1D("slimmedMETs", "MET_{slimmed}", 50, 0., 200.);
218 
219  // MET (calo)
220  hists_["slimmedMETsNoHF_"] = ibooker.book1D("slimmedMETsNoHF", "MET_{slimmedNoHF}", 50, 0., 200.);
221  // MET (pflow)
222  hists_["slimmedMETsPuppi_"] = ibooker.book1D("slimmedMETsPuppi", "MET_{slimmedPuppi}", 50, 0., 200.);
223  // W mass estimate
224  hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.);
225  // Top mass estimate
226  hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.);
227  // W mass transverse estimate mu
228  hists_["MTWm_"] = ibooker.book1D("MTWm", "M_{T}^{W}(#mu)", 60, 0., 300.);
229  // Top mass transverse estimate mu
230  hists_["mMTT_"] = ibooker.book1D("mMTT", "M_{T}^{t}(#mu)", 50, 0., 500.);
231 
232  // W mass transverse estimate e
233  hists_["MTWe_"] = ibooker.book1D("MTWe", "M_{T}^{W}(e)", 60, 0., 300.);
234  // Top mass transverse estimate e
235  hists_["eMTT_"] = ibooker.book1D("eMTT", "M_{T}^{t}(e)", 50, 0., 500.);
236 
237  // set bin labels for trigger monitoring
239 
240  if (verbosity_ == STANDARD) return;
241 
242  // --- [VERBOSE] --- //
243 
244  // eta of the leading muon
245  hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu)", 30, -3., 3.);
246  // std isolation variable of the leading muon
247  hists_["muonPFRelIso_"] = ibooker.book1D("MuonPFRelIso",
248  "PFIso_{Rel}(#mu)", 50, 0., 1.);
249  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu)", 50, 0., 1.);
250 
251  // eta of the leading electron
252  hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e)", 30, -3., 3.);
253  // std isolation variable of the leading electron
254  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.);
255  hists_["elecPFRelIso_"] = ibooker.book1D("ElecPFRelIso",
256  "PFIso_{Rel}(e)", 50, 0., 1.);
257 
258  // multiplicity of btagged jets (for track counting high efficiency) with
259  // pt(L2L3)>30
260  hists_["jetMultBEff_"] = ibooker.book1D("JetMultBEff",
261  "N_{30}(b/eff)", 10, 0., 10.);
262  // btag discriminator for track counting high efficiency for jets with
263  // pt(L2L3)>30
264  hists_["jetBDiscEff_"] = ibooker.book1D("JetBDiscEff",
265  "Disc_{b/eff}(jet)", 100, 0., 10.);
266 
267  // eta of the 1. leading jet
268  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta (jet1)", 50, -5., 5.);
269  // eta of the 2. leading jet
270  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta (jet2)", 50, -5., 5.);
271 
272  // pt of the 1. leading jet (corrected to L2+L3)
273  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.);
274  // pt of the 2. leading jet (corrected to L2+L3)
275  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.);
276 
277  // eta and pt of the b-tagged jet (filled only when nJets==2)
278  hists_["TaggedJetEta_"] = ibooker.book1D("TaggedJetEta",
279  "#eta (Tagged jet)", 50, -5., 5.);
280  hists_["TaggedJetPt_"] = ibooker.book1D("TaggedJetPt",
281  "pt_{L2L3}(Tagged jet)", 60, 0., 300.);
282 
283  // eta and pt of the jet not passing b-tag (filled only when nJets==2)
284  hists_["UnTaggedJetEta_"] = ibooker.book1D("UnTaggedJetEta",
285  "#eta (UnTagged jet)", 50, -5., 5.);
286  hists_["UnTaggedJetPt_"] = ibooker.book1D("UnTaggedJetPt",
287  "pt_{L2L3}(UnTagged jet)", 60, 0., 300.);
288 
289  // eta and pt of the most forward jet in the event with nJets==2
290  hists_["FwdJetEta_"] = ibooker.book1D("FwdJetEta", "#eta (Fwd jet)", 50, -5., 5.);
291  hists_["FwdJetPt_"] = ibooker.book1D("FwdJetPt",
292  "pt_{L2L3}(Fwd jet)", 60, 0., 300.);
293 
294  // 2D histogram (pt,eta) of the b-tagged jet (filled only when nJets==2)
295  hists_["TaggedJetPtEta_"] = ibooker.book2D("TaggedJetPt_Eta",
296  "(pt vs #eta)_{L2L3}(Tagged jet)", 60, 0., 300., 50, -5., 5.);
297 
298  // 2D histogram (pt,eta) of the not-b tagged jet (filled only when nJets==2)
299  hists_["UnTaggedJetPtEta_"] = ibooker.book2D("UnTaggedJetPt_Eta",
300  "(pt vs #eta)_{L2L3}(UnTagged jet)", 60, 0., 300., 50, -5., 5.);
301 
302 
303 
304  // dz for muons (to suppress cosmis)
305  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
306  // dxy for muons (to suppress cosmics)
307  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY",
308  "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
309 
310  // set axes titles for dxy for muons
311  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
312  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
313 
314  if (verbosity_ == VERBOSE) return;
315 
316  // --- [DEBUG] --- //
317 
318  // relative muon isolation from charged hadrons for the leading muon
319  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIso",
320  "Iso_{ChHad}(#mu)", 100, 0., 1.);
321  // relative muon isolation from neutral hadrons for the leading muon
322  hists_["muonNeuHadIso_"] = ibooker.book1D("MuonNeuHadIso",
323  "Iso_{NeuHad}(#mu)", 100, 0., 1.);
324  // relative muon isolation from photons for the leading muon
325  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIso", "Iso_{Ph}(#mu)", 100, 0., 1.);
326 
327  // relative electron isolation from charged hadrons for the leading electron
328  hists_["elecChHadIso_"] = ibooker.book1D("ElecChHadIso",
329  "Iso_{ChHad}(e)", 100, 0., 1.);
330  // relative electron isolation from neutral hadrons for the leading electron
331  hists_["elecNeuHadIso_"] = ibooker.book1D("ElecNeuHadIso",
332  "Iso_{NeuHad}(e)", 100, 0., 1.);
333  // relative electron isolation from photons for the leading electron
334  hists_["elecPhIso_"] = ibooker.book1D("ElecPhIso", "Iso_{Ph}(e)", 100, 0., 1.);
335 
336  // multiplicity of btagged jets (for track counting high purity) with
337  // pt(L2L3)>30
338  hists_["jetMultBPur_"] = ibooker.book1D("JetMultBPur",
339  "N_{30}(b/pur)", 10, 0., 10.);
340  // btag discriminator for track counting high purity
341  hists_["jetBDiscPur_"] = ibooker.book1D("JetBDiscPur",
342  "Disc_{b/pur}(Jet)", 200, -10., 10.);
343  // btag discriminator for track counting high purity for 1. leading jet
344  hists_["jet1BDiscPur_"] = ibooker.book1D("Jet1BDiscPur",
345  "Disc_{b/pur}(Jet1)", 200, -10., 10.);
346  // btag discriminator for track counting high purity for 2. leading jet
347  hists_["jet2BDiscPur_"] = ibooker.book1D("Jet2BDiscPur",
348  "Disc_{b/pur}(Jet2)", 200, -10., 10.);
349 
350  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
351  hists_["jetMultBVtx_"] = ibooker.book1D("JetMultBVtx",
352  "N_{30}(b/vtx)", 10, 0., 10.);
353  // btag discriminator for simple secondary vertex
354  hists_["jetBDiscVtx_"] = ibooker.book1D("JetBDiscVtx",
355  "Disc_{b/vtx}(Jet)", 35, -1., 6.);
356 
357  // multiplicity of btagged jets (for combined secondary vertex) with
358  // pt(L2L3)>30
359  hists_["jetMultBCombVtx_"] = ibooker.book1D("JetMultBCombVtx",
360  "N_{30}(b/CSV)", 10, 0., 10.);
361  // btag discriminator for combined secondary vertex
362  hists_["jetBDiscCombVtx_"] = ibooker.book1D("JetBDiscCombVtx",
363  "Disc_{b/CSV}(Jet)", 60, -1., 2.);
364  // btag discriminator for combined secondary vertex for 1. leading jet
365  hists_["jet1BDiscCombVtx_"] = ibooker.book1D("Jet1BDiscCombVtx",
366  "Disc_{b/CSV}(Jet1)", 60, -1., 2.);
367  // btag discriminator for combined secondary vertex for 2. leading jet
368  hists_["jet2BDiscCombVtx_"] = ibooker.book1D("Jet2BDiscCombVtx",
369  "Disc_{b/CSV}(Jet2)", 60, -1., 2.);
370 
371  // pt of the 1. leading jet (uncorrected)
372  hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
373  // pt of the 2. leading jet (uncorrected)
374  hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
375 
376  // selected events
377  hists_["eventLogger_"] = ibooker.book2D("EventLogger",
378  "Logged Events", 9, 0., 9., 10, 0., 10.);
379 
380  // set axes titles for selected events
381  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
382  hists_["eventLogger_"]->setBinLabel(1, "Run", 1);
383  hists_["eventLogger_"]->setBinLabel(2, "Block", 1);
384  hists_["eventLogger_"]->setBinLabel(3, "Event", 1);
385  hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1);
386  hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1);
387  hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1);
388  hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1);
389  hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1);
390  hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1);
391  hists_["eventLogger_"]->setAxisTitle("logged evts", 2);
392  return;
393 }
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
bool SingleTopTChannelLepton_miniAOD::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 69 of file SingleTopTChannelLeptonDQM_miniAOD.h.

References hists_.

Referenced by fill().

69  {
70  return hists_.find(histName.c_str()) != hists_.end();
71  };
void MonitorEnsemble::fill ( const edm::Event event,
const edm::EventSetup setup 
)

fill monitor histograms with electronId and jetCorrections

Definition at line 395 of file SingleTopTChannelLeptonDQM_miniAOD.cc.

References funct::abs(), pat::Jet::bDiscriminator(), alignCSCRings::e, elecIso, elecs_gsf_, elecSelect, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::Event::getByToken(), hists_, customizeTrackingMonitorSeedNumber::idx, edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, fwrapper::jets, jets_, jetSelect_, jetSelectJet, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), Calculate_miniAOD::massTopQuark(), Calculate_miniAOD::massWBoson(), bookConverter::max, SingleTopTChannelLepton_miniAOD::MAXJETS, objects.METAnalyzer::met, mets_, RPCpg::mu, VarParsing::mult, metsig::muon, muonIso, patZpeak::muons, muons_, muonSelect, EnergyCorrector::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), pvs_, pvSelect_, edm::EventAuxiliary::run(), EgammaValidation_Wenu_cff::sel, Calculate_miniAOD::tmassTopQuark(), Calculate_miniAOD::tmassWBoson(), triggerPaths_, triggerTable_, upperEdge_, and SingleTopTChannelLepton_miniAOD::WMASS.

Referenced by fill().

396  {
397  // fetch trigger event if configured such
400  if (!event.getByToken(triggerTable_, triggerTable)) return;
401  }
402  /*
403  ------------------------------------------------------------
404 
405  Primary Vertex Monitoring
406 
407  ------------------------------------------------------------
408  */
409 
410  // fill monitoring plots for primary vertices
412  if (!event.getByToken(pvs_, pvs)) return;
413  unsigned int pvMult = 0;
414  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
415  pv != pvs->end(); ++pv) {
416  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
417  }
418  fill("pvMult_", pvMult);
419 
420  /*
421  ------------------------------------------------------------
422 
423  Electron Monitoring
424 
425  ------------------------------------------------------------
426  */
427 
428  // fill monitoring plots for electrons
430 
431 
432 
433 
434 
435 
436  if (!event.getByToken(elecs_gsf_, elecs_gsf)) return;
437 
438  // loop electron collection
439  unsigned int eMult = 0, eMultIso = 0;
440  std::vector<const pat::Electron*> isoElecs;
442 
443  unsigned int idx_gsf = 0;
444  for ( edm::View<pat::Electron>::const_iterator elec = elecs_gsf->begin(); elec != elecs_gsf->end(); ++elec) {
445 
446  if (true){
447  if ((*elecSelect)(*elec)) {
448  double isolationRel =
449  (elec->dr03TkSumPt() + elec->dr03EcalRecHitSumEt() +
450  elec->dr03HcalTowerSumEt()) /
451  elec->pt();
452 
453  double isolationChHad =
454  elec->pt() /
455  (elec->pt() + elec->pfIsolationVariables().sumChargedHadronPt);
456  double isolationNeuHad =
457  elec->pt() /
458  (elec->pt() + elec->pfIsolationVariables().sumNeutralHadronEt);
459  double isolationPhoton =
460  elec->pt() /
461  (elec->pt() + elec->pfIsolationVariables().sumPhotonEt);
462  double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt;
463  double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt;
464  double el_PhIso = elec->pfIsolationVariables().sumPhotonEt;
465  double PFisolationRel =
466  (el_ChHadIso +
467  max(0., el_NeHadIso + el_PhIso -
468  0.5 * elec->pfIsolationVariables().sumPUPt)) /
469  elec->pt();
470 
471  if (eMult == 0) {
472  fill("elecPt_", elec->pt());
473  fill("elecEta_", elec->eta());
474  fill("elecRelIso_", isolationRel);
475  fill("elecPFRelIso_", PFisolationRel);
476  fill("elecChHadIso_", isolationChHad);
477  fill("elecNeuHadIso_", isolationNeuHad);
478  fill("elecPhIso_", isolationPhoton);
479  }
480 
481  ++eMult;
482  if ((*elecIso)(*elec)) {
483  if (eMultIso == 0) e = *elec;
484  isoElecs.push_back(&(*elec));
485  ++eMultIso;
486  }
487  }
488  }
489  idx_gsf++;
490  }
491 
492  fill("elecMult_", eMult);
493  fill("elecMultIso_", eMultIso);
494 
495  /*
496  ------------------------------------------------------------
497 
498  Muon Monitoring
499 
500  ------------------------------------------------------------
501  */
502 
503  // fill monitoring plots for muons
504  unsigned int mMult = 0, mMultIso = 0;
505 
507 
508  pat::Muon mu;
509 
510  if (!event.getByToken(muons_, muons)) return;
511  for (edm::View<pat::Muon>::const_iterator muon = muons->begin(); muon != muons->end();
512  ++muon) {
513 
514  // restrict to globalMuons
515  if (muon->isGlobalMuon()) {
516  fill("muonDelZ_", muon->globalTrack()->vz());
517  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
518 
519  // apply selection
520  if ((*muonSelect)(*muon)) {
521 
522  double isolationRel =
523  (muon->isolationR03().sumPt + muon->isolationR03().emEt +
524  muon->isolationR03().hadEt) /
525  muon->pt();
526  double isolationChHad =
527  muon->pt() /
528  (muon->pt() + muon->pfIsolationR04().sumChargedHadronPt);
529  double isolationNeuHad =
530  muon->pt() /
531  (muon->pt() + muon->pfIsolationR04().sumNeutralHadronEt);
532  double isolationPhoton =
533  muon->pt() / (muon->pt() + muon->pfIsolationR04().sumPhotonEt);
534  double PFisolationRel = (muon->pfIsolationR04().sumChargedHadronPt +
535  muon->pfIsolationR04().sumNeutralHadronEt +
536  muon->pfIsolationR04().sumPhotonEt) /
537  muon->pt();
538 
539  if (mMult == 0) {
540  // restrict to leading muon
541  fill("muonPt_", muon->pt());
542  fill("muonEta_", muon->eta());
543  fill("muonRelIso_", isolationRel);
544  fill("muonChHadIso_", isolationChHad);
545  fill("muonNeuHadIso_", isolationNeuHad);
546  fill("muonPhIso_", isolationPhoton);
547  fill("muonPFRelIso_", PFisolationRel);
548  }
549  ++mMult;
550 
551  if ((*muonIso)(*muon)) {
552  if (mMultIso == 0) mu = *muon;
553  ++mMultIso;
554  }
555  }
556  }
557  }
558  fill("muonMult_", mMult);
559  fill("muonMultIso_", mMultIso);
560 
561  /*
562  ------------------------------------------------------------
563 
564  Jet Monitoring
565 
566  ------------------------------------------------------------
567  */
568 
569  // loop jet collection
570  std::vector<pat::Jet> correctedJets;
571  unsigned int mult = 0, multBEff = 0, multBPur = 0, multNoBPur = 0,
572  multBVtx = 0, multBCombVtx = 0;
573 
575  if (!event.getByToken(jets_, jets)) return;
576 
577  vector<double> bJetDiscVal;
578  vector<double> NobJetDiscVal;
579  pat::Jet TaggedJetCand;
580  pat::Jet UnTaggedJetCand;
581  pat::Jet FwdJetCand;
582  for (edm::View<pat::Jet>::const_iterator jet = jets->begin();
583  jet != jets->end(); ++jet) {
584 
585  pat::Jet sel = *jet;
586 
587  if ( jetSelectJet==0)
589 
590  if (!((*jetSelectJet)(sel))) continue;
591 
592  // prepare jet to fill monitor histograms
593  pat::Jet monitorJet = *jet;
594  correctedJets.push_back(monitorJet);
595 
596  ++mult; // determine jet multiplicity
597 
598 
599  fill("jetBDiscEff_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now.
600  if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff;
601 
602 
603 
604  if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) {
605  if (multBPur == 0) {
606  TaggedJetCand = monitorJet;
607  bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
608 
609  } else if (multBPur == 1) {
610  bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
611  if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet;
612  }
613  ++multBPur;
614  } else {
615  if (multNoBPur == 0) {
616  UnTaggedJetCand = monitorJet;
617  NobJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
618 
619  } else if (multNoBPur == 1) {
620  NobJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
621  if (NobJetDiscVal[1] < NobJetDiscVal[0]) UnTaggedJetCand = monitorJet;
622  }
623 
624  ++multNoBPur;
625  }
626 
627 
628  if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff;
629  if (mult == 1) {
630  fill("jet1BDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
631  } else if (mult == 2) {
632  fill("jet2BDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
633  }
634 
635  fill("jetBDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
636 
637 
638  // fill pt (raw or L2L3) for the leading jets
639  if (mult == 1) {
640  fill("jet1Pt_", monitorJet.pt());
641  fill("jet1Eta_", monitorJet.eta());
642  fill("jet1PtRaw_", jet->pt());
643  FwdJetCand = monitorJet;
644  }
645 
646  if (mult == 2) {
647  fill("jet2Pt_", monitorJet.pt());
648  fill("jet2Eta_", monitorJet.eta());
649  fill("jet2PtRaw_", jet->pt());
650 
651  if (abs(monitorJet.eta()) > abs(FwdJetCand.eta())) {
652  FwdJetCand = monitorJet;
653  }
654 
655  fill("FwdJetPt_", FwdJetCand.pt());
656  fill("FwdJetEta_", FwdJetCand.eta());
657  }
658  }
659 
660  if (multNoBPur == 1 && multBPur == 1) {
661 
662  fill("TaggedJetPtEta_", TaggedJetCand.pt(), TaggedJetCand.eta());
663  fill("UnTaggedJetPtEta_", UnTaggedJetCand.pt(), UnTaggedJetCand.eta());
664 
665  fill("TaggedJetPt_", TaggedJetCand.pt());
666  fill("TaggedJetEta_", TaggedJetCand.eta());
667  fill("UnTaggedJetPt_", UnTaggedJetCand.pt());
668  fill("UnTaggedJetEta_", UnTaggedJetCand.eta());
669  }
670 
671  fill("jetMult_", mult);
672  fill("jetMultBEff_", multBEff);
673  fill("jetMultBPur_", multBPur);
674  fill("jetMultBVtx_", multBVtx);
675  fill("jetMultBCombVtx_", multBCombVtx);
676 
677  /*
678  ------------------------------------------------------------
679 
680  MET Monitoring
681 
682  ------------------------------------------------------------
683  */
684 
685  // fill monitoring histograms for met
686  pat::MET mET;
687 
688  for (std::vector<edm::EDGetTokenT<edm::View<pat::MET>>>::const_iterator
689  met_ = mets_.begin();
690  met_ != mets_.end(); ++met_) {
692  if (!event.getByToken(*met_, met)) continue;
693  mET = *(met->begin());
694  if (met->begin() != met->end()) {
695  unsigned int idx = met_ - mets_.begin();
696  if (idx == 0) fill("slimmedMETs_", met->begin()->et());
697  if (idx == 1) fill("slimmedMETsNoHF_", met->begin()->et());
698  if (idx == 2) fill("slimmedMETsPuppi_", met->begin()->et());
699 
700  }
701  }
702 
703  /*
704  ------------------------------------------------------------
705 
706  Event Monitoring
707 
708  ------------------------------------------------------------
709  */
710 
711  // fill W boson and top mass estimates
712  Calculate_miniAOD eventKinematics(MAXJETS, WMASS);
713  double wMass = eventKinematics.massWBoson(correctedJets);
714  double topMass = eventKinematics.massTopQuark(correctedJets);
715  if (wMass >= 0 && topMass >= 0) {
716  fill("massW_", wMass);
717  fill("massTop_", topMass);
718  }
719  // fill plots for trigger monitoring
720  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
721  (lowerEdge_ < wMass && wMass < upperEdge_)) {
723  fill(event, *triggerTable, "trigger", triggerPaths_);
724  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
725  // log runnumber, lumi block, event number & some
726  // more pysics infomation for interesting events
727  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
728  fill("eventLogger_", 1.5, logged_ + 0.5,
729  event.eventAuxiliary().luminosityBlock());
730  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
731  if (correctedJets.size() > 0)
732  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
733  if (correctedJets.size() > 1)
734  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
735  if (correctedJets.size() > 2)
736  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
737  if (correctedJets.size() > 3)
738  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
739  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
740  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
741  ++logged_;
742  }
743  }
744  if (multBPur != 0 && mMultIso == 1) {
745 
746  double mtW = eventKinematics.tmassWBoson(&mu, mET, TaggedJetCand);
747  fill("MTWm_", mtW);
748  double MTT = eventKinematics.tmassTopQuark(&mu, mET, TaggedJetCand);
749  fill("mMTT_", MTT);
750  }
751 
752  if (multBPur != 0 && eMultIso == 1) {
753  double mtW = eventKinematics.tmassWBoson(&e, mET, TaggedJetCand);
754  fill("MTWe_", mtW);
755  double MTT = eventKinematics.tmassTopQuark(&e, mET, TaggedJetCand);
756  fill("eMTT_", MTT);
757  }
758 }
Analysis-level MET class.
Definition: MET.h:43
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_gsf_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
RunNumber_t run() const
std::unique_ptr< StringCutObjectSelector< pat::Muon, true > > muonIso
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
std::unique_ptr< StringCutObjectSelector< pat::Electron, true > > elecSelect
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
vector< PseudoJet > jets
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int mu
Definition: Constants.h:22
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:77
std::unique_ptr< StringCutObjectSelector< pat::Muon, true > > muonSelect
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
Analysis-level electron class.
Definition: Electron.h:52
Analysis-level calorimeter jet class.
Definition: Jet.h:78
tuple muons
Definition: patZpeak.py:38
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelectJet
std::unique_ptr< StringCutObjectSelector< pat::Electron, true > > elecIso
bool isUninitialized() const
Definition: EDGetToken.h:73
virtual double eta() const final
momentum pseudorapidity
std::vector< edm::EDGetTokenT< edm::View< pat::MET > > > mets_
considers a vector of METs
Analysis-level muon class.
Definition: Muon.h:49
EventNumber_t event() const
virtual double pt() const final
transverse momentum
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 192 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

195  {
196  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
197  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
198  fill((channel + "Mon_").c_str(), idx + 0.5);
199  // take care to fill triggerMon_ before evts is being called
200  int evts = hists_.find((channel + "Mon_").c_str())
201  ->second->getBinContent(idx + 1);
202  double value = hists_.find((channel + "Eff_").c_str())
203  ->second->getBinContent(idx + 1);
204  fill(
205  (channel + "Eff_").c_str(), idx + 0.5,
206  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
207  value));
208  }
209  }
210 }
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
std::string monitorPath(const std::string &label) const
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void SingleTopTChannelLepton_miniAOD::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 73 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

73  {
74  if (booked(histName.c_str()))
75  hists_.find(histName.c_str())->second->Fill(value);
76  };
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void SingleTopTChannelLepton_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 78 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

78  {
79  if (booked(histName.c_str()))
80  hists_.find(histName.c_str())->second->Fill(xValue, yValue);
81  };
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void SingleTopTChannelLepton_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 83 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

84  {
85  if (booked(histName.c_str()))
86  hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue);
87  };
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
std::string SingleTopTChannelLepton_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 52 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and triggerBinLabels().

52  {
53  return label.substr(label.find(':') + 1);
54  };
std::string SingleTopTChannelLepton_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 57 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and triggerBinLabels().

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

set configurable labels for trigger monitoring histograms

Definition at line 180 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

Referenced by book().

181  {
182  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
183  hists_[(channel + "Mon_").c_str()]
184  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
185  hists_[(channel + "Eff_").c_str()]
186  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
187  monitorPath(labels[idx]) + "]",
188  1);
189  }
190 }
std::string selectionPath(const std::string &label) const
std::string monitorPath(const std::string &label) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...

Member Data Documentation

edm::EDGetTokenT<reco::JetTagCollection> SingleTopTChannelLepton_miniAOD::MonitorEnsemble::btagCombVtx_
private

Definition at line 150 of file SingleTopTChannelLeptonDQM_miniAOD.h.

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::btagCombVtxWP_
private

Definition at line 154 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

btag discriminator labels

Definition at line 150 of file SingleTopTChannelLeptonDQM_miniAOD.h.

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 154 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

Definition at line 150 of file SingleTopTChannelLeptonDQM_miniAOD.h.

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::btagPurWP_
private

Definition at line 154 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

Definition at line 150 of file SingleTopTChannelLeptonDQM_miniAOD.h.

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::btagVtxWP_
private

Definition at line 154 of file SingleTopTChannelLeptonDQM_miniAOD.h.

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::directory_
private

Definition at line 165 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::eidCutValue_
private

Definition at line 119 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Electron, true> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecIso
private

Definition at line 175 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 121 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

edm::EDGetTokenT<edm::View<pat::Muon> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecs_
private

Definition at line 101 of file SingleTopTChannelLeptonDQM_miniAOD.h.

edm::EDGetTokenT<edm::View<pat::Electron> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecs_gsf_
private

Definition at line 100 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Electron, true> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecSelect
private

Definition at line 174 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 123 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

electronId label

Definition at line 116 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

storage manager histogram container

Definition at line 162 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

bool SingleTopTChannelLepton_miniAOD::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 147 of file SingleTopTChannelLeptonDQM_miniAOD.h.

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 135 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

jetID as an extra selection type

Definition at line 137 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

extra jetID selection on calo jets

Definition at line 140 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

input sources for monitoring

Definition at line 98 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton_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 144 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::CaloJet> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::jetSelectCalo
private

Definition at line 170 of file SingleTopTChannelLeptonDQM_miniAOD.h.

std::unique_ptr<StringCutObjectSelector<pat::Jet> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::jetSelectJet
private

Definition at line 172 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill().

std::unique_ptr<StringCutObjectSelector<reco::PFJet> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::jetSelectPF
private

Definition at line 171 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

number of logged interesting events

Definition at line 159 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill().

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 156 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

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

considers a vector of METs

Definition at line 95 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Muon, true> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::muonIso
private

Definition at line 168 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 130 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

Definition at line 99 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<pat::Muon, true> > SingleTopTChannelLepton_miniAOD::MonitorEnsemble::muonSelect
private

Definition at line 167 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton_miniAOD::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 132 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

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

Definition at line 102 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

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

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

Definition at line 127 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDConsumerBase SingleTopTChannelLepton_miniAOD::MonitorEnsemble::tmpConsumerBase
private

Definition at line 163 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

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

Definition at line 112 of file SingleTopTChannelLeptonDQM_miniAOD.h.

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

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

trigger table

Definition at line 108 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton_miniAOD::MonitorEnsemble::upperEdge_
private

Definition at line 156 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

Level SingleTopTChannelLepton_miniAOD::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 87 of file SingleTopTChannelLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().