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_
 
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 29 of file TopSingleLeptonDQM_miniAOD.h.

Member Enumeration Documentation

◆ Level

Constructor & Destructor Documentation

◆ MonitorEnsemble()

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

default contructor

Definition at line 30 of file TopSingleLeptonDQM_miniAOD.cc.

References looper::cfg, DEBUG, directory_, eidCutValue_, singleTopDQM_cfi::elecExtras, elecIso_, elecs_, elecSelect_, electronId_, edm::ParameterSet::getParameter(), singleTopDQM_cfi::jetExtras, jetIDLabel_, jetIDSelect_, jets_, jetSelect, jetSelect_, lowerEdge_, singleTopDQM_cfi::massExtras, mets_, singleTopDQM_cfi::monitoring, singleTopDQM_cfi::muonExtras, muonIso_, muons_, muonSelect_, singleTopDQM_cfi::pvExtras, pvs_, pvSelect_, rhoTag, CalibrationSummaryClient_cfi::sources, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, triggerPaths_, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

31  : label_(label),
32  elecIso_(nullptr),
33  elecSelect_(nullptr),
34  pvSelect_(nullptr),
35  muonIso_(nullptr),
36  muonSelect_(nullptr),
37  jetIDSelect_(nullptr),
38  jetSelect(nullptr),
39  includeBTag_(false),
40  lowerEdge_(-1.),
41  upperEdge_(-1.),
42  logged_(0) {
43  // sources have to be given; this PSet is not optional
44  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
45  // muons_ = iC.consumes<edm::View<reco::PFCandidate> >(
46  // sources.getParameter<edm::InputTag>("muons"));
47 
48  muons_ = iC.consumes<edm::View<pat::Muon>>(sources.getParameter<edm::InputTag>("muons"));
49 
50  elecs_ = iC.consumes<edm::View<pat::Electron>>(sources.getParameter<edm::InputTag>("elecs"));
51  pvs_ = iC.consumes<edm::View<reco::Vertex>>(sources.getParameter<edm::InputTag>("pvs"));
52  jets_ = iC.consumes<edm::View<pat::Jet>>(sources.getParameter<edm::InputTag>("jets"));
53  for (edm::InputTag const& tag : sources.getParameter<std::vector<edm::InputTag>>("mets"))
54  mets_.push_back(iC.consumes<edm::View<pat::MET>>(tag));
55  // electronExtras are optional; they may be omitted or
56  // empty
57  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
58  edm::ParameterSet elecExtras = cfg.getParameter<edm::ParameterSet>("elecExtras");
59  // select is optional; in case it's not found no
60  // selection will be applied
61  if (elecExtras.existsAs<std::string>("select")) {
62  elecSelect_ =
63  std::make_unique<StringCutObjectSelector<pat::Electron>>(elecExtras.getParameter<std::string>("select"));
64  }
65  // isolation is optional; in case it's not found no
66  // isolation will be applied
67  if (elecExtras.existsAs<std::string>("isolation")) {
68  elecIso_ =
69  std::make_unique<StringCutObjectSelector<pat::Electron>>(elecExtras.getParameter<std::string>("isolation"));
70  }
71 
72  if (elecExtras.existsAs<std::string>("rho")) {
73  rhoTag = elecExtras.getParameter<edm::InputTag>("rho");
74  }
75  // electronId is optional; in case it's not found the
76  // InputTag will remain empty
77  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
78  edm::ParameterSet elecId = elecExtras.getParameter<edm::ParameterSet>("electronId");
80  eidCutValue_ = elecId.getParameter<double>("cutValue");
81  }
82  }
83  // pvExtras are opetional; they may be omitted or empty
84  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
85  edm::ParameterSet pvExtras = cfg.getParameter<edm::ParameterSet>("pvExtras");
86  // select is optional; in case it's not found no
87  // selection will be applied
88  if (pvExtras.existsAs<std::string>("select")) {
89  pvSelect_ =
90  std::make_unique<StringCutObjectSelector<reco::Vertex>>(pvExtras.getParameter<std::string>("select"));
91  }
92  }
93  // muonExtras are optional; they may be omitted or empty
94  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
95  edm::ParameterSet muonExtras = cfg.getParameter<edm::ParameterSet>("muonExtras");
96  // select is optional; in case it's not found no
97  // selection will be applied
98  if (muonExtras.existsAs<std::string>("select")) {
99  muonSelect_ =
100  std::make_unique<StringCutObjectSelector<pat::Muon>>(muonExtras.getParameter<std::string>("select"));
101  }
102  // isolation is optional; in case it's not found no
103  // isolation will be applied
104  if (muonExtras.existsAs<std::string>("isolation")) {
105  muonIso_ =
106  std::make_unique<StringCutObjectSelector<pat::Muon>>(muonExtras.getParameter<std::string>("isolation"));
107  }
108  }
109 
110  // jetExtras are optional; they may be omitted or
111  // empty
112  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
113  edm::ParameterSet jetExtras = cfg.getParameter<edm::ParameterSet>("jetExtras");
114  // read jetID information if it exists
115  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
116  edm::ParameterSet jetID = jetExtras.getParameter<edm::ParameterSet>("jetID");
118  jetIDSelect_ =
119  std::make_unique<StringCutObjectSelector<reco::JetID>>(jetID.getParameter<std::string>("select"));
120  }
121  // select is optional; in case it's not found no
122  // selection will be applied (only implemented for
123  // CaloJets at the moment)
124  if (jetExtras.existsAs<std::string>("select")) {
125  jetSelect_ = jetExtras.getParameter<std::string>("select");
126  jetSelect = std::make_unique<StringCutObjectSelector<pat::Jet>>(jetSelect_);
127  }
128  }
129 
130  // triggerExtras are optional; they may be omitted or empty
131  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
132  edm::ParameterSet triggerExtras = cfg.getParameter<edm::ParameterSet>("triggerExtras");
134  triggerPaths_ = triggerExtras.getParameter<std::vector<std::string>>("paths");
135  }
136 
137  // massExtras is optional; in case it's not found no mass
138  // window cuts are applied for the same flavor monitor
139  // histograms
140  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
141  edm::ParameterSet massExtras = cfg.getParameter<edm::ParameterSet>("massExtras");
142  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
143  upperEdge_ = massExtras.getParameter<double>("upperEdge");
144  }
145 
146  // setup the verbosity level for booking histograms;
147  // per default the verbosity level will be set to
148  // STANDARD. This will also be the chosen level in
149  // the case when the monitoring PSet is not found
151  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
152  edm::ParameterSet monitoring = cfg.getParameter<edm::ParameterSet>("monitoring");
153  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
154  verbosity_ = DEBUG;
155  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
157  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
159  }
160  // and don't forget to do the histogram booking
161  directory_ = cfg.getParameter<std::string>("directory");
162  // book(ibooker);
163  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonIso_
extra isolation criterion on muon
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
extra selection on muons
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

◆ ~MonitorEnsemble()

TopSingleLepton_miniAOD::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 38 of file TopSingleLeptonDQM_miniAOD.h.

38 {};

Member Function Documentation

◆ book()

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

book histograms in subdirectory directory

Definition at line 165 of file TopSingleLeptonDQM_miniAOD.cc.

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

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

◆ booked()

bool TopSingleLepton_miniAOD::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 62 of file TopSingleLeptonDQM_miniAOD.h.

References hists_.

Referenced by fill().

62 { return hists_.find(histName) != hists_.end(); };
std::map< std::string, MonitorElement * > hists_
histogram container

◆ fill() [1/5]

void MonitorEnsemble::fill ( const edm::Event event,
const edm::EventSetup setup 
)

fill monitor histograms with electronId and jetCorrections

Definition at line 338 of file TopSingleLeptonDQM_miniAOD.cc.

References funct::abs(), pat::Jet::bDiscriminator(), pat::Jet::chargedEmEnergyFraction(), pat::Jet::chargedHadronEnergyFraction(), pat::Jet::chargedMultiplicity(), PDWG_TauSkim_cff::discriminator, singleTopDQM_cfi::elecs, elecs_, elecSelect_, topSingleLeptonDQM_PU_cfi::electronId, electronId_, reco::LeafCandidate::eta(), nano_mu_digi_cff::float, hists_, heavyIonCSV_trainingSettings::idx, edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), metsig::jet, PDWG_EXODelayedJetMET_cff::jets, jets_, jetSelect, logged_, lowerEdge_, Calculate_miniAOD::massBTopQuark(), Calculate_miniAOD::massTopQuark(), Calculate_miniAOD::massWBoson(), SiStripPI::max, TopSingleLepton_miniAOD::MAXJETS, BTaggingMonitor_cfi::met, mets_, VarParsing::mult, HLT_2024v10_cff::muon, DiMuonV_cfg::muons, muons_, muonSelect_, pat::Jet::neutralEmEnergyFraction(), pat::Jet::neutralHadronEnergyFraction(), pat::Jet::neutralMultiplicity(), reco::Vertex::position(), DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), FSQDQM_cfi::pvs, pvs_, rhoTag, EgammaValidation_Wenu_cff::sel, triggerPaths_, triggerTable_, upperEdge_, trackerHitRTTI::vector, pseudoTop_cfi::wMass, and TopSingleLepton_miniAOD::WMASS.

Referenced by fill().

338  {
339  // fetch trigger event if configured such
341 
343  if (!event.getByToken(triggerTable_, triggerTable))
344  return;
345  }
346 
347  /*
348  ------------------------------------------------------------
349 
350  Primary Vertex Monitoring
351 
352  ------------------------------------------------------------
353  */
354  // fill monitoring plots for primary verices
356  if (!event.getByToken(pvs_, pvs))
357  return;
358  const reco::Vertex& pver = pvs->front();
359 
360  unsigned int pvMult = 0;
361  if (pvs.isValid()) {
362  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin(); pv != pvs->end(); ++pv) {
363  bool isGood =
364  (!(pv->isFake()) && (pv->ndof() > 4.0) && (abs(pv->z()) < 24.0) && (abs(pv->position().Rho()) < 2.0));
365  if (!isGood)
366  continue;
367  pvMult++;
368  }
369  //std::cout<<" npv "<<testn<<endl;
370  }
371 
372  fill("pvMult_", pvMult);
373 
374  /*
375  ------------------------------------------------------------
376 
377  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
378  value=5.0)
379 
380  ------------------------------------------------------------
381  */
382 
383  //if (!event.eventAuxiliary().run()) return;
384 
385  //fill("RunNumb_", event.eventAuxiliary().run());
386 
387  //double dummy = 5.;
388  //fill("InstLumi_", dummy);
389 
390  /*
391  ------------------------------------------------------------
392 
393  Electron Monitoring
394 
395  ------------------------------------------------------------
396  */
397 
398  // fill monitoring plots for electrons
400  if (!event.getByToken(elecs_, elecs))
401  return;
402 
403  edm::Handle<double> _rhoHandle;
404  event.getByLabel(rhoTag, _rhoHandle);
405  //if (!event.getByToken(elecs_, elecs)) return;
406 
407  // check availability of electron id
409  if (!electronId_.isUninitialized()) {
410  if (!event.getByToken(electronId_, electronId))
411  return;
412  }
413 
414  // loop electron collection
415  unsigned int eMultIso = 0, eMult = 0;
416  std::vector<const pat::Electron*> isoElecs;
417 
418  for (edm::View<pat::Electron>::const_iterator elec = elecs->begin(); elec != elecs->end(); ++elec) {
419  if (true) { //loose id
420  if (!elecSelect_ || (*elecSelect_)(*elec)) {
421  double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt;
422  double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt;
423  double el_PhIso = elec->pfIsolationVariables().sumPhotonEt;
424 
425  double rho = _rhoHandle.isValid() ? (float)(*_rhoHandle) : 0;
426  double absEta = abs(elec->superCluster()->eta());
427  double eA = 0;
428  if (absEta < 1.000)
429  eA = 0.1703;
430  else if (absEta < 1.479)
431  eA = 0.1715;
432  else if (absEta < 2.000)
433  eA = 0.1213;
434  else if (absEta < 2.200)
435  eA = 0.1230;
436  else if (absEta < 2.300)
437  eA = 0.1635;
438  else if (absEta < 2.400)
439  eA = 0.1937;
440  else if (absEta < 5.000)
441  eA = 0.2393;
442 
443  double el_pfRelIso = (el_ChHadIso + max(0., el_NeHadIso + el_PhIso - rho * eA)) / elec->pt();
444 
445  ++eMult;
446 
447  if (eMult == 1) {
448  fill("elecRelIso_", el_pfRelIso);
449  fill("elecChHadIso_", el_ChHadIso);
450  fill("elecNeHadIso_", el_NeHadIso);
451  fill("elecPhIso_", el_PhIso);
452  }
453  //loose Iso
454  //if(!((el_pfRelIso<0.0994 && absEta<1.479)||(el_pfRelIso<0.107 && absEta>1.479)))continue;
455 
456  //tight Iso
457  if (!((el_pfRelIso < 0.0588 && absEta < 1.479) || (el_pfRelIso < 0.0571 && absEta > 1.479)))
458  continue;
459  ++eMultIso;
460 
461  if (eMultIso == 1) {
462  // restrict to the leading electron
463  fill("elecPt_", elec->pt());
464  fill("elecEta_", elec->eta());
465  fill("elecPhi_", elec->phi());
466  }
467  }
468  }
469  }
470  //fill("elecMult_", eMult);
471  fill("elecMultTight_", eMultIso);
472 
473  /*
474  ------------------------------------------------------------
475 
476  Muon Monitoring
477 
478  ------------------------------------------------------------
479  */
480 
481  // fill monitoring plots for muons
482  unsigned int mMult = 0, mTight = 0, mTightId = 0;
483 
486 
487  if (!event.getByToken(muons_, muons))
488  return;
489 
490  for (edm::View<pat::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
491  // restrict to globalMuons
492  if (muon->isGlobalMuon()) {
493  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
494  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
495 
496  // apply preselection loose muon
497  if (!muonSelect_ || (*muonSelect_)(*muon)) {
498  //loose muon count
499  ++mMult;
500 
501  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
502  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
503  double phoEt = muon->pfIsolationR04().sumPhotonEt;
504 
505  double pfRelIso = (chHadPt + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
506  muon->pt(); // CB dBeta corrected iso!
507 
508  if (!(muon->isGlobalMuon() && muon->isPFMuon() && muon->globalTrack()->normalizedChi2() < 10. &&
509  muon->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && muon->numberOfMatchedStations() > 1 &&
510  fabs(muon->muonBestTrack()->dxy(pver.position())) < 0.2 &&
511  fabs(muon->muonBestTrack()->dz(pver.position())) < 0.5 &&
512  muon->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
513  muon->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5))
514  continue;
515 
516  if (mTightId == 0) {
517  // restrict to leading muon
518  fill("muonRelIso_", pfRelIso);
519  fill("muonChHadIso_", chHadPt);
520  fill("muonNeHadIso_", neHadEt);
521  fill("muonPhIso_", phoEt);
522  //fill("muonRelIso_", pfRelIso);
523  }
524 
525  if (!(pfRelIso < 0.15))
526  continue;
527  //tight id
528  if (mTight == 0) {
529  // restrict to leading muon
530 
531  fill("muonPt_", muon->pt());
532  fill("muonEta_", muon->eta());
533  fill("muonPhi_", muon->phi());
534  }
535  mTight++;
536  mTightId++;
537  }
538  }
539  }
540  fill("muonMult_", mMult); //loose
541  fill("muonMultTight_", mTight); //tight id & iso
542 
543  /*
544  ------------------------------------------------------------
545 
546  Jet Monitoring
547 
548  ------------------------------------------------------------
549  */
550 
551  // loop jet collection
552  std::vector<pat::Jet> correctedJets;
553  std::vector<double> JetTagValues;
554  unsigned int mult = 0, loosemult = 0, multBDeepJetM = 0;
555 
557  if (!event.getByToken(jets_, jets)) {
558  return;
559  }
560 
561  for (edm::View<pat::Jet>::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) {
562  // check jetID for calo jets
563  //unsigned int idx = jet - jets->begin();
564 
565  const pat::Jet& sel = *jet;
566 
567  if (!(*jetSelect)(sel))
568  continue;
569  // if (!jetSelect(sel)) continue;
570 
571  // prepare jet to fill monitor histograms
572  const pat::Jet& monitorJet = *jet;
573 
574  ++mult;
575 
576  if (monitorJet.chargedHadronEnergyFraction() > 0 && monitorJet.chargedMultiplicity() > 0 &&
577  monitorJet.chargedEmEnergyFraction() < 0.99 && monitorJet.neutralHadronEnergyFraction() < 0.99 &&
578  monitorJet.neutralEmEnergyFraction() < 0.99 &&
579  (monitorJet.chargedMultiplicity() + monitorJet.neutralMultiplicity()) > 1) {
580  correctedJets.push_back(monitorJet);
581  ++loosemult; // determine jet multiplicity
582 
583  double discriminator = monitorJet.bDiscriminator("pfDeepFlavourJetTags:probb") +
584  monitorJet.bDiscriminator("pfDeepFlavourJetTags:probbb") +
585  monitorJet.bDiscriminator("pfDeepFlavourJetTags:problepb");
586 
587  fill("jetBDeepJet_", discriminator); //hard coded discriminator and value right now.
588  if (discriminator > 0.2435)
589  ++multBDeepJetM;
590 
591  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: DeepJet
592  // tagger
593  JetTagValues.push_back(discriminator);
594  // }
595  // fill pt (raw or L2L3) for the leading four jets
596  if (loosemult == 1) {
597  //cout<<" jet id= "<<monitorJet.chargedHadronEnergyFraction()<<endl;
598 
599  fill("jet1Pt_", monitorJet.pt());
600  //fill("jet1PtRaw_", jet->pt());
601  fill("jet1Eta_", monitorJet.eta());
602  };
603  if (loosemult == 2) {
604  fill("jet2Pt_", monitorJet.pt());
605  //fill("jet2PtRaw_", jet->pt());
606  fill("jet2Eta_", monitorJet.eta());
607  }
608  if (loosemult == 3) {
609  fill("jet3Pt_", monitorJet.pt());
610  //fill("jet3PtRaw_", jet->pt());
611  fill("jet3Eta_", monitorJet.eta());
612  }
613  if (loosemult == 4) {
614  fill("jet4Pt_", monitorJet.pt());
615  //fill("jet4PtRaw_", jet->pt());
616  fill("jet4Eta_", monitorJet.eta());
617  }
618  }
619  }
620  fill("jetMult_", mult);
621  fill("jetLooseMult_", loosemult);
622  fill("jetMultBDeepJetM_", multBDeepJetM);
623 
624  /*
625  ------------------------------------------------------------
626 
627  MET Monitoring
628 
629  ------------------------------------------------------------
630  */
631 
632  // fill monitoring histograms for met
633  for (std::vector<edm::EDGetTokenT<edm::View<pat::MET>>>::const_iterator met_ = mets_.begin(); met_ != mets_.end();
634  ++met_) {
636  if (!event.getByToken(*met_, met))
637  continue;
638  if (met->begin() != met->end()) {
639  unsigned int idx = met_ - mets_.begin();
640  if (idx == 0)
641  fill("slimmedMETs_", met->begin()->et());
642  if (idx == 1)
643  fill("slimmedMETsNoHF_", met->begin()->et());
644  if (idx == 2)
645  fill("slimmedMETsPuppi_", met->begin()->et());
646  }
647  }
648 
649  /*
650  ------------------------------------------------------------
651 
652  Event Monitoring
653 
654  ------------------------------------------------------------
655  */
656 
657  // fill W boson and top mass estimates
658 
659  Calculate_miniAOD eventKinematics(MAXJETS, WMASS);
660  double wMass = eventKinematics.massWBoson(correctedJets);
661  double topMass = eventKinematics.massTopQuark(correctedJets);
662  if (wMass >= 0 && topMass >= 0) {
663  fill("massW_", wMass);
664  fill("massTop_", topMass);
665  }
666 
667  // Fill M3 with Btag (DeepJet Tight) requirement
668 
669  // if (!includeBTag_) return;
670  if (correctedJets.size() != JetTagValues.size())
671  return;
672 
673  double btopMass = eventKinematics.massBTopQuark(correctedJets, JetTagValues, 0.2435); //hard coded DeepJet value
674 
675  if (btopMass >= 0)
676  fill("massBTop_", btopMass);
677 
678  // fill plots for trigger monitoring
679  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < wMass && wMass < upperEdge_)) {
681  fill(event, *triggerTable, "trigger", triggerPaths_);
682  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
683  // log runnumber, lumi block, event number & some
684  // more pysics infomation for interesting events
685  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
686  fill("eventLogger_", 1.5, logged_ + 0.5, event.eventAuxiliary().luminosityBlock());
687  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
688  //if (correctedJets.size() > 0)
689  if (!correctedJets.empty())
690  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
691  if (correctedJets.size() > 1)
692  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
693  if (correctedJets.size() > 2)
694  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
695  if (correctedJets.size() > 3)
696  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
697  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
698  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
699  ++logged_;
700  }
701  }
702  }
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
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
double pt() const final
transverse momentum
int chargedMultiplicity() const
chargedMultiplicity
Definition: Jet.h:740
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
const Point & position() const
position
Definition: Vertex.h:128
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:104
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
static const unsigned int MAXJETS
int neutralMultiplicity() const
neutralMultiplicity
Definition: Jet.h:464
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:402
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
Definition: DiMuonV_cfg.py:214
electronId
when omitted electron plots will be filled w/o cut on electronId
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
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
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:398
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
double lowerEdge_
mass window upper and lower edge
Analysis-level calorimeter jet class.
Definition: Jet.h:77
int logged_
number of logged interesting events
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:406
bool isValid() const
Definition: HandleBase.h:70
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:410
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecSelect_
extra selection on electrons
Definition: event.py:1
double eta() const final
momentum pseudorapidity

◆ fill() [2/5]

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 153 of file TopSingleLeptonDQM_miniAOD.h.

References accept(), fill(), hists_, heavyIonCSV_trainingSettings::idx, SummaryClient_cfi::labels, monitorPath(), and selectionPath().

156  {
157  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
158  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
159  fill(channel + "Mon_", idx + 0.5);
160  // take care to fill triggerMon_ before evts is being called
161  int evts = hists_.find(channel + "Mon_")->second->getBinContent(idx + 1);
162  double value = hists_.find(channel + "Eff_")->second->getBinContent(idx + 1);
163  fill(
164  channel + "Eff_", idx + 0.5, 1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) - value));
165  }
166  }
167  }
std::string monitorPath(const std::string &label) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
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
Definition: event.py:1

◆ fill() [3/5]

void TopSingleLepton_miniAOD::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 64 of file TopSingleLeptonDQM_miniAOD.h.

References booked(), and hists_.

64  {
65  if (booked(histName))
66  hists_.find(histName)->second->Fill(value);
67  };
std::map< std::string, MonitorElement * > hists_
histogram container
Definition: value.py:1
bool booked(const std::string histName) const
check if histogram was booked

◆ fill() [4/5]

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 69 of file TopSingleLeptonDQM_miniAOD.h.

References booked(), and hists_.

69  {
70  if (booked(histName))
71  hists_.find(histName)->second->Fill(xValue, yValue);
72  };
std::map< std::string, MonitorElement * > hists_
histogram container
bool booked(const std::string histName) const
check if histogram was booked

◆ fill() [5/5]

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 74 of file TopSingleLeptonDQM_miniAOD.h.

References booked(), and hists_.

74  {
75  if (booked(histName))
76  hists_.find(histName)->second->Fill(xValue, yValue, zValue);
77  };
std::map< std::string, MonitorElement * > hists_
histogram container
bool booked(const std::string histName) const
check if histogram was booked

◆ monitorPath()

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 48 of file TopSingleLeptonDQM_miniAOD.h.

References label.

Referenced by fill(), and triggerBinLabels().

48 { return label.substr(label.find(':') + 1); };
char const * label

◆ selectionPath()

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 51 of file TopSingleLeptonDQM_miniAOD.h.

References label.

Referenced by fill(), and triggerBinLabels().

51 { return label.substr(0, label.find(':')); };
char const * label

◆ triggerBinLabels()

void MonitorEnsemble::triggerBinLabels ( std::string  channel,
const std::vector< std::string >  labels 
)
inlineprivate

set configurable labels for trigger monitoring histograms

Definition at line 145 of file TopSingleLeptonDQM_miniAOD.h.

References hists_, heavyIonCSV_trainingSettings::idx, SummaryClient_cfi::labels, monitorPath(), and selectionPath().

Referenced by book().

145  {
146  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
147  hists_[channel + "Mon_"]->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
148  hists_[channel + "Eff_"]->setBinLabel(
149  idx + 1, "[" + selectionPath(labels[idx]) + "]|[" + monitorPath(labels[idx]) + "]", 1);
150  }
151  }
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

◆ btagCSV_

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

Definition at line 130 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagCSVWP_

double TopSingleLepton_miniAOD::MonitorEnsemble::btagCSVWP_
private

Definition at line 132 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagEff_

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

btag discriminator labels

Definition at line 130 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagEffWP_

double TopSingleLepton_miniAOD::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 132 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagPur_

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

Definition at line 130 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagPurWP_

double TopSingleLepton_miniAOD::MonitorEnsemble::btagPurWP_
private

Definition at line 132 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagVtx_

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

Definition at line 130 of file TopSingleLeptonDQM_miniAOD.h.

◆ btagVtxWP_

double TopSingleLepton_miniAOD::MonitorEnsemble::btagVtxWP_
private

Definition at line 132 of file TopSingleLeptonDQM_miniAOD.h.

◆ directory_

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

Definition at line 142 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().

◆ eidCutValue_

double TopSingleLepton_miniAOD::MonitorEnsemble::eidCutValue_
private

Definition at line 102 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ elecIso_

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

extra isolation criterion on electron

Definition at line 104 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ elecs_

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

Definition at line 89 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ elecSelect_

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

extra selection on electrons

Definition at line 106 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ electronId_

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

electronId label

Definition at line 100 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ hists_

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

histogram container

Definition at line 140 of file TopSingleLeptonDQM_miniAOD.h.

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

◆ includeBTag_

bool TopSingleLepton_miniAOD::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 128 of file TopSingleLeptonDQM_miniAOD.h.

◆ jetIDLabel_

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

jetID as an extra selection type

Definition at line 119 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ jetIDSelect_

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

extra jetID selection on calo jets

Definition at line 121 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ jets_

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

input sources for monitoring

Definition at line 87 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ jetSelect

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

Definition at line 125 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ jetSelect_

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 124 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ label_

std::string TopSingleLepton_miniAOD::MonitorEnsemble::label_
private

◆ logged_

int TopSingleLepton_miniAOD::MonitorEnsemble::logged_
private

number of logged interesting events

Definition at line 137 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill().

◆ lowerEdge_

double TopSingleLepton_miniAOD::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 134 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ mets_

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

considers a vector of METs

Definition at line 85 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ muonIso_

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

extra isolation criterion on muon

Definition at line 113 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ muons_

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

Definition at line 88 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ muonSelect_

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

extra selection on muons

Definition at line 116 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ pvs_

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

Definition at line 90 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ pvSelect_

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 110 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by MonitorEnsemble().

◆ rhoTag

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

Definition at line 97 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ tmpConsumerBase

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

Definition at line 141 of file TopSingleLeptonDQM_miniAOD.h.

◆ triggerPaths_

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

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

Definition at line 95 of file TopSingleLeptonDQM_miniAOD.h.

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

◆ triggerTable_

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

trigger table

Definition at line 92 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ upperEdge_

double TopSingleLepton_miniAOD::MonitorEnsemble::upperEdge_
private

Definition at line 134 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by fill(), and MonitorEnsemble().

◆ verbosity_

Level TopSingleLepton_miniAOD::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 77 of file TopSingleLeptonDQM_miniAOD.h.

Referenced by book(), and MonitorEnsemble().