CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_(0), elecSelect_(0), muonIso_(0), muonSelect_(0), jetIDSelect_(0),
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") ){
50  }
51  // isolation is optional; in case it's not found no
52  // isolation will be applied
53  if( elecExtras.existsAs<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") ){
71  }
72  // isolation is optional; in case it's not found no
73  // isolation will be applied
74  if( muonExtras.existsAs<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"));
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=0;
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(std::vector<const reco::GsfElectron*>::const_iterator 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
362  reco::MET caloMET;
363  for(std::vector< edm::EDGetTokenT< edm::View<reco::MET> > >::const_iterator 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(unsigned int i=0; i<triggerNames.triggerNames().size(); ++i){
386  bool elecmu = false;
387  bool dielec = false;
388  bool dimuon = false;
389  // consider only path from triggerPaths
390  string name = triggerNames.triggerNames()[i];
391  for (unsigned int j=0; j<triggerPaths.size(); j++) {
392  if (TString(name.c_str()).Contains(TString(triggerPaths[j]), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("ele"), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("mu"), TString::kIgnoreCase)) elecmu = true;
393  else {
394  if (TString(name.c_str()).Contains(TString(triggerPaths[j]), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("ele"), TString::kIgnoreCase)) dielec = true;
395  if (TString(name.c_str()).Contains(TString(triggerPaths[j]), TString::kIgnoreCase) && TString(name.c_str()).Contains(TString("mu"), TString::kIgnoreCase)) dimuon = true;
396  }
397  }
398 
399  // ELECMU channel
400  if( elecmu ){
401  fill("decayChannel_", 0.5);
402  if( isoElecs.size()>0 && isoMuons.size()>0 ) {
403  double mass = (isoElecs[0]->p4()+isoMuons[0]->p4()).mass();
404  if( (lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
405  // fill plots for trigger monitoring
406  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "elecMu", elecMuPaths_);
407  if(elecMuLogged_<=hists_.find("elecMuLogger_")->second->getNbinsY()){
408  // log runnumber, lumi block, event number & some
409  // more pysics infomation for interesting events
410  // We're doing a static_cast here to denote the explicity of the cast
411  double runID = static_cast<double>(event.eventAuxiliary().run());
412  double luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
413  double eventID = static_cast<double>(event.eventAuxiliary().event());
414  fill("elecMuLogger_", 0.5, elecMuLogged_+0.5, runID);
415  fill("elecMuLogger_", 1.5, elecMuLogged_+0.5, luminosityBlockID);
416  fill("elecMuLogger_", 2.5, elecMuLogged_+0.5, eventID);
417  fill("elecMuLogger_", 3.5, elecMuLogged_+0.5, isoMuons[0]->pt());
418  fill("elecMuLogger_", 4.5, elecMuLogged_+0.5, isoElecs[0]->pt());
419  if(leadingJets.size()>0) fill("elecMuLogger_", 5.5, elecMuLogged_+0.5, leadingJets[0].pt());
420  if(leadingJets.size()>1) fill("elecMuLogger_", 6.5, elecMuLogged_+0.5, leadingJets[1].pt());
421  fill("elecMuLogger_", 7.5, elecMuLogged_+0.5, caloMET.et());
422  ++elecMuLogged_;
423  }
424  }
425  }
426  }
427 
428  // DIMUON channel
429  if( dimuon ){
430  fill("decayChannel_", 1.5);
431  if (isoMuons.size()>1) {
432  int charge = isoMuons[0]->charge()*isoMuons[1]->charge();
433  double mass = (isoMuons[0]->p4()+isoMuons[1]->p4()).mass();
434  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
435  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
436  // fill plots for trigger monitoring
437  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "diMuon", diMuonPaths_);
438  if(diMuonLogged_<=hists_.find("diMuonLogger_")->second->getNbinsY()){
439  // log runnumber, lumi block, event number & some
440  // more pysics infomation for interesting events
441  // We're doing a static_cast here to denote the explicity of the cast
442  double runID = static_cast<double>(event.eventAuxiliary().run());
443  double luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
444  double eventID = static_cast<double>(event.eventAuxiliary().event());
445  fill("diMuonLogger_", 0.5, diMuonLogged_+0.5, runID);
446  fill("diMuonLogger_", 1.5, diMuonLogged_+0.5, luminosityBlockID);
447  fill("diMuonLogger_", 2.5, diMuonLogged_+0.5, eventID);
448  fill("diMuonLogger_", 3.5, diMuonLogged_+0.5, isoMuons[0]->pt());
449  fill("diMuonLogger_", 4.5, diMuonLogged_+0.5, isoMuons[1]->pt());
450  if(leadingJets.size()>0) fill("diMuonLogger_", 5.5, diMuonLogged_+0.5, leadingJets[0].pt());
451  if(leadingJets.size()>1) fill("diMuonLogger_", 6.5, diMuonLogged_+0.5, leadingJets[1].pt());
452  fill("diMuonLogger_", 7.5, diMuonLogged_+0.5, caloMET.et());
453  ++diMuonLogged_;
454  }
455  }
456  }
457  }
458 
459  // DIELEC channel
460  if( dielec ){
461  fill("decayChannel_", 2.5);
462  if( dielec && isoElecs.size()>1 ){
463  int charge = isoElecs[0]->charge()*isoElecs[1]->charge();
464  double mass = (isoElecs[0]->p4()+isoElecs[1]->p4()).mass();
465  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
466  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
467  // fill plots for trigger monitoring
468  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "diElec", diElecPaths_);
469  if(diElecLogged_<=hists_.find("diElecLogger_")->second->getNbinsY()){
470  // log runnumber, lumi block, event number & some
471  // more pysics infomation for interesting events
472  // We're doing a static_cast here to denote the explicity of the cast
473  double runID = static_cast<double>(event.eventAuxiliary().run());
474  double luminosityBlockID = static_cast<double>(event.eventAuxiliary().luminosityBlock());
475  double eventID = static_cast<double>(event.eventAuxiliary().event());
476  fill("diElecLogger_", 0.5, diElecLogged_+0.5, runID);
477  fill("diElecLogger_", 1.5, diElecLogged_+0.5, luminosityBlockID);
478  fill("diElecLogger_", 2.5, diElecLogged_+0.5, eventID);
479  fill("diElecLogger_", 3.5, diElecLogged_+0.5, isoElecs[0]->pt());
480  fill("diElecLogger_", 4.5, diElecLogged_+0.5, isoElecs[1]->pt());
481  if(leadingJets.size()>0) fill("diElecLogger_", 5.5, diElecLogged_+0.5, leadingJets[0].pt());
482  if(leadingJets.size()>1) fill("diElecLogger_", 6.5, diElecLogged_+0.5, leadingJets[1].pt());
483  fill("diElecLogger_", 7.5, diElecLogged_+0.5, caloMET.et());
484  ++diElecLogged_;
485  }
486  }
487  }
488  }
489  }
490 
491  /*
492  ------------------------------------------------------------
493 
494  HLT Objects Monitoring
495 
496  ------------------------------------------------------------
497  */
498 
499 // if(event.getByToken(triggerEventWithRefsTag_,triggerEventWithRefsHandle)) {
500 
501 
503  event.getByToken(triggerSummaryTokenRAW,rawTriggerEvent);
504 
506  event.getByToken(triggerSummaryTokenAOD,aodTriggerEvent);
507 
509  if(!rawTriggerEvent.isValid()){
510  hasRawTriggerSummary=false;
511 // edm::LogWarning( "TopDiLeptonHLTOfflineDQM" )
512 // << "No RAW trigger summary found! Returning... \n";
513 
514  if(!aodTriggerEvent.isValid()){
515 // edm::LogWarning( "TopDiLeptonHLTOfflineDQM" )
516 // << "No AOD trigger summary found! Returning... \n";
517 
518  return;
519  }
520  }
521 
522 
523 
524  // loop over trigger paths
525  for(unsigned int i=0; i<triggerNames.triggerNames().size(); ++i){
526  // consider only path from triggerPaths
527  string name = triggerNames.triggerNames()[i].c_str();
528  bool isInteresting = false;
529  for (unsigned int j=0; j<triggerPaths.size(); j++) {
530  if (TString(name.c_str()).Contains(TString(triggerPaths[j]), TString::kIgnoreCase)) isInteresting = true;
531  }
532  if (!isInteresting) continue;
533  // dump infos on the considered trigger path
534  const unsigned int triggerIndex = triggerNames.triggerIndex(name);
535  // get modules for the considered trigger path
536  const vector<string>& moduleLabels(hltConfig.moduleLabels(triggerIndex));
537  const unsigned int moduleIndex(triggerTable->index(triggerIndex));
538  // Results from TriggerEvent product
539  electronIds_.clear(); electronRefs_.clear();
540  muonIds_.clear(); muonRefs_.clear();
541  // look only for modules actually run in this path
542  unsigned int kElec=0;
543  unsigned int kMuon=0;
544  for (unsigned int k=0; k<=moduleIndex; ++k) {
545  const string& moduleLabel(moduleLabels[k]);
546  const string moduleType(hltConfig.moduleType(moduleLabel));
547  // check whether the module is packed up in TriggerEventWithRef product
548 
549 // const unsigned int filterIndex(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
550 // if (filterIndex<triggerEventWithRefsHandle->size()) {
551 
553  const unsigned int filterIndex(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
554  if (filterIndex<rawTriggerEvent->size()) {
555  rawTriggerEvent->getObjects(filterIndex,electronIds_,electronRefs_);
556  const unsigned int nElectrons(electronIds_.size());
557  if (nElectrons>0) kElec = k;
558 
559  rawTriggerEvent->getObjects(filterIndex,muonIds_,muonRefs_);
560  const unsigned int nMuons(muonIds_.size());
561  if (nMuons>0) kMuon = k;
562  }
563  }
564 
565  else{
566  const unsigned int filterIndex(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabel,"",processName_)));
567  if (filterIndex<aodTriggerEvent->size()) {
568 
569  aodTriggerEvent->getObjects(filterIndex,electronIds_,electronRefs_);
570  const unsigned int nElectrons(electronIds_.size());
571  if (nElectrons>0) kElec = k;
572 
573  aodTriggerEvent->getObjects(filterIndex,muonIds_,muonRefs_);
574  const unsigned int nMuons(muonIds_.size());
575  if (nMuons>0) kMuon = k;
576  }
577  }
578  }
579 
580  bool l1Matched = false;
581  bool l2Matched = false;
582  double l1DeltaRMin = 500.;
583  double l2DeltaRMin = 500.;
584  unsigned int l1IndMatched = 500;
585  unsigned int l2IndMatched = 500;
586  // access to hlt dielecs
587  electronIds_.clear(); electronRefs_.clear();
588  if (kElec > 0 && kMuon < 1 && isoElecs.size()>0) {
589  const string& moduleLabelElec(moduleLabels[kElec]);
590  const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec));
591 
592 // const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
593 // triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_);
594 
596  const unsigned int filterIndexElec(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
597  rawTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
598  }
599  else{
600  const unsigned int filterIndexElec(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
601  aodTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
602 
603  }
604  const unsigned int nElectrons(electronIds_.size());
605  double deltar1 = 600.;
606  double deltar2 = 600.;
607  for (unsigned int inde = 0; inde < isoElecs.size(); inde++) {
608  if (nElectrons > 0) deltar1 = deltaR(*electronRefs_[0],*isoElecs[inde]);
609  if (nElectrons > 1) deltar2 = deltaR(*electronRefs_[1],*isoElecs[inde]);
610  if (deltar1 < deltar2 && deltar1 < l1DeltaRMin) {
611  l1DeltaRMin = deltar1;
612  l1IndMatched = inde;
613  }
614  if (deltar2 < deltar1 && deltar2 < l2DeltaRMin) {
615  l2DeltaRMin = deltar2;
616  l2IndMatched = inde;
617  }
618  }
619  if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin);
620  if (nElectrons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoElecs[l2IndMatched]->eta(), l2DeltaRMin);
621  if (l1DeltaRMin < DRMIN) {
622  l1Matched = true;
623  fill("matchingMon_", 0.5 );
624  fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() );
625  }
626  if (l2DeltaRMin < DRMIN) {
627  l2Matched = true;
628  fill("matchingMon_", 1.5 );
629  fill("leptResolution_", fabs(isoElecs[l2IndMatched]->pt()-electronRefs_[1]->pt())/isoElecs[l2IndMatched]->pt() );
630  }
631  }
632  // access to hlt dimuons
633  muonIds_.clear(); muonRefs_.clear();
634  l1DeltaRMin = 500.; l2DeltaRMin = 500.; double l3DeltaRMin = 500.;
635  l1IndMatched = 500; l2IndMatched = 500; double l3IndMatched = 500;
636  if (kMuon > 0 && kElec < 1 && isoMuons.size()>0) {
637  const string& moduleLabelMuon(moduleLabels[kMuon]);
638  const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon));
639 
640 // const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
641 // triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_);
642 
644  const unsigned int filterIndexMuon(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
645  rawTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
646  }
647 
648  else{
649  const unsigned int filterIndexMuon(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
650  aodTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
651  }
652 
653  trigger::VRmuon myMuonRefs;
654  const unsigned int nMuons(muonIds_.size());
655  for (unsigned int l=0; l<nMuons; l++) {
656  bool isNew = true;
657  for (unsigned int ll=0; ll<myMuonRefs.size(); ll++) {
658  if (fabs((myMuonRefs[ll]->pt()-muonRefs_[l]->pt())/muonRefs_[l]->pt()) < 1e-5) isNew = false;
659  }
660  if (isNew) myMuonRefs.push_back(muonRefs_[l]);
661  }
662  const unsigned int nMyMuons(myMuonRefs.size());
663  double deltar1 = 600.;
664  double deltar2 = 600.;
665  double deltar3 = 600.;
666  for (unsigned int indm = 0; indm < isoMuons.size(); indm++) {
667  if (nMyMuons > 0) deltar1 = deltaR(*myMuonRefs[0],*isoMuons[indm]);
668  if (nMyMuons > 1) deltar2 = deltaR(*myMuonRefs[1],*isoMuons[indm]);
669  if (nMyMuons > 2) deltar3 = deltaR(*myMuonRefs[2],*isoMuons[indm]);
670  if (nMyMuons > 0 && (nMyMuons<1 || deltar1 < deltar2) && (nMyMuons<2 || deltar1<deltar3) && deltar1 < l1DeltaRMin) {
671  l1DeltaRMin = deltar1;
672  l1IndMatched = indm;
673  }
674  if (nMyMuons > 1 && deltar2 < deltar1 && (nMyMuons<3 || deltar2<deltar3) && deltar2 < l2DeltaRMin) {
675  l2DeltaRMin = deltar2;
676  l2IndMatched = indm;
677  }
678  if (nMyMuons > 2 && deltar3 < deltar1 && deltar3 < deltar2 && deltar3 < l3DeltaRMin) {
679  l3DeltaRMin = deltar3;
680  l3IndMatched = indm;
681  }
682  }
683  if (nMyMuons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoMuons[l1IndMatched]->eta(), l1DeltaRMin);
684  if (nMyMuons > 1 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin);
685  if (nMyMuons > 2 && l3IndMatched < 500) fill("leptDeltaREta_", isoMuons[l3IndMatched]->eta(), l3DeltaRMin);
686  if (l1DeltaRMin < DRMIN) {
687  l1Matched = true;
688  fill("matchingMon_", 0.5 );
689  fill("leptResolution_", fabs(isoMuons[l1IndMatched]->pt()-myMuonRefs[0]->pt())/isoMuons[l1IndMatched]->pt() );
690  if (l2DeltaRMin < DRMIN) {
691  l2Matched = true;
692  fill("matchingMon_", 1.5 );
693  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() );
694  } else if (l3DeltaRMin < DRMIN) {
695  l2Matched = true;
696  fill("matchingMon_", 1.5 );
697  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
698  }
699  } else {
700  if (l2DeltaRMin < DRMIN) {
701  l1Matched = true;
702  fill("matchingMon_", 0.5 );
703  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-myMuonRefs[1]->pt())/isoMuons[l2IndMatched]->pt() );
704  if (l3DeltaRMin < DRMIN) {
705  l2Matched = true;
706  fill("matchingMon_", 1.5 );
707  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
708  }
709  }
710  if (l3DeltaRMin < DRMIN) {
711  l1Matched = true;
712  fill("matchingMon_", 0.5 );
713  fill("leptResolution_", fabs(isoMuons[l3IndMatched]->pt()-myMuonRefs[2]->pt())/isoMuons[l3IndMatched]->pt() );
714  }
715  }
716  }
717  // access to hlt elec-muon
718  electronIds_.clear(); electronRefs_.clear();
719  muonIds_.clear(); muonRefs_.clear();
720  l1DeltaRMin = 500.; l2DeltaRMin = 500.;
721  l1IndMatched = 500; l2IndMatched = 500;
722  if (kElec > 0 && kMuon > 0 && isoElecs.size()>0) {
723  const string& moduleLabelElec(moduleLabels[kElec]);
724  const string moduleTypeElec(hltConfig.moduleType(moduleLabelElec));
725 
726 // const unsigned int filterIndexElec(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
727 // triggerEventWithRefsHandle->getObjects(filterIndexElec,electronIds_,electronRefs_);
728 
730  const unsigned int filterIndexElec(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
731  rawTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
732  }
733  else{
734  const unsigned int filterIndexElec(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelElec,"",processName_)));
735  aodTriggerEvent->getObjects(filterIndexElec,electronIds_,electronRefs_);
736  }
737 
738  const unsigned int nElectrons(electronIds_.size());
739  double deltar = 600.;
740  for (unsigned int inde = 0; inde < isoElecs.size(); inde++) {
741  if (nElectrons > 0) deltar = deltaR(*electronRefs_[0],*isoElecs[inde]);
742  if (deltar < l1DeltaRMin) {
743  l1DeltaRMin = deltar;
744  l1IndMatched = inde;
745  }
746  }
747  if (nElectrons > 0 && l1IndMatched < 500) fill("leptDeltaREta_", isoElecs[l1IndMatched]->eta(), l1DeltaRMin);
748  if (l1DeltaRMin < DRMIN) {
749  l1Matched = true;
750  fill("matchingMon_", 0.5 );
751  fill("leptResolution_", fabs(isoElecs[l1IndMatched]->pt()-electronRefs_[0]->pt())/isoElecs[l1IndMatched]->pt() );
752  }
753  }
754  if (kElec > 0 && kMuon > 0 && isoMuons.size()>0) {
755  const string& moduleLabelMuon(moduleLabels[kMuon]);
756  const string moduleTypeMuon(hltConfig.moduleType(moduleLabelMuon));
757 
758 // const unsigned int filterIndexMuon(triggerEventWithRefsHandle->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
759 // triggerEventWithRefsHandle->getObjects(filterIndexMuon,muonIds_,muonRefs_);
760 
762  const unsigned int filterIndexMuon(rawTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
763  rawTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
764  }
765  else{
766  const unsigned int filterIndexMuon(aodTriggerEvent->filterIndex(edm::InputTag(moduleLabelMuon,"",processName_)));
767  aodTriggerEvent->getObjects(filterIndexMuon,muonIds_,muonRefs_);
768  }
769 
770  const unsigned int nMuons(muonIds_.size());
771  if (isoMuons.size()<1) continue;
772  double deltar = 600.;
773  for (unsigned int indm = 0; indm < isoMuons.size(); indm++) {
774  if (nMuons > 0) deltar = deltaR(*muonRefs_[0],*isoMuons[indm]);
775  if (deltar < l2DeltaRMin) {
776  l2DeltaRMin = deltar;
777  l2IndMatched = indm;
778  }
779  }
780  if (nMuons > 0 && l2IndMatched < 500) fill("leptDeltaREta_", isoMuons[l2IndMatched]->eta(), l2DeltaRMin);
781  if (l2DeltaRMin < DRMIN) {
782  l2Matched = true;
783  fill("matchingMon_", 1.5 );
784  fill("leptResolution_", fabs(isoMuons[l2IndMatched]->pt()-muonRefs_[0]->pt())/isoMuons[l2IndMatched]->pt() );
785  }
786  }
787  if (l1Matched && l2Matched) fill("matchingMon_", 2.5 );
788  }
789 // }
790 
791  }
792 
793 }
794 
795 TopDiLeptonHLTOfflineDQM::TopDiLeptonHLTOfflineDQM(const edm::ParameterSet& cfg): vertexSelect_(0), beamspotSelect_(0)
796 {
797  // configure the preselection
798  edm::ParameterSet presel=cfg.getParameter<edm::ParameterSet>("preselection");
799  if( presel.existsAs<edm::ParameterSet>("trigger") ){
800  edm::ParameterSet trigger=presel.getParameter<edm::ParameterSet>("trigger");
801  triggerTable_= consumes< edm::TriggerResults >(trigger.getParameter<edm::InputTag>("src"));
802  triggerPaths_=trigger.getParameter<std::vector<std::string> >("select");
803  }
804  if( presel.existsAs<edm::ParameterSet>("vertex" ) ){
805  edm::ParameterSet vertex=presel.getParameter<edm::ParameterSet>("vertex");
806  vertex_= consumes< std::vector<reco::Vertex> >(vertex.getParameter<edm::InputTag>("src"));
808  }
809  if( presel.existsAs<edm::ParameterSet>("beamspot" ) ){
811  beamspot_= consumes< reco::BeamSpot >(beamspot.getParameter<edm::InputTag>("src"));
813  }
814 
815  // configure the selection
816  std::vector<edm::ParameterSet> sel=cfg.getParameter<std::vector<edm::ParameterSet> >("selection");
817  for(unsigned int i=0; i<sel.size(); ++i){
818  selectionOrder_.push_back(sel.at(i).getParameter<std::string>("label"));
820  }
821 
822  for (const std::string& s: selectionOrder_) {
824 
825  if (selection_.find(key) == selection_.end())
826  continue;
827 
828  if (type == "muons"){
830  }
831  if (type == "elecs"){
833  }
834  if (type == "jets"){
836  }
837  if (type == "jets/pf"){
839  }
840  if (type == "jets/calo"){
842  }
843  if (type == "met"){
845  }
846  }
847 }
848 
849  void
851 {
852  using namespace std;
853  using namespace edm;
854 
855  bool changed(true);
856  if (!hltConfig_.init(iRun,iSetup,"*",changed)) {
857  edm::LogWarning( "TopSingleLeptonHLTOfflineDQM" )
858  << "Config extraction failure with process name "
860  << "\n";
861  return;
862  }
863 }
864 
865  void
867 {
870  if( !event.getByToken(triggerTable_, triggerTable) ) return;
871  if(!acceptHLT(event, *triggerTable, triggerPaths_)) return;
872  }
873  if(!vertex_.isUninitialized()){
875  if( !event.getByToken(vertex_, vertex) ) return;
876  if(vertex->empty() || !(*vertexSelect_)(vertex->front())) return;
877  }
878  if(!beamspot_.isUninitialized()){
880  if( !event.getByToken(beamspot_, beamspot) ) return;
881  if(!(*beamspotSelect_)(*beamspot)) return;
882  }
883  // apply selection steps
884  for(std::vector<std::string>::const_iterator selIt=selectionOrder_.begin(); selIt!=selectionOrder_.end(); ++selIt){
885  std::string key = selectionStep(*selIt), type = objectType(*selIt);
886  if(selection_.find(key)!=selection_.end()){
887 
888  if(type=="empty"){
889  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
890  continue;
891  }
892  if(type=="Hlt" ){
893  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
894  continue;
895  }
896 
897  bool passSel = true;
898 
899  for(std::vector<std::string>::const_iterator selIt2=selectionOrder_.begin(); selIt2<=selIt; ++selIt2){
900  std::string key2 = selectionStep(*selIt2), type2 = objectType(*selIt2);
901  if(selection_.find(key2)==selection_.end()) continue;
902 
903  if(type2=="Hlt" || type2=="empty" ) continue;
904  if (!selectmap_[type2]->select(event)) passSel=false;
905 
906  } // end 2nd loop
907 
908  // Apply cumulative event selection
909  if ( !passSel ) continue;
910 
911  selection_[key].second->fill(event, setup, hltConfig_, triggerPaths_);
912 
913  }
914  }
915 }
916 
917  void
919 {
920  for (auto& sel: selection_) {
921  sel.second.second->book(i);
922  }
923 }
TopDiLeptonHLTOfflineDQM(const edm::ParameterSet &cfg)
default constructor
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
tuple cfg
Definition: looper.py:293
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
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
edm::EDGetTokenT< reco::BeamSpot > beamspot_
beamspot
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
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
int elecMuLogged_
number of logged interesting events
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_
input sources for monitoring
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
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
virtual 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:91
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::map< std::string, SelectionStepHLTBase * > selectmap_
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
StringCutObjectSelector< reco::BeamSpot > * beamspotSelect_
string cut selector
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
tuple corrector
Definition: mvaPFMET_cff.py:86
Definition: MET.h:42
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
vector< PseudoJet > jets
void loggerBinLabels(std::string hist)
set labels for event logging histograms
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< std::string > diElecPaths_
trigger paths for di electron channel
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerSummaryTokenAOD
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool isValid() const
Definition: HandleBase.h:75
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::map< std::string, MonitorElement * > hists_
histogram container
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 triggerBinLabels(std::string channel, const std::vector< std::string > &labels)
set configurable labels for trigger monitoring histograms
const std::string & processName() const
process name
std::map< std::string, std::pair< edm::ParameterSet, HLTOfflineDQMTopDiLepton::MonitorDiLepton * > > selection_
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
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:78
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
bool acceptHLT(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::vector< std::string > selectionOrder_
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
tuple muons
Definition: patZpeak.py:38
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
virtual double et() const final
transverse energy
bool isUninitialized() const
Definition: EDGetToken.h:73
tuple process
Definition: LaserDQM_cfg.py:3
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
tuple size
Write out results.
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
Definition: Run.h:42
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
StringCutObjectSelector< reco::Vertex > * vertexSelect_
string cut selector