CMS 3D CMS Logo

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

#include <TopSingleLeptonDQM.h>

Public Types

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< reco::JetTagCollectionbtagCSV_
 
double btagCSVWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT< reco::JetTagCollectionbtagPur_
 
double btagPurWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagVtx_
 
double btagVtxWP_
 
std::string directory_
 
double eidCutValue_
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
 extra selection on electrons More...
 
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
 electronId label More...
 
std::map< std::string, MonitorElement * > hists_
 histogram container More...
 
bool includeBTag_
 
std::string jetCorrector_
 jetCorrector More...
 
edm::EDGetTokenT< reco::JetIDValueMapjetIDLabel_
 jetID as an extra selection type More...
 
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
 
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetlooseSelection_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
 input sources for monitoring More...
 
std::string jetSelect_
 extra selection on jets More...
 
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetSelection_
 
std::string label_
 instance label More...
 
int logged_
 number of logged interesting events More...
 
double lowerEdge_
 mass window upper and lower edge More...
 
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
 considers a vector of METs More...
 
edm::EDGetTokenT< reco::JetCorrectormJetCorrector
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
 
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
 
edm::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 55 of file TopSingleLeptonDQM.h.

Member Enumeration Documentation

different verbosity levels

Enumerator
STANDARD 
VERBOSE 
DEBUG 

Definition at line 58 of file TopSingleLeptonDQM.h.

Constructor & Destructor Documentation

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

default contructor

Definition at line 23 of file TopSingleLeptonDQM.cc.

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

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

default destructor

Definition at line 69 of file TopSingleLeptonDQM.h.

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

69 {};

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 192 of file TopSingleLeptonDQM.cc.

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

Referenced by ~MonitorEnsemble().

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

check if histogram was booked

Definition at line 96 of file TopSingleLeptonDQM.h.

References hists_.

Referenced by fill().

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

fill monitor histograms with electronId and jetCorrections

Definition at line 359 of file TopSingleLeptonDQM.cc.

References btagCSV_, btagCSVWP_, reco::JetCorrector::correction(), mitigatedMETSequence_cff::corrector, eidCutValue_, PatTopSelectionAnalyzer_cfi::elecs, elecs_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), objects.autophobj::float, edm::Event::getByToken(), hists_, training_settings::idx, includeBTag_, edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), metsig::jet, jetlooseSelection_, fwrapper::jets, jets_, jetSelection_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), SiStripPI::max, RazorAnalyzer::met, mets_, mJetCorrector, extraflags_cff::muons, muons_, muonSelect_, reco::Vertex::position(), EnergyCorrector::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), pvs_, pvSelect_, rhoTag, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), triggerObjects_cff::sel, triggerPaths_, triggerTable_, upperEdge_, and pseudoTop_cfi::wMass.

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

360  {
361  // fetch trigger event if configured such
363 
365  if (!event.getByToken(triggerTable_, triggerTable)) return;
366  }
367 
368  /*
369  ------------------------------------------------------------
370 
371  Primary Vertex Monitoring
372 
373  ------------------------------------------------------------
374  */
375  // fill monitoring plots for primary verices
377 
378 
379  if (!event.getByToken(pvs_, pvs)) return;
380  const reco::Vertex& Pvertex = pvs->front();
381  unsigned int pvMult = 0;
382  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
383  pv != pvs->end(); ++pv) {
384  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
385  }
386  fill("pvMult_", pvMult);
387 
388  /*
389  ------------------------------------------------------------
390 
391  Electron Monitoring
392 
393  ------------------------------------------------------------
394  */
395 
396  // fill monitoring plots for electrons
398  edm::Handle< double > _rhoHandle;
399  event.getByLabel(rhoTag,_rhoHandle);
400  if (!event.getByToken(elecs_, elecs)) return;
401 
402  // check availability of electron id
404  if (!electronId_.isUninitialized()) {
405  if (!event.getByToken(electronId_, electronId)) return;
406  }
407 
408  // loop electron collection
409  unsigned int eMult = 0, eMultIso = 0;
410  std::vector<const reco::PFCandidate*> isoElecs;
411  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin();
412  elec != elecs->end(); ++elec) {
413  if (elec->gsfElectronRef().isNull()) {
414  continue;
415  }
416  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
417  // restrict to electrons with good electronId
418  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >=
419  eidCutValue_)) { //This Electron Id is not currently used, but we can keep this for future needs
420  if (!elecSelect_ || (*elecSelect_)(*elec)) {
421 
422  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
423  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
424  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
425  double absEta = std::fabs(gsf_el->superCluster()->eta());
426 
427  //Effective Area computation
428  double eA = 0;
429  if (absEta < 1.000) eA = 0.1703;
430  else if (absEta < 1.479) eA = 0.1715;
431  else if (absEta < 2.000) eA = 0.1213;
432  else if (absEta < 2.200) eA = 0.1230;
433  else if (absEta < 2.300) eA = 0.1635;
434  else if (absEta < 2.400) eA = 0.1937;
435  else if (absEta < 5.000) eA = 0.2393;
436 
437  double rho = _rhoHandle.isValid() ? (float)(*_rhoHandle) : 0;
438  double el_pfRelIso = (el_ChHadIso + max(0., el_NeHadIso + el_PhIso - rho * eA)) /gsf_el->pt();
439 
440  //Only TightId
441  if (eMult == 0) {// Restricted to the leading tight electron
442  fill("elecRelIso_", el_pfRelIso);
443  fill("elecChHadIso_", el_ChHadIso);
444  fill("elecNeHadIso_", el_NeHadIso);
445  fill("elecPhIso_", el_PhIso);
446  }
447  ++eMult;
448 
449  if (!((el_pfRelIso<0.0588 && absEta<1.479)||(el_pfRelIso<0.0571 && absEta>1.479))) continue; // PF Isolation with Effective Area Corrections according to https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedElectronIdentificationRun2
450 
451 
452  // TightId and TightIso
453  if (eMultIso == 0){//Only leading
454  fill("elecPt_", elec->pt());
455  fill("elecEta_", elec->eta());
456  fill("elecPhi_", elec->phi());
457  }
458  ++eMultIso;
459  }
460  }
461  }
462  //fill("elecMult_", eMult);
463  fill("elecMultTight_", eMultIso);
464 
465  /*
466  ------------------------------------------------------------
467 
468  Muon Monitoring
469 
470  ------------------------------------------------------------
471  */
472 
473  // fill monitoring plots for muons
474  unsigned int mMult = 0, mTight=0, mTightId = 0;
475 
478 
479  if (!event.getByToken(muons_, muons)) return;
480 
481  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin(); muonit != muons->end(); ++muonit) {
482 
483  if (muonit->muonRef().isNull()) continue;
484  reco::MuonRef muon = muonit->muonRef();
485 
486  // restrict to globalMuons
487  if (muon->isGlobalMuon()) {
488  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
489  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
490 
491  // apply preselection
492  if ((!muonSelect_ || (*muonSelect_)(*muonit))) {
493  mMult++;
494  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
495  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
496  double phoEt = muon->pfIsolationR04().sumPhotonEt;
497  double pfRelIso = (chHadPt + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) / muon->pt(); // CB dBeta corrected iso!
498 
499  if(!(muon->isGlobalMuon() && muon->isPFMuon() && muon->globalTrack()->normalizedChi2() < 10. && muon->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && muon->numberOfMatchedStations() > 1 && muon->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 && muon->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 && fabs(muon->muonBestTrack()->dxy(Pvertex.position())) < 0.2 && fabs(muon->muonBestTrack()->dz(Pvertex.position())) < 0.5) ) continue; //Only tight muons
500 
501  if (mTightId == 0){
502  fill("muonRelIso_", pfRelIso);
503  fill("muonChHadIso_", chHadPt);
504  fill("muonNeHadIso_", neHadEt);
505  fill("muonPhIso_", phoEt);
506  }
507  mTightId++;
508 
509  if(!(pfRelIso < 0.15)) continue; //Tight Iso
510 
511  if (mTight == 0){//Leading tightId tightIso muon
512  fill("muonPt_", muon->pt());
513  fill("muonEta_", muon->eta());
514  fill("muonPhi_", muon->phi());
515  }
516  mTight++;
517  }
518  }
519  }
520  fill("muonMult_", mMult);
521  fill("muonMultTight_", mTight);
522 
523  /*
524  ------------------------------------------------------------
525 
526  Jet Monitoring
527 
528  ------------------------------------------------------------
529  */
530 
531  // check availability of the btaggers
532  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCSV;
533  if (includeBTag_) {
534 
535  if (!event.getByToken(btagCSV_, btagCSV)) return;
536  }
537 
539  event.getByToken(mJetCorrector, corrector);
540  if (!event.getByToken(mJetCorrector, corrector)) return;
541 
542  // loop jet collection
543  std::vector<reco::Jet> correctedJets;
544  std::vector<double> JetTagValues;
545  unsigned int mult = 0, multLoose = 0, multCSV = 0;
546 
548  if (!event.getByToken(jets_, jets)) {
549  return;
550  }
551 
552  for (edm::View<reco::Jet>::const_iterator jet = jets->begin();
553  jet != jets->end(); ++jet) {
554  bool isLoose = false;
555  // check additional jet selection for pf jets
556  if (dynamic_cast<const reco::PFJet*>(&*jet)) {
557  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
558  if ((*jetlooseSelection_)(sel)) isLoose = true;
559  sel.scaleEnergy(corrector->correction(*jet));
560  if (!(*jetSelection_)(sel)) continue;
561  }
562 
563  // prepare jet to fill monitor histograms
564  reco::Jet monitorJet = *jet;
565 
566  ++mult; // determine jet (no Id) multiplicity
567  monitorJet.scaleEnergy(corrector->correction(*jet));
568 
569  if (isLoose){ //Loose Id
570  unsigned int idx = jet - jets->begin();
571  correctedJets.push_back(monitorJet);
572  if (includeBTag_) {
573  // fill b-discriminators
574  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
575  fill("jetBCSV_", (*btagCSV)[jetRef]);
576  if ((*btagCSV)[jetRef] > btagCSVWP_) ++multCSV;
577  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV
578  // tagger
579  JetTagValues.push_back((*btagCSV)[jetRef]);
580  }
581 
582  // fill pt/eta for the leading four jets
583  if (multLoose == 0) {
584  fill("jet1Pt_", monitorJet.pt());
585  fill("jet1Eta_", monitorJet.eta());
586  };
587  if (multLoose == 1) {
588  fill("jet2Pt_", monitorJet.pt());
589  fill("jet2Eta_", monitorJet.eta());
590  }
591  if (multLoose == 2) {
592  fill("jet3Pt_", monitorJet.pt());
593  fill("jet3Eta_", monitorJet.eta());
594  }
595  if (multLoose == 3) {
596  fill("jet4Pt_", monitorJet.pt());
597  fill("jet4Eta_", monitorJet.eta());
598  }
599  multLoose++;
600  }
601  }
602  fill("jetMult_" , mult);
603  fill("jetMultLoose_", multLoose);
604  fill("jetMultBCSVM_", multCSV);
605 
606  /*
607  ------------------------------------------------------------
608 
609  MET Monitoring
610 
611  ------------------------------------------------------------
612  */
613 
614  // fill monitoring histograms for met
615  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >::const_iterator
616  met_ = mets_.begin();
617  met_ != mets_.end(); ++met_) {
619  if (!event.getByToken(*met_, met)) continue;
620  if (met->begin() != met->end()) {//If we ever have to use more than one type of met again
621  unsigned int idx = met_ - mets_.begin();
622  if (idx == 0) fill("metPflow_", met->begin()->et());
623  }
624  }
625 
626  /*
627  ------------------------------------------------------------
628 
629  Event Monitoring
630 
631  ------------------------------------------------------------
632  */
633 
634  // fill W boson and top mass estimates
635 
636  Calculate eventKinematics(MAXJETS, WMASS);
637  double wMass = eventKinematics.massWBoson(correctedJets);
638  double topMass = eventKinematics.massTopQuark(correctedJets);
639  if (wMass >= 0 && topMass >= 0) {
640  fill("massW_", wMass);
641  fill("massTop_", topMass);
642  }
643 
644  // Fill M3 with Btag (CSV Tight) requirement
645 
646  if (!includeBTag_) return;
647  if (correctedJets.size() != JetTagValues.size()) return;
648  double btopMass =
649  eventKinematics.massBTopQuark(correctedJets, JetTagValues, btagCSVWP_);
650  if (btopMass >= 0) fill("massBTop_", btopMass);
651 
652  // fill plots for trigger monitoring
653  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
654  (lowerEdge_ < wMass && wMass < upperEdge_)) {
656  fill(event, *triggerTable, "trigger", triggerPaths_);
657  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
658  // log runnumber, lumi block, event number & some
659  // more pysics infomation for interesting events
660  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
661  fill("eventLogger_", 1.5, logged_ + 0.5,
662  event.eventAuxiliary().luminosityBlock());
663  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
664  if (!correctedJets.empty())
665  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
666  if (correctedJets.size() > 1)
667  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
668  if (correctedJets.size() > 2)
669  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
670  if (correctedJets.size() > 3)
671  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
672  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
673  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
674  ++logged_;
675  }
676  }
677 }
std::map< std::string, MonitorElement * > hists_
histogram container
int logged_
number of logged interesting events
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:92
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
double eta() const final
momentum pseudorapidity
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< std::string > triggerPaths_
Base class for all types of Jets.
Definition: Jet.h:20
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
RunNumber_t run() const
double pt() const final
transverse momentum
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:49
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
const Point & position() const
position
Definition: Vertex.h:109
Jets made from PFObjects.
Definition: PFJet.h:21
edm::EDGetTokenT< reco::JetCorrector > mJetCorrector
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
LuminosityBlockNumber_t luminosityBlock() const
static const double WMASS
double lowerEdge_
mass window upper and lower edge
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetSelection_
Helper class for the calculation of a top and a W boson mass estime.
vector< PseudoJet > jets
def pv(vc)
Definition: MetAnalyzer.py:7
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
bool isValid() const
Definition: HandleBase.h:74
met
===> hadronic RAZOR
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetlooseSelection_
bool isUninitialized() const
Definition: EDGetToken.h:70
static const unsigned int MAXJETS
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventNumber_t event() const
void MonitorEnsemble::fill ( const edm::Event event,
const edm::TriggerResults triggerTable,
std::string  channel,
const std::vector< std::string >  labels 
) const
inlineprivate

fill trigger monitoring histograms

Definition at line 214 of file TopSingleLeptonDQM.h.

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

217  {
218  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
219  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
220  fill((channel + "Mon_").c_str(), idx + 0.5);
221  // take care to fill triggerMon_ before evts is being called
222  int evts = hists_.find((channel + "Mon_").c_str())
223  ->second->getBinContent(idx + 1);
224  double value = hists_.find((channel + "Eff_").c_str())
225  ->second->getBinContent(idx + 1);
226  fill(
227  (channel + "Eff_").c_str(), idx + 0.5,
228  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
229  value));
230  }
231  }
232 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
Definition: value.py:1
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::string monitorPath(const std::string &label) const
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 100 of file TopSingleLeptonDQM.h.

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

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

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

Definition at line 105 of file TopSingleLeptonDQM.h.

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

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

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

Definition at line 110 of file TopSingleLeptonDQM.h.

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

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

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

Definition at line 79 of file TopSingleLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

79  {
80  return label.substr(label.find(':') + 1);
81  };
char const * label
std::string TopSingleLepton::MonitorEnsemble::selectionPath ( const std::string &  label) const
inlineprivate

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

Definition at line 84 of file TopSingleLeptonDQM.h.

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

Referenced by fill(), and triggerBinLabels().

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

set configurable labels for trigger monitoring histograms

Definition at line 202 of file TopSingleLeptonDQM.h.

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

Referenced by book(), and selectionPath().

203  {
204  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
205  hists_[(channel + "Mon_").c_str()]
206  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
207  hists_[(channel + "Eff_").c_str()]
208  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
209  monitorPath(labels[idx]) + "]",
210  1);
211  }
212 }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
std::string monitorPath(const std::string &label) const

Member Data Documentation

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

Definition at line 185 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagCSVWP_
private

Definition at line 188 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

btag discriminator labels

Definition at line 185 of file TopSingleLeptonDQM.h.

double TopSingleLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 188 of file TopSingleLeptonDQM.h.

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

Definition at line 185 of file TopSingleLeptonDQM.h.

double TopSingleLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 188 of file TopSingleLeptonDQM.h.

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

Definition at line 185 of file TopSingleLeptonDQM.h.

double TopSingleLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 188 of file TopSingleLeptonDQM.h.

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

Definition at line 199 of file TopSingleLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::eidCutValue_
private

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

Definition at line 151 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 126 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> > TopSingleLepton::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 158 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

electronId label

Definition at line 135 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

histogram container

Definition at line 196 of file TopSingleLeptonDQM.h.

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

bool TopSingleLepton::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 183 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

jetCorrector

Definition at line 171 of file TopSingleLeptonDQM.h.

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

jetID as an extra selection type

Definition at line 174 of file TopSingleLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 176 of file TopSingleLeptonDQM.h.

Referenced by MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFJet> > TopSingleLepton::MonitorEnsemble::jetlooseSelection_
private

Definition at line 179 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

input sources for monitoring

Definition at line 124 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra selection on jets

Definition at line 178 of file TopSingleLeptonDQM.h.

Referenced by MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFJet> > TopSingleLepton::MonitorEnsemble::jetSelection_
private

Definition at line 180 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

number of logged interesting events

Definition at line 193 of file TopSingleLeptonDQM.h.

Referenced by fill().

double TopSingleLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 190 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

considers a vector of METs

Definition at line 122 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetCorrector> TopSingleLepton::MonitorEnsemble::mJetCorrector
private

Definition at line 136 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> > TopSingleLepton::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 165 of file TopSingleLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 125 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> > TopSingleLepton::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 168 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 127 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

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

Definition at line 162 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag TopSingleLepton::MonitorEnsemble::rhoTag
private

Definition at line 154 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 197 of file TopSingleLeptonDQM.h.

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

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

Definition at line 132 of file TopSingleLeptonDQM.h.

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

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

trigger table

Definition at line 129 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::upperEdge_
private

Definition at line 190 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level TopSingleLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 114 of file TopSingleLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().