CMS 3D CMS Logo

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

#include <SingleTopTChannelLeptonDQM.h>

Public Types

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< reco::JetTagCollectionbtagCombVtx_
 
double btagCombVtxWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagCSV_
 
double btagCSVWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT< reco::JetTagCollectionbtagPur_
 
double btagPurWP_
 
edm::EDGetTokenT< reco::JetTagCollectionbtagVtx_
 
double btagVtxWP_
 
std::string directory_
 
double eidCutValue_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > elecIso
 
std::string elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
 
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_gsf_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > elecSelect
 
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_
 
bool includeBTag_
 
std::string jetCorrector_
 jetCorrector More...
 
edm::EDGetTokenT< reco::JetIDValueMapjetIDLabel_
 jetID as an extra selection type More...
 
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
 extra jetID selection on calo jets More...
 
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetlooseSelection_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
 input sources for monitoring More...
 
std::string jetSelect_
 
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, true > > muonIso
 
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, true > > muonSelect
 
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 SingleTopTChannelLeptonDQM.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

default contructor

Definition at line 25 of file SingleTopTChannelLeptonDQM.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_.

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

default destructor

Definition at line 69 of file SingleTopTChannelLeptonDQM.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 196 of file SingleTopTChannelLeptonDQM.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().

196  {
197  // set up the current directory path
198  std::string current(directory_);
199  current += label_;
200  ibooker.setCurrentFolder(current);
201 
202 
203  // --- [STANDARD] --- //
204  // number of selected primary vertices
205  hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
206  // pt of the leading muon
207  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
208  // muon multiplicity before std isolation
209  hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{loose}(#mu)", 10, 0., 10.);
210  // muon multiplicity tight Id and tight Iso
211  hists_["muonMultTight_"] = ibooker.book1D("MuonMultTight",
212  "N_{TightIso,TightId}(#mu)", 10, 0., 10.);
213  // pt of the leading electron
214  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e TightId, TightIso)", 40, 0., 200.);
215  // multiplicity of jets with pt>30 (corrected to L1+L2+L3)
216  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.);
217  // multiplicity of loose Id jets with pt>30
218  hists_["jetLooseMult_"] = ibooker.book1D("JetLooseMult", "N_{30,loose}(jet)", 10, 0., 10.);
219 
220  // MET (pflow)
221  hists_["metPflow_"] = ibooker.book1D("METPflow", "MET_{Pflow}", 50, 0., 200.);
222  // W mass estimate
223  hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.);
224  // Top mass estimate
225  hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.);
226  // W mass transverse estimate mu
227  hists_["MTWm_"] = ibooker.book1D("MTWm", "M_{T}^{W}(#mu)", 60, 0., 300.);
228  // Top mass transverse estimate mu
229  hists_["mMTT_"] = ibooker.book1D("mMTT", "M_{T}^{t}(#mu)", 50, 0., 500.);
230 
231  // W mass transverse estimate e
232  hists_["MTWe_"] = ibooker.book1D("MTWe", "M_{T}^{W}(e)", 60, 0., 300.);
233  // Top mass transverse estimate e
234  hists_["eMTT_"] = ibooker.book1D("eMTT", "M_{T}^{t}(e)", 50, 0., 500.);
235 
236  // set bin labels for trigger monitoring
238 
239  if (verbosity_ == STANDARD) return;
240 
241  // --- [VERBOSE] --- //
242 
243  // eta of the leading muon
244  hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu TightId, TightIso)", 30, -3., 3.);
245  // relative isolation of the candidate muon (depending on the decay channel)
246  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu TightId) (#Delta#beta Corrected)", 50, 0., 1.);
247  // phi of the leading muon
248  hists_["muonPhi_"] = ibooker.book1D("MuonPhi", "#phi(#mu TightId, TightIso)", 40, -4., 4.);
249  // eta of the leading electron
250  hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e tightId, TightIso)", 30, -3., 3.);
251  // std isolation variable of the leading electron
252  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e TightId)", 50, 0., 1.);
253  // phi of the leading electron
254  hists_["elecPhi_"] = ibooker.book1D("ElecPhi", "#phi(e tightId, TightIso)", 40, -4., 4.);
255  // multiplicity of tight Id, tight Iso electorns
256  hists_["elecMultTight_"] = ibooker.book1D("ElecMultTight",
257  "N_{TightIso,TightId}(e)", 10, 0., 10.);
258 
259 
260  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta_{30,loose}(jet1)", 60, -3., 3.);
261  // pt of the 1. leading jet (corrected to L2+L3)
262  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{30,loose}(jet1)", 60, 0., 300.);
263  // eta of the 2. leading jet (corrected to L2+L3)
264  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta_{30,loose}(jet2)", 60, -3., 3.);
265  // pt of the 2. leading jet (corrected to L2+L3)
266  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{30,loose}(jet2)", 60, 0., 300.);
267 
268  // dz for muons (to suppress cosmis)
269  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
270  // dxy for muons (to suppress cosmics)
271  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY",
272  "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
273 
274  // set axes titles for dxy for muons
275  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
276  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
277 
278  if (verbosity_ == VERBOSE) return;
279 
280  // --- [DEBUG] --- //
281  // charged hadron isolation component of the candidate muon (depending on the
282  // decay channel)
283  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIsoComp",
284  "ChHad_{IsoComponent}(#mu TightId)", 50, 0., 5.);
285  // neutral hadron isolation component of the candidate muon (depending on the
286  // decay channel)
287  hists_["muonNeHadIso_"] = ibooker.book1D("MuonNeHadIsoComp",
288  "NeHad_{IsoComponent}(#mu TightId)", 50, 0., 5.);
289  // photon isolation component of the candidate muon (depending on the decay
290  // channel)
291  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIsoComp",
292  "Photon_{IsoComponent}(#mu TightId)", 50, 0., 5.);
293  // charged hadron isolation component of the candidate electron (depending on
294  // the decay channel)
295  hists_["elecChHadIso_"] = ibooker.book1D("ElectronChHadIsoComp",
296  "ChHad_{IsoComponent}(e tightId)", 50, 0., 5.);
297  // neutral hadron isolation component of the candidate electron (depending on
298  // the decay channel)
299  hists_["elecNeHadIso_"] = ibooker.book1D("ElectronNeHadIsoComp",
300  "NeHad_{IsoComponent}(e tightId)", 50, 0., 5.);
301  // photon isolation component of the candidate electron (depending on the
302  // decay channel)
303  hists_["elecPhIso_"] = ibooker.book1D("ElectronPhIsoComp",
304  "Photon_{IsoComponent}(e tightId)", 50, 0., 5.);
305 
306  // multiplicity for combined secondary vertex
307  hists_["jetMultBCSVM_"] = ibooker.book1D("JetMultBCSVM", "N_{30}(CSVM)", 10, 0., 10.);
308  // btag discriminator for combined secondary vertex
309  hists_["jetBCSV_"] = ibooker.book1D("JetDiscCSV",
310  "BJet Disc_{CSV}(JET)", 100, -1., 2.);
311  // pt of the 1. leading jet (uncorrected)
312  // hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
313  // pt of the 2. leading jet (uncorrected)
314  // hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
315  // pt of the 3. leading jet (uncorrected)
316  // hists_["jet3PtRaw_"] = ibooker.book1D("Jet3PtRaw", "pt_{Raw}(jet3)", 60, 0., 300.);
317  // pt of the 4. leading jet (uncorrected)
318  // hists_["jet4PtRaw_"] = ibooker.book1D("Jet4PtRaw", "pt_{Raw}(jet4)", 60, 0., 300.);
319  // selected events
320  hists_["eventLogger_"] = ibooker.book2D("EventLogger",
321  "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_{30,loose}(jet1)", 1);
329  hists_["eventLogger_"]->setBinLabel(5, "pt_{30,loose}(jet2)", 1);
330  hists_["eventLogger_"]->setBinLabel(6, "pt_{30,loose}(jet3)", 1);
331  hists_["eventLogger_"]->setBinLabel(7, "pt_{30,loose}(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 }
std::map< std::string, MonitorElement * > hists_
Level verbosity_
verbosity level for booking
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
bool SingleTopTChannelLepton::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 96 of file SingleTopTChannelLeptonDQM.h.

References hists_.

Referenced by fill().

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

fill monitor histograms with electronId and jetCorrections

Definition at line 338 of file SingleTopTChannelLeptonDQM.cc.

References funct::abs(), btagCSV_, btagCSVWP_, reco::JetCorrector::correction(), mitigatedMETSequence_cff::corrector, MillePedeFileConverter_cfg::e, 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(), Calculate::massTopQuark(), Calculate::massWBoson(), SiStripPI::max, RazorAnalyzer::met, mets_, mJetCorrector, RPCpg::mu, metsig::muon, 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, Calculate::tmassTopQuark(), Calculate::tmassWBoson(), triggerPaths_, triggerTable_, upperEdge_, and pseudoTop_cfi::wMass.

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

339  {
340  // fetch trigger event if configured such
342 
343  /*
344  ------------------------------------------------------------
345 
346  Primary Vertex Monitoring
347 
348  ------------------------------------------------------------
349  */
350 
351  // fill monitoring plots for primary verices
353 
354  if (!event.getByToken(pvs_, pvs)) return;
355  const reco::Vertex& Pvertex = pvs->front();
356  unsigned int pvMult = 0;
357  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
358  pv != pvs->end(); ++pv) {
359  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
360  }
361  fill("pvMult_", pvMult);
362  /*
363  ------------------------------------------------------------
364 
365  Electron Monitoring
366 
367  ------------------------------------------------------------
368  */
369 
370  // fill monitoring plots for electrons
373  edm::Handle< double > _rhoHandle;
374  event.getByLabel(rhoTag,_rhoHandle);
375 
376  if (!event.getByToken(elecs_, elecs)) return;
377 
378 
379  // check availability of electron id
381  if (!electronId_.isUninitialized()) {
382  if (!event.getByToken(electronId_, electronId)) {
383  return;
384  }
385  }
386  // loop electron collection
387  unsigned int eMult = 0, eMultIso = 0;
388  std::vector<const reco::PFCandidate*> isoElecs;
389 
390  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin();
391  elec != elecs->end(); ++elec) {
392  if (elec->gsfElectronRef().isNull()) {
393  continue;
394  }
395  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
396  // restrict to electrons with good electronId
397  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >=
398  eidCutValue_)) { //This Electron Id is not currently used, but we can keep this for future needs
399  if (!elecSelect_ || (*elecSelect_)(*elec)) {
400 
401  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
402  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
403  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
404  double absEta = std::abs(gsf_el->superCluster()->eta());
405 
406  //Effective Area computation
407  double eA = 0;
408  if (absEta < 1.000) eA = 0.1703;
409  else if (absEta < 1.479) eA = 0.1715;
410  else if (absEta < 2.000) eA = 0.1213;
411  else if (absEta < 2.200) eA = 0.1230;
412  else if (absEta < 2.300) eA = 0.1635;
413  else if (absEta < 2.400) eA = 0.1937;
414  else if (absEta < 5.000) eA = 0.2393;
415 
416  double rho = _rhoHandle.isValid() ? (float)(*_rhoHandle) : 0;
417  double el_pfRelIso = (el_ChHadIso + max(0., el_NeHadIso + el_PhIso - rho * eA)) /gsf_el->pt();
418 
419  //Only TightId
420  if (eMult == 0) {// Restricted to the leading tight electron
421  fill("elecRelIso_", el_pfRelIso);
422  fill("elecChHadIso_", el_ChHadIso);
423  fill("elecNeHadIso_", el_NeHadIso);
424  fill("elecPhIso_", el_PhIso);
425  }
426  ++eMult;
427 
428  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
429 
430 
431  // TightId and TightIso
432  if (eMultIso == 0){//Only leading
433  e = *gsf_el;
434  fill("elecPt_", gsf_el->pt());
435  fill("elecEta_", gsf_el->eta());
436  fill("elecPhi_", gsf_el->phi());
437  }
438  ++eMultIso;
439  }
440  }
441  }
442  //fill("elecMult_", eMult);
443  fill("elecMultTight_", eMultIso);
444 
445  /*
446  ------------------------------------------------------------
447 
448  Muon Monitoring
449 
450  ------------------------------------------------------------
451  */
452 
453  // fill monitoring plots for muons
454  unsigned int mMult = 0, mTight=0, mTightId = 0;
455 
459  reco::Muon mu;
460 
461  if (!event.getByToken(muons_, muons)) return;
462 
463  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin(); muonit != muons->end(); ++muonit) {
464 
465  if (muonit->muonRef().isNull()) continue;
466  reco::MuonRef muon = muonit->muonRef();
467 
468  // restrict to globalMuons
469  if (muon->isGlobalMuon()) {
470  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
471  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
472 
473  // apply preselection
474  if ((!muonSelect_ || (*muonSelect_)(*muonit))) {
475  mMult++;
476  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
477  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
478  double phoEt = muon->pfIsolationR04().sumPhotonEt;
479  double pfRelIso = (chHadPt + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) / muon->pt(); // CB dBeta corrected iso!
480 
481  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
482 
483  if (mTightId == 0){
484  fill("muonRelIso_", pfRelIso);
485  fill("muonChHadIso_", chHadPt);
486  fill("muonNeHadIso_", neHadEt);
487  fill("muonPhIso_", phoEt);
488  }
489  mTightId++;
490 
491  if(!(pfRelIso < 0.15)) continue; //Tight Iso
492 
493  if (mTight == 0){//Leading tightId tightIso muon
494  mu = *(muon);
495  fill("muonPt_", muon->pt());
496  fill("muonEta_", muon->eta());
497  fill("muonPhi_", muon->phi());
498  }
499  mTight++;
500  }
501  }
502  }
503  fill("muonMult_", mMult);
504  fill("muonMultTight_", mTight);
505 
506  /*
507  ------------------------------------------------------------
508 
509  Jet Monitoring
510 
511  ------------------------------------------------------------
512  */
513 
514  // check availability of the btaggers
515  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCSV;
516  if (includeBTag_) {
517 
518  if (!event.getByToken(btagCSV_, btagCSV)) return;
519  }
520 
522  event.getByToken(mJetCorrector, corrector);
523  if (!event.getByToken(mJetCorrector, corrector)) return;
524  // load jet
525 // corrector if configured such
526 // const JetCorrector* corrector = 0;
527 // if (!jetCorrector_.empty()) {
528 
529  // check whether a jet correcto is in the event setup or not
530 // if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey<
531 // JetCorrectionsRecord>())) {
532 // corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
533 // } else {
534 // edm::LogVerbatim("SingleTopTChannelLeptonDQM")
535 // << "\n"
536 // << "-----------------------------------------------------------------"
537 // "-------------------- \n"
538 // << " No JetCorrectionsRecord available from EventSetup:\n"
539 // << " - Jets will not be corrected.\n"
540 // << " - If you want to change this add the following lines to your "
541 // "cfg file:\n"
542 // << "\n"
543 // << " ## load jet corrections\n"
544 // << " "
545 // "process.load(\"JetMETCorrections.Configuration."
546 // "JetCorrectionServicesAllAlgos_cff\") \n"
547 // << " process.prefer(\"ak5CaloL2L3\")\n"
548 // << "\n"
549 // << "-----------------------------------------------------------------"
550 // "-------------------- \n";
551 // }
552 //}
553  // loop jet collection
554  std::vector<reco::Jet> correctedJets;
555  std::vector<double> JetTagValues;
556  reco::Jet TaggedJetCand;
557  unsigned int mult = 0, multLoose = 0, multCSV = 0;
558  vector<double> bJetDiscVal;
559 
561  if (!event.getByToken(jets_, jets)) {
562  return;
563  }
564 
565  for (edm::View<reco::Jet>::const_iterator jet = jets->begin();
566  jet != jets->end(); ++jet) {
567  bool isLoose = false;
568  // check jetID for calo jets, keep functionality if we ever want to go back to those
569 // unsigned int idx = jet - jets->begin();
570 // if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
571 // if (jetIDSelect_ &&
572 // dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
573 // if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
574 // }
575 // }
576 
577  // check additional jet selection for pf jets
578  if (dynamic_cast<const reco::PFJet*>(&*jet)) {
579  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
580  if ((*jetlooseSelection_)(sel)) isLoose = true;
581  sel.scaleEnergy(corrector->correction(*jet));
582  if (!(*jetSelection_)(sel)) continue;
583 // else if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
584 // reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
585 // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
586 // if ( jetSelectCalo==nullptr)
587 // jetSelectCalo.reset(new StringCutObjectSelector<reco::CaloJet>(jetSelect_));
588 // if (!((*jetSelectCalo)(sel))) {
589 // continue;
590 // }
591  }
592 // else {
593 // reco::Jet sel = *jet;
594 // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
595 // if ( jetSelectJet==nullptr)
596 // jetSelectJet.reset(new StringCutObjectSelector<reco::Jet>(jetSelect_));
597 //
598 // if (!((*jetSelectJet)(sel))) continue;
599 // }
600 
601  // prepare jet to fill monitor histograms
602  reco::Jet monitorJet = *jet;
603 
604  ++mult; // determine jet (no Id) multiplicity
605  monitorJet.scaleEnergy(corrector->correction(*jet));
606 
607  if (isLoose){ //Loose Id
608  unsigned int idx = jet - jets->begin();
609  correctedJets.push_back(monitorJet);
610  if (includeBTag_) {
611  // fill b-discriminators
612  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
613  fill("jetBCSV_", (*btagCSV)[jetRef]);
614  if ((*btagCSV)[jetRef] > btagCSVWP_){
615  if (multCSV == 0){
616  TaggedJetCand = monitorJet;
617  bJetDiscVal.push_back((*btagCSV)[jetRef]);
618  }
619  else if(multCSV == 1){
620  bJetDiscVal.push_back((*btagCSV)[jetRef]);
621  if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet;
622  }
623  ++multCSV;
624  }
625  JetTagValues.push_back((*btagCSV)[jetRef]);
626  }
627 
628  // fill pt/eta for the leading four jets
629  if (multLoose == 0) {
630  fill("jet1Pt_", monitorJet.pt());
631  fill("jet1Eta_", monitorJet.eta());
632  };
633  if (multLoose == 1) {
634  fill("jet2Pt_", monitorJet.pt());
635  fill("jet2Eta_", monitorJet.eta());
636  }
637  multLoose++;
638  }
639  }
640  fill("jetMult_" , mult);
641  fill("jetMultLoose_", multLoose);
642  fill("jetMultBCSVM_", multCSV);
643 
644 
645  /*
646  ------------------------------------------------------------
647 
648  MET Monitoring
649 
650  ------------------------------------------------------------
651  */
652 
653  // fill monitoring histograms for met
654  reco::MET mET;
655  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET>>>::const_iterator
656  met_ = mets_.begin();
657  met_ != mets_.end(); ++met_) {
659  if (!event.getByToken(*met_, met)) continue;
660  if (met->begin() != met->end()) {
661  unsigned int idx = met_ - mets_.begin();
662  if (idx == 0) {
663  fill("metPflow_", met->begin()->et());
664  mET = *(met->begin());
665  }
666  }
667  }
668 
669  /*
670  ------------------------------------------------------------
671 
672  Event Monitoring
673 
674  ------------------------------------------------------------
675  */
676 
677  // fill W boson and top mass estimates
678  Calculate eventKinematics(MAXJETS, WMASS);
679  double wMass = eventKinematics.massWBoson(correctedJets);
680  double topMass = eventKinematics.massTopQuark(correctedJets);
681  if (wMass >= 0 && topMass >= 0) {
682  fill("massW_", wMass);
683  fill("massTop_", topMass);
684  }
685  // fill plots for trigger monitoring
686  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
687  (lowerEdge_ < wMass && wMass < upperEdge_)) {
689  fill(event, *triggerTable, "trigger", triggerPaths_);
690  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
691  // log runnumber, lumi block, event number & some
692  // more pysics infomation for interesting events
693  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
694  fill("eventLogger_", 1.5, logged_ + 0.5,
695  event.eventAuxiliary().luminosityBlock());
696  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
697  if (!correctedJets.empty())
698  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
699  if (correctedJets.size() > 1)
700  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
701  if (correctedJets.size() > 2)
702  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
703  if (correctedJets.size() > 3)
704  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
705  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
706  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
707  ++logged_;
708  }
709  }
710  if (multCSV != 0 && mTight == 1) {
711 
712  double mtW = eventKinematics.tmassWBoson(&mu, mET, TaggedJetCand);
713  fill("MTWm_", mtW);
714  double MTT = eventKinematics.tmassTopQuark(&mu, mET, TaggedJetCand);
715  fill("mMTT_", MTT);
716  }
717 
718  if (multCSV != 0 && eMultIso == 1) {
719  double mtW = eventKinematics.tmassWBoson(&e, mET, TaggedJetCand);
720  fill("MTWe_", mtW);
721  double MTT = eventKinematics.tmassTopQuark(&e, mET, TaggedJetCand);
722  fill("eMTT_", MTT);
723  }
724  }
std::map< std::string, MonitorElement * > hists_
edm::EDGetTokenT< reco::JetCorrector > mJetCorrector
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:93
double eta() const final
momentum pseudorapidity
virtual void scaleEnergy(double fScale)
scale energy of the jet
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetlooseSelection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
Base class for all types of Jets.
Definition: Jet.h:20
int logged_
number of logged interesting events
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< edm::View< reco::PFCandidate > > muons_
const Point & position() const
position
Definition: Vertex.h:109
Jets made from PFObjects.
Definition: PFJet.h:21
LuminosityBlockNumber_t luminosityBlock() const
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
Helper class for the calculation of a top and a W boson mass estime.
double lowerEdge_
mass window upper and lower edge
Definition: MET.h:42
vector< PseudoJet > jets
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
const int mu
Definition: Constants.h:22
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
met
===> hadronic RAZOR
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
static const unsigned int MAXJETS
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
bool isUninitialized() const
Definition: EDGetToken.h:73
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetSelection_
EventNumber_t event() const
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
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 231 of file SingleTopTChannelLeptonDQM.h.

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

234  {
235  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
236  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
237  fill(channel + "Mon_", idx + 0.5);
238  // take care to fill triggerMon_ before evts is being called
239  int evts = hists_.find(channel + "Mon_")
240  ->second->getBinContent(idx + 1);
241  double value = hists_.find(channel + "Eff_")
242  ->second->getBinContent(idx + 1);
243  fill(
244  channel + "Eff_", idx + 0.5,
245  1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) -
246  value));
247  }
248  }
249 }
std::map< std::string, MonitorElement * > hists_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::string monitorPath(const std::string &label) const
Definition: value.py:1
std::string selectionPath(const std::string &label) const
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
void SingleTopTChannelLepton::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 100 of file SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

100  {
101  if (booked(histName))
102  hists_.find(histName)->second->Fill(value);
103  };
std::map< std::string, MonitorElement * > hists_
bool booked(const std::string histName) const
check if histogram was booked
Definition: value.py:1
void SingleTopTChannelLepton::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 SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

105  {
106  if (booked(histName))
107  hists_.find(histName)->second->Fill(xValue, yValue);
108  };
std::map< std::string, MonitorElement * > hists_
bool booked(const std::string histName) const
check if histogram was booked
void SingleTopTChannelLepton::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 SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

111  {
112  if (booked(histName))
113  hists_.find(histName)->second->Fill(xValue, yValue, zValue);
114  };
std::map< std::string, MonitorElement * > hists_
bool booked(const std::string histName) const
check if histogram was booked
std::string SingleTopTChannelLepton::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 SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

79  {
80  return label.substr(label.find(':') + 1);
81  };
char const * label
std::string SingleTopTChannelLepton::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 SingleTopTChannelLeptonDQM.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 219 of file SingleTopTChannelLeptonDQM.h.

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

Referenced by book(), and selectionPath().

220  {
221  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
222  hists_[channel + "Mon_"]
223  ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
224  hists_[channel + "Eff_"]
225  ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" +
226  monitorPath(labels[idx]) + "]",
227  1);
228  }
229 }
std::map< std::string, MonitorElement * > hists_
std::string monitorPath(const std::string &label) const
std::string selectionPath(const std::string &label) const

Member Data Documentation

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

Definition at line 192 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagCombVtxWP_
private

Definition at line 196 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 192 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagCSVWP_
private

Definition at line 196 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

btag discriminator labels

Definition at line 192 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 196 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 192 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 196 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 192 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 196 of file SingleTopTChannelLeptonDQM.h.

std::string SingleTopTChannelLepton::MonitorEnsemble::directory_
private

Definition at line 207 of file SingleTopTChannelLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().

double SingleTopTChannelLepton::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 159 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > SingleTopTChannelLepton::MonitorEnsemble::elecIso
private

Definition at line 214 of file SingleTopTChannelLeptonDQM.h.

std::string SingleTopTChannelLepton::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 161 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 128 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::GsfElectron> > SingleTopTChannelLepton::MonitorEnsemble::elecs_gsf_
private

Definition at line 127 of file SingleTopTChannelLeptonDQM.h.

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > SingleTopTChannelLepton::MonitorEnsemble::elecSelect
private

Definition at line 213 of file SingleTopTChannelLeptonDQM.h.

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

extra selection on electrons

Definition at line 163 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

electronId label

Definition at line 143 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

storage manager histogram container

Definition at line 204 of file SingleTopTChannelLeptonDQM.h.

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

bool SingleTopTChannelLepton::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 189 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 176 of file SingleTopTChannelLeptonDQM.h.

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

jetID as an extra selection type

Definition at line 178 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

extra jetID selection on calo jets

Definition at line 181 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 182 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

input sources for monitoring

Definition at line 125 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::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 186 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 183 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

number of logged interesting events

Definition at line 201 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill().

double SingleTopTChannelLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 198 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

considers a vector of METs

Definition at line 122 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 145 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > SingleTopTChannelLepton::MonitorEnsemble::muonIso
private

Definition at line 210 of file SingleTopTChannelLeptonDQM.h.

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

extra isolation criterion on muon

Definition at line 171 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 126 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > SingleTopTChannelLepton::MonitorEnsemble::muonSelect
private

Definition at line 209 of file SingleTopTChannelLeptonDQM.h.

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

extra selection on muons

Definition at line 174 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 129 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

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

Definition at line 168 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag SingleTopTChannelLepton::MonitorEnsemble::rhoTag
private

Definition at line 164 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDConsumerBase SingleTopTChannelLepton::MonitorEnsemble::tmpConsumerBase
private

Definition at line 205 of file SingleTopTChannelLeptonDQM.h.

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

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

Definition at line 139 of file SingleTopTChannelLeptonDQM.h.

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

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

trigger table

Definition at line 135 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::upperEdge_
private

Definition at line 198 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level SingleTopTChannelLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 114 of file SingleTopTChannelLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().