CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
EwkElecDQM Class Reference

#include <EwkElecDQM.h>

Inheritance diagram for EwkElecDQM:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 EwkElecDQM (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
double calcDeltaPhi (double phi1, double phi2)
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endRun (const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotTag_
 
MonitorElementdetainbarrel_after_
 
MonitorElementdetainbarrel_before_
 
double detainCutBarrel_
 
double detainCutEndcap_
 
MonitorElementdetainendcap_after_
 
MonitorElementdetainendcap_before_
 
MonitorElementecalisobarrel_after_
 
MonitorElementecalisobarrel_before_
 
double ecalIsoCutBarrel_
 
double ecalIsoCutEndcap_
 
MonitorElementecalisoendcap_after_
 
MonitorElementecalisoendcap_before_
 
double eJetMin_
 
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecTag_
 
const std::vector< std::string > elecTrig_
 
MonitorElementeta_after_
 
MonitorElementeta_before_
 
double etaCut_
 
MonitorElementhcalisobarrel_after_
 
MonitorElementhcalisobarrel_before_
 
double hcalIsoCutBarrel_
 
double hcalIsoCutEndcap_
 
MonitorElementhcalisoendcap_after_
 
MonitorElementhcalisoendcap_before_
 
HLTPrescaleProvider hltPrescaleProvider_
 
MonitorElementinvmass_after_
 
MonitorElementinvmass_before_
 
MonitorElementinvmassPU_afterZ_
 
MonitorElementinvmassPU_before_
 
bool isValidHltConfig_
 
MonitorElementjet_et_after_
 
MonitorElementjet_et_before_
 
MonitorElementjet_eta_after_
 
MonitorElementjet_eta_before_
 
edm::InputTag jetTag_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
 
MonitorElementmet_after_
 
MonitorElementmet_before_
 
bool metIncludesMuons_
 
double metMax_
 
double metMin_
 
edm::InputTag metTag_
 
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
 
MonitorElementmt_after_
 
MonitorElementmt_before_
 
double mtMax_
 
double mtMin_
 
unsigned int nall
 
unsigned int neid
 
MonitorElementnelectrons_after_
 
MonitorElementnelectrons_before_
 
unsigned int nGoodElectrons
 
unsigned int niso
 
int nJetMax_
 
MonitorElementnjets_after_
 
MonitorElementnjets_before_
 
MonitorElementnpvs_afterZ_
 
MonitorElementnpvs_before_
 
unsigned int nrec
 
unsigned int nsel
 
MonitorElementpt_after_
 
MonitorElementpt_before_
 
double ptCut_
 
unsigned int PUBinCount_
 
unsigned int PUMax_
 
MonitorElementsieiebarrel_after_
 
MonitorElementsieiebarrel_before_
 
double sieieCutBarrel_
 
double sieieCutEndcap_
 
MonitorElementsieieendcap_after_
 
MonitorElementsieieendcap_before_
 
MonitorElementtrig_after_
 
MonitorElementtrig_before_
 
edm::EDGetTokenT< edm::TriggerResultstrigTag_
 
MonitorElementtrkisobarrel_after_
 
MonitorElementtrkisobarrel_before_
 
double trkIsoCutBarrel_
 
double trkIsoCutEndcap_
 
MonitorElementtrkisoendcap_after_
 
MonitorElementtrkisoendcap_before_
 
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexTag_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

DQM offline for EWK Electrons

Definition at line 29 of file EwkElecDQM.h.

Constructor & Destructor Documentation

EwkElecDQM::EwkElecDQM ( const edm::ParameterSet cfg)

Definition at line 37 of file EwkElecDQM.cc.

References isValidHltConfig_.

38  :
39  // Input collections
41  edm::InputTag("met"))),
43  "JetTag", edm::InputTag("sisCone5CaloJets"))),
44 // trigTag_(consumes<edm::TriggerResults>(
45  // cfg.getUntrackedParameter<edm::InputTag>(
46  // "TrigTag", edm::InputTag("TriggerResults::HLT")))),
49  "ElecTag", edm::InputTag("gsfElectrons")))),
52  edm::InputTag("met")))),
55  "JetTag", edm::InputTag("sisCone5CaloJets")))),
58  "VertexTag", edm::InputTag("offlinePrimaryVertices")))),
60  consumes<reco::BeamSpot>(cfg.getUntrackedParameter<edm::InputTag>(
61  "BeamSpotTag", edm::InputTag("BeamSpot")))),
62 
63  // Main cuts
64  // muonTrig_(cfg.getUntrackedParameter<std::string> ("MuonTrig",
65  // "HLT_Mu9")),
66  // elecTrig_(cfg.getUntrackedParameter<std::vector< std::string >
67  // >("ElecTrig", "HLT_Ele10_SW_L1R")),
68  elecTrig_(
69  cfg.getUntrackedParameter<std::vector<std::string> >("ElecTrig")),
70  // ptCut_(cfg.getUntrackedParameter<double>("PtCut", 25.)),
71  ptCut_(cfg.getUntrackedParameter<double>("PtCut", 10.)),
72  // etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.1)),
73  etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.4)),
74  sieieCutBarrel_(cfg.getUntrackedParameter<double>("SieieBarrel", 0.01)),
75  sieieCutEndcap_(cfg.getUntrackedParameter<double>("SieieEndcap", 0.028)),
77  cfg.getUntrackedParameter<double>("DetainBarrel", 0.0071)),
79  cfg.getUntrackedParameter<double>("DetainEndcap", 0.0066)),
80  // isRelativeIso_(cfg.getUntrackedParameter<bool>("IsRelativeIso",
81  // true)),
82  // isCombinedIso_(cfg.getUntrackedParameter<bool>("IsCombinedIso",
83  // false)),
84  // isoCut03_(cfg.getUntrackedParameter<double>("IsoCut03", 0.1)),
86  cfg.getUntrackedParameter<double>("EcalIsoCutBarrel", 5.7)),
88  cfg.getUntrackedParameter<double>("EcalIsoCutEndcap", 5.0)),
90  cfg.getUntrackedParameter<double>("HcalIsoCutBarrel", 8.1)),
92  cfg.getUntrackedParameter<double>("HcalIsoCutEndcap", 3.4)),
94  cfg.getUntrackedParameter<double>("TrkIsoCutBarrel", 7.2)),
96  cfg.getUntrackedParameter<double>("TrkIsoCutEndcap", 5.1)),
97  mtMin_(cfg.getUntrackedParameter<double>("MtMin", -999999)),
98  mtMax_(cfg.getUntrackedParameter<double>("MtMax", 999999.)),
99  metMin_(cfg.getUntrackedParameter<double>("MetMin", -999999.)),
100  metMax_(cfg.getUntrackedParameter<double>("MetMax", 999999.)),
101  // acopCut_(cfg.getUntrackedParameter<double>("AcopCut", 2.)),
102 
103  // Muon quality cuts
104  // dxyCut_(cfg.getUntrackedParameter<double>("DxyCut", 0.2)),
105  // normalizedChi2Cut_(cfg.getUntrackedParameter<double>("NormalizedChi2Cut",
106  // 10.)),
107  // trackerHitsCut_(cfg.getUntrackedParameter<int>("TrackerHitsCut",
108  // 11)),
109  // isAlsoTrackerMuon_(cfg.getUntrackedParameter<bool>("IsAlsoTrackerMuon",
110  // true)),
111 
112  // Z rejection
113  // ptThrForZ1_(cfg.getUntrackedParameter<double>("PtThrForZ1", 20.)),
114  // ptThrForZ2_(cfg.getUntrackedParameter<double>("PtThrForZ2", 10.)),
115 
116  // Top rejection
117  eJetMin_(cfg.getUntrackedParameter<double>("EJetMin", 999999.)),
118  nJetMax_(cfg.getUntrackedParameter<int>("NJetMax", 999999)),
119  PUMax_(cfg.getUntrackedParameter<unsigned int>("PUMax", 60)),
120  PUBinCount_(cfg.getUntrackedParameter<unsigned int>("PUBinCount", 12)),
122  // caloJetCollection_(cfg.getUntrackedParameter<edm:InputTag>("CaloJetCollection","sisCone5CaloJets"))
123 {
124  isValidHltConfig_ = false;
125 }
T getUntrackedParameter(std::string const &, T const &) const
double metMax_
Definition: EwkElecDQM.h:77
double sieieCutBarrel_
Definition: EwkElecDQM.h:59
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
Definition: EwkElecDQM.h:51
edm::InputTag jetTag_
Definition: EwkElecDQM.h:45
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
double ecalIsoCutEndcap_
Definition: EwkElecDQM.h:69
double detainCutEndcap_
Definition: EwkElecDQM.h:62
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecTag_
Definition: EwkElecDQM.h:47
double metMin_
Definition: EwkElecDQM.h:76
double trkIsoCutEndcap_
Definition: EwkElecDQM.h:73
unsigned int PUBinCount_
Definition: EwkElecDQM.h:92
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
int nJetMax_
Definition: EwkElecDQM.h:89
double ecalIsoCutBarrel_
Definition: EwkElecDQM.h:68
double trkIsoCutBarrel_
Definition: EwkElecDQM.h:72
edm::InputTag metTag_
Definition: EwkElecDQM.h:44
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
Definition: EwkElecDQM.h:49
unsigned int PUMax_
Definition: EwkElecDQM.h:92
double etaCut_
Definition: EwkElecDQM.h:57
double hcalIsoCutBarrel_
Definition: EwkElecDQM.h:70
bool isValidHltConfig_
Definition: EwkElecDQM.h:94
double sieieCutEndcap_
Definition: EwkElecDQM.h:60
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexTag_
Definition: EwkElecDQM.h:50
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: EwkElecDQM.h:48
double eJetMin_
Definition: EwkElecDQM.h:88
double mtMax_
Definition: EwkElecDQM.h:75
double detainCutBarrel_
Definition: EwkElecDQM.h:61
const std::vector< std::string > elecTrig_
Definition: EwkElecDQM.h:55
HLTPrescaleProvider hltPrescaleProvider_
Definition: EwkElecDQM.h:95
double hcalIsoCutEndcap_
Definition: EwkElecDQM.h:71
double mtMin_
Definition: EwkElecDQM.h:74
double ptCut_
Definition: EwkElecDQM.h:56

Member Function Documentation

void EwkElecDQM::analyze ( const edm::Event ev,
const edm::EventSetup iSet 
)
overrideprotectedvirtual

Definition at line 380 of file EwkElecDQM.cc.

References beamSpotTag_, calcDeltaPhi(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), detainbarrel_after_, detainbarrel_before_, detainCutBarrel_, detainCutEndcap_, detainendcap_after_, detainendcap_before_, reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), reco::GsfElectron::dr04TkSumPt(), ecalisobarrel_after_, ecalisobarrel_before_, ecalIsoCutBarrel_, ecalIsoCutEndcap_, ecalisoendcap_after_, ecalisoendcap_before_, eJetMin_, elecTag_, metsig::electron, ElectronMcFakeValidator_cfi::electronCollection, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), PVValHelper::eta, reco::LeafCandidate::eta(), eta_after_, eta_before_, etaCut_, MonitorElement::Fill(), edm::Event::getByToken(), hcalisobarrel_after_, hcalisobarrel_before_, hcalIsoCutBarrel_, hcalIsoCutEndcap_, hcalisoendcap_after_, hcalisoendcap_before_, hltPrescaleProvider_, mps_fire::i, invmass_after_, invmass_before_, invmassPU_afterZ_, invmassPU_before_, gedGsfElectrons_cfi::isBarrel, GeomDetEnumerators::isEndcap(), reco::Vertex::isValid(), metsig::jet, jet_et_after_, jet_et_before_, jet_eta_after_, jet_eta_before_, jetToken_, LogTrace, reco::LeafCandidate::massSqr(), RazorAnalyzer::met, met_after_, met_before_, MT2Analyzer::metCollection, metMax_, metMin_, metToken_, mt_after_, mt_before_, mtMax_, mtMin_, nall, neid, nelectrons_after_, nelectrons_before_, nGoodElectrons, niso, nJetMax_, njets_after_, njets_before_, npvs_afterZ_, npvs_before_, nrec, nsel, reco::LeafCandidate::phi(), HLTPrescaleProvider::prescaleSet(), EnergyCorrector::pt, reco::LeafCandidate::pt(), pt_after_, pt_before_, ptCut_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), sieiebarrel_after_, sieiebarrel_before_, sieieCutBarrel_, sieieCutEndcap_, sieieendcap_after_, sieieendcap_before_, reco::GsfElectron::sigmaIetaIeta(), mathSSE::sqrt(), trkisobarrel_after_, trkisobarrel_before_, trkIsoCutBarrel_, trkIsoCutEndcap_, trkisoendcap_after_, trkisoendcap_before_, particleFlowSuperClusterECAL_cfi::vertexCollection, and vertexTag_.

380  {
381 
382  // Reset global event selection flags
383  bool rec_sel = false;
384  bool eid_sel = false;
385  bool iso_sel = false;
386  bool all_sel = false;
387 
388  // Electron collection
390  if (!ev.getByToken(elecTag_, electronCollection)) {
391  // LogWarning("") << ">>> Electron collection does not exist !!!";
392  return;
393  }
394  unsigned int electronCollectionSize = electronCollection->size();
395 
396  // Beam spot
397  Handle<reco::BeamSpot> beamSpotHandle;
398  if (!ev.getByToken(beamSpotTag_, beamSpotHandle)) {
399  // LogWarning("") << ">>> No beam spot found !!!";
400  return;
401  }
402 
403  // MET
404  double met_px = 0.;
405  double met_py = 0.;
407  if (!ev.getByToken(metToken_, metCollection)) {
408  // LogWarning("") << ">>> MET collection does not exist !!!";
409  return;
410  }
411 
412  const MET& met = metCollection->at(0);
413  met_px = met.px();
414  met_py = met.py();
415  // if (!metIncludesMuons_) {
416  // for (unsigned int i=0; i<muonCollectionSize; i++) {
417  // const Muon& mu = muonCollection->at(i);
418  // if (!mu.isGlobalMuon()) continue;
419  // met_px -= mu.px();
420  // met_py -= mu.py();
421  // }
422  // }
423  double met_et = sqrt(met_px * met_px + met_py * met_py);
424  LogTrace("") << ">>> MET, MET_px, MET_py: " << met_et << ", " << met_px
425  << ", " << met_py << " [GeV]";
426  met_before_->Fill(met_et);
427 
428  // Vertices in the event
429  int npvCount = 0;
431  if (!ev.getByToken(vertexTag_, vertexCollection)) {
432  LogError("") << ">>> Vertex collection does not exist !!!";
433  return;
434  }
435 
436  for (unsigned int i = 0; i < vertexCollection->size(); i++) {
437  const Vertex& vertex = vertexCollection->at(i);
438  if (vertex.isValid()) npvCount++;
439  }
440  npvs_before_->Fill(npvCount);
441 
442  // Trigger
443  // Handle<TriggerResults> triggerResults;
444  // if (!ev.getByToken(trigTag_, triggerResults)) {
445  // LogWarning("") << ">>> TRIGGER collection does not exist !!!";
446  return;
447  // }
448  // const edm::TriggerNames& trigNames = ev.triggerNames(*triggerResults);
449  // bool trigger_fired = false;
450 
451  // HLTConfigProvider const& hltConfigProvider = hltPrescaleProvider_.hltConfigProvider();
452 
453  /* very old code
454  for (unsigned int i=0; i<triggerResults->size(); i++) {
455  if (triggerResults->accept(i)) {
456  LogTrace("") << "Accept by: " << i << ", Trigger: " <<
457  trigNames.triggerName(i);
458  }
459  }
460  */
461 
462  // the following gives error on CRAFT08 data where itrig1=19 (vector index out
463  // of range)
464  /*
465  int itrig1 = trigNames.triggerIndex(muonTrig_);
466  if (triggerResults->accept(itrig1)) trigger_fired = true;
467  */
468  // suggested replacement: lm250909
469  /* Fix buggy trigger logic
470  for (unsigned int i=0; i<triggerResults->size(); i++)
471  {
472  std::string trigName = trigNames.triggerName(i);
473  bool found=false;
474 
475 // for (unsigned int j = 0; j < elecTrig_.size(); j++)
476 // {
477 // if ( trigName == elecTrig_.at(j) && triggerResults->accept(i))
478 // {
479 // trigger_fired = true;
480 // }
481 // }
482 
483 
484  for(unsigned int index=0; index<elecTrig_.size() && found==false; index++)
485 {
486  size_t trigPath = trigName.find(elecTrig_.at(index)); // 0 if found, pos
487 if not
488  if (trigPath==0) found=true;
489  }
490  if(!found) continue;
491 
492  bool prescaled=false;
493  for (unsigned int ps= 0; ps< hltConfigProvider.prescaleSize();
494 ps++){
495  const unsigned int prescaleValue =
496 hltConfigProvider.prescaleValue(ps, trigName) ;
497  if (prescaleValue != 1) prescaled =true;
498  }
499 
500  if(triggerResults->accept(i) && !prescaled) trigger_fired=true;
501 
502  }
503  */
504 
505  // get the prescale set for this event
506  const int prescaleSet = hltPrescaleProvider_.prescaleSet(ev, iSet);
507  if (prescaleSet == -1) {
508  LogTrace("") << "Failed to determine prescaleSet\n";
509  // std::cout << "Failed to determine prescaleSet. Check cmsRun GlobalTag\n";
510  return;
511  }
512 
513  // for (unsigned int i = 0;
514  // (i < triggerResults->size()) && (trigger_fired == false); i++) {
515  // skip trigger, if it did not fire
516  // if (!triggerResults->accept(i)) continue;
517 
518  // skip trigger, if it is not on our list
519  // bool found = false;
520  // const std::string trigName = trigNames.triggerName(i);
521  // for (unsigned int index = 0; index < elecTrig_.size() && found == false;
522  // index++) {
523  // if (trigName.find(elecTrig_.at(index)) == 0) found = true;
524  // }
525  // if (!found) continue;
526 
527  // skip trigger, if it is prescaled
528  // if (hltConfigProvider.prescaleValue(prescaleSet, trigName) != 1) continue;
529 
530  // std::cout << "found unprescaled trigger that fired: " << trigName <<
531  // "\n";
532  // trigger_fired = true;
533  // }
534 
535 /* LogTrace("") << ">>> Trigger bit: " << trigger_fired << " for one of ( ";
536  for (unsigned int k = 0; k < elecTrig_.size(); k++) {
537  LogTrace("") << elecTrig_.at(k) << " ";
538  }
539  LogTrace("") << ")";
540  trig_before_->Fill(trigger_fired);
541 */
542  // Jet collection
543  Handle<View<Jet> > jetCollection;
544  if (!ev.getByToken(jetToken_, jetCollection)) {
545  // LogError("") << ">>> JET collection does not exist !!!";
546  return;
547  }
548  float electron_et = -8.0;
549  float electron_eta = -8.0;
550  float electron_phi = -8.0;
551  float electron2_et = -9.0;
552  float electron2_eta = -9.0;
553  float electron2_phi = -9.0;
554  // need to get some electron info so jets can be cleaned of them
555  for (unsigned int i = 0; i < electronCollectionSize; i++) {
556  const GsfElectron& elec = electronCollection->at(i);
557 
558  if (i < 1) {
559  electron_et = elec.pt();
560  electron_eta = elec.eta();
561  electron_phi = elec.phi();
562  }
563  if (i == 2) {
564  electron2_et = elec.pt();
565  electron2_eta = elec.eta();
566  electron2_phi = elec.phi();
567  }
568  }
569 
570  float jet_et = -8.0;
571  float jet_eta = -8.0;
572  int jet_count = 0;
573  float jet2_et = -9.0;
574  unsigned int jetCollectionSize = jetCollection->size();
575  int njets = 0;
576  for (unsigned int i = 0; i < jetCollectionSize; i++) {
577  const Jet& jet = jetCollection->at(i);
578 
579  float jet_current_et = jet.et();
580  // cout << "jet_current_et " << jet_current_et << endl;
581  // if it overlaps with electron, it is not a jet
582  if (electron_et > 0.0 && fabs(jet.eta() - electron_eta) < 0.2 &&
583  calcDeltaPhi(jet.phi(), electron_phi) < 0.2)
584  continue;
585  if (electron2_et > 0.0 && fabs(jet.eta() - electron2_eta) < 0.2 &&
586  calcDeltaPhi(jet.phi(), electron2_phi) < 0.2)
587  continue;
588 
589  // if it has too low Et, throw away
590  // if (jet_current_et < eJetMin_) continue; //Keep if only want to plot
591  // above jet cut
592 
593  if (jet.et() > eJetMin_) {
594  njets++;
595  jet_count++;
596  }
597  if (jet_current_et > jet_et) {
598  jet2_et = jet_et; // 2nd highest jet get's et from current highest
599  jet_et = jet.et(); // current highest jet gets et from the new highest
600  jet_eta = jet.eta();
601  } else if (jet_current_et > jet2_et) {
602  jet2_et = jet.et();
603  }
604  }
605 
606  // Fill After all electron cuts (or both before and after)
607  if (jet_et > 10) // don't want low energy "jets"
608  {
609  jet_et_before_->Fill(jet_et);
610  // jet2_et_before_ ->Fill(jet2_et);
611  jet_eta_before_->Fill(jet_eta);
612  }
613 
614  LogTrace("") << ">>> Total number of jets: " << jetCollectionSize;
615  LogTrace("") << ">>> Number of jets above " << eJetMin_
616  << " [GeV]: " << njets;
617  njets_before_->Fill(njets);
618 
619  // Start counting
620  nall++;
621 
622  // Histograms per event should be done only once, so keep track of them
623  //bool hlt_hist_done = false;
624  // bool minv_hist_done = false;
625  bool met_hist_done = false;
626  // bool nz1_hist_done = false;
627  // bool nz2_hist_done = false;
628  bool njets_hist_done = false;
629 
630  // Central selection criteria
631  // const int NFLAGS = 13; // number of individual selection criteria
632  const int NFLAGS = 10; // number of individual selection criteria
633  // 0: pt cut | rec
634  // 1: eta cut | rec
635  // 2: sieie | eid
636  // 3: detain | eid
637  // 4: ecal iso | iso
638  // 5: hcal iso | iso
639  // 6: trk iso | iso
640  // 7: trigger fired | hlt/all
641  bool electron_sel[NFLAGS];
642 
643  // for invariant mass calculation
644  // keep track of highest-pt electrons for initial (RECO) electrons
645  // and "good" electrons (passing all cuts)
646  // first array dimension is for first or second good electron
647  // second array dimension is for relevant quantities of good electron
648  // [0]: 1 for electron found or 0 for not found (if 0, no other quantities
649  // filled)
650  // [1]: mSqr
651  // [2]: E
652  // [3]: px
653  // [4]: py
654  // [5]: pz
655  // inv mass = sqrt(m_1^2 + m_2^2 + 2*(E_1*E_2 - (px1*px2 + py1*py2 + pz1+pz2)
656  // ) )
657  double electron[2][6];
658  double goodElectron[2][6];
659  nGoodElectrons = 0;
660  for (unsigned int i = 0; i < 2; i++) {
661  for (unsigned int j = 0; j < 6; j++) {
662  electron[i][j] = 0.;
663  goodElectron[i][j] = 0.;
664  }
665  }
666 
667  for (unsigned int i = 0; i < electronCollectionSize; i++) {
668  for (int j = 0; j < NFLAGS; ++j) {
669  electron_sel[j] = false;
670  }
671 
672  const GsfElectron& elec = electronCollection->at(i);
673  // if (!mu.isGlobalMuon()) continue;
674  // if (mu.globalTrack().isNull()) continue;
675  // if (mu.innerTrack().isNull()) continue;
676 
677  LogTrace("") << "> elec: processing electron number " << i << "...";
678  // reco::TrackRef gm = mu.globalTrack();
679  // reco::TrackRef tk = mu.innerTrack();
680  // should have stuff for electron track?
681 
682  if (i < 2) {
683  electron[i][0] = 1.;
684  electron[i][1] = elec.massSqr();
685  electron[i][2] = elec.energy();
686  electron[i][3] = elec.px();
687  electron[i][4] = elec.py();
688  electron[i][5] = elec.pz();
689  }
690 
691  // Pt,eta cuts
692  double pt = elec.pt();
693  double px = elec.px();
694  double py = elec.py();
695  double eta = elec.eta();
696  LogTrace("") << "\t... pt, eta: " << pt << " [GeV], " << eta;
697  ;
698  if (pt > ptCut_) electron_sel[0] = true;
699  if (fabs(eta) < etaCut_) electron_sel[1] = true;
700 
701  bool isBarrel = false;
702  bool isEndcap = false;
703  if (eta < 1.4442 && eta > -1.4442) {
704  isBarrel = true;
705  } else if ((eta > 1.56 && eta < 2.4) || (eta < -1.56 && eta > -2.4)) {
706  isEndcap = true;
707  }
708 
709  // // d0, chi2, nhits quality cuts
710  // double dxy = tk->dxy(beamSpotHandle->position());
711  // double normalizedChi2 = gm->normalizedChi2();
712  // double trackerHits = tk->numberOfValidHits();
713  // LogTrace("") << "\t... dxy, normalizedChi2, trackerHits,
714  // isTrackerMuon?: " << dxy << " [cm], " << normalizedChi2 << ", " <<
715  // trackerHits << ", " << mu.isTrackerMuon();
716  // if (fabs(dxy)<dxyCut_) muon_sel[2] = true;
717  // if (normalizedChi2<normalizedChi2Cut_) muon_sel[3] = true;
718  // if (trackerHits>=trackerHitsCut_) muon_sel[4] = true;
719  // if (mu.isTrackerMuon()) muon_sel[5] = true;
720 
721  pt_before_->Fill(pt);
722  eta_before_->Fill(eta);
723  // dxy_before_->Fill(dxy);
724  // chi2_before_->Fill(normalizedChi2);
725  // nhits_before_->Fill(trackerHits);
726  // tkmu_before_->Fill(mu.isTrackerMuon());
727 
728  // Electron ID cuts
729  double sieie = (double)elec.sigmaIetaIeta();
730  double detain =
731  (double)elec.deltaEtaSuperClusterTrackAtVtx(); // think this is detain
732  if (sieie < sieieCutBarrel_ && isBarrel) electron_sel[2] = true;
733  if (sieie < sieieCutEndcap_ && isEndcap) electron_sel[2] = true;
734  if (detain < detainCutBarrel_ && isBarrel) electron_sel[3] = true;
735  if (detain < detainCutEndcap_ && isEndcap) electron_sel[3] = true;
736  if (isBarrel) {
737  LogTrace("") << "\t... sieie value " << sieie << " (barrel), pass? "
738  << electron_sel[2];
739  LogTrace("") << "\t... detain value " << detain << " (barrel), pass? "
740  << electron_sel[3];
741  } else if (isEndcap) {
742  LogTrace("") << "\t... sieie value " << sieie << " (endcap), pass? "
743  << electron_sel[2];
744  LogTrace("") << "\t... detain value " << detain << " (endcap), pass? "
745  << electron_sel[2];
746  }
747 
748  if (isBarrel) {
749  sieiebarrel_before_->Fill(sieie);
750  detainbarrel_before_->Fill(detain);
751  } else if (isEndcap) {
752  sieieendcap_before_->Fill(sieie);
753  detainendcap_before_->Fill(detain);
754  }
755 
756  // Isolation cuts
757  // double isovar = mu.isolationR03().sumPt;
758  double ecalisovar = elec.dr03EcalRecHitSumEt(); // picked one set!
759  double hcalisovar = elec.dr03HcalTowerSumEt(); // try others if
760  double trkisovar = elec.dr04TkSumPt(); // doesn't work
761  // if (isCombinedIso_) {
762  // isovar += mu.isolationR03().emEt;
763  // isovar += mu.isolationR03().hadEt;
764  //}
765  // if (isRelativeIso_) isovar /= pt;
766  if (ecalisovar < ecalIsoCutBarrel_ && isBarrel) electron_sel[4] = true;
767  if (ecalisovar < ecalIsoCutEndcap_ && isEndcap) electron_sel[4] = true;
768  if (hcalisovar < hcalIsoCutBarrel_ && isBarrel) electron_sel[5] = true;
769  if (hcalisovar < hcalIsoCutEndcap_ && isEndcap) electron_sel[5] = true;
770  if (trkisovar < trkIsoCutBarrel_ && isBarrel) electron_sel[6] = true;
771  if (trkisovar < trkIsoCutEndcap_ && isEndcap) electron_sel[6] = true;
772  if (isBarrel) {
773  LogTrace("") << "\t... ecal isolation value " << ecalisovar
774  << " (barrel), pass? " << electron_sel[4];
775  LogTrace("") << "\t... hcal isolation value " << hcalisovar
776  << " (barrel), pass? " << electron_sel[5];
777  LogTrace("") << "\t... trk isolation value " << trkisovar
778  << " (barrel), pass? " << electron_sel[6];
779  } else if (isEndcap) {
780  LogTrace("") << "\t... ecal isolation value " << ecalisovar
781  << " (endcap), pass? " << electron_sel[4];
782  LogTrace("") << "\t... hcal isolation value " << hcalisovar
783  << " (endcap), pass? " << electron_sel[5];
784  LogTrace("") << "\t... trk isolation value " << trkisovar
785  << " (endcap), pass? " << electron_sel[6];
786  }
787 
788  // iso_before_->Fill(isovar);
789  if (isBarrel) {
790  ecalisobarrel_before_->Fill(ecalisovar);
791  hcalisobarrel_before_->Fill(hcalisovar);
792  trkisobarrel_before_->Fill(trkisovar);
793  } else if (isEndcap) {
794  ecalisoendcap_before_->Fill(ecalisovar);
795  hcalisoendcap_before_->Fill(hcalisovar);
796  trkisoendcap_before_->Fill(trkisovar);
797  }
798 
799  // HLT
800  // if (trigger_fired) electron_sel[7] = true;
801 
802  // // MET/MT cuts
803  double w_et = met_et + pt;
804  double w_px = met_px + px;
805  double w_py = met_py + py;
806 
807  double massT = w_et * w_et - w_px * w_px - w_py * w_py;
808  massT = (massT > 0) ? sqrt(massT) : 0;
809 
810  LogTrace("") << "\t... W mass, W_et, W_px, W_py: " << massT << ", " << w_et
811  << ", " << w_px << ", " << w_py << " [GeV]";
812  if (massT > mtMin_ && massT < mtMax_) electron_sel[7] = true;
813  mt_before_->Fill(massT);
814  if (met_et > metMin_ && met_et < metMax_) electron_sel[8] = true;
815 
816  // // Acoplanarity cuts
817  // Geom::Phi<double> deltaphi(mu.phi()-atan2(met_py,met_px));
818  // double acop = deltaphi.value();
819  // if (acop<0) acop = - acop;
820  // acop = M_PI - acop;
821  // LogTrace("") << "\t... acoplanarity: " << acop;
822  // if (acop<acopCut_) muon_sel[10] = true;
823  // acop_before_->Fill(acop);
824 
825  // // Remaining flags (from global event information)
826  // if (nmuonsForZ1<1 || nmuonsForZ2<2) muon_sel[11] = true;
827  if (njets <= nJetMax_) electron_sel[9] = true;
828 
829  // Collect necessary flags "per electron"
830  int flags_passed = 0;
831  bool rec_sel_this = true;
832  bool eid_sel_this = true;
833  bool iso_sel_this = true;
834  bool all_sel_this = true;
835  for (int j = 0; j < NFLAGS; ++j) {
836  if (electron_sel[j]) flags_passed += 1;
837  if (j < 2 && !electron_sel[j]) rec_sel_this = false;
838  if (j < 4 && !electron_sel[j]) eid_sel_this = false;
839  if (j < 7 && !electron_sel[j]) iso_sel_this = false;
840  if (!electron_sel[j]) all_sel_this = false;
841  }
842 
843  if (all_sel_this) {
844  if (nGoodElectrons < 2) {
845  goodElectron[nGoodElectrons][0] = 1.;
846  goodElectron[nGoodElectrons][1] = elec.massSqr();
847  goodElectron[nGoodElectrons][2] = elec.energy();
848  goodElectron[nGoodElectrons][3] = elec.px();
849  goodElectron[nGoodElectrons][4] = elec.py();
850  goodElectron[nGoodElectrons][5] = elec.pz();
851  }
852  nGoodElectrons++;
853  }
854 
855  // // "rec" => pt,eta and quality cuts are satisfied
856  // if (rec_sel_this) rec_sel = true;
857  // // "iso" => "rec" AND "muon is isolated"
858  // if (iso_sel_this) iso_sel = true;
859  // // "hlt" => "iso" AND "event is triggered"
860  // if (hlt_sel_this) hlt_sel = true;
861  // // "all" => "met" AND "Z/top rejection cuts"
862  // if (all_sel_this) all_sel = true;
863 
864  // "rec" => pt,eta cuts are satisfied
865  if (rec_sel_this) rec_sel = true;
866  // "eid" => "rec" AND "electron passes ID"
867  if (eid_sel_this) iso_sel = true;
868  // "iso" => "eid" AND "electron is isolated"
869  if (iso_sel_this) iso_sel = true;
870  // "met" => "iso" AND "MET/MT"
871  // "all" => "met" AND "event is triggered"
872  if (all_sel_this) all_sel = true;
873 
874  // Do N-1 histograms now (and only once for global event quantities)
875  if (flags_passed >= (NFLAGS - 1)) {
876  if (!electron_sel[0] || flags_passed == NFLAGS) {
877  pt_after_->Fill(pt);
878  }
879  if (!electron_sel[1] || flags_passed == NFLAGS) {
880  eta_after_->Fill(eta);
881  }
882  if (!electron_sel[2] || flags_passed == NFLAGS) {
883  if (isBarrel) {
884  sieiebarrel_after_->Fill(sieie);
885  } else if (isEndcap) {
886  sieieendcap_after_->Fill(sieie);
887  }
888  }
889  if (!electron_sel[3] || flags_passed == NFLAGS) {
890  if (isBarrel) {
891  detainbarrel_after_->Fill(detain);
892  } else if (isEndcap) {
893  detainendcap_after_->Fill(detain);
894  }
895  }
896  if (!electron_sel[4] || flags_passed == NFLAGS) {
897  if (isBarrel) {
898  ecalisobarrel_after_->Fill(ecalisovar);
899  } else if (isEndcap) {
900  ecalisoendcap_after_->Fill(ecalisovar);
901  }
902  }
903  if (!electron_sel[5] || flags_passed == NFLAGS) {
904  if (isBarrel) {
905  hcalisobarrel_after_->Fill(hcalisovar);
906  } else if (isEndcap) {
907  hcalisoendcap_after_->Fill(hcalisovar);
908  }
909  }
910  if (!electron_sel[6] || flags_passed == NFLAGS) {
911  if (isBarrel) {
912  trkisobarrel_after_->Fill(trkisovar);
913  } else if (isEndcap) {
914  trkisoendcap_after_->Fill(trkisovar);
915  }
916  }
917  // if (!electron_sel[3] || flags_passed==NFLAGS)
918  // {
919  // detain_after_->Fill(detain);
920  // }
921  // if (!electron_sel[4] || flags_passed==NFLAGS)
922  // {
923  // ecaliso_after_->Fill(trackerHits);
924  // }
925  // if (!electron_sel[5] || flags_passed==NFLAGS)
926  // {
927  // tkelectr_after_->Fill(electr.isTrackerElectron());
928  // }
929  // if (!electron_sel[6] || flags_passed==NFLAGS)
930  // {
931  // iso_after_->Fill(isovar);
932  // }
933  /* if (!electron_sel[7] || flags_passed == NFLAGS) {
934  if (!hlt_hist_done) {
935  trig_after_->Fill(trigger_fired);
936  }
937  }*/
938  //hlt_hist_done = true;
939  if (!electron_sel[7] || flags_passed == NFLAGS) {
940  mt_after_->Fill(massT);
941  }
942  if (!electron_sel[8] || flags_passed == NFLAGS) {
943  if (!met_hist_done) {
944  met_after_->Fill(met_et);
945  }
946  }
947  met_hist_done = true;
948  // if (!muon_sel[10] || flags_passed==NFLAGS)
949  // acop_after_->Fill(acop);
950  // if (!muon_sel[11] || flags_passed==NFLAGS)
951  // if (!nz1_hist_done)
952  // nz1_after_->Fill(nmuonsForZ1);
953  // nz1_hist_done = true;
954  // if (!muon_sel[11] || flags_passed==NFLAGS)
955  // if (!nz2_hist_done)
956  // nz2_after_->Fill(nmuonsForZ2);
957  // nz2_hist_done = true;
958  if (!electron_sel[9] || flags_passed == NFLAGS) {
959  if (!njets_hist_done) {
960  njets_after_->Fill(njets);
961  if (jet_et > 10) // don't want low energy "jets"
962  {
963  jet_et_after_->Fill(jet_et);
964  jet_eta_after_->Fill(jet_eta);
965  }
966  }
967  }
968  njets_hist_done = true;
969 
970  } // end N-1 histos block
971 
972  } // end loop through electrons
973 
974  // inv mass = sqrt(m_1^2 + m_2^2 + 2*(E_1*E_2 - (px1*px2 + py1*py2 + pz1+pz2)
975  // ) )
976  double invMass = 0;
977 
978  nelectrons_before_->Fill(electronCollectionSize);
979  if (electronCollectionSize > 1) {
980  invMass = sqrt(electron[0][1] + electron[1][1] +
981  2 * (electron[0][2] * electron[1][2] -
982  (electron[0][3] * electron[1][3] +
983  electron[0][4] * electron[1][4] +
984  electron[0][5] * electron[1][5])));
985  invmass_before_->Fill(invMass);
986  invmassPU_before_->Fill(invMass, npvCount);
987  }
988 
990  if (nGoodElectrons > 1) {
991  invMass = sqrt(goodElectron[0][1] + goodElectron[1][1] +
992  2 * (goodElectron[0][2] * goodElectron[1][2] -
993  (goodElectron[0][3] * goodElectron[1][3] +
994  goodElectron[0][4] * goodElectron[1][4] +
995  goodElectron[0][5] * goodElectron[1][5])));
996  invmass_after_->Fill(invMass);
997  invmassPU_afterZ_->Fill(invMass, npvCount);
998  npvs_afterZ_->Fill(npvCount);
999  }
1000 
1001  // Collect final flags
1002  if (rec_sel) nrec++;
1003  if (eid_sel) neid++;
1004  if (iso_sel) niso++;
1005  // if (hlt_sel) nhlt++;
1006  // if (met_sel) nmet++;
1007 
1008  if (all_sel) {
1009  nsel++;
1010  LogTrace("") << ">>>> Event ACCEPTED";
1011  } else {
1012  LogTrace("") << ">>>> Event REJECTED";
1013  }
1014 
1015  return;
1016 }
MonitorElement * ecalisoendcap_after_
Definition: EwkElecDQM.h:142
virtual double pt() const final
transverse momentum
MonitorElement * jet_et_after_
Definition: EwkElecDQM.h:189
unsigned int nGoodElectrons
Definition: EwkElecDQM.h:106
MonitorElement * invmass_after_
Definition: EwkElecDQM.h:160
unsigned int nall
Definition: EwkElecDQM.h:97
MonitorElement * hcalisobarrel_after_
Definition: EwkElecDQM.h:145
unsigned int nsel
Definition: EwkElecDQM.h:103
double metMax_
Definition: EwkElecDQM.h:77
MonitorElement * nelectrons_before_
Definition: EwkElecDQM.h:168
double sieieCutBarrel_
Definition: EwkElecDQM.h:59
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
Definition: EwkElecDQM.h:51
MonitorElement * sieieendcap_before_
Definition: EwkElecDQM.h:117
virtual double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
MonitorElement * sieieendcap_after_
Definition: EwkElecDQM.h:118
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:68
MonitorElement * ecalisobarrel_before_
Definition: EwkElecDQM.h:138
MonitorElement * sieiebarrel_before_
Definition: EwkElecDQM.h:114
MonitorElement * hcalisobarrel_before_
Definition: EwkElecDQM.h:144
float dr04TkSumPt() const
Definition: GsfElectron.h:554
MonitorElement * detainbarrel_after_
Definition: EwkElecDQM.h:121
MonitorElement * ecalisobarrel_after_
Definition: EwkElecDQM.h:139
MonitorElement * detainendcap_before_
Definition: EwkElecDQM.h:123
MonitorElement * sieiebarrel_after_
Definition: EwkElecDQM.h:115
MonitorElement * detainbarrel_before_
Definition: EwkElecDQM.h:120
MonitorElement * mt_before_
Definition: EwkElecDQM.h:171
MonitorElement * nelectrons_after_
Definition: EwkElecDQM.h:169
MonitorElement * hcalisoendcap_before_
Definition: EwkElecDQM.h:147
MonitorElement * npvs_afterZ_
Definition: EwkElecDQM.h:166
void Fill(long long x)
virtual double phi() const final
momentum azimuthal angle
unsigned int niso
Definition: EwkElecDQM.h:100
double calcDeltaPhi(double phi1, double phi2)
Definition: EwkElecDQM.cc:1019
virtual double et() const final
transverse energy
MonitorElement * mt_after_
Definition: EwkElecDQM.h:172
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:249
double ecalIsoCutEndcap_
Definition: EwkElecDQM.h:69
float sigmaIetaIeta() const
Definition: GsfElectron.h:434
MonitorElement * jet_et_before_
Definition: EwkElecDQM.h:188
double detainCutEndcap_
Definition: EwkElecDQM.h:62
MonitorElement * njets_after_
Definition: EwkElecDQM.h:187
MonitorElement * pt_before_
Definition: EwkElecDQM.h:108
MonitorElement * pt_after_
Definition: EwkElecDQM.h:109
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecTag_
Definition: EwkElecDQM.h:47
double metMin_
Definition: EwkElecDQM.h:76
double trkIsoCutEndcap_
Definition: EwkElecDQM.h:73
Definition: Jet.py:1
Definition: MET.h:42
virtual double px() const final
x coordinate of momentum vector
T sqrt(T t)
Definition: SSEVec.h:18
unsigned int nrec
Definition: EwkElecDQM.h:98
MonitorElement * hcalisoendcap_after_
Definition: EwkElecDQM.h:148
int nJetMax_
Definition: EwkElecDQM.h:89
virtual double energy() const final
energy
double ecalIsoCutBarrel_
Definition: EwkElecDQM.h:68
double trkIsoCutBarrel_
Definition: EwkElecDQM.h:72
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
Definition: EwkElecDQM.h:49
MonitorElement * invmass_before_
Definition: EwkElecDQM.h:159
MonitorElement * ecalisoendcap_before_
Definition: EwkElecDQM.h:141
MonitorElement * jet_eta_after_
Definition: EwkElecDQM.h:191
bool isEndcap(GeomDetEnumerators::SubDetector m)
#define LogTrace(id)
MonitorElement * jet_eta_before_
Definition: EwkElecDQM.h:190
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup)
unsigned int neid
Definition: EwkElecDQM.h:99
double etaCut_
Definition: EwkElecDQM.h:57
virtual double pz() const final
z coordinate of momentum vector
double hcalIsoCutBarrel_
Definition: EwkElecDQM.h:70
virtual double massSqr() const final
mass squared
MonitorElement * detainendcap_after_
Definition: EwkElecDQM.h:124
MonitorElement * njets_before_
Definition: EwkElecDQM.h:186
MonitorElement * invmassPU_afterZ_
Definition: EwkElecDQM.h:162
MonitorElement * trkisobarrel_before_
Definition: EwkElecDQM.h:150
met
===> hadronic RAZOR
double sieieCutEndcap_
Definition: EwkElecDQM.h:60
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexTag_
Definition: EwkElecDQM.h:50
MonitorElement * met_before_
Definition: EwkElecDQM.h:174
MonitorElement * trkisoendcap_before_
Definition: EwkElecDQM.h:153
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: EwkElecDQM.h:48
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:544
MonitorElement * met_after_
Definition: EwkElecDQM.h:175
double eJetMin_
Definition: EwkElecDQM.h:88
MonitorElement * trkisobarrel_after_
Definition: EwkElecDQM.h:151
double mtMax_
Definition: EwkElecDQM.h:75
MonitorElement * eta_after_
Definition: EwkElecDQM.h:112
double detainCutBarrel_
Definition: EwkElecDQM.h:61
MonitorElement * npvs_before_
Definition: EwkElecDQM.h:164
MonitorElement * trkisoendcap_after_
Definition: EwkElecDQM.h:154
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:547
HLTPrescaleProvider hltPrescaleProvider_
Definition: EwkElecDQM.h:95
double hcalIsoCutEndcap_
Definition: EwkElecDQM.h:71
virtual double py() const final
y coordinate of momentum vector
MonitorElement * eta_before_
Definition: EwkElecDQM.h:111
MonitorElement * invmassPU_before_
Definition: EwkElecDQM.h:161
double mtMin_
Definition: EwkElecDQM.h:74
double ptCut_
Definition: EwkElecDQM.h:56
void EwkElecDQM::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

1.5); // elecTrig_ is now a vector of strings!

Implements DQMEDAnalyzer.

Definition at line 147 of file EwkElecDQM.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), detainbarrel_after_, detainbarrel_before_, detainendcap_after_, detainendcap_before_, ecalisobarrel_after_, ecalisobarrel_before_, ecalisoendcap_after_, ecalisoendcap_before_, eJetMin_, eta_after_, eta_before_, hcalisobarrel_after_, hcalisobarrel_before_, hcalisoendcap_after_, hcalisoendcap_before_, invmass_after_, invmass_before_, invmassPU_afterZ_, invmassPU_before_, jet_et_after_, jet_et_before_, jet_eta_after_, jet_eta_before_, jetTag_, edm::InputTag::label(), met_after_, met_before_, metTag_, mt_after_, mt_before_, nelectrons_after_, nelectrons_before_, njets_after_, njets_before_, npvs_afterZ_, npvs_before_, pt_after_, pt_before_, PUBinCount_, PUMax_, DQMStore::IBooker::setCurrentFolder(), sieiebarrel_after_, sieiebarrel_before_, sieieendcap_after_, sieieendcap_before_, trkisobarrel_after_, trkisobarrel_before_, trkisoendcap_after_, and trkisoendcap_before_.

148  {
149 
150  ibooker.setCurrentFolder("Physics/EwkElecDQM");
151 
152  char chtitle[256] = "";
153 
154  pt_before_ = ibooker.book1D("PT_BEFORECUTS",
155  "Electron transverse momentum [GeV]", 100, 0., 100.);
156  pt_after_ = ibooker.book1D("PT_LASTCUT",
157  "Electron transverse momentum [GeV]", 100, 0., 100.);
158 
159  eta_before_ = ibooker.book1D("ETA_BEFORECUTS",
160  "Electron pseudo-rapidity", 50, -2.5, 2.5);
161  eta_after_ = ibooker.book1D("ETA_LASTCUT",
162  "Electron pseudo-rapidity", 50, -2.5, 2.5);
163 
164  sieiebarrel_before_ = ibooker.book1D("SIEIEBARREL_BEFORECUTS",
165  "Electron #sigma_{i#etai#eta} (barrel)", 70, 0., 0.07);
166  sieiebarrel_after_ = ibooker.book1D("SIEIEBARREL_LASTCUT",
167  "Electron #sigma_{i#etai#eta} (barrel)", 70, 0., 0.07);
168 
169  sieieendcap_before_ = ibooker.book1D("SIEIEENDCAP_BEFORECUTS",
170  "Electron #sigma_{i#etai#eta} (endcap)", 70, 0., 0.07);
171  sieieendcap_after_ = ibooker.book1D("SIEIEENDCAP_LASTCUT",
172  "Electron #sigma_{i#etai#eta} (endcap)", 70, 0., 0.07);
173 
174  detainbarrel_before_ = ibooker.book1D("DETAINBARREL_BEFORECUTS",
175  "Electron #Delta#eta_{in} (barrel)", 40, -0.02, 0.02);
176  detainbarrel_after_ = ibooker.book1D("DETAINBARREL_LASTCUT",
177  "Electron #Delta#eta_{in} (barrel)", 40, -0.02, 0.02);
178 
179  detainendcap_before_ = ibooker.book1D("DETAINENDCAP_BEFORECUTS",
180  "Electron #Delta#eta_{in} (endcap)", 40, -0.02, 0.02);
181  detainendcap_after_ = ibooker.book1D("DETAINENDCAP_LASTCUT",
182  "Electron #Delta#eta_{in} (endcap)", 40, -0.02, 0.02);
183 
184  ecalisobarrel_before_ = ibooker.book1D("ECALISOBARREL_BEFORECUTS",
185  "Absolute electron ECAL isolation variable (barrel) [GeV]", 50, 0., 50.);
186  ecalisobarrel_after_ = ibooker.book1D("ECALISOBARREL_LASTCUT",
187  "Absolute electron ECAL isolation variable (barrel) [GeV]", 50, 0., 50.);
188 
189  ecalisoendcap_before_ = ibooker.book1D("ECALISOENDCAP_BEFORECUTS",
190  "Absolute electron ECAL isolation variable (endcap) [GeV]", 50, 0., 50.);
191  ecalisoendcap_after_ = ibooker.book1D("ECALISOENDCAP_LASTCUT",
192  "Absolute electron ECAL isolation variable (endcap) [GeV]", 50, 0., 50.);
193 
194  hcalisobarrel_before_ = ibooker.book1D("HCALISOBARREL_BEFORECUTS",
195  "Absolute electron HCAL isolation variable (barrel) [GeV]", 50, 0., 50.);
196  hcalisobarrel_after_ = ibooker.book1D("HCALISOBARREL_LASTCUT",
197  "Absolute electron HCAL isolation variable (barrel) [GeV]", 50, 0., 50.);
198 
199  hcalisoendcap_before_ = ibooker.book1D("HCALISOENDCAP_BEFORECUTS",
200  "Absolute electron HCAL isolation variable (endcap) [GeV]", 50, 0., 50.);
201  hcalisoendcap_after_ = ibooker.book1D("HCALISOENDCAP_LASTCUT",
202  "Absolute electron HCAL isolation variable (endcap) [GeV]", 50, 0., 50.);
203 
204  trkisobarrel_before_ = ibooker.book1D("TRKISOBARREL_BEFORECUTS",
205  "Absolute electron track isolation variable (barrel) [GeV]", 50, 0., 50.);
206  trkisobarrel_after_ = ibooker.book1D("TRKISOBARREL_LASTCUT",
207  "Absolute electron track isolation variable (barrel) [GeV]", 50, 0., 50.);
208 
209  trkisoendcap_before_ = ibooker.book1D("TRKISOENDCAP_BEFORECUTS",
210  "Absolute electron track isolation variable (endcap) [GeV]", 50, 0., 50.);
211  trkisoendcap_after_ = ibooker.book1D("TRKISOENDCAP_LASTCUT",
212  "Absolute electron track isolation variable (endcap) [GeV]", 50, 0., 50.);
213 
214  // trig_before_ = ibooker.book1D("TRIG_BEFORECUTS", "Trigger response", 2, -0.5,
216 // trig_after_ = ibooker.book1D("TRIG_LASTCUT", "Trigger response", 2, -0.5, 1.5);
217 
218  invmass_before_ = ibooker.book1D("INVMASS_BEFORECUTS",
219  "Di-electron invariant mass [GeV]", 100, 0., 200.);
220  invmass_after_ = ibooker.book1D("INVMASS_AFTERCUTS",
221  "Di-electron invariant mass [GeV]", 100, 0., 200.);
222 
223  invmassPU_before_ = ibooker.book2D("INVMASS_PU_BEFORECUTS",
224  "Di-electron invariant mass [GeV] vs PU; mass [GeV]; PU count", 100, 0.,
225  200., PUBinCount_, -0.5, PUMax_ + 0.5);
226  invmassPU_afterZ_ = ibooker.book2D("INVMASS_PU_AFTERZCUTS",
227  "Di-electron invariant mass [GeV] vs PU; mass [GeV]; PU count", 100, 0.,
228  200., PUBinCount_, -0.5, PUMax_ + 0.5);
229 
230  npvs_before_ = ibooker.book1D("NPVs_BEFORECUTS",
231  "Number of Valid Primary Vertices; nGoodPVs", PUMax_ + 1, -0.5, PUMax_ + 0.5);
232 
233  npvs_afterZ_ = ibooker.book1D("NPVs_AFTERZCUTS",
234  "Number of Valid Primary Vertices; nGoodPVs", PUMax_ + 1, -0.5, PUMax_ + 0.5);
235 
236  nelectrons_before_ = ibooker.book1D("NELECTRONS_BEFORECUTS",
237  "Number of electrons in event", 10, -0.5, 9.5);
238  nelectrons_after_ = ibooker.book1D("NELECTRONS_AFTERCUTS",
239  "Number of electrons in event", 10, -0.5, 9.5);
240 
241  snprintf(chtitle, 255, "Transverse mass (%s) [GeV]", metTag_.label().data());
242  mt_before_ = ibooker.book1D("MT_BEFORECUTS", chtitle, 150, 0., 300.);
243  mt_after_ = ibooker.book1D("MT_LASTCUT", chtitle, 150, 0., 300.);
244 
245 
246  snprintf(chtitle, 255, "Missing transverse energy (%s) [GeV]",
247  metTag_.label().data());
248  met_before_ = ibooker.book1D("MET_BEFORECUTS", chtitle, 100, 0., 200.);
249  met_after_ = ibooker.book1D("MET_LASTCUT", chtitle, 100, 0., 200.);
250 
251  snprintf(chtitle, 255, "Number of jets (%s) above %.2f GeV",
252  jetTag_.label().data(), eJetMin_);
253  njets_before_ = ibooker.book1D("NJETS_BEFORECUTS", chtitle, 10, -0.5, 9.5);
254  njets_after_ = ibooker.book1D("NJETS_LASTCUT", chtitle, 10, -0.5, 9.5);
255 
256  snprintf(chtitle, 255, "Jet with highest E_{T} (%s)", jetTag_.label().data());
257  jet_et_before_ = ibooker.book1D("JETET1_BEFORECUTS", chtitle, 20, 0., 200.0);
258  jet_et_after_ = ibooker.book1D("JETET1_AFTERCUTS", chtitle, 20, 0., 200.0);
259 
260  snprintf(chtitle, 255, "Eta of Jet with highest E_{T} (%s)",
261  jetTag_.label().data());
262  jet_eta_before_ = ibooker.book1D("JETETA1_BEFORECUTS", chtitle, 20, -5, 5);
263  jet_eta_after_ = ibooker.book1D("JETETA1_AFTERCUTS", chtitle, 20, -5, 5);
264 
265 }
MonitorElement * ecalisoendcap_after_
Definition: EwkElecDQM.h:142
MonitorElement * jet_et_after_
Definition: EwkElecDQM.h:189
MonitorElement * invmass_after_
Definition: EwkElecDQM.h:160
MonitorElement * hcalisobarrel_after_
Definition: EwkElecDQM.h:145
MonitorElement * nelectrons_before_
Definition: EwkElecDQM.h:168
MonitorElement * sieieendcap_before_
Definition: EwkElecDQM.h:117
MonitorElement * sieieendcap_after_
Definition: EwkElecDQM.h:118
MonitorElement * ecalisobarrel_before_
Definition: EwkElecDQM.h:138
edm::InputTag jetTag_
Definition: EwkElecDQM.h:45
MonitorElement * sieiebarrel_before_
Definition: EwkElecDQM.h:114
MonitorElement * hcalisobarrel_before_
Definition: EwkElecDQM.h:144
MonitorElement * detainbarrel_after_
Definition: EwkElecDQM.h:121
MonitorElement * ecalisobarrel_after_
Definition: EwkElecDQM.h:139
MonitorElement * detainendcap_before_
Definition: EwkElecDQM.h:123
MonitorElement * sieiebarrel_after_
Definition: EwkElecDQM.h:115
MonitorElement * detainbarrel_before_
Definition: EwkElecDQM.h:120
MonitorElement * mt_before_
Definition: EwkElecDQM.h:171
MonitorElement * nelectrons_after_
Definition: EwkElecDQM.h:169
MonitorElement * hcalisoendcap_before_
Definition: EwkElecDQM.h:147
MonitorElement * npvs_afterZ_
Definition: EwkElecDQM.h:166
MonitorElement * mt_after_
Definition: EwkElecDQM.h:172
MonitorElement * jet_et_before_
Definition: EwkElecDQM.h:188
MonitorElement * njets_after_
Definition: EwkElecDQM.h:187
MonitorElement * pt_before_
Definition: EwkElecDQM.h:108
MonitorElement * pt_after_
Definition: EwkElecDQM.h:109
unsigned int PUBinCount_
Definition: EwkElecDQM.h:92
MonitorElement * hcalisoendcap_after_
Definition: EwkElecDQM.h:148
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
edm::InputTag metTag_
Definition: EwkElecDQM.h:44
MonitorElement * invmass_before_
Definition: EwkElecDQM.h:159
MonitorElement * ecalisoendcap_before_
Definition: EwkElecDQM.h:141
unsigned int PUMax_
Definition: EwkElecDQM.h:92
MonitorElement * jet_eta_after_
Definition: EwkElecDQM.h:191
MonitorElement * jet_eta_before_
Definition: EwkElecDQM.h:190
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * detainendcap_after_
Definition: EwkElecDQM.h:124
MonitorElement * njets_before_
Definition: EwkElecDQM.h:186
MonitorElement * invmassPU_afterZ_
Definition: EwkElecDQM.h:162
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * trkisobarrel_before_
Definition: EwkElecDQM.h:150
MonitorElement * met_before_
Definition: EwkElecDQM.h:174
MonitorElement * trkisoendcap_before_
Definition: EwkElecDQM.h:153
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * met_after_
Definition: EwkElecDQM.h:175
double eJetMin_
Definition: EwkElecDQM.h:88
MonitorElement * trkisobarrel_after_
Definition: EwkElecDQM.h:151
MonitorElement * eta_after_
Definition: EwkElecDQM.h:112
MonitorElement * npvs_before_
Definition: EwkElecDQM.h:164
MonitorElement * trkisoendcap_after_
Definition: EwkElecDQM.h:154
MonitorElement * eta_before_
Definition: EwkElecDQM.h:111
MonitorElement * invmassPU_before_
Definition: EwkElecDQM.h:161
double EwkElecDQM::calcDeltaPhi ( double  phi1,
double  phi2 
)
protected

Definition at line 1019 of file EwkElecDQM.cc.

References hiPixelPairStep_cff::deltaPhi.

Referenced by analyze().

1019  {
1020 
1021  double deltaPhi = phi1 - phi2;
1022 
1023  if (deltaPhi < 0) deltaPhi = -deltaPhi;
1024 
1025  if (deltaPhi > 3.1415926) {
1026  deltaPhi = 2 * 3.1415926 - deltaPhi;
1027  }
1028 
1029  return deltaPhi;
1030 }
void EwkElecDQM::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSet 
)
overrideprotected

Definition at line 127 of file EwkElecDQM.cc.

References hltPrescaleProvider_, HLTPrescaleProvider::init(), isValidHltConfig_, LogTrace, nall, neid, niso, nrec, and nsel.

127  {
128  nall = 0;
129  nsel = 0;
130 
131  nrec = 0;
132  neid = 0;
133  niso = 0;
134  // nhlt = 0;
135  // nmet = 0;
136 
137  // passed as parameter to HLTConfigProvider::init(), not yet used
138  bool isConfigChanged = false;
139  // isValidHltConfig_ could be used to short-circuit analyze() in case of
140  // problems
142  hltPrescaleProvider_.init(iRun, iSet, "HLT", isConfigChanged);
143 
144  LogTrace("") << "isValidHltConfig_=" << isValidHltConfig_ << "\n";
145 }
unsigned int nall
Definition: EwkElecDQM.h:97
unsigned int nsel
Definition: EwkElecDQM.h:103
unsigned int niso
Definition: EwkElecDQM.h:100
unsigned int nrec
Definition: EwkElecDQM.h:98
#define LogTrace(id)
unsigned int neid
Definition: EwkElecDQM.h:99
bool isValidHltConfig_
Definition: EwkElecDQM.h:94
HLTPrescaleProvider hltPrescaleProvider_
Definition: EwkElecDQM.h:95
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
void EwkElecDQM::endRun ( const edm::Run r,
const edm::EventSetup  
)
overrideprotectedvirtual

Definition at line 267 of file EwkElecDQM.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), nall, neid, niso, nrec, nsel, pileupDistInMC::num, and mathSSE::sqrt().

267  {
268 
269  // overall
270  double all = nall;
271  double esel = nsel / all;
272  LogVerbatim("") << "\n>>>>>> SELECTION SUMMARY BEGIN >>>>>>>>>>>>>>>";
273  LogVerbatim("") << "Total number of events analyzed: " << nall << " [events]";
274  LogVerbatim("") << "Total number of events selected: " << nsel << " [events]";
275  LogVerbatim("") << "Overall efficiency: "
276  << "(" << setprecision(4) << esel * 100. << " +/- "
277  << setprecision(2) << sqrt(esel * (1 - esel) / all) * 100.
278  << ")%";
279 
280  double erec = nrec / all;
281  double eeid = neid / all;
282  double eiso = niso / all;
283  // double ehlt = nhlt/all;
284  // double emet = nmet/all;
285 
286  // general reconstruction step??
287  double num = nrec;
288  double eff = erec;
289  double err = sqrt(eff * (1 - eff) / all);
290  LogVerbatim("") << "Passing Pt/Eta/Quality cuts: " << num << " [events], ("
291  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
292  << err * 100. << ")%";
293 
294  // electron ID step
295  num = neid;
296  eff = eeid;
297  err = sqrt(eff * (1 - eff) / all);
298  double effstep = 0.;
299  double errstep = 0.;
300  if (nrec > 0) effstep = eeid / erec;
301  if (nrec > 0) errstep = sqrt(effstep * (1 - effstep) / nrec);
302  LogVerbatim("") << "Passing eID cuts: " << num << " [events], ("
303  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
304  << err * 100. << ")%, to previous step: (" << setprecision(4)
305  << effstep * 100. << " +/- " << setprecision(2)
306  << errstep * 100. << ")%";
307 
308  // isolation step
309  num = niso;
310  eff = eiso;
311  err = sqrt(eff * (1 - eff) / all);
312  effstep = 0.;
313  errstep = 0.;
314  if (neid > 0) effstep = eiso / eeid;
315  if (neid > 0) errstep = sqrt(effstep * (1 - effstep) / neid);
316  LogVerbatim("") << "Passing isolation cuts: " << num << " [events], ("
317  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
318  << err * 100. << ")%, to previous step: (" << setprecision(4)
319  << effstep * 100. << " +/- " << setprecision(2)
320  << errstep * 100. << ")%";
321 
322  // // trigger step
323  // num = nhlt;
324  // eff = ehlt;
325  // err = sqrt(eff*(1-eff)/all);
326  // effstep = 0.;
327  // errstep = 0.;
328  // if (niso>0) effstep = ehlt/eiso;
329  // if (niso>0) errstep = sqrt(effstep*(1-effstep)/niso);
330  // LogVerbatim("") << "Passing HLT criteria: " << num << "
331  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
332  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
333  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
334 
335  // trigger step
336  num = nsel;
337  eff = esel;
338  err = sqrt(eff * (1 - eff) / all);
339  effstep = 0.;
340  errstep = 0.;
341  if (niso > 0) effstep = esel / eiso;
342  if (niso > 0) errstep = sqrt(effstep * (1 - effstep) / niso);
343  LogVerbatim("") << "Passing HLT criteria: " << num << " [events], ("
344  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
345  << err * 100. << ")%, to previous step: (" << setprecision(4)
346  << effstep * 100. << " +/- " << setprecision(2)
347  << errstep * 100. << ")%";
348 
349  // // met/acoplanarity cuts
350  // num = nmet;
351  // eff = emet;
352  // err = sqrt(eff*(1-eff)/all);
353  // effstep = 0.;
354  // errstep = 0.;
355  // if (nhlt>0) effstep = emet/ehlt;
356  // if (nhlt>0) errstep = sqrt(effstep*(1-effstep)/nhlt);
357  // LogVerbatim("") << "Passing MET/acoplanarity cuts: " << num << "
358  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
359  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
360  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
361 
362  // // Z/top selection cuts ALSO LAST STEP so "sel" for "selection"
363  // num = nsel;
364  // eff = esel;
365  // err = sqrt(eff*(1-eff)/all);
366  // effstep = 0.;
367  // errstep = 0.;
368  // if (nmet>0) effstep = esel/emet;
369  // if (nmet>0) errstep = sqrt(effstep*(1-effstep)/nmet);
370  // LogVerbatim("") << "Passing Z/top rejection cuts: " << num << "
371  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
372  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
373  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
374 
375  LogVerbatim("") << ">>>>>> SELECTION SUMMARY END >>>>>>>>>>>>>>>\n";
376 }
unsigned int nall
Definition: EwkElecDQM.h:97
unsigned int nsel
Definition: EwkElecDQM.h:103
unsigned int niso
Definition: EwkElecDQM.h:100
T sqrt(T t)
Definition: SSEVec.h:18
unsigned int nrec
Definition: EwkElecDQM.h:98
unsigned int neid
Definition: EwkElecDQM.h:99

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> EwkElecDQM::beamSpotTag_
private

Definition at line 51 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::detainbarrel_after_
private

Definition at line 121 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::detainbarrel_before_
private

Definition at line 120 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::detainCutBarrel_
private

Definition at line 61 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::detainCutEndcap_
private

Definition at line 62 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::detainendcap_after_
private

Definition at line 124 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::detainendcap_before_
private

Definition at line 123 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::ecalisobarrel_after_
private

Definition at line 139 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::ecalisobarrel_before_
private

Definition at line 138 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::ecalIsoCutBarrel_
private

Definition at line 68 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::ecalIsoCutEndcap_
private

Definition at line 69 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::ecalisoendcap_after_
private

Definition at line 142 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::ecalisoendcap_before_
private

Definition at line 141 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::eJetMin_
private

Definition at line 88 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<edm::View<reco::GsfElectron> > EwkElecDQM::elecTag_
private

Definition at line 47 of file EwkElecDQM.h.

Referenced by analyze().

const std::vector<std::string> EwkElecDQM::elecTrig_
private

Definition at line 55 of file EwkElecDQM.h.

MonitorElement* EwkElecDQM::eta_after_
private

Definition at line 112 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::eta_before_
private

Definition at line 111 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::etaCut_
private

Definition at line 57 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::hcalisobarrel_after_
private

Definition at line 145 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::hcalisobarrel_before_
private

Definition at line 144 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::hcalIsoCutBarrel_
private

Definition at line 70 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::hcalIsoCutEndcap_
private

Definition at line 71 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::hcalisoendcap_after_
private

Definition at line 148 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::hcalisoendcap_before_
private

Definition at line 147 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

HLTPrescaleProvider EwkElecDQM::hltPrescaleProvider_
private

Definition at line 95 of file EwkElecDQM.h.

Referenced by analyze(), and dqmBeginRun().

MonitorElement* EwkElecDQM::invmass_after_
private

Definition at line 160 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::invmass_before_
private

Definition at line 159 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::invmassPU_afterZ_
private

Definition at line 162 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::invmassPU_before_
private

Definition at line 161 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

bool EwkElecDQM::isValidHltConfig_
private

Definition at line 94 of file EwkElecDQM.h.

Referenced by dqmBeginRun(), and EwkElecDQM().

MonitorElement* EwkElecDQM::jet_et_after_
private

Definition at line 189 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::jet_et_before_
private

Definition at line 188 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::jet_eta_after_
private

Definition at line 191 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::jet_eta_before_
private

Definition at line 190 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag EwkElecDQM::jetTag_
private

Definition at line 45 of file EwkElecDQM.h.

Referenced by bookHistograms().

edm::EDGetTokenT<edm::View<reco::Jet> > EwkElecDQM::jetToken_
private

Definition at line 49 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::met_after_
private

Definition at line 175 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::met_before_
private

Definition at line 174 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

bool EwkElecDQM::metIncludesMuons_
private

Definition at line 52 of file EwkElecDQM.h.

double EwkElecDQM::metMax_
private

Definition at line 77 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::metMin_
private

Definition at line 76 of file EwkElecDQM.h.

Referenced by analyze().

edm::InputTag EwkElecDQM::metTag_
private

Definition at line 44 of file EwkElecDQM.h.

Referenced by bookHistograms().

edm::EDGetTokenT<edm::View<reco::MET> > EwkElecDQM::metToken_
private

Definition at line 48 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::mt_after_
private

Definition at line 172 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::mt_before_
private

Definition at line 171 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::mtMax_
private

Definition at line 75 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::mtMin_
private

Definition at line 74 of file EwkElecDQM.h.

Referenced by analyze().

unsigned int EwkElecDQM::nall
private

Definition at line 97 of file EwkElecDQM.h.

Referenced by analyze(), dqmBeginRun(), and endRun().

unsigned int EwkElecDQM::neid
private

Definition at line 99 of file EwkElecDQM.h.

Referenced by analyze(), dqmBeginRun(), and endRun().

MonitorElement* EwkElecDQM::nelectrons_after_
private

Definition at line 169 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::nelectrons_before_
private

Definition at line 168 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

unsigned int EwkElecDQM::nGoodElectrons
private

Definition at line 106 of file EwkElecDQM.h.

Referenced by analyze().

unsigned int EwkElecDQM::niso
private

Definition at line 100 of file EwkElecDQM.h.

Referenced by analyze(), dqmBeginRun(), and endRun().

int EwkElecDQM::nJetMax_
private

Definition at line 89 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::njets_after_
private

Definition at line 187 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::njets_before_
private

Definition at line 186 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::npvs_afterZ_
private

Definition at line 166 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::npvs_before_
private

Definition at line 164 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

unsigned int EwkElecDQM::nrec
private

Definition at line 98 of file EwkElecDQM.h.

Referenced by analyze(), dqmBeginRun(), and endRun().

unsigned int EwkElecDQM::nsel
private

Definition at line 103 of file EwkElecDQM.h.

Referenced by analyze(), dqmBeginRun(), and endRun().

MonitorElement* EwkElecDQM::pt_after_
private

Definition at line 109 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::pt_before_
private

Definition at line 108 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::ptCut_
private
unsigned int EwkElecDQM::PUBinCount_
private

Definition at line 92 of file EwkElecDQM.h.

Referenced by bookHistograms().

unsigned int EwkElecDQM::PUMax_
private

Definition at line 92 of file EwkElecDQM.h.

Referenced by bookHistograms().

MonitorElement* EwkElecDQM::sieiebarrel_after_
private

Definition at line 115 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::sieiebarrel_before_
private

Definition at line 114 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::sieieCutBarrel_
private

Definition at line 59 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::sieieCutEndcap_
private

Definition at line 60 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::sieieendcap_after_
private

Definition at line 118 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::sieieendcap_before_
private

Definition at line 117 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::trig_after_
private

Definition at line 157 of file EwkElecDQM.h.

MonitorElement* EwkElecDQM::trig_before_
private

Definition at line 156 of file EwkElecDQM.h.

edm::EDGetTokenT<edm::TriggerResults> EwkElecDQM::trigTag_
private

Definition at line 46 of file EwkElecDQM.h.

MonitorElement* EwkElecDQM::trkisobarrel_after_
private

Definition at line 151 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::trkisobarrel_before_
private

Definition at line 150 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

double EwkElecDQM::trkIsoCutBarrel_
private

Definition at line 72 of file EwkElecDQM.h.

Referenced by analyze().

double EwkElecDQM::trkIsoCutEndcap_
private

Definition at line 73 of file EwkElecDQM.h.

Referenced by analyze().

MonitorElement* EwkElecDQM::trkisoendcap_after_
private

Definition at line 154 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EwkElecDQM::trkisoendcap_before_
private

Definition at line 153 of file EwkElecDQM.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<edm::View<reco::Vertex> > EwkElecDQM::vertexTag_
private

Definition at line 50 of file EwkElecDQM.h.

Referenced by analyze().