CMS 3D CMS Logo

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

#include <TopDiLeptonOfflineDQM.h>

Public Types

enum  DecayChannel { NONE, DIMUON, DIELEC, ELECMU }
 different decay channels More...
 
enum  Level { STANDARD, VERBOSE, DEBUG }
 different verbosity levels More...
 
typedef reco::LeafCandidate::LorentzVector LorentzVector
 

Public Member Functions

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

Private Member Functions

bool booked (const std::string histName) const
 check if histogram was booked More...
 
DecayChannel decayChannel (const std::vector< const reco::PFCandidate * > &muons, const std::vector< const reco::PFCandidate * > &elecs) const
 determine dileptonic decay channel 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...
 
void loggerBinLabels (std::string hist)
 set labels for event logging histograms 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

int diElecLogged_
 
int diMuonLogged_
 
std::vector< std::string > diMuonPaths_
 trigger paths for di muon channel More...
 
std::string directory_
 
double eidCutValue_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
 extra isolation criterion on electron More...
 
int elecMuLogged_
 number of logged interesting events More...
 
std::vector< std::string > elecMuPaths_
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
 extra selection on electrons More...
 
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
 electronId label More...
 
std::map< std::string, MonitorElement * > hists_
 
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...
 
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
 input sources for monitoring More...
 
std::string jetSelect_
 
std::string label_
 instance label 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...
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
 
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::TriggerResultstriggerTable_
 trigger table More...
 
double upperEdge_
 
Level verbosity_
 verbosity level for booking More...
 

Detailed Description

Definition at line 52 of file TopDiLeptonOfflineDQM.h.

Member Typedef Documentation

◆ LorentzVector

make clear which LorentzVector to use for jet, electrons and muon buffering

Definition at line 58 of file TopDiLeptonOfflineDQM.h.

Member Enumeration Documentation

◆ DecayChannel

different decay channels

Enumerator
NONE 
DIMUON 
DIELEC 
ELECMU 

Definition at line 60 of file TopDiLeptonOfflineDQM.h.

60 { NONE, DIMUON, DIELEC, ELECMU };

◆ Level

different verbosity levels

Enumerator
STANDARD 
VERBOSE 
DEBUG 

Definition at line 55 of file TopDiLeptonOfflineDQM.h.

55 { STANDARD, VERBOSE, DEBUG };

Constructor & Destructor Documentation

◆ MonitorEnsemble()

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

default contructor MonitorEnsemble(const char* label, const edm::ParameterSet& cfg);

Definition at line 14 of file TopDiLeptonOfflineDQM.cc.

15  : label_(label),
16  eidCutValue_(0.),
17  elecIso_(nullptr),
18  elecSelect_(nullptr),
19  muonIso_(nullptr),
20  muonSelect_(nullptr),
21  jetIDSelect_(nullptr),
22  lowerEdge_(-1.),
23  upperEdge_(-1.),
24  elecMuLogged_(0),
25  diMuonLogged_(0),
26  diElecLogged_(0) {
27  // sources have to be given; this PSet is not optional
28  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
31  jets_ = iC.consumes<edm::View<reco::Jet>>(sources.getParameter<edm::InputTag>("jets"));
32  for (edm::InputTag const& tag : sources.getParameter<std::vector<edm::InputTag>>("mets"))
33  mets_.push_back(iC.consumes<edm::View<reco::MET>>(tag));
34 
35  // elecExtras are optional; they may be omitted or empty
36  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
37  edm::ParameterSet elecExtras = cfg.getParameter<edm::ParameterSet>("elecExtras");
38  // select is optional; in case it's not found no
39  // selection will be applied
40  if (elecExtras.existsAs<std::string>("select")) {
41  elecSelect_.reset(
43  }
44  // isolation is optional; in case it's not found no
45  // isolation will be applied
46  if (elecExtras.existsAs<std::string>("isolation")) {
47  elecIso_.reset(
48  new StringCutObjectSelector<reco::PFCandidate>(elecExtras.getParameter<std::string>("isolation")));
49  }
50  // electronId is optional; in case it's not found the
51  // InputTag will remain empty
52  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
53  edm::ParameterSet elecId = elecExtras.getParameter<edm::ParameterSet>("electronId");
55  eidCutValue_ = elecId.getParameter<double>("cutValue");
56  // eidPattern_= elecId.getParameter<int>("pattern");
57  }
58  }
59  // muonExtras are optional; they may be omitted or empty
60  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
61  edm::ParameterSet muonExtras = cfg.getParameter<edm::ParameterSet>("muonExtras");
62  // select is optional; in case it's not found no
63  // selection will be applied
64  if (muonExtras.existsAs<std::string>("select")) {
65  muonSelect_.reset(
67  }
68  // isolation is optional; in case it's not found no
69  // isolation will be applied
70  if (muonExtras.existsAs<std::string>("isolation")) {
71  muonIso_.reset(
73  }
74  }
75  // jetExtras are optional; they may be omitted or empty
76  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
77  edm::ParameterSet jetExtras = cfg.getParameter<edm::ParameterSet>("jetExtras");
78  // jetCorrector is optional; in case it's not found
79  // the InputTag will remain empty
80  if (jetExtras.existsAs<std::string>("jetCorrector")) {
81  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
82  }
83  // read jetID information if it exists
84  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
85  edm::ParameterSet jetID = jetExtras.getParameter<edm::ParameterSet>("jetID");
87  jetIDSelect_.reset(new StringCutObjectSelector<reco::JetID>(jetID.getParameter<std::string>("select")));
88  }
89  // select is optional; in case it's not found no
90  // selection will be applied (only implemented for
91  // CaloJets at the moment)
92  if (jetExtras.existsAs<std::string>("select")) {
93  jetSelect_ = jetExtras.getParameter<std::string>("select");
94  }
95  }
96  // triggerExtras are optional; they may be omitted or empty
97  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
98  edm::ParameterSet triggerExtras = cfg.getParameter<edm::ParameterSet>("triggerExtras");
100  elecMuPaths_ = triggerExtras.getParameter<std::vector<std::string>>("pathsELECMU");
101  diMuonPaths_ = triggerExtras.getParameter<std::vector<std::string>>("pathsDIMUON");
102  }
103  // massExtras is optional; in case it's not found no mass
104  // window cuts are applied for the same flavor monitor
105  // histograms
106  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
107  edm::ParameterSet massExtras = cfg.getParameter<edm::ParameterSet>("massExtras");
108  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
109  upperEdge_ = massExtras.getParameter<double>("upperEdge");
110  }
111 
112  // setup the verbosity level for booking histograms;
113  // per default the verbosity level will be set to
114  // STANDARD. This will also be the chosen level in
115  // the case when the monitoring PSet is not found
117  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
118  edm::ParameterSet monitoring = cfg.getParameter<edm::ParameterSet>("monitoring");
119  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
120  verbosity_ = DEBUG;
121  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
123  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
125  }
126  // and don't forget to do the histogram booking
127  directory_ = cfg.getParameter<std::string>("directory");
128  }

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

◆ ~MonitorEnsemble()

TopDiLeptonOffline::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 67 of file TopDiLeptonOfflineDQM.h.

67 {};

Member Function Documentation

◆ book()

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

book histograms in subdirectory directory

Definition at line 130 of file TopDiLeptonOfflineDQM.cc.

130  {
131  // set up the current directory path
132  std::string current(directory_);
133  current += label_;
134  ibooker.setCurrentFolder(current);
135 
136  // determine number of bins for trigger monitoring
137  unsigned int nElecMu = elecMuPaths_.size();
138  unsigned int nDiMuon = diMuonPaths_.size();
139 
140  // --- [STANDARD] --- //
141  // Run Number
142  hists_["RunNumb_"] = ibooker.book1D("RunNumber", "Run Nr.", 1.e4, 1.5e5, 3.e5);
143  // invariant mass of opposite charge lepton pair (only filled for same flavor)
144  hists_["invMass_"] = ibooker.book1D("InvMass", "M(lep1, lep2)", 80, 0., 320.);
145  // invariant mass of opposite charge lepton pair (only filled for same flavor)
146  hists_["invMassLog_"] = ibooker.book1D("InvMassLog", "log_{10}(M(lep1, lep2))", 80, .1, 2.5);
147  // invariant mass of same charge lepton pair (log10 for low mass region, only
148  // filled for same flavor)
149  hists_["invMassWC_"] = ibooker.book1D("InvMassWC", "M_{WC}(L1, L2)", 80, 0., 320.);
150  // invariant mass of same charge lepton pair (log10 for low mass region, only
151  // filled for same flavor)
152  hists_["invMassWCLog_"] = ibooker.book1D("InvMassLogWC", "log_{10}(M_{WC})", 80, .1, 2.5);
153  // decay channel [1]: muon/muon, [2]:elec/elec, [3]:elec/muon
154  hists_["decayChannel_"] = ibooker.book1D("DecayChannel", "Decay Channel", 3, 0, 3);
155  // trigger efficiency estimates for the electron muon channel
156  hists_["elecMuEff_"] = ibooker.book1D("ElecMuEff", "Eff(e/#mu paths)", nElecMu, 0., nElecMu);
157  // monitored trigger occupancy for the electron muon channel
158  hists_["elecMuMon_"] = ibooker.book1D("ElecMuMon", "Mon(e/#mu paths)", nElecMu, 0., nElecMu);
159  // trigger efficiency estimates for the di muon channel
160  hists_["diMuonEff_"] = ibooker.book1D("DiMuonEff", "Eff(#mu/#mu paths)", nDiMuon, 0., nDiMuon);
161  // monitored trigger occupancy for the di muon channel
162  hists_["diMuonMon_"] = ibooker.book1D("DiMuonMon", "Mon(#mu/#mu paths)", nDiMuon, 0., nDiMuon);
163  // pt of the leading lepton
164  hists_["lep1Pt_"] = ibooker.book1D("Lep1Pt", "pt(lep1)", 50, 0., 200.);
165  // pt of the 2. leading lepton
166  hists_["lep2Pt_"] = ibooker.book1D("Lep2Pt", "pt(lep2)", 50, 0., 200.);
167  // multiplicity of jets with pt>30 (corrected to L2+L3)
168  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 21, -0.5, 20.5);
169  // MET (calo)
170  hists_["metCalo_"] = ibooker.book1D("METCalo", "MET_{Calo}", 50, 0., 200.);
171 
172  // set bin labels for trigger monitoring
175  // set bin labels for decayChannel_
176  hists_["decayChannel_"]->setBinLabel(1, "#mu e", 1);
177  hists_["decayChannel_"]->setBinLabel(2, "#mu #mu", 1);
178  hists_["decayChannel_"]->setBinLabel(3, "e e", 1);
179 
180  if (verbosity_ == STANDARD)
181  return;
182 
183  // --- [VERBOSE] --- //
184  // mean eta of the candidate leptons
185  hists_["sumEtaL1L2_"] = ibooker.book1D("SumEtaL1L2", "<#eta>(lep1, lep2)", 100, -5., 5.);
186  // deltaEta between the 2 candidate leptons
187  hists_["dEtaL1L2_"] = ibooker.book1D("DEtaL1L2", "#Delta#eta(lep1,lep2)", 80, -4., 4.);
188  // deltaPhi between the 2 candidate leptons
189  hists_["dPhiL1L2_"] = ibooker.book1D("DPhiL1L2", "#Delta#phi(lep1,lep2)", 64, -3.2, 3.2);
190  // pt of the candidate electron (depending on the decay channel)
191  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 200.);
192  // relative isolation of the candidate electron (depending on the decay
193  // channel)
194  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.);
195  // pt of the canddiate muon (depending on the decay channel)
196  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 200.);
197  // relative isolation of the candidate muon (depending on the decay channel)
198  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu) (#Delta#beta Corrected)", 50, 0., 1.);
199  // pt of the 1. leading jet (corrected to L2+L3)
200  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.);
201  // pt of the 2. leading jet (corrected to L2+L3)
202  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.);
203  // MET (PF)
204  hists_["metPflow_"] = ibooker.book1D("METPflow", "MET_{Pflow}", 50, 0., 200.);
205  // MET (TC)
206  hists_["metTC_"] = ibooker.book1D("METTC", "MET_{TC}", 50, 0., 200.);
207  // dz for muons (to suppress cosmis)
208  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
209  // dxy for muons (to suppress cosmics)
210  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -1., 1., 50, -1., 1.);
211  // lepton multiplicity after std isolation
212  hists_["lepMultIso_"] = ibooker.book2D("LepMultIso", "N_{Iso}(e) vs N_{Iso}(#mu)", 5, 0., 5., 5, 0., 5.);
213 
214  // set axes titles for dxy for muons
215  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
216  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
217  // set axes titles for lepton multiplicity after std isolation
218  hists_["lepMultIso_"]->setAxisTitle("N_{Iso}(#mu)", 1);
219  hists_["lepMultIso_"]->setAxisTitle("N_{Iso}(elec)", 2);
220 
221  if (verbosity_ == VERBOSE)
222  return;
223 
224  // --- [DEBUG] --- //
225  // electron multiplicity after std isolation
226  hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 11, -0.5, 10.5);
227  // muon multiplicity after std isolation
228  hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", "N_{Iso}(#mu)", 11, -0.5, 10.5);
229  // charged hadron isolation component of the candidate muon (depending on the
230  // decay channel)
231  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIsoComp", "ChHad_{IsoComponent}(#mu)", 50, 0., 5.);
232  // neutral hadron isolation component of the candidate muon (depending on the
233  // decay channel)
234  hists_["muonNeHadIso_"] = ibooker.book1D("MuonNeHadIsoComp", "NeHad_{IsoComponent}(#mu)", 50, 0., 5.);
235  // photon isolation component of the candidate muon (depending on the decay
236  // channel)
237  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIsoComp", "Photon_{IsoComponent}(#mu)", 50, 0., 5.);
238  // charged hadron isolation component of the candidate electron (depending on
239  // the decay channel)
240  hists_["elecChHadIso_"] = ibooker.book1D("ElectronChHadIsoComp", "ChHad_{IsoComponent}(e)", 50, 0., 5.);
241  // neutral hadron isolation component of the candidate electron (depending on
242  // the decay channel)
243  hists_["elecNeHadIso_"] = ibooker.book1D("ElectronNeHadIsoComp", "NeHad_{IsoComponent}(e)", 50, 0., 5.);
244  // photon isolation component of the candidate electron (depending on the
245  // decay channel)
246  hists_["elecPhIso_"] = ibooker.book1D("ElectronPhIsoComp", "Photon_{IsoComponent}(e)", 50, 0., 5.);
247  // eta of the leading jet
248  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta(jet1)", 30, -5., 5.);
249  // eta of the 2. leading jet
250  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta(jet2)", 30, -5., 5.);
251  // pt of the 1. leading jet (not corrected)
252  hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
253  // pt of the 2. leading jet (not corrected)
254  hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
255  // deltaEta between the 2 leading jets
256  hists_["dEtaJet1Jet2_"] = ibooker.book1D("DEtaJet1Jet2", "#Delta#eta(jet1,jet2)", 80, -4., 4.);
257  // deltaEta between the lepton and the leading jet
258  hists_["dEtaJet1Lep1_"] = ibooker.book1D("DEtaJet1Lep1", "#Delta#eta(jet1,lep1)", 80, -4., 4.);
259  // deltaEta between the lepton and MET
260  hists_["dEtaLep1MET_"] = ibooker.book1D("DEtaLep1MET", "#Delta#eta(lep1,MET)", 80, -4., 4.);
261  // deltaEta between leading jet and MET
262  hists_["dEtaJet1MET_"] = ibooker.book1D("DEtaJet1MET", "#Delta#eta(jet1,MET)", 80, -4., 4.);
263  // deltaPhi of 2 leading jets
264  hists_["dPhiJet1Jet2_"] = ibooker.book1D("DPhiJet1Jet2", "#Delta#phi(jet1,jet2)", 64, -3.2, 3.2);
265  // deltaPhi of 1. lepton and 1. jet
266  hists_["dPhiJet1Lep1_"] = ibooker.book1D("DPhiJet1Lep1", "#Delta#phi(jet1,lep1)", 64, -3.2, 3.2);
267  // deltaPhi of 1. lepton and MET
268  hists_["dPhiLep1MET_"] = ibooker.book1D("DPhiLep1MET", "#Delta#phi(lep1,MET)", 64, -3.2, 3.2);
269  // deltaPhi of 1. jet and MET
270  hists_["dPhiJet1MET_"] = ibooker.book1D("DPhiJet1MET", "#Delta#phi(jet1,MET)", 64, -3.2, 3.2);
271  // selected dimuon events
272  hists_["diMuonLogger_"] = ibooker.book2D("DiMuonLogger", "Logged DiMuon Events", 8, 0., 8., 10, 0., 10.);
273  // selected dielec events
274  hists_["diElecLogger_"] = ibooker.book2D("DiElecLogger", "Logged DiElec Events", 8, 0., 8., 10, 0., 10.);
275  // selected elemu events
276  hists_["elecMuLogger_"] = ibooker.book2D("ElecMuLogger", "Logged ElecMu Events", 8, 0., 8., 10, 0., 10.);
277 
278  // set bin labels for trigger monitoring
279  loggerBinLabels(std::string("diMuonLogger_"));
280  loggerBinLabels(std::string("diElecLogger_"));
281  loggerBinLabels(std::string("elecMuLogger_"));
282  return;
283  }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), diMuonPaths_, directory_, vertexPlots::e4, elecMuPaths_, hists_, label_, loggerBinLabels(), dqm::implementation::NavigatorBase::setCurrentFolder(), STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, triggerBinLabels(), VERBOSE, and verbosity_.

◆ booked()

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

check if histogram was booked

Definition at line 96 of file TopDiLeptonOfflineDQM.h.

96 { return hists_.find(histName) != hists_.end(); };

References hists_.

Referenced by fill().

◆ decayChannel()

MonitorEnsemble::DecayChannel MonitorEnsemble::decayChannel ( const std::vector< const reco::PFCandidate * > &  muons,
const std::vector< const reco::PFCandidate * > &  elecs 
) const
inlineprivate

determine dileptonic decay channel

Definition at line 231 of file TopDiLeptonOfflineDQM.h.

232  {
234  if (muons.size() > 1) {
235  type = DIMUON;
236  } else if (elecs.size() > 1) {
237  type = DIELEC;
238  } else if (!elecs.empty() && !muons.empty()) {
239  type = ELECMU;
240  }
241  return type;
242  }

References DIELEC, DIMUON, ELECMU, singleTopDQM_cfi::elecs, PDWG_BPHSkim_cff::muons, and NONE.

Referenced by fill().

◆ fill() [1/5]

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

fill monitor histograms with electronId and jetCorrections

Definition at line 285 of file TopDiLeptonOfflineDQM.cc.

285  {
286  // fetch trigger event if configured such
289  if (!event.getByToken(triggerTable_, triggerTable))
290  return;
291  }
292  /*
293  ------------------------------------------------------------
294 
295  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
296  value=5.0)
297 
298  ------------------------------------------------------------
299  */
300 
301  if (!event.eventAuxiliary().run())
302  return;
303  fill("RunNumb_", event.eventAuxiliary().run());
304 
305  double dummy = 5.;
306  fill("InstLumi_", dummy);
307 
308  /*
309  ------------------------------------------------------------
310 
311  Muon Selection
312 
313  ------------------------------------------------------------
314  */
315 
316  std::vector<const reco::PFCandidate*> isoMuons;
317 
320 
321  if (!event.getByToken(muons_, muons))
322  return;
323 
324  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin(); muonit != muons->end(); ++muonit) {
325  if (muonit->muonRef().isNull())
326  continue;
327  reco::MuonRef muon = muonit->muonRef();
328 
329  if (muon->innerTrack().isNull())
330  continue;
331 
332  if (muon->isGlobalMuon()) {
333  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
334  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
335 
336  // apply selection
337  if (!muonSelect_ || (*muonSelect_)(*muonit)) {
338  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
339  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
340  double phoEt = muon->pfIsolationR04().sumPhotonEt;
341 
342  double pfRelIso = (chHadPt + std::max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
343  muon->pt(); // CB dBeta corrected iso!
344 
345  fill("muonRelIso_", pfRelIso);
346 
347  fill("muonChHadIso_", chHadPt);
348  fill("muonNeHadIso_", neHadEt);
349  fill("muonPhIso_", phoEt);
350 
351  if (!muonIso_ || (*muonIso_)(*muonit))
352  isoMuons.push_back(&(*muonit));
353  }
354  }
355  }
356 
357  fill("muonMultIso_", isoMuons.size());
358 
359  /*
360  ------------------------------------------------------------
361 
362  Electron Selection
363 
364  ------------------------------------------------------------
365  */
366 
367  // buffer isolated electronss
368  std::vector<const reco::PFCandidate*> isoElecs;
370  if (!electronId_.isUninitialized()) {
371  if (!event.getByToken(electronId_, electronId))
372  return;
373  }
375  if (!event.getByToken(elecs_, elecs))
376  return;
377 
378  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin(); elec != elecs->end(); ++elec) {
379  if (elec->gsfElectronRef().isNull()) {
380  continue;
381  }
382  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
383  // restrict to electrons with good electronId
384  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >= eidCutValue_)) {
385  // apply preselection
386  if (!elecSelect_ || (*elecSelect_)(*elec)) {
387  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
388  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
389  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
390  double el_pfRelIso =
391  (el_ChHadIso + std::max(0., el_NeHadIso + el_PhIso - 0.5 * gsf_el->pfIsolationVariables().sumPUPt)) /
392  gsf_el->pt();
393  fill("elecRelIso_", el_pfRelIso);
394  fill("elecChHadIso_", el_ChHadIso);
395  fill("elecNeHadIso_", el_NeHadIso);
396  fill("elecPhIso_", el_PhIso);
397  if (!elecIso_ || (*elecIso_)(*elec))
398  isoElecs.push_back(&(*elec));
399  }
400  }
401  }
402  fill("elecMultIso_", isoElecs.size());
403 
404  /*
405  ------------------------------------------------------------
406 
407  Jet Selection
408 
409  ------------------------------------------------------------
410  */
411 
412  const JetCorrector* corrector = nullptr;
413  if (!jetCorrector_.empty()) {
414  // check whether a jet correcto is in the event setup or not
415  if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>())) {
417  } else {
418  edm::LogVerbatim("TopDiLeptonOfflineDQM") << "\n"
419  << "-----------------------------------------------------------------"
420  "-------------------- \n"
421  << " No JetCorrectionsRecord available from EventSetup: "
422  " \n"
423  << " - Jets will not be corrected. "
424  " \n"
425  << " - If you want to change this add the following lines to your "
426  "cfg file: \n"
427  << " "
428  " \n"
429  << " ## load jet corrections "
430  " \n"
431  << " "
432  "process.load(\"JetMETCorrections.Configuration."
433  "JetCorrectionServicesAllAlgos_cff\") \n"
434  << " process.prefer(\"ak5CaloL2L3\") "
435  " \n"
436  << " "
437  " \n"
438  << "-----------------------------------------------------------------"
439  "-------------------- \n";
440  }
441  }
442 
443  unsigned int mult = 0;
444  // buffer leadingJets
445  std::vector<reco::Jet> leadingJets;
447  if (!event.getByToken(jets_, jets))
448  return;
449 
451  if (jetIDSelect_) {
452  if (!event.getByToken(jetIDLabel_, jetID))
453  return;
454  }
455 
456  for (edm::View<reco::Jet>::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) {
457  unsigned int idx = jet - jets->begin();
458  if (jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
459  if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)]))
460  continue;
461  }
462  // chekc additional jet selection for calo, pf and bare reco jets
463  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
464  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
465  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
467  if (!jetSelect(sel)) {
468  continue;
469  }
470  } else if (dynamic_cast<const reco::PFJet*>(&*jet)) {
471  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
472  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
474  if (!jetSelect(sel))
475  continue;
476  } else {
477  reco::Jet sel = *jet;
478  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
480  if (!jetSelect(sel))
481  continue;
482  }
483  // check for overlaps
484  bool overlap = false;
485  for (std::vector<const reco::PFCandidate*>::const_iterator elec = isoElecs.begin(); elec != isoElecs.end();
486  ++elec) {
487  if (reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi()) < 0.4) {
488  overlap = true;
489  break;
490  }
491  }
492  if (overlap) {
493  continue;
494  }
495  // prepare jet to fill monitor histograms
496  reco::Jet monitorJet = *jet;
497  monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
498  ++mult; // determine jet multiplicity
499  if (idx == 0) {
500  leadingJets.push_back(monitorJet);
501  fill("jet1Pt_", monitorJet.pt());
502  fill("jet1PtRaw_", jet->pt());
503  fill("jet1Eta_", jet->eta());
504  }
505  if (idx == 1) {
506  leadingJets.push_back(monitorJet);
507  fill("jet2Pt_", monitorJet.pt());
508  fill("jet2PtRaw_", jet->pt());
509  fill("jet2Eta_", jet->eta());
510  }
511  }
512  if (leadingJets.size() > 1) {
513  fill("dEtaJet1Jet2_", leadingJets[0].eta() - leadingJets[1].eta());
514  fill("dPhiJet1Jet2_", reco::deltaPhi(leadingJets[0].phi(), leadingJets[1].phi()));
515  if (!isoMuons.empty()) {
516  if (isoElecs.empty() || isoMuons[0]->pt() > isoElecs[0]->pt()) {
517  fill("dEtaJet1Lep1_", isoMuons[0]->eta() - leadingJets[0].eta());
518  fill("dPhiJet1Lep1_", reco::deltaPhi(isoMuons[0]->phi(), leadingJets[0].phi()));
519  }
520  }
521  if (!isoElecs.empty()) {
522  if (isoMuons.empty() || isoElecs[0]->pt() > isoMuons[0]->pt()) {
523  fill("dEtaJet1Lep1_", isoElecs[0]->eta() - leadingJets[0].eta());
524  fill("dPhiJet1Lep1_", reco::deltaPhi(isoElecs[0]->phi(), leadingJets[0].phi()));
525  }
526  }
527  }
528  fill("jetMult_", mult);
529 
530  /*
531  ------------------------------------------------------------
532 
533  MET Selection
534 
535  ------------------------------------------------------------
536  */
537 
538  // buffer for event logging
540  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET>>>::const_iterator met_ = mets_.begin(); met_ != mets_.end();
541  ++met_) {
543  if (!event.getByToken(*met_, met))
544  continue;
545 
546  if (met->begin() != met->end()) {
547  unsigned int idx = met_ - mets_.begin();
548  if (idx == 0) {
549  caloMET = *met->begin();
550  fill("metCalo_", met->begin()->et());
551  if (!leadingJets.empty()) {
552  fill("dEtaJet1MET_", leadingJets[0].eta() - met->begin()->eta());
553  fill("dPhiJet1MET_", reco::deltaPhi(leadingJets[0].phi(), met->begin()->phi()));
554  }
555  if (!isoMuons.empty()) {
556  if (isoElecs.empty() || isoMuons[0]->pt() > isoElecs[0]->pt()) {
557  fill("dEtaLep1MET_", isoMuons[0]->eta() - met->begin()->eta());
558  fill("dPhiLep1MET_", reco::deltaPhi(isoMuons[0]->phi(), met->begin()->phi()));
559  }
560  }
561  if (!isoElecs.empty()) {
562  if (isoMuons.empty() || isoElecs[0]->pt() > isoMuons[0]->pt()) {
563  fill("dEtaLep1MET_", isoElecs[0]->eta() - met->begin()->eta());
564  fill("dPhiLep1MET_", reco::deltaPhi(isoElecs[0]->phi(), met->begin()->phi()));
565  }
566  }
567  }
568  if (idx == 1) {
569  fill("metTC_", met->begin()->et());
570  }
571  if (idx == 2) {
572  fill("metPflow_", met->begin()->et());
573  }
574  }
575  }
576 
577  /*
578  ------------------------------------------------------------
579 
580  Event Monitoring
581 
582  ------------------------------------------------------------
583  */
584 
585  // check number of isolated leptons
586  fill("lepMultIso_", isoMuons.size(), isoElecs.size());
587  // ELECMU channel
588  if (decayChannel(isoMuons, isoElecs) == ELECMU) {
589  fill("decayChannel_", 0.5);
590  double mass = (isoElecs[0]->p4() + isoMuons[0]->p4()).mass();
591  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
592  fill("dEtaL1L2_", isoElecs[0]->eta() - isoMuons[0]->eta());
593  fill("sumEtaL1L2_", (isoElecs[0]->eta() + isoMuons[0]->eta()) / 2);
594  fill("dPhiL1L2_", reco::deltaPhi(isoElecs[0]->phi(), isoMuons[0]->eta()));
595  fill("elecPt_", isoElecs[0]->pt());
596  fill("muonPt_", isoMuons[0]->pt());
597  fill("lep1Pt_", isoElecs[0]->pt() > isoMuons[0]->pt() ? isoElecs[0]->pt() : isoMuons[0]->pt());
598  fill("lep2Pt_", isoElecs[0]->pt() > isoMuons[0]->pt() ? isoMuons[0]->pt() : isoElecs[0]->pt());
599  // fill plots for trigger monitoring
601  fill(event, *triggerTable, "elecMu", elecMuPaths_);
602  if (elecMuLogged_ <= hists_.find("elecMuLogger_")->second->getNbinsY()) {
603  // log runnumber, lumi block, event number & some
604  // more pysics infomation for interesting events
605  fill("elecMuLogger_", 0.5, elecMuLogged_ + 0.5, event.eventAuxiliary().run());
606  fill("elecMuLogger_", 1.5, elecMuLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
607  fill("elecMuLogger_", 2.5, elecMuLogged_ + 0.5, event.eventAuxiliary().event());
608  fill("elecMuLogger_", 3.5, elecMuLogged_ + 0.5, isoMuons[0]->pt());
609  fill("elecMuLogger_", 4.5, elecMuLogged_ + 0.5, isoElecs[0]->pt());
610  if (!leadingJets.empty())
611  fill("elecMuLogger_", 5.5, elecMuLogged_ + 0.5, leadingJets[0].pt());
612  if (leadingJets.size() > 1)
613  fill("elecMuLogger_", 6.5, elecMuLogged_ + 0.5, leadingJets[1].pt());
614  fill("elecMuLogger_", 7.5, elecMuLogged_ + 0.5, caloMET.et());
615  ++elecMuLogged_;
616  }
617  }
618  }
619 
620  // DIMUON channel
621  if (decayChannel(isoMuons, isoElecs) == DIMUON) {
622  fill("decayChannel_", 1.5);
623  int charge = isoMuons[0]->charge() * isoMuons[1]->charge();
624  double mass = (isoMuons[0]->p4() + isoMuons[1]->p4()).mass();
625 
626  fill(charge < 0 ? "invMass_" : "invMassWC_", mass);
627  fill(charge < 0 ? "invMassLog_" : "invMassWCLog_", log10(mass));
628  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
629  fill("dEtaL1L2_", isoMuons[0]->eta() - isoMuons[1]->eta());
630  fill("sumEtaL1L2_", (isoMuons[0]->eta() + isoMuons[1]->eta()) / 2);
631  fill("dPhiL1L2_", reco::deltaPhi(isoMuons[0]->phi(), isoMuons[1]->phi()));
632  fill("muonPt_", isoMuons[0]->pt());
633  fill("muonPt_", isoMuons[1]->pt());
634  fill("lep1Pt_", isoMuons[0]->pt());
635  fill("lep2Pt_", isoMuons[1]->pt());
636  // fill plots for trigger monitoring
638  fill(event, *triggerTable, "diMuon", diMuonPaths_);
639  if (diMuonLogged_ <= hists_.find("diMuonLogger_")->second->getNbinsY()) {
640  // log runnumber, lumi block, event number & some
641  // more pysics infomation for interesting events
642  fill("diMuonLogger_", 0.5, diMuonLogged_ + 0.5, event.eventAuxiliary().run());
643  fill("diMuonLogger_", 1.5, diMuonLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
644  fill("diMuonLogger_", 2.5, diMuonLogged_ + 0.5, event.eventAuxiliary().event());
645  fill("diMuonLogger_", 3.5, diMuonLogged_ + 0.5, isoMuons[0]->pt());
646  fill("diMuonLogger_", 4.5, diMuonLogged_ + 0.5, isoMuons[1]->pt());
647  if (!leadingJets.empty())
648  fill("diMuonLogger_", 5.5, diMuonLogged_ + 0.5, leadingJets[0].pt());
649  if (leadingJets.size() > 1)
650  fill("diMuonLogger_", 6.5, diMuonLogged_ + 0.5, leadingJets[1].pt());
651  fill("diMuonLogger_", 7.5, diMuonLogged_ + 0.5, caloMET.et());
652  ++diMuonLogged_;
653  }
654  }
655  }
656 
657  // DIELEC channel
658  if (decayChannel(isoMuons, isoElecs) == DIELEC) {
659  fill("decayChannel_", 2.5);
660  int charge = isoElecs[0]->charge() * isoElecs[1]->charge();
661  double mass = (isoElecs[0]->p4() + isoElecs[1]->p4()).mass();
662  fill(charge < 0 ? "invMass_" : "invMassWC_", mass);
663  fill(charge < 0 ? "invMassLog_" : "invMassWCLog_", log10(mass));
664  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
665  fill("dEtaL1L2_", isoElecs[0]->eta() - isoElecs[1]->eta());
666  fill("sumEtaL1L2_", (isoElecs[0]->eta() + isoElecs[1]->eta()) / 2);
667  fill("dPhiL1L2_", reco::deltaPhi(isoElecs[0]->phi(), isoElecs[1]->phi()));
668  fill("elecPt_", isoElecs[0]->pt());
669  fill("elecPt_", isoElecs[1]->pt());
670  fill("lep1Pt_", isoElecs[0]->pt());
671  fill("lep2Pt_", isoElecs[1]->pt());
672  if (diElecLogged_ <= hists_.find("diElecLogger_")->second->getNbinsY()) {
673  // log runnumber, lumi block, event number & some
674  // more pysics infomation for interesting events
675  fill("diElecLogger_", 0.5, diElecLogged_ + 0.5, event.eventAuxiliary().run());
676  fill("diElecLogger_", 1.5, diElecLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
677  fill("diElecLogger_", 2.5, diElecLogged_ + 0.5, event.eventAuxiliary().event());
678  fill("diElecLogger_", 3.5, diElecLogged_ + 0.5, isoElecs[0]->pt());
679  fill("diElecLogger_", 4.5, diElecLogged_ + 0.5, isoElecs[1]->pt());
680  if (!leadingJets.empty())
681  fill("diElecLogger_", 5.5, diElecLogged_ + 0.5, leadingJets[0].pt());
682  if (leadingJets.size() > 1)
683  fill("diElecLogger_", 6.5, diElecLogged_ + 0.5, leadingJets[1].pt());
684  fill("diElecLogger_", 7.5, diElecLogged_ + 0.5, caloMET.et());
685  ++diElecLogged_;
686  }
687  }
688  }
689  }

References slimmedMETs_cfi::caloMET, ALCARECOTkAlJpsiMuMu_cff::charge, pfClustersFromHGC3DClusters_cfi::corrector, decayChannel(), reco::deltaPhi(), reco::deltaR(), DIELEC, diElecLogged_, DIMUON, diMuonLogged_, diMuonPaths_, eidCutValue_, elecIso_, ELECMU, elecMuLogged_, elecMuPaths_, singleTopDQM_cfi::elecs, elecs_, elecSelect_, topSingleLeptonDQM_PU_cfi::electronId, electronId_, PVValHelper::eta, JetCorrector::getJetCorrector(), hists_, training_settings::idx, edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, jetCorrector_, jetIDLabel_, jetIDSelect_, singleTopDQM_cfi::jets, jets_, jetSelect_, lowerEdge_, EgHLTOffHistBins_cfi::mass, SiStripPI::max, BTaggingMonitor_cfi::met, mets_, VarParsing::mult, muonIso_, PDWG_BPHSkim_cff::muons, muons_, muonSelect_, goodZToMuMu_cfi::overlap, DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), reco::Jet::scaleEnergy(), EgammaValidation_Wenu_cff::sel, singleTopDQM_cfi::setup, triggerTable_, funct::true, and upperEdge_.

Referenced by fill().

◆ fill() [2/5]

void MonitorEnsemble::fill ( const edm::Event event,
const edm::TriggerResults triggerTable,
std::string  channel,
const std::vector< std::string >  labels 
) const
inlineprivate

fill trigger monitoring histograms

Definition at line 215 of file TopDiLeptonOfflineDQM.h.

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

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

◆ fill() [3/5]

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

fill histogram if it had been booked before

Definition at line 98 of file TopDiLeptonOfflineDQM.h.

98  {
99  if (booked(histName))
100  hists_.find(histName)->second->Fill(value);
101  };

References booked(), and hists_.

◆ fill() [4/5]

void TopDiLeptonOffline::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 103 of file TopDiLeptonOfflineDQM.h.

103  {
104  if (booked(histName))
105  hists_.find(histName)->second->Fill(xValue, yValue);
106  };

References booked(), and hists_.

◆ fill() [5/5]

void TopDiLeptonOffline::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 108 of file TopDiLeptonOfflineDQM.h.

108  {
109  if (booked(histName))
110  hists_.find(histName)->second->Fill(xValue, yValue, zValue);
111  };

References booked(), and hists_.

◆ loggerBinLabels()

void MonitorEnsemble::loggerBinLabels ( std::string  hist)
inlineprivate

set labels for event logging histograms

Definition at line 182 of file TopDiLeptonOfflineDQM.h.

182  {
183  // set axes titles for selected events
184  hists_[hist]->getTH1()->SetOption("TEXT");
185  hists_[hist]->setBinLabel(1, "Run", 1);
186  hists_[hist]->setBinLabel(2, "Block", 1);
187  hists_[hist]->setBinLabel(3, "Event", 1);
188  hists_[hist]->setBinLabel(6, "pt_{L2L3}(jet1)", 1);
189  hists_[hist]->setBinLabel(7, "pt_{L2L3}(jet2)", 1);
190  hists_[hist]->setBinLabel(8, "MET_{Calo}", 1);
191  hists_[hist]->setAxisTitle("logged evts", 2);
192 
193  if (hist == "diMuonLogger_") {
194  hists_[hist]->setBinLabel(4, "pt(muon)", 1);
195  hists_[hist]->setBinLabel(5, "pt(muon)", 1);
196  }
197  if (hist == "diElecLogger_") {
198  hists_[hist]->setBinLabel(4, "pt(elec)", 1);
199  hists_[hist]->setBinLabel(5, "pt(elec)", 1);
200  }
201  if (hist == "elecMuLogger_") {
202  hists_[hist]->setBinLabel(4, "pt(elec)", 1);
203  hists_[hist]->setBinLabel(5, "pt(muon)", 1);
204  }
205  }

References compare::hist, and hists_.

Referenced by book().

◆ monitorPath()

std::string TopDiLeptonOffline::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 77 of file TopDiLeptonOfflineDQM.h.

77 { return label.substr(label.find(':') + 1); };

References label.

Referenced by fill(), and triggerBinLabels().

◆ selectionPath()

std::string TopDiLeptonOffline::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 80 of file TopDiLeptonOfflineDQM.h.

80 { return label.substr(0, label.find(':')); };

References label.

Referenced by fill(), and triggerBinLabels().

◆ triggerBinLabels()

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

set configurable labels for trigger monitoring histograms

Definition at line 207 of file TopDiLeptonOfflineDQM.h.

207  {
208  for (unsigned int idx = 0; idx < labels.size(); ++idx) {
209  hists_[channel + "Mon_"]->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1);
210  hists_[channel + "Eff_"]->setBinLabel(
211  idx + 1, "[" + selectionPath(labels[idx]) + "]|[" + monitorPath(labels[idx]) + "]", 1);
212  }
213  }

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

Referenced by book().

Member Data Documentation

◆ diElecLogged_

int TopDiLeptonOffline::MonitorEnsemble::diElecLogged_
private

Definition at line 174 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

◆ diMuonLogged_

int TopDiLeptonOffline::MonitorEnsemble::diMuonLogged_
private

Definition at line 174 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

◆ diMuonPaths_

std::vector<std::string> TopDiLeptonOffline::MonitorEnsemble::diMuonPaths_
private

trigger paths for di muon channel

Definition at line 132 of file TopDiLeptonOfflineDQM.h.

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

◆ directory_

std::string TopDiLeptonOffline::MonitorEnsemble::directory_
private

Definition at line 179 of file TopDiLeptonOfflineDQM.h.

Referenced by book(), and MonitorEnsemble().

◆ eidCutValue_

double TopDiLeptonOffline::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 149 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ elecIso_

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> > TopDiLeptonOffline::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 151 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ elecMuLogged_

int TopDiLeptonOffline::MonitorEnsemble::elecMuLogged_
private

number of logged interesting events

Definition at line 174 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

◆ elecMuPaths_

std::vector<std::string> TopDiLeptonOffline::MonitorEnsemble::elecMuPaths_
private

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

Definition at line 130 of file TopDiLeptonOfflineDQM.h.

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

◆ elecs_

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

Definition at line 121 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ elecSelect_

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

extra selection on electrons

Definition at line 153 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ electronId_

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

electronId label

Definition at line 135 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ hists_

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

storage manager histogram container

Definition at line 177 of file TopDiLeptonOfflineDQM.h.

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

◆ jetCorrector_

std::string TopDiLeptonOffline::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 162 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ jetIDLabel_

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

jetID as an extra selection type

Definition at line 164 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ jetIDSelect_

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

extra jetID selection on calo jets

Definition at line 166 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ jets_

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

input sources for monitoring

Definition at line 119 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ jetSelect_

std::string TopDiLeptonOffline::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 169 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ label_

std::string TopDiLeptonOffline::MonitorEnsemble::label_
private

◆ lowerEdge_

double TopDiLeptonOffline::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 171 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ mets_

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

considers a vector of METs

Definition at line 124 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ muonIso_

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > TopDiLeptonOffline::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 156 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ muons_

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

Definition at line 120 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ muonSelect_

std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> > TopDiLeptonOffline::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 159 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ triggerTable_

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

trigger table

Definition at line 127 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ upperEdge_

double TopDiLeptonOffline::MonitorEnsemble::upperEdge_
private

Definition at line 171 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

◆ verbosity_

Level TopDiLeptonOffline::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 111 of file TopDiLeptonOfflineDQM.h.

Referenced by book(), and MonitorEnsemble().

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
reco::Jet::scaleEnergy
virtual void scaleEnergy(double fScale)
scale energy of the jet
TopDiLeptonOffline::MonitorEnsemble::elecSelect_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
Definition: TopDiLeptonOfflineDQM.h:153
TopDiLeptonOffline::MonitorEnsemble::mets_
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
Definition: TopDiLeptonOfflineDQM.h:124
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
TopDiLeptonOffline::MonitorEnsemble::diMuonPaths_
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
Definition: TopDiLeptonOfflineDQM.h:132
muon
Definition: MuonCocktails.h:17
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
edm::EDGetTokenT
Definition: EDGetToken.h:33
TopDiLeptonOffline::MonitorEnsemble::decayChannel
DecayChannel decayChannel(const std::vector< const reco::PFCandidate * > &muons, const std::vector< const reco::PFCandidate * > &elecs) const
determine dileptonic decay channel
Definition: TopDiLeptonOfflineDQM.h:231
singleTopDQM_cfi.elecExtras
elecExtras
Definition: singleTopDQM_cfi.py:52
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
TopDiLeptonOffline::MonitorEnsemble::loggerBinLabels
void loggerBinLabels(std::string hist)
set labels for event logging histograms
Definition: TopDiLeptonOfflineDQM.h:182
TopDiLeptonOffline::MonitorEnsemble::DIMUON
Definition: TopDiLeptonOfflineDQM.h:60
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
TopDiLeptonOffline::MonitorEnsemble::DEBUG
Definition: TopDiLeptonOfflineDQM.h:55
topSingleLeptonDQM_PU_cfi.electronId
electronId
when omitted electron plots will be filled w/o cut on electronId
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::Handle< edm::TriggerResults >
training_settings.idx
idx
Definition: training_settings.py:16
TopDiLeptonOffline::MonitorEnsemble::jetIDLabel_
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
Definition: TopDiLeptonOfflineDQM.h:164
JetCorrector
Definition: JetCorrector.h:19
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
slimmedMETs_cfi.caloMET
caloMET
Definition: slimmedMETs_cfi.py:17
TopDiLeptonOffline::MonitorEnsemble::muons_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
Definition: TopDiLeptonOfflineDQM.h:120
edm::Ref< MuonCollection >
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
TopDiLeptonOffline::MonitorEnsemble::triggerTable_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
Definition: TopDiLeptonOfflineDQM.h:127
TopDiLeptonOffline::MonitorEnsemble::jetIDSelect_
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
Definition: TopDiLeptonOfflineDQM.h:166
pfClustersFromHGC3DClusters_cfi.corrector
corrector
Definition: pfClustersFromHGC3DClusters_cfi.py:5
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
TopDiLeptonOffline::MonitorEnsemble::electronId_
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
Definition: TopDiLeptonOfflineDQM.h:135
TopDiLeptonOffline::MonitorEnsemble::triggerBinLabels
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
Definition: TopDiLeptonOfflineDQM.h:207
reco::MET
Definition: MET.h:41
TopDiLeptonOffline::MonitorEnsemble::NONE
Definition: TopDiLeptonOfflineDQM.h:60
compare.hist
hist
Definition: compare.py:376
TopDiLeptonOffline::MonitorEnsemble::elecMuPaths_
std::vector< std::string > elecMuPaths_
Definition: TopDiLeptonOfflineDQM.h:130
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TopDiLeptonOffline::MonitorEnsemble::directory_
std::string directory_
Definition: TopDiLeptonOfflineDQM.h:179
PVValHelper::eta
Definition: PVValidationHelpers.h:69
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
singleTopDQM_cfi.muonExtras
muonExtras
Definition: singleTopDQM_cfi.py:56
DecayChannel
Definition: DecayChannel.h:22
TopDiLeptonOffline::MonitorEnsemble::VERBOSE
Definition: TopDiLeptonOfflineDQM.h:55
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
TopDiLeptonOffline::MonitorEnsemble::ELECMU
Definition: TopDiLeptonOfflineDQM.h:60
singleTopDQM_cfi.elecs
elecs
Definition: singleTopDQM_cfi.py:41
TopDiLeptonOffline::MonitorEnsemble::label_
std::string label_
instance label
Definition: TopDiLeptonOfflineDQM.h:117
TopDiLeptonOffline::MonitorEnsemble::lowerEdge_
double lowerEdge_
mass window upper and lower edge
Definition: TopDiLeptonOfflineDQM.h:171
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TopDiLeptonOffline::MonitorEnsemble::jetCorrector_
std::string jetCorrector_
jetCorrector
Definition: TopDiLeptonOfflineDQM.h:162
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TopDiLeptonOffline::MonitorEnsemble::eidCutValue_
double eidCutValue_
Definition: TopDiLeptonOfflineDQM.h:149
singleTopDQM_cfi.massExtras
massExtras
Definition: singleTopDQM_cfi.py:70
edm::View< reco::PFCandidate >
funct::true
true
Definition: Factorize.h:173
TopDiLeptonOffline::MonitorEnsemble::diMuonLogged_
int diMuonLogged_
Definition: TopDiLeptonOfflineDQM.h:174
edm::ParameterSet
Definition: ParameterSet.h:36
TopDiLeptonOffline::MonitorEnsemble::elecMuLogged_
int elecMuLogged_
number of logged interesting events
Definition: TopDiLeptonOfflineDQM.h:174
TopDiLeptonOffline::MonitorEnsemble::upperEdge_
double upperEdge_
Definition: TopDiLeptonOfflineDQM.h:171
PVValHelper::phi
Definition: PVValidationHelpers.h:68
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TopDiLeptonOffline::MonitorEnsemble::monitorPath
std::string monitorPath(const std::string &label) const
Definition: TopDiLeptonOfflineDQM.h:77
TopDiLeptonOffline::MonitorEnsemble::diElecLogged_
int diElecLogged_
Definition: TopDiLeptonOfflineDQM.h:174
value
Definition: value.py:1
edm::LogVerbatim
Definition: MessageLogger.h:297
JetCorrector::getJetCorrector
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing
Definition: JetCorrector.cc:48
goodZToMuMu_cfi.overlap
overlap
Definition: goodZToMuMu_cfi.py:108
TopDiLeptonOffline::MonitorEnsemble::elecIso_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
Definition: TopDiLeptonOfflineDQM.h:151
looper.cfg
cfg
Definition: looper.py:297
TopDiLeptonOffline::MonitorEnsemble::muonSelect_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect_
extra selection on muons
Definition: TopDiLeptonOfflineDQM.h:159
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
type
type
Definition: HCALResponse.h:21
singleTopDQM_cfi.jetExtras
jetExtras
Definition: singleTopDQM_cfi.py:60
singleTopDQM_cfi.monitoring
monitoring
Definition: singleTopDQM_cfi.py:46
TopDiLeptonOffline::MonitorEnsemble::DIELEC
Definition: TopDiLeptonOfflineDQM.h:60
metsig::jet
Definition: SignAlgoResolutions.h:47
edm::ValueMap< float >
StringCutObjectSelector< reco::PFCandidate >
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
TopDiLeptonOffline::MonitorEnsemble::jetSelect_
std::string jetSelect_
Definition: TopDiLeptonOfflineDQM.h:169
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
VarParsing.mult
mult
Definition: VarParsing.py:659
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
TopDiLeptonOffline::MonitorEnsemble::elecs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
Definition: TopDiLeptonOfflineDQM.h:121
dummy
Definition: DummySelector.h:38
TopDiLeptonOffline::MonitorEnsemble::booked
bool booked(const std::string histName) const
check if histogram was booked
Definition: TopDiLeptonOfflineDQM.h:96
TopDiLeptonOffline::MonitorEnsemble::STANDARD
Definition: TopDiLeptonOfflineDQM.h:55
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
event
Definition: event.py:1
TopDiLeptonOffline::MonitorEnsemble::verbosity_
Level verbosity_
verbosity level for booking
Definition: TopDiLeptonOfflineDQM.h:111
TopDiLeptonOffline::MonitorEnsemble::jets_
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
Definition: TopDiLeptonOfflineDQM.h:119
TopDiLeptonOffline::MonitorEnsemble::muonIso_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonIso_
extra isolation criterion on muon
Definition: TopDiLeptonOfflineDQM.h:156
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::TriggerResults
Definition: TriggerResults.h:35
vertexPlots.e4
e4
Definition: vertexPlots.py:64
TopDiLeptonOffline::MonitorEnsemble::hists_
std::map< std::string, MonitorElement * > hists_
Definition: TopDiLeptonOfflineDQM.h:177
TopDiLeptonOffline::MonitorEnsemble::fill
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
Definition: TopDiLeptonOfflineDQM.cc:285
TopDiLeptonOffline::MonitorEnsemble::selectionPath
std::string selectionPath(const std::string &label) const
Definition: TopDiLeptonOfflineDQM.h:80