CMS 3D CMS Logo

TopDiLeptonHLTOfflineDQM.cc
Go to the documentation of this file.
1 //#include <algorithm>
15 
17 
19 
20 /*Originally from DQM/Physics by R. Wolf and J. Andrea*/
21 using namespace std;
22 namespace HLTOfflineDQMTopDiLepton {
23 
24  // maximal Delta to consider
25  // hlt and reco objects matched
26  static const double DRMIN = 0.05;
27 
28  MonitorDiLepton::MonitorDiLepton(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC) :
29  label_(label), eidPattern_(0), elecIso_(nullptr), elecSelect_(nullptr), muonIso_(nullptr), muonSelect_(nullptr), jetIDSelect_(nullptr),
30  lowerEdge_(-1.), upperEdge_(-1.), elecMuLogged_(0), diMuonLogged_(0), diElecLogged_(0)
31  {
32  // sources have to be given; this PSet is not optional
33  edm::ParameterSet sources=cfg.getParameter<edm::ParameterSet>("sources");
34  muons_= iC.consumes< edm::View<reco::Muon> >(sources.getParameter<edm::InputTag>("muons"));
35  elecs_= iC.consumes< edm::View<reco::GsfElectron> >(sources.getParameter<edm::InputTag>("elecs"));
36  jets_ = iC.consumes< edm::View<reco::Jet> >(sources.getParameter<edm::InputTag>("jets" ));
37 
38  const auto& mets = sources.getParameter<std::vector<edm::InputTag>>("mets");
39  for (const auto& met: mets) {
40  mets_.push_back(iC.consumes<edm::View<reco::MET>>(met));
41  }
42 
43  // elecExtras are optional; they may be omitted or empty
44  if( cfg.existsAs<edm::ParameterSet>("elecExtras") ){
45  edm::ParameterSet elecExtras=cfg.getParameter<edm::ParameterSet>("elecExtras");
46  // select is optional; in case it's not found no
47  // selection will be applied
48  if( elecExtras.existsAs<std::string>("select") ){
49  elecSelect_= std::make_unique<StringCutObjectSelector<reco::GsfElectron>>(elecExtras.getParameter<std::string>("select"));
50  }
51  // isolation is optional; in case it's not found no
52  // isolation will be applied
53  if( elecExtras.existsAs<std::string>("isolation") ){
54  elecIso_= std::make_unique<StringCutObjectSelector<reco::GsfElectron>>(elecExtras.getParameter<std::string>("isolation"));
55  }
56  // electronId is optional; in case it's not found the
57  // InputTag will remain empty
58  if( elecExtras.existsAs<edm::ParameterSet>("electronId") ){
59  edm::ParameterSet elecId=elecExtras.getParameter<edm::ParameterSet>("electronId");
60  electronId_= iC.consumes< edm::ValueMap<float> >(elecId.getParameter<edm::InputTag>("src"));
61  eidPattern_= elecId.getParameter<int>("pattern");
62  }
63  }
64  // muonExtras are optional; they may be omitted or empty
65  if( cfg.existsAs<edm::ParameterSet>("muonExtras") ){
66  edm::ParameterSet muonExtras=cfg.getParameter<edm::ParameterSet>("muonExtras");
67  // select is optional; in case it's not found no
68  // selection will be applied
69  if( muonExtras.existsAs<std::string>("select") ){
70  muonSelect_= std::make_unique<StringCutObjectSelector<reco::Muon>>(muonExtras.getParameter<std::string>("select"));
71  }
72  // isolation is optional; in case it's not found no
73  // isolation will be applied
74  if( muonExtras.existsAs<std::string>("isolation") ){
75  muonIso_= std::make_unique<StringCutObjectSelector<reco::Muon>>(muonExtras.getParameter<std::string>("isolation"));
76  }
77  }
78  // jetExtras are optional; they may be omitted or empty
79  if( cfg.existsAs<edm::ParameterSet>("jetExtras") ){
80  edm::ParameterSet jetExtras=cfg.getParameter<edm::ParameterSet>("jetExtras");
81  // jetCorrector is optional; in case it's not found
82  // the InputTag will remain empty
83  if( jetExtras.existsAs<std::string>("jetCorrector") ){
84  jetCorrector_= jetExtras.getParameter<std::string>("jetCorrector");
85  }
86  // read jetID information if it exists
87  if(jetExtras.existsAs<edm::ParameterSet>("jetID")){
88  edm::ParameterSet jetID=jetExtras.getParameter<edm::ParameterSet>("jetID");
89  jetIDLabel_ = iC.consumes< reco::JetIDValueMap >(jetID.getParameter<edm::InputTag>("label"));
90  jetIDSelect_= std::make_unique<StringCutObjectSelector<reco::JetID>>(jetID.getParameter<std::string>("select"));
91  }
92  // select is optional; in case it's not found no
93  // selection will be applied (only implemented for
94  // CaloJets at the moment)
95  if( jetExtras.existsAs<std::string>("select") ){
96  jetSelect_= jetExtras.getParameter<std::string>("select");
97  }
98  }
99  // triggerExtras are optional; they may be omitted or empty
100  processName_ = "HLT";
101  if( cfg.existsAs<edm::ParameterSet>("triggerExtras") ){
102  edm::ParameterSet triggerExtras=cfg.getParameter<edm::ParameterSet>("triggerExtras");
103  triggerTable_= iC.consumes< edm::TriggerResults >(triggerExtras.getParameter<edm::InputTag>("src"));
104  processName_ = triggerExtras.getParameter<edm::InputTag>("src").process();
105  elecMuPaths_ = triggerExtras.getParameter<std::vector<std::string> >("pathsELECMU");
106  diMuonPaths_ = triggerExtras.getParameter<std::vector<std::string> >("pathsDIMUON");
107  diElecPaths_ = triggerExtras.getParameter<std::vector<std::string> >("pathsDIELEC");
108  }
109  // massExtras is optional; in case it's not found no mass
110  // window cuts are applied for the same flavor monitor
111  // histograms
112  if( cfg.existsAs<edm::ParameterSet>("massExtras") ){
113  edm::ParameterSet massExtras=cfg.getParameter<edm::ParameterSet>("massExtras");
114  lowerEdge_= massExtras.getParameter<double>("lowerEdge");
115  upperEdge_= massExtras.getParameter<double>("upperEdge");
116  }
117 
118  // and don't forget to do the histogram booking
119  folder_=cfg.getParameter<std::string>("directory");
120 
121 // triggerEventWithRefsTag_ = iC.consumes< trigger::TriggerEventWithRefs >(edm::InputTag("hltTriggerSummaryRAW","",processName_));
122  triggerSummaryTokenRAW = iC.consumes <trigger::TriggerEventWithRefs>(edm::InputTag("hltTriggerSummaryRAW","",processName_));
123  triggerSummaryTokenAOD = iC.consumes <trigger::TriggerEventWithRefs> (edm::InputTag("hltTriggerSummaryAOD","",processName_));
124 
125  }
126 
127  void
129  {
130  //set up the current directory path
131  std::string current(folder_); current+=label_;
132  store_.setCurrentFolder(current);
133 
134  // determine number of bins for trigger monitoring
135  unsigned int nElecMu=elecMuPaths_.size();
136  unsigned int nDiMuon=diMuonPaths_.size();
137  unsigned int nDiElec=diElecPaths_.size();
138 
139  // invariant mass of opposite charge lepton pair (only filled for same flavor)
140  hists_["invMass_" ] = store_.book1D("InvMass" , "M(lep1, lep2)" , 80, 0., 320.);
141  // invariant mass of same charge lepton pair (only filled for same flavor)
142  hists_["invMassWC_" ] = store_.book1D("InvMassWC" , "M_{WC}(L1, L2)" , 80, 0., 320.);
143  // decay channel [1]: muon/muon, [2]:elec/elec, [3]:elec/muon
144  hists_["decayChannel_"] = store_.book1D("DecayChannel", "Decay Channel" , 3, 0, 3);
145  // // trigger efficiency estimates for the electron muon channel
146  // hists_["elecMuEff_" ] = store_.book1D("ElecMuEff" , "Eff(e/#mu paths)" , nElecMu, 0., nElecMu);
147  // monitored trigger occupancy for the electron muon channel
148  hists_["elecMuMon_" ] = store_.book1D("ElecMuMon" , "Mon(e/#mu paths)" , nElecMu, 0., nElecMu);
149  // // trigger efficiency estimates for the di muon channel
150  // hists_["diMuonEff_" ] = store_.book1D("DiMuonEff" , "Eff(#mu/#mu paths)" , nDiMuon, 0., nDiMuon);
151  // monitored trigger occupancy for the di muon channel
152  hists_["diMuonMon_" ] = store_.book1D("DiMuonMon" , "Mon(#mu/#mu paths)" , nDiMuon, 0., nDiMuon);
153  // // trigger efficiency estimates for the di electron channel
154  // hists_["diElecEff_" ] = store_.book1D("DiElecEff" , "Eff(e/e paths)" , nDiElec, 0., nDiElec);
155  // monitored trigger occupancy for the di electron channel
156  hists_["diElecMon_" ] = store_.book1D("DiElecMon" , "Mon(e/e paths)" , nDiElec, 0., nDiElec);
157  // multiplicity of jets with pt>30 (corrected to L2+L3)
158  hists_["jetMult_" ] = store_.book1D("JetMult" , "N_{30}(jet)" , 20, 0., 20.);
159 
160  // set bin labels for trigger monitoring
164  // set bin labels for decayChannel_
165  hists_["decayChannel_"]->setBinLabel( 1, "#mu e" , 1);
166  hists_["decayChannel_"]->setBinLabel( 2, "#mu #mu", 1);
167  hists_["decayChannel_"]->setBinLabel( 3, "e e" , 1);
168 
169  // selected dimuon events
170  hists_["diMuonLogger_"] = store_.book2D("DiMuonLogger", "Logged DiMuon Events" , 8, 0., 8., 10, 0., 10.); //OK
171  // selected dielec events
172  hists_["diElecLogger_"] = store_.book2D("DiElecLogger", "Logged DiElec Events" , 8, 0., 8., 10, 0., 10.); //OK
173  // selected elemu events
174  hists_["elecMuLogger_"] = store_.book2D("ElecMuLogger", "Logged ElecMu Events" , 8, 0., 8., 10, 0., 10.); //OK
175 
176  // set bin labels for trigger monitoring
177  loggerBinLabels(std::string("diMuonLogger_"));
178  loggerBinLabels(std::string("diElecLogger_"));
179  loggerBinLabels(std::string("elecMuLogger_"));
180 
181  // deltaR min between hlt iso lepton and reco iso lepton wrt eta
182  hists_["leptDeltaREta_"] = store_.book2D("DeltaRMinEtaLepton", "#Delta R_{min}(leptons) wrt #eta", 30, -3, 3, 10, 0., 0.1);
183  // resolution in pT for matched isolated leptons
184  hists_["leptResolution_"] = store_.book1D("ResIsoLeptons", "#Delta p_{T}/p_{T}(matched leptons)", 20, 0., 0.1);
185  // matching monitoring
186  hists_["matchingMon_"] = store_.book1D("MatchingMon", "Mon(matching)", 3, 0., 3.);
187  // set axes titles for matching monitoring
188  hists_["matchingMon_"]->setBinLabel( 1 , "1st lepton" );
189  hists_["matchingMon_"]->setBinLabel( 2 , "2nd lepton" );
190  hists_["matchingMon_"]->setBinLabel( 3 , "both " );
191 
192  return;
193  }
194 
195  void
196  MonitorDiLepton::fill(const edm::Event& event, const edm::EventSetup& setup, const HLTConfigProvider& hltConfig, const std::vector<std::string>& triggerPaths)
197  {
198  // fetch trigger event if configured such
201  if( !event.getByToken(triggerTable_, triggerTable) ) return;
202  }
203  /*
204  ------------------------------------------------------------
205 
206  Run information
207 
208  ------------------------------------------------------------
209  */
210 
211  if (!event.eventAuxiliary().run()) return;
212 
213  /*
214  ------------------------------------------------------------
215 
216  Muon Selection
217 
218  ------------------------------------------------------------
219  */
220 
221  // buffer isolated muons
222  std::vector<const reco::Muon*> isoMuons;
223 
225  if( !event.getByToken(muons_, muons) ) {
226  edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" )
227  << "Muon collection not found \n";
228  return;
229  }
230 
231  for(edm::View<reco::Muon>::const_iterator muon=muons->begin(); muon!=muons->end(); ++muon){
232  // restrict to globalMuons
233  if( muon->isGlobalMuon() ){
234  // apply preselection
235  if(!muonSelect_ || (*muonSelect_)(*muon)){
236  if(!muonIso_ || (*muonIso_)(*muon)) isoMuons.push_back(&(*muon));
237  }
238  }
239  }
240 
241  /*
242  ------------------------------------------------------------
243 
244  Electron Selection
245 
246  ------------------------------------------------------------
247  */
248 
249  // buffer isolated electronss
250  std::vector<const reco::GsfElectron*> isoElecs;
251  edm::Handle<edm::ValueMap<float> > electronId;
253  if( !event.getByToken(electronId_, electronId) ) return;
254  }
255 
257  if( !event.getByToken(elecs_, elecs) ) {
258  edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" )
259  << "Electron collection not found \n";
260  return;
261  }
262 
263  for(edm::View<reco::GsfElectron>::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){
264  // restrict to electrons with good electronId
265  int idx = elec-elecs->begin();
266  if( electronId_.isUninitialized() ? true : ((int)(*electronId)[elecs->refAt(idx)] & eidPattern_) ){
267  // apply preselection
268  if(!elecSelect_ || (*elecSelect_)(*elec)){
269  if(!elecIso_ || (*elecIso_)(*elec)) isoElecs.push_back(&(*elec));
270  }
271  }
272  }
273 
274  /*
275  ------------------------------------------------------------
276 
277  Jet Selection
278 
279  ------------------------------------------------------------
280  */
281 
282  const JetCorrector* corrector=nullptr;
283  if(!jetCorrector_.empty()){
284  // check whether a jet correcto is in the event setup or not
285  if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
286  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
287  }
288  else{
289  edm::LogVerbatim( "TopDiLeptonHLTOfflineDQM" )
290  << "\n"
291  << "------------------------------------------------------------------------------------- \n"
292  << " No JetCorrectionsRecord available from EventSetup: \n"
293  << " - Jets will not be corrected. \n"
294  << " - If you want to change this add the following lines to your cfg file: \n"
295  << " \n"
296  << " ## load jet corrections \n"
297  << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
298  << " process.prefer(\"ak5CaloL2L3\") \n"
299  << " \n"
300  << "------------------------------------------------------------------------------------- \n";
301  }
302  }
303 
304  unsigned int mult=0;
305  // buffer leadingJets
306  std::vector<reco::Jet> leadingJets;
308  if( !event.getByToken(jets_, jets) ) {
309  edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" )
310  << "Jet collection not found \n";
311  return;
312  }
313 
315  if(jetIDSelect_){
316  if( !event.getByToken(jetIDLabel_, jetID) ) return;
317  }
318 
319  for(edm::View<reco::Jet>::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){
320  unsigned int idx=jet-jets->begin();
321  if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())){
322  if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
323  }
324  // chekc additional jet selection for calo, pf and bare reco jets
325  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
326  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
327  StringCutObjectSelector<reco::CaloJet> jetSelect(jetSelect_); if(!jetSelect(sel)){ continue;}
328  }
329  else if(dynamic_cast<const reco::PFJet*>(&*jet)){
330  reco::PFJet sel= dynamic_cast<const reco::PFJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
331  StringCutObjectSelector<reco::PFJet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
332  }
333  else{
334  reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
335  StringCutObjectSelector<reco::Jet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
336  }
337  // check for overlaps
338  bool overlap=false;
339  for(auto elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){
340  if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;}
341  } if(overlap){continue;}
342  // prepare jet to fill monitor histograms
343  reco::Jet monitorJet=*jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
344  ++mult; // determine jet multiplicity
345  if(idx==0) {
346  leadingJets.push_back(monitorJet);
347  }
348  if(idx==1) {
349  leadingJets.push_back(monitorJet);
350  }
351  }
352  fill("jetMult_", mult);
353  /*
354  ------------------------------------------------------------
355 
356  MET Selection
357 
358  ------------------------------------------------------------
359  */
360 
361  // buffer for event logging
363  for(auto met_=mets_.begin(); met_!=mets_.end(); ++met_){
364 
366  if( !event.getByToken(*met_, met) ) continue;
367 
368  if(met->begin()!=met->end()){
369  unsigned int idx=met_-mets_.begin();
370  if(idx==0){
371  caloMET=*met->begin();
372  }
373  }
374  }
375 
376  /*
377  ------------------------------------------------------------
378 
379  Event Monitoring
380 
381  ------------------------------------------------------------
382  */
383  const edm::TriggerNames& triggerNames = event.triggerNames(*triggerTable);
384  // loop over trigger paths
385  for(auto name : triggerNames.triggerNames()){
386  bool elecmu = false;
387  bool dielec = false;
388  bool dimuon = false;
389  // consider only path from triggerPaths
390  for (auto const & triggerPath : triggerPaths) {
391  if (TString(name.c_str()).Contains(TString(triggerPath), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("ele"), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("mu"), TString::kIgnoreCase)) elecmu = true;
392  else {
393  if (TString(name.c_str()).Contains(TString(triggerPath), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("ele"), TString::kIgnoreCase)) dielec = true;
394  if (TString(name.c_str()).Contains(TString(triggerPath), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("mu"), TString::kIgnoreCase)) dimuon = true;
395  }
396  }
397 
398  // ELECMU channel
399  if( elecmu ){
400  fill("decayChannel_", 0.5);
401  if( !isoElecs.empty() && !isoMuons.empty() ) {
402  double mass = (isoElecs[0]->p4()+isoMuons[0]->p4()).mass();
403  if( (lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
404  // fill plots for trigger monitoring
405  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "elecMu", elecMuPaths_);
406  if(elecMuLogged_<=hists_.find("elecMuLogger_")->second->getNbinsY()){
407  // log runnumber, lumi block, event number & some
408  // more pysics infomation for interesting events
409  // We're doing a static_cast here to denote the explicity of the cast
410  auto runID = static_cast<double>(event.eventAuxiliary().run());
411  auto luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
412  auto eventID = static_cast<double>(event.eventAuxiliary().event());
413  fill("elecMuLogger_", 0.5, elecMuLogged_+0.5, runID);
414  fill("elecMuLogger_", 1.5, elecMuLogged_+0.5, luminosityBlockID);
415  fill("elecMuLogger_", 2.5, elecMuLogged_+0.5, eventID);
416  fill("elecMuLogger_", 3.5, elecMuLogged_+0.5, isoMuons[0]->pt());
417  fill("elecMuLogger_", 4.5, elecMuLogged_+0.5, isoElecs[0]->pt());
418  if(!leadingJets.empty()) fill("elecMuLogger_", 5.5, elecMuLogged_+0.5, leadingJets[0].pt());
419  if(leadingJets.size()>1) fill("elecMuLogger_", 6.5, elecMuLogged_+0.5, leadingJets[1].pt());
420  fill("elecMuLogger_", 7.5, elecMuLogged_+0.5, caloMET.et());
421  ++elecMuLogged_;
422  }
423  }
424  }
425  }
426 
427  // DIMUON channel
428  if( dimuon ){
429  fill("decayChannel_", 1.5);
430  if (isoMuons.size()>1) {
431  int charge = isoMuons[0]->charge()*isoMuons[1]->charge();
432  double mass = (isoMuons[0]->p4()+isoMuons[1]->p4()).mass();
433  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
434  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
435  // fill plots for trigger monitoring
436  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "diMuon", diMuonPaths_);
437  if(diMuonLogged_<=hists_.find("diMuonLogger_")->second->getNbinsY()){
438  // log runnumber, lumi block, event number & some
439  // more pysics infomation for interesting events
440  // We're doing a static_cast here to denote the explicity of the cast
441  auto runID = static_cast<double>(event.eventAuxiliary().run());
442  auto luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
443  auto eventID = static_cast<double>(event.eventAuxiliary().event());
444  fill("diMuonLogger_", 0.5, diMuonLogged_+0.5, runID);
445  fill("diMuonLogger_", 1.5, diMuonLogged_+0.5, luminosityBlockID);
446  fill("diMuonLogger_", 2.5, diMuonLogged_+0.5, eventID);
447  fill("diMuonLogger_", 3.5, diMuonLogged_+0.5, isoMuons[0]->pt());
448  fill("diMuonLogger_", 4.5, diMuonLogged_+0.5, isoMuons[1]->pt());
449  if(!leadingJets.empty()) fill("diMuonLogger_", 5.5, diMuonLogged_+0.5, leadingJets[0].pt());
450  if(leadingJets.size()>1) fill("diMuonLogger_", 6.5, diMuonLogged_+0.5, leadingJets[1].pt());
451  fill("diMuonLogger_", 7.5, diMuonLogged_+0.5, caloMET.et());
452  ++diMuonLogged_;
453  }
454  }
455  }
456  }
457 
458  // DIELEC channel
459  if( dielec ){
460  fill("decayChannel_", 2.5);
461  if( dielec && isoElecs.size()>1 ){
462  int charge = isoElecs[0]->charge()*isoElecs[1]->charge();
463  double mass = (isoElecs[0]->p4()+isoElecs[1]->p4()).mass();
464  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
465  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
466  // fill plots for trigger monitoring
467  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "diElec", diElecPaths_);
468  if(diElecLogged_<=hists_.find("diElecLogger_")->second->getNbinsY()){
469  // log runnumber, lumi block, event number & some
470  // more pysics infomation for interesting events
471  // We're doing a static_cast here to denote the explicity of the cast
472  auto runID = static_cast<double>(event.eventAuxiliary().run());
473  auto luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
474  auto eventID = static_cast<double>(event.eventAuxiliary().event());
475  fill("diElecLogger_", 0.5, diElecLogged_+0.5, runID);
476  fill("diElecLogger_", 1.5, diElecLogged_+0.5, luminosityBlockID);
477  fill("diElecLogger_", 2.5, diElecLogged_+0.5, eventID);
478  fill("diElecLogger_", 3.5, diElecLogged_+0.5, isoElecs[0]->pt());
479  fill("diElecLogger_", 4.5, diElecLogged_+0.5, isoElecs[1]->pt());
480  if(!leadingJets.empty()) fill("diElecLogger_", 5.5, diElecLogged_+0.5, leadingJets[0].pt());
481  if(leadingJets.size()>1) fill("diElecLogger_", 6.5, diElecLogged_+0.5, leadingJets[1].pt());
482  fill("diElecLogger_", 7.5, diElecLogged_+0.5, caloMET.et());
483  ++diElecLogged_;
484  }
485  }
486  }
487  }
488  }
489 
490  /*
491  ------------------------------------------------------------
492 
493  HLT Objects Monitoring
494 
495  ------------------------------------------------------------
496  */
497 
498 // if(event.getByToken(triggerEventWithRefsTag_,triggerEventWithRefsHandle)) {
499 
500 
502  event.getByToken(triggerSummaryTokenRAW,rawTriggerEvent);
503 
505  event.getByToken(triggerSummaryTokenAOD,aodTriggerEvent);
506 
508  if(!rawTriggerEvent.isValid()){
509  hasRawTriggerSummary=false;
510 // edm::LogWarning( "TopDiLeptonHLTOfflineDQM" )
511 // << "No RAW trigger summary found! Returning... \n";
512 
513  if(!aodTriggerEvent.isValid()){
514 // edm::LogWarning( "TopDiLeptonHLTOfflineDQM" )
515 // << "No AOD trigger summary found! Returning... \n";
516 
517  return;
518  }
519  }
520 
521 
522 
523  // loop over trigger paths
524  for(unsigned int i=0; i<triggerNames.triggerNames().size(); ++i){
525  // consider only path from triggerPaths
526  string name = triggerNames.triggerNames()[i];
527  bool isInteresting = false;
528  for (auto const & triggerPath : triggerPaths) {
529  if (TString(name.c_str()).Contains(TString(triggerPath), TString::kIgnoreCase)) isInteresting = true;
530  }
531  if (!isInteresting) continue;
532  // dump infos on the considered trigger path
533  const unsigned int triggerIndex = triggerNames.triggerIndex(name);
534  // get modules for the considered trigger path
535  const vector<string>& moduleLabels(hltConfig.moduleLabels(triggerIndex));
536  const unsigned int moduleIndex(triggerTable->index(triggerIndex));
537  // Results from TriggerEvent product
538  electronIds_.clear(); electronRefs_.clear();
539  muonIds_.clear(); muonRefs_.clear();
540  // look only for modules actually run in this path
541  unsigned int kElec=0;
542  unsigned int kMuon=0;
543  for (unsigned int k=0; k<=moduleIndex; ++k) {
544  const string& moduleLabel(moduleLabels[k]);
545  const string moduleType(hltConfig.moduleType(moduleLabel));
546  // check whether the module is packed up in TriggerEventWithRef product
547 
548 // const unsigned int filterIndex(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
549 // if (filterIndex<triggerEventWithRefsHandle->size()) {
550 
552  const unsigned int filterIndex(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
553  if (filterIndex<rawTriggerEvent->size()) {
554  rawTriggerEvent->getObjects(filterIndex,electronIds_,electronRefs_);
555  const unsigned int nElectrons(electronIds_.size());
556  if (nElectrons>0) kElec = k;
557 
558  rawTriggerEvent->getObjects(filterIndex,muonIds_,muonRefs_);
559  const unsigned int nMuons(muonIds_.size());
560  if (nMuons>0) kMuon = k;
561  }
562  }
563 
564  else{
565  const unsigned int filterIndex(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
566  if (filterIndex<aodTriggerEvent->size()) {
567 
568  aodTriggerEvent->getObjects(filterIndex,electronIds_,electronRefs_);
569  const unsigned int nElectrons(electronIds_.size());
570  if (nElectrons>0) kElec = k;
571 
572  aodTriggerEvent->getObjects(filterIndex,muonIds_,muonRefs_);
573  const unsigned int nMuons(muonIds_.size());
574  if (nMuons>0) kMuon = k;
575  }
576  }
577  }
578 
579  bool l1Matched = false;
580  bool l2Matched = false;
581  double l1DeltaRMin = 500.;
582  double l2DeltaRMin = 500.;
583  unsigned int l1IndMatched = 500;
584  unsigned int l2IndMatched = 500;
585  // access to hlt dielecs
586  electronIds_.clear(); electronRefs_.clear();
587  if (kElec > 0 && kMuon < 1 && !isoElecs.empty()) {
588  const string& moduleLabelElec(moduleLabels[kElec]);
589  const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec));
590 
591 // const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
592 // triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_);
593 
595  const unsigned int filterIndexElec(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
596  rawTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
597  }
598  else{
599  const unsigned int filterIndexElec(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
600  aodTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
601 
602  }
603  const unsigned int nElectrons(electronIds_.size());
604  double deltar1 = 600.;
605  double deltar2 = 600.;
606  for (unsigned int inde = 0; inde < isoElecs.size(); inde++) {
607  if (nElectrons > 0) deltar1 = deltaR(*electronRefs_[0],*isoElecs[inde]);
608  if (nElectrons > 1) deltar2 = deltaR(*electronRefs_[1],*isoElecs[inde]);
609  if (deltar1 < deltar2 && deltar1 < l1DeltaRMin) {
610  l1DeltaRMin = deltar1;
611  l1IndMatched = inde;
612  }
613  if (deltar2 < deltar1 && deltar2 < l2DeltaRMin) {
614  l2DeltaRMin = deltar2;
615  l2IndMatched = inde;
616  }
617  }
618  if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin);
619  if (nElectrons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoElecs[l2IndMatched]->eta(), l2DeltaRMin);
620  if (l1DeltaRMin < DRMIN) {
621  l1Matched = true;
622  fill("matchingMon_", 0.5 );
623  fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() );
624  }
625  if (l2DeltaRMin < DRMIN) {
626  l2Matched = true;
627  fill("matchingMon_", 1.5 );
628  fill("leptResolution_", fabs(isoElecs[l2IndMatched]->pt()-electronRefs_[1]->pt())/isoElecs[l2IndMatched]->pt() );
629  }
630  }
631  // access to hlt dimuons
632  muonIds_.clear(); muonRefs_.clear();
633  l1DeltaRMin = 500.; l2DeltaRMin = 500.; double l3DeltaRMin = 500.;
634  l1IndMatched = 500; l2IndMatched = 500; double l3IndMatched = 500;
635  if (kMuon > 0 && kElec < 1 && !isoMuons.empty()) {
636  const string& moduleLabelMuon(moduleLabels[kMuon]);
637  const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon));
638 
639 // const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
640 // triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_);
641 
643  const unsigned int filterIndexMuon(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
644  rawTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
645  }
646 
647  else{
648  const unsigned int filterIndexMuon(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
649  aodTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
650  }
651 
652  trigger::VRmuon myMuonRefs;
653  const unsigned int nMuons(muonIds_.size());
654  for (unsigned int l=0; l<nMuons; l++) {
655  bool isNew = true;
656  for (auto & myMuonRef : myMuonRefs) {
657  if (fabs((myMuonRef->pt()-muonRefs_[l]->pt())/muonRefs_[l]->pt()) < 1e-5) isNew = false;
658  }
659  if (isNew) myMuonRefs.push_back(muonRefs_[l]);
660  }
661  const unsigned int nMyMuons(myMuonRefs.size());
662  double deltar1 = 600.;
663  double deltar2 = 600.;
664  double deltar3 = 600.;
665  for (unsigned int indm = 0; indm < isoMuons.size(); indm++) {
666  if (nMyMuons > 0) deltar1 = deltaR(*myMuonRefs[0],*isoMuons[indm]);
667  if (nMyMuons > 1) deltar2 = deltaR(*myMuonRefs[1],*isoMuons[indm]);
668  if (nMyMuons > 2) deltar3 = deltaR(*myMuonRefs[2],*isoMuons[indm]);
669  if (nMyMuons > 0 && (nMyMuons<1 || deltar1 < deltar2) && (nMyMuons<2 || deltar1<deltar3) && deltar1 < l1DeltaRMin) {
670  l1DeltaRMin = deltar1;
671  l1IndMatched = indm;
672  }
673  if (nMyMuons > 1 && deltar2 < deltar1 && (nMyMuons<3 || deltar2<deltar3) && deltar2 < l2DeltaRMin) {
674  l2DeltaRMin = deltar2;
675  l2IndMatched = indm;
676  }
677  if (nMyMuons > 2 && deltar3 < deltar1 && deltar3 < deltar2 && deltar3 < l3DeltaRMin) {
678  l3DeltaRMin = deltar3;
679  l3IndMatched = indm;
680  }
681  }
682  if (nMyMuons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoMuons[l1IndMatched]->eta(), l1DeltaRMin);
683  if (nMyMuons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin);
684  if (nMyMuons > 2 && l3IndMatched < 500) fill("leptDeltaREta_", isoMuons[l3IndMatched]->eta(), l3DeltaRMin);
685  if (l1DeltaRMin < DRMIN) {
686  l1Matched = true;
687  fill("matchingMon_", 0.5 );
688  fill("leptResolution_", fabs(isoMuons[l1IndMatched]->pt()-myMuonRefs[0]->pt())/isoMuons[l1IndMatched]->pt() );
689  if (l2DeltaRMin < DRMIN) {
690  l2Matched = true;
691  fill("matchingMon_", 1.5 );
692  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() );
693  } else if (l3DeltaRMin < DRMIN) {
694  l2Matched = true;
695  fill("matchingMon_", 1.5 );
696  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
697  }
698  } else {
699  if (l2DeltaRMin < DRMIN) {
700  l1Matched = true;
701  fill("matchingMon_", 0.5 );
702  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() );
703  if (l3DeltaRMin < DRMIN) {
704  l2Matched = true;
705  fill("matchingMon_", 1.5 );
706  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
707  }
708  }
709  if (l3DeltaRMin < DRMIN) {
710  l1Matched = true;
711  fill("matchingMon_", 0.5 );
712  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
713  }
714  }
715  }
716  // access to hlt elec-muon
717  electronIds_.clear(); electronRefs_.clear();
718  muonIds_.clear(); muonRefs_.clear();
719  l1DeltaRMin = 500.; l2DeltaRMin = 500.;
720  l1IndMatched = 500; l2IndMatched = 500;
721  if (kElec > 0 && kMuon > 0 && !isoElecs.empty()) {
722  const string& moduleLabelElec(moduleLabels[kElec]);
723  const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec));
724 
725 // const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
726 // triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_);
727 
729  const unsigned int filterIndexElec(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
730  rawTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
731  }
732  else{
733  const unsigned int filterIndexElec(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
734  aodTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
735  }
736 
737  const unsigned int nElectrons(electronIds_.size());
738  double deltar = 600.;
739  for (unsigned int inde = 0; inde < isoElecs.size(); inde++) {
740  if (nElectrons > 0) deltar = deltaR(*electronRefs_[0],*isoElecs[inde]);
741  if (deltar < l1DeltaRMin) {
742  l1DeltaRMin = deltar;
743  l1IndMatched = inde;
744  }
745  }
746  if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin);
747  if (l1DeltaRMin < DRMIN) {
748  l1Matched = true;
749  fill("matchingMon_", 0.5 );
750  fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() );
751  }
752  }
753  if (kElec > 0 && kMuon > 0 && !isoMuons.empty()) {
754  const string& moduleLabelMuon(moduleLabels[kMuon]);
755  const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon));
756 
757 // const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
758 // triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_);
759 
761  const unsigned int filterIndexMuon(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
762  rawTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
763  }
764  else{
765  const unsigned int filterIndexMuon(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
766  aodTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
767  }
768 
769  const unsigned int nMuons(muonIds_.size());
770  if (isoMuons.empty()) continue;
771  double deltar = 600.;
772  for (unsigned int indm = 0; indm < isoMuons.size(); indm++) {
773  if (nMuons > 0) deltar = deltaR(*muonRefs_[0],*isoMuons[indm]);
774  if (deltar < l2DeltaRMin) {
775  l2DeltaRMin = deltar;
776  l2IndMatched = indm;
777  }
778  }
779  if (nMuons > 0 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin);
780  if (l2DeltaRMin < DRMIN) {
781  l2Matched = true;
782  fill("matchingMon_", 1.5 );
783  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-muonRefs_[0]->pt())/isoMuons[l2IndMatched]->pt() );
784  }
785  }
786  if (l1Matched && l2Matched) fill("matchingMon_", 2.5 );
787  }
788 // }
789 
790  }
791 
792 }
793 
795 {
796  // configure the preselection
797  edm::ParameterSet presel=cfg.getParameter<edm::ParameterSet>("preselection");
798  if( presel.existsAs<edm::ParameterSet>("trigger") ){
800  triggerTable_= consumes< edm::TriggerResults >(trigger.getParameter<edm::InputTag>("src"));
801  triggerPaths_=trigger.getParameter<std::vector<std::string> >("select");
802  }
803  if( presel.existsAs<edm::ParameterSet>("vertex" ) ){
804  edm::ParameterSet vertex=presel.getParameter<edm::ParameterSet>("vertex");
805  vertex_= consumes< std::vector<reco::Vertex> >(vertex.getParameter<edm::InputTag>("src"));
806  vertexSelect_= std::make_unique<StringCutObjectSelector<reco::Vertex>>(vertex.getParameter<std::string>("select"));
807  }
808  if( presel.existsAs<edm::ParameterSet>("beamspot" ) ){
810  beamspot_= consumes< reco::BeamSpot >(beamspot.getParameter<edm::InputTag>("src"));
811  beamspotSelect_= std::make_unique<StringCutObjectSelector<reco::BeamSpot>>(beamspot.getParameter<std::string>("select"));
812  }
813 
814  // configure the selection
815  std::vector<edm::ParameterSet> sel=cfg.getParameter<std::vector<edm::ParameterSet> >("selection");
816  for(auto & i : sel){
817  selectionOrder_.push_back(i.getParameter<std::string>("label"));
818  selection_[selectionStep(selectionOrder_.back())] = std::make_pair(i, std::make_unique<HLTOfflineDQMTopDiLepton::MonitorDiLepton>(selectionStep(selectionOrder_.back()).c_str(), cfg.getParameter<edm::ParameterSet>("setup"), consumesCollector()));
819  }
820 
821  for (const std::string& s: selectionOrder_) {
823 
824  if (selection_.find(key) == selection_.end())
825  continue;
826 
827  if (type == "muons"){
828  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::Muon>>(selection_[key].first, consumesCollector());
829  }
830  if (type == "elecs"){
831  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::GsfElectron>>(selection_[key].first, consumesCollector());
832  }
833  if (type == "jets"){
834  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::Jet>>(selection_[key].first, consumesCollector());
835  }
836  if (type == "jets/pf"){
837  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::PFJet>>(selection_[key].first, consumesCollector());
838  }
839  if (type == "jets/calo"){
840  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::CaloJet>>(selection_[key].first, consumesCollector());
841  }
842  if (type == "met"){
843  selectmap_[type] = std::make_unique<SelectionStepHLT<reco::MET>>(selection_[key].first, consumesCollector());
844  }
845  }
846 }
847 
848  void
850 {
851  using namespace std;
852  using namespace edm;
853 
854  bool changed(true);
855  if (!hltConfig_.init(iRun,iSetup,"*",changed)) {
856  edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" )
857  << "Config extraction failure with process name "
859  << "\n";
860  return;
861  }
862 }
863 
864  void
866 {
869  if( !event.getByToken(triggerTable_, triggerTable) ) return;
870  if(!acceptHLT(event, *triggerTable, triggerPaths_)) return;
871  }
872  if(!vertex_.isUninitialized()){
874  if( !event.getByToken(vertex_, vertex) ) return;
875  if(vertex->empty() || !(*vertexSelect_)(vertex->front())) return;
876  }
877  if(!beamspot_.isUninitialized()){
879  if( !event.getByToken(beamspot_, beamspot) ) return;
880  if(!(*beamspotSelect_)(*beamspot)) return;
881  }
882  // apply selection steps
883  for(auto selIt=selectionOrder_.begin(); selIt!=selectionOrder_.end(); ++selIt){
884  std::string key = selectionStep(*selIt), type = objectType(*selIt);
885  if(selection_.find(key)!=selection_.end()){
886 
887  if(type=="empty"){
888  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
889  continue;
890  }
891  if(type=="Hlt" ){
892  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
893  continue;
894  }
895 
896  bool passSel = true;
897 
898  for(auto selIt2=selectionOrder_.begin(); selIt2<=selIt; ++selIt2){
899  std::string key2 = selectionStep(*selIt2), type2 = objectType(*selIt2);
900  if(selection_.find(key2)==selection_.end()) continue;
901 
902  if(type2=="Hlt" || type2=="empty" ) continue;
903  if (!selectmap_[type2]->select(event)) passSel=false;
904 
905  } // end 2nd loop
906 
907  // Apply cumulative event selection
908  if ( !passSel ) continue;
909 
910  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
911 
912  }
913  }
914 }
915 
916  void
918 {
919  for (auto& sel: selection_) {
920  sel.second.second->book(i);
921  }
922 }
TopDiLeptonHLTOfflineDQM(const edm::ParameterSet &cfg)
default constructor
size
Write out results.
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:92
const std::string moduleType(const std::string &module) const
C++ class name of module.
double lowerEdge_
mass window upper and lower edge
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual void scaleEnergy(double fScale)
scale energy of the jet
edm::EDGetTokenT< reco::BeamSpot > beamspot_
beamspot
std::unique_ptr< StringCutObjectSelector< reco::GsfElectron > > elecSelect_
extra selection on electrons
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
Base class for all types of Jets.
Definition: Jet.h:20
RunNumber_t run() const
std::string selectionStep(const std::string &label)
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
int elecMuLogged_
number of logged interesting events
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_
input sources for monitoring
#define nullptr
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
Jets made from PFObjects.
Definition: PFJet.h:21
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
std::vector< std::string > triggerPaths_
trigger paths
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
do this during the event loop
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:88
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
void triggerBinLabels(const std::string &channel, const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
void loggerBinLabels(const std::string &hist)
set labels for event logging histograms
double et() const final
transverse energy
Definition: MET.h:42
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
vector< PseudoJet > jets
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
std::unique_ptr< StringCutObjectSelector< reco::Muon > > muonSelect_
extra selection on muons
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
std::vector< std::string > diElecPaths_
trigger paths for di electron channel
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerSummaryTokenAOD
std::unique_ptr< StringCutObjectSelector< reco::GsfElectron > > elecIso_
extra isolation criterion on electron
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
bool isValid() const
Definition: HandleBase.h:74
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
std::map< std::string, MonitorElement * > hists_
histogram container
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< HLTOfflineDQMTopDiLepton::MonitorDiLepton > > > selection_
const std::string & processName() const
process name
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
int k[5][pyjets_maxn]
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
void fill(const edm::Event &event, const edm::EventSetup &setup, const HLTConfigProvider &hltConfig, const std::vector< std::string > &triggerPaths)
fill monitor histograms with electronId and jetCorrections
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
bool acceptHLT(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
met
===> hadronic RAZOR
Definition: deltar.py:1
std::vector< std::string > selectionOrder_
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
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:50
void book(DQMStore::IBooker &store_)
book histograms in subdirectory directory
std::string objectType(const std::string &label)
std::vector< reco::RecoChargedCandidateRef > VRmuon
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerSummaryTokenRAW
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
std::map< std::string, std::unique_ptr< SelectionStepHLTBase > > selectmap_
bool isUninitialized() const
Definition: EDGetToken.h:73
std::unique_ptr< StringCutObjectSelector< reco::Muon > > muonIso_
extra isolation criterion on muon
edm::EDGetTokenT< edm::View< reco::Muon > > muons_
edm::EDGetTokenT< std::vector< reco::Vertex > > vertex_
primary vertex
static std::string const triggerPaths
Definition: EdmProvDump.cc:42
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
Definition: event.py:1
Definition: Run.h:43