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 56 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_, singleTopDQM_cfi::elecExtras, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), includeBTag_, singleTopDQM_cfi::jetExtras, singleTopDQM_cfi::jetID, jetIDLabel_, jetIDSelect_, jetlooseSelection_, jets_, jetSelect_, jetSelection_, lowerEdge_, singleTopDQM_cfi::massExtras, mets_, mJetCorrector, singleTopDQM_cfi::monitoring, singleTopDQM_cfi::muonExtras, muonIso_, muons_, muonSelect_, singleTopDQM_cfi::pvExtras, pvs_, pvSelect_, rhoTag, CalibrationSummaryClient_cfi::sources, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, singleTopDQM_cfi::triggerExtras, 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
45  jets_ = iC.consumes<edm::View<reco::Jet>>(sources.getParameter<edm::InputTag>("jets"));
46  for (edm::InputTag const& tag : sources.getParameter<std::vector<edm::InputTag>>("mets"))
47  mets_.push_back(iC.consumes<edm::View<reco::MET>>(tag));
48  pvs_ = iC.consumes<edm::View<reco::Vertex>>(sources.getParameter<edm::InputTag>("pvs"));
49  // electronExtras are optional; they may be omitted or
50  // empty
51  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
52  // rho for PF isolation with EA corrections
53  // eventrhoToken_ =
54  // iC.consumes<double>(edm::InputTag("fixedGridRhoFastjetAll"));
55 
57  // select is optional; in case it's not found no
58  // selection will be applied
59  if (elecExtras.existsAs<std::string>("select")) {
60  elecSelect_.reset(
62  }
63 
64  if (elecExtras.existsAs<std::string>("rho")) {
65  rhoTag = elecExtras.getParameter<edm::InputTag>("rho");
66  }
67  // electronId is optional; in case it's not found the
68  // InputTag will remain empty
69  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
70  edm::ParameterSet elecId = elecExtras.getParameter<edm::ParameterSet>("electronId");
72  eidCutValue_ = elecId.getParameter<double>("cutValue");
73  }
74  }
75  // pvExtras are optional; they may be omitted or empty
76  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
78  // select is optional; in case it's not found no
79  // selection will be applied
80  if (pvExtras.existsAs<std::string>("select")) {
82  }
83  }
84  // muonExtras are optional; they may be omitted or empty
85  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
87  // select is optional; in case it's not found no
88  // selection will be applied
89  if (muonExtras.existsAs<std::string>("select")) {
90  muonSelect_.reset(
92  }
93  // isolation is optional; in case it's not found no
94  // isolation will be applied
95  if (muonExtras.existsAs<std::string>("isolation")) {
96  muonIso_.reset(
98  }
99  }
100 
101  // jetExtras are optional; they may be omitted or
102  // empty
103  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
105  // jetCorrector is optional; in case it's not found
106  // the InputTag will remain empty
107  if (jetExtras.existsAs<edm::InputTag>("jetCorrector")) {
108  mJetCorrector = iC.consumes<reco::JetCorrector>(jetExtras.getParameter<edm::InputTag>("jetCorrector"));
109  }
110  // read jetID information if it exists
111  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
114  jetIDSelect_.reset(new StringCutObjectSelector<reco::JetID>(jetID.getParameter<std::string>("select")));
115  }
116  // select is optional; in case it's not found no
117  // selection will be applied (only implemented for
118  // CaloJets at the moment)
119  if (jetExtras.existsAs<std::string>("select")) {
120  jetSelect_ = jetExtras.getParameter<std::string>("select");
123  "chargedHadronEnergyFraction()>0 && chargedMultiplicity()>0 && chargedEmEnergyFraction()<0.99 && "
124  "neutralHadronEnergyFraction()<0.99 && neutralEmEnergyFraction()<0.99 && "
125  "(chargedMultiplicity()+neutralMultiplicity())>1"));
126  }
127 
128  // jetBDiscriminators are optional; in case they are
129  // not found the InputTag will remain empty; they
130  // consist of pairs of edm::JetFlavorAssociation's &
131  // corresponding working points
132  includeBTag_ = jetExtras.existsAs<edm::ParameterSet>("jetBTaggers");
133  if (includeBTag_) {
134  edm::ParameterSet btagCSV =
135  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("cvsVertex");
137  btagCSVWP_ = btagCSV.getParameter<double>("workingPoint");
138  }
139  }
140 
141  // triggerExtras are optional; they may be omitted or empty
142  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
145  triggerPaths_ = triggerExtras.getParameter<std::vector<std::string>>("paths");
146  }
147 
148  // massExtras is optional; in case it's not found no mass
149  // window cuts are applied for the same flavor monitor
150  // histograms
151  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
153  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
154  upperEdge_ = massExtras.getParameter<double>("upperEdge");
155  }
156 
157  // setup the verbosity level for booking histograms;
158  // per default the verbosity level will be set to
159  // STANDARD. This will also be the chosen level in
160  // the case when the monitoring PSet is not found
162  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
164  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
165  verbosity_ = DEBUG;
166  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
167  verbosity_ = VERBOSE;
168  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
169  verbosity_ = STANDARD;
170  }
171  // and don't forget to do the histogram booking
172  directory_ = cfg.getParameter<std::string>("directory");
173  }
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:160
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
muonExtras
when omitted isolated electron multiplicity plot will be equi- valent to inclusive electron multiplic...
double lowerEdge_
mass window upper and lower edge
triggerExtras
[optional] : when omitted no mass window will be applied for the W mass befor filling the event monit...
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_
elecExtras
[optional] : when omitted all monitoring plots for primary vertices will be filled w/o extras pvExtra...
jetExtras
when omitted isolated muon multiplicity plot will be equi- valent to inclusive muon multiplicity plot...
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
monitoring
[optional] : when omitted the verbosity level is set to STANDARD
SingleTopTChannelLepton::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 68 of file SingleTopTChannelLeptonDQM.h.

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

68 {}

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 175 of file SingleTopTChannelLeptonDQM.cc.

References directory_, hists_, label_, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, triggerBinLabels(), triggerPaths_, VERBOSE, and verbosity_.

Referenced by ~MonitorEnsemble().

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

check if histogram was booked

Definition at line 92 of file SingleTopTChannelLeptonDQM.h.

References hists_.

Referenced by fill().

92 { return hists_.find(histName) != hists_.end(); };
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 306 of file SingleTopTChannelLeptonDQM.cc.

References funct::abs(), btagCSV_, btagCSVWP_, reco::JetCorrector::correction(), mitigatedMETSequence_cff::corrector, MillePedeFileConverter_cfg::e, eidCutValue_, singleTopDQM_cfi::elecs, elecs_, elecSelect_, topSingleLeptonDQM_PU_cfi::electronId, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), dqmMemoryStats::float, edm::Event::getByToken(), hists_, training_settings::idx, includeBTag_, edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), metsig::jet, jetlooseSelection_, singleTopDQM_cfi::jets, jets_, jetSelection_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), Calculate::massTopQuark(), Calculate::massWBoson(), SiStripPI::max, BTaggingMonitor_cfi::met, mets_, mJetCorrector, amptDefaultParameters_cff::mu, VarParsing::mult, HLT_2018_cff::muon, PDWG_BPHSkim_cff::muons, muons_, muonSelect_, reco::Vertex::position(), DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), MetAnalyzer::pv(), FSQDQM_cfi::pvs, pvs_, pvSelect_, rhoTag, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), EgammaValidation_Wenu_cff::sel, Calculate::tmassTopQuark(), Calculate::tmassWBoson(), triggerPaths_, triggerTable_, upperEdge_, and pseudoTop_cfi::wMass.

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

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

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

219  {
220  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
221  if (accept(event, triggerTable, monitorPath(labels[idx]))) {
222  fill(channel + "Mon_", idx + 0.5);
223  // take care to fill triggerMon_ before evts is being called
224  int evts = hists_.find(channel + "Mon_")->second->getBinContent(idx + 1);
225  double value = hists_.find(channel + "Eff_")->second->getBinContent(idx + 1);
226  fill(
227  channel + "Eff_", idx + 0.5, 1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) - value));
228  }
229  }
230  }
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 94 of file SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

94  {
95  if (booked(histName))
96  hists_.find(histName)->second->Fill(value);
97  };
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 99 of file SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

99  {
100  if (booked(histName))
101  hists_.find(histName)->second->Fill(xValue, yValue);
102  };
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 104 of file SingleTopTChannelLeptonDQM.h.

References booked(), and hists_.

104  {
105  if (booked(histName))
106  hists_.find(histName)->second->Fill(xValue, yValue, zValue);
107  };
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 78 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

78 { return label.substr(label.find(':') + 1); };
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 81 of file SingleTopTChannelLeptonDQM.h.

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

Referenced by fill(), and triggerBinLabels().

81 { return label.substr(0, label.find(':')); };
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 208 of file SingleTopTChannelLeptonDQM.h.

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

Referenced by book(), and selectionPath().

208  {
209  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
210  hists_[channel + "Mon_"]->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
211  hists_[channel + "Eff_"]->setBinLabel(
212  idx + 1, "[" + selectionPath(labels[idx]) + "]|[" + monitorPath(labels[idx]) + "]", 1);
213  }
214  }
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 185 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagCombVtxWP_
private

Definition at line 188 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 185 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagCSVWP_
private

Definition at line 188 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

btag discriminator labels

Definition at line 185 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 188 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 185 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 188 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 185 of file SingleTopTChannelLeptonDQM.h.

double SingleTopTChannelLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 188 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 199 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 152 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 205 of file SingleTopTChannelLeptonDQM.h.

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

extra isolation criterion on electron

Definition at line 154 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 121 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 120 of file SingleTopTChannelLeptonDQM.h.

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

Definition at line 204 of file SingleTopTChannelLeptonDQM.h.

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

extra selection on electrons

Definition at line 156 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

electronId label

Definition at line 136 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 196 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 182 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

jetCorrector

Definition at line 169 of file SingleTopTChannelLeptonDQM.h.

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

jetID as an extra selection type

Definition at line 171 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 174 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 175 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 118 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 179 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 176 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 193 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill().

double SingleTopTChannelLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 190 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 115 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 138 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 202 of file SingleTopTChannelLeptonDQM.h.

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

extra isolation criterion on muon

Definition at line 164 of file SingleTopTChannelLeptonDQM.h.

Referenced by MonitorEnsemble().

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

Definition at line 119 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 201 of file SingleTopTChannelLeptonDQM.h.

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

extra selection on muons

Definition at line 167 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 122 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 161 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 157 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 197 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 132 of file SingleTopTChannelLeptonDQM.h.

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

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

trigger table

Definition at line 128 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::upperEdge_
private

Definition at line 190 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level SingleTopTChannelLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 107 of file SingleTopTChannelLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().