CMS 3D CMS Logo

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

#include <ZCounting.h>

Inheritance diagram for ZCounting:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Types

enum  MuonIDTypes { NoneID, LooseID, MediumID, TightID }
 
enum  MuonIsoTypes { NoneIso, TrackerIso, PFIso }
 

Public Member Functions

 ZCounting (const edm::ParameterSet &ps)
 
 ~ZCounting () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 

Private Member Functions

void analyzeElectrons (edm::Event const &e, edm::EventSetup const &eSetup)
 
void analyzeMuons (edm::Event const &e, edm::EventSetup const &eSetup)
 
bool ele_probe_selection (double pt, double abseta)
 
bool ele_tag_selection (double pt, double abseta)
 
void initHLT (const edm::TriggerResults &, const edm::TriggerNames &)
 
bool isElectronTrigger (ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
 
bool isElectronTriggerObj (ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
 
bool isMuonTrigger (const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
 
bool isMuonTriggerObj (const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
 
bool passMuonID (const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
 
bool passMuonIso (const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
 

Private Attributes

const float ELE_ETA_CRACK_HIGH = 1.56
 
const float ELE_ETA_CRACK_LOW = 1.4442
 
const float ELE_ETA_CUT_PROBE
 
const float ELE_ETA_CUT_TAG
 
const std::string ELE_ID_WP
 
const float ELE_MASS_CUT_HIGH
 
const float ELE_MASS_CUT_LOW
 
const float ELE_PT_CUT_PROBE
 
const float ELE_PT_CUT_TAG
 
const float ELECTRON_MASS = 0.000511
 
ElectronIdentifier EleID_
 
double EtaCutL1_
 
double EtaCutL2_
 
edm::InputTag fBeamspotTag
 
edm::EDGetTokenT< reco::BeamSpotfBeamspotToken
 
edm::InputTag fConversionTag
 
edm::EDGetTokenT< reco::ConversionCollectionfConversionToken
 
std::string fElectronName
 
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
 
edm::InputTag fHLTObjTag
 
edm::EDGetTokenT< trigger::TriggerEventfHLTObjTag_token
 
edm::InputTag fHLTTag
 
edm::EDGetTokenT< edm::TriggerResultsfHLTTag_token
 
std::vector< std::string > fMuonHLTNames
 
std::vector< std::string > fMuonHLTObjectNames
 
std::string fMuonName
 
edm::EDGetTokenT< reco::MuonCollectionfMuonName_token
 
std::string fPVName
 
edm::EDGetTokenT< reco::VertexCollectionfPVName_token
 
edm::InputTag fRhoTag
 
edm::EDGetTokenT< double > fRhoToken
 
std::string fSCName
 
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
 
std::string fTrackName
 
edm::EDGetTokenT< reco::TrackCollectionfTrackName_token
 
std::unique_ptr< ZCountingTrigger::TTriggerfTrigger
 
edm::ParameterSetID fTriggerNamesID
 
MonitorElementh_ee_mass_HLT_fail_central
 
MonitorElementh_ee_mass_HLT_fail_forward
 
MonitorElementh_ee_mass_HLT_pass_central
 
MonitorElementh_ee_mass_HLT_pass_forward
 
MonitorElementh_ee_mass_id_fail_central
 
MonitorElementh_ee_mass_id_fail_forward
 
MonitorElementh_ee_mass_id_pass_central
 
MonitorElementh_ee_mass_id_pass_forward
 
MonitorElementh_ee_yield_Z_ebeb
 
MonitorElementh_ee_yield_Z_ebee
 
MonitorElementh_ee_yield_Z_eeee
 
MonitorElementh_mass_Glo_fail_central
 
MonitorElementh_mass_Glo_fail_forward
 
MonitorElementh_mass_Glo_pass_central
 
MonitorElementh_mass_Glo_pass_forward
 
MonitorElementh_mass_HLT_fail_central
 
MonitorElementh_mass_HLT_fail_forward
 
MonitorElementh_mass_HLT_pass_central
 
MonitorElementh_mass_HLT_pass_forward
 
MonitorElementh_mass_SIT_fail_central
 
MonitorElementh_mass_SIT_fail_forward
 
MonitorElementh_mass_SIT_pass_central
 
MonitorElementh_mass_SIT_pass_forward
 
MonitorElementh_mass_yield_Z
 
MonitorElementh_npv
 
MonitorElementh_npv_yield_Z
 
MonitorElementh_yieldBB_Z
 
MonitorElementh_yieldEE_Z
 
MuonIDTypes IDType_ {NoneID}
 
std::string IDTypestr_
 
double IsoCut_
 
MuonIsoTypes IsoType_ {NoneIso}
 
std::string IsoTypestr_
 
int LumiBin_
 
double LumiMax_
 
double LumiMin_
 
int MassBin_
 
double MassMax_
 
double MassMin_
 
const double MUON_BOUND = 0.9
 
const double MUON_MASS = 0.105658369
 
double PtCutL1_
 
double PtCutL2_
 
int PVBin_
 
double PVMax_
 
double PVMin_
 
double VtxAbsZCut_
 
double VtxNdofCut_
 
double VtxNTracksFitCut_
 
double VtxRhoCut_
 

Detailed Description

Definition at line 42 of file ZCounting.h.

Member Enumeration Documentation

Enumerator
NoneID 
LooseID 
MediumID 
TightID 

Definition at line 49 of file ZCounting.h.

Enumerator
NoneIso 
TrackerIso 
PFIso 

Definition at line 50 of file ZCounting.h.

Constructor & Destructor Documentation

ZCounting::ZCounting ( const edm::ParameterSet ps)

Definition at line 24 of file ZCounting.cc.

References ELE_ID_WP, EleID_, EtaCutL1_, EtaCutL2_, fBeamspotTag, fBeamspotToken, fConversionTag, fConversionToken, fElectronName, fGsfElectronName_token, fHLTObjTag, fHLTObjTag_token, fHLTTag, fHLTTag_token, fMuonHLTNames, fMuonHLTObjectNames, fMuonName, fMuonName_token, fPVName, fPVName_token, fRhoTag, fRhoToken, fSCName, fSCName_token, fTrackName, fTrackName_token, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), IDType_, IDTypestr_, IsoCut_, IsoType_, IsoTypestr_, LooseID, LumiBin_, LumiMax_, LumiMin_, MassBin_, MassMax_, MassMin_, MediumID, NoneID, NoneIso, PFIso, PtCutL1_, PtCutL2_, PVBin_, PVMax_, PVMin_, ElectronIdentifier::setID(), AlCaHLTBitMon_QueryRunRegistry::string, TightID, TrackerIso, VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

24  :
25  fHLTObjTag (iConfig.getParameter<edm::InputTag>("TriggerEvent")),
26  fHLTTag (iConfig.getParameter<edm::InputTag>("TriggerResults")),
27  fPVName (iConfig.getUntrackedParameter<std::string>("edmPVName","offlinePrimaryVertices")),
28  fMuonName (iConfig.getUntrackedParameter<std::string>("edmName","muons")),
29  fTrackName (iConfig.getUntrackedParameter<std::string>("edmTrackName","generalTracks")),
30 
31  // Electron-specific Parameters
32  fElectronName( iConfig.getUntrackedParameter<std::string>("edmGsfEleName","gedGsfElectrons")),
33  fSCName( iConfig.getUntrackedParameter<std::string>("edmSCName","particleFlowEGamma")),
34 
35  // Electron-specific Tags
36  fRhoTag( iConfig.getParameter<edm::InputTag>("rhoname") ),
37  fBeamspotTag(iConfig.getParameter<edm::InputTag>("beamspotName") ),
38  fConversionTag( iConfig.getParameter<edm::InputTag>("conversionsName")),
39 
40  // Electron-specific Cuts
41  ELE_PT_CUT_TAG(iConfig.getUntrackedParameter<double>("PtCutEleTag")),
42  ELE_PT_CUT_PROBE(iConfig.getUntrackedParameter<double>("PtCutEleProbe")),
43  ELE_ETA_CUT_TAG(iConfig.getUntrackedParameter<double>("EtaCutEleTag")),
44  ELE_ETA_CUT_PROBE(iConfig.getUntrackedParameter<double>("EtaCutEleProbe")),
45 
46  ELE_MASS_CUT_LOW(iConfig.getUntrackedParameter<double>("MassCutEleLow")),
47  ELE_MASS_CUT_HIGH(iConfig.getUntrackedParameter<double>("MassCutEleHigh")),
48 
49  ELE_ID_WP( iConfig.getUntrackedParameter<std::string>("ElectronIDType","TIGHT")),
50  EleID_(ElectronIdentifier(iConfig))
51 {
52  edm::LogInfo("ZCounting") << "Constructor ZCounting::ZCounting " << std::endl;
53 
54  //Get parameters from configuration file
55  fHLTTag_token = consumes<edm::TriggerResults>(fHLTTag);
56  fHLTObjTag_token = consumes<trigger::TriggerEvent>(fHLTObjTag);
57  fPVName_token = consumes<reco::VertexCollection>(fPVName);
58  fMuonName_token = consumes<reco::MuonCollection>(fMuonName);
59  fTrackName_token = consumes<reco::TrackCollection>(fTrackName);
60 
61  // Trigger-specific Parameters
62  fMuonHLTNames = iConfig.getParameter<std::vector<std::string>>("MuonTriggerNames");
63  fMuonHLTObjectNames = iConfig.getParameter<std::vector<std::string>>("MuonTriggerObjectNames");
64  if(fMuonHLTNames.size() != fMuonHLTObjectNames.size()){
65  edm::LogError("ZCounting") << "List of MuonTriggerNames and MuonTriggerObjectNames has to be the same length" << std::endl;
66  }
67 
68  // Electron-specific parameters
69  fGsfElectronName_token = consumes<edm::View<reco::GsfElectron>>(fElectronName);
70  fSCName_token = consumes<edm::View<reco::SuperCluster>>(fSCName);
71  fRhoToken = consumes<double>(fRhoTag);
72  fBeamspotToken = consumes<reco::BeamSpot>(fBeamspotTag);
73  fConversionToken = consumes<reco::ConversionCollection>(fConversionTag);
74 
75  // Muon-specific Cuts
76  IDTypestr_ = iConfig.getUntrackedParameter<std::string>("IDType");
77  IsoTypestr_ = iConfig.getUntrackedParameter<std::string>("IsoType");
78  IsoCut_ = iConfig.getUntrackedParameter<double>("IsoCut");
79 
80  if (IDTypestr_ == "Loose") IDType_ = LooseID;
81  else if(IDTypestr_ == "Medium") IDType_ = MediumID;
82  else if(IDTypestr_ == "Tight") IDType_ = TightID;
83  else IDType_ = NoneID;
84 
85  if (IsoTypestr_ == "Tracker-based") IsoType_ = TrackerIso;
86  else if(IsoTypestr_ == "PF-based") IsoType_ = PFIso;
87  else IsoType_ = NoneIso;
88 
89  PtCutL1_ = iConfig.getUntrackedParameter<double>("PtCutL1");
90  PtCutL2_ = iConfig.getUntrackedParameter<double>("PtCutL2");
91  EtaCutL1_ = iConfig.getUntrackedParameter<double>("EtaCutL1");
92  EtaCutL2_ = iConfig.getUntrackedParameter<double>("EtaCutL2");
93 
94  MassBin_ = iConfig.getUntrackedParameter<int>("MassBin");
95  MassMin_ = iConfig.getUntrackedParameter<double>("MassMin");
96  MassMax_ = iConfig.getUntrackedParameter<double>("MassMax");
97 
98  LumiBin_ = iConfig.getUntrackedParameter<int>("LumiBin");
99  LumiMin_ = iConfig.getUntrackedParameter<double>("LumiMin");
100  LumiMax_ = iConfig.getUntrackedParameter<double>("LumiMax");
101 
102  PVBin_ = iConfig.getUntrackedParameter<int>("PVBin");
103  PVMin_ = iConfig.getUntrackedParameter<double>("PVMin");
104  PVMax_ = iConfig.getUntrackedParameter<double>("PVMax");
105 
106  VtxNTracksFitCut_ = iConfig.getUntrackedParameter<double>("VtxNTracksFitMin");
107  VtxNdofCut_ = iConfig.getUntrackedParameter<double>("VtxNdofMin");
108  VtxAbsZCut_ = iConfig.getUntrackedParameter<double>("VtxAbsZMax");
109  VtxRhoCut_ = iConfig.getUntrackedParameter<double>("VtxRhoMax");
110 
112 }
double IsoCut_
Definition: ZCounting.h:121
edm::InputTag fRhoTag
Definition: ZCounting.h:103
edm::InputTag fBeamspotTag
Definition: ZCounting.h:106
double PtCutL1_
Definition: ZCounting.h:123
std::string fPVName
Definition: ZCounting.h:82
double LumiMax_
Definition: ZCounting.h:134
std::string fSCName
Definition: ZCounting.h:98
std::string fTrackName
Definition: ZCounting.h:92
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:88
edm::InputTag fHLTObjTag
Definition: ZCounting.h:78
MuonIsoTypes IsoType_
Definition: ZCounting.h:120
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:97
std::string fMuonName
Definition: ZCounting.h:86
edm::InputTag fConversionTag
Definition: ZCounting.h:109
ElectronIdentifier EleID_
Definition: ZCounting.h:162
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:153
double LumiMin_
Definition: ZCounting.h:133
edm::InputTag fHLTTag
Definition: ZCounting.h:79
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:93
std::string IDTypestr_
Definition: ZCounting.h:117
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:87
double VtxRhoCut_
Definition: ZCounting.h:143
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:156
const std::string ELE_ID_WP
Definition: ZCounting.h:158
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:83
int PVBin_
Definition: ZCounting.h:136
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:152
double VtxNTracksFitCut_
Definition: ZCounting.h:140
double VtxNdofCut_
Definition: ZCounting.h:141
MuonIDTypes IDType_
Definition: ZCounting.h:119
double PtCutL2_
Definition: ZCounting.h:124
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:155
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:80
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:154
int MassBin_
Definition: ZCounting.h:128
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:110
int LumiBin_
Definition: ZCounting.h:132
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:81
std::string fElectronName
Definition: ZCounting.h:96
double EtaCutL1_
Definition: ZCounting.h:125
void setID(std::string ID)
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:104
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:89
double MassMax_
Definition: ZCounting.h:130
double PVMax_
Definition: ZCounting.h:138
double MassMin_
Definition: ZCounting.h:129
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:107
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:151
std::string IsoTypestr_
Definition: ZCounting.h:118
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:99
double EtaCutL2_
Definition: ZCounting.h:126
double PVMin_
Definition: ZCounting.h:137
double VtxAbsZCut_
Definition: ZCounting.h:142
ZCounting::~ZCounting ( )
override

Definition at line 117 of file ZCounting.cc.

118 {
119  edm::LogInfo("ZCounting") << "Destructor ZCounting::~ZCounting " << std::endl;
120 }

Member Function Documentation

void ZCounting::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 221 of file ZCounting.cc.

References analyzeMuons().

222 {// Fill event tree on the fly
223  edm::LogInfo("ZCounting") << "ZCounting::analyze" << std::endl;
224  analyzeMuons(iEvent, iSetup);
225  //analyzeElectrons(iEvent, iSetup);
226 }
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:228
int iEvent
Definition: GenABIO.cc:224
void ZCounting::analyzeElectrons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Fill for ID efficiency

Fill for HLT efficiency

Definition at line 480 of file ZCounting.cc.

References edm::HLTGlobalStatus::accept(), reco::LeafCandidate::charge(), ELE_ETA_CRACK_LOW, ELE_MASS_CUT_HIGH, ELE_MASS_CUT_LOW, ele_probe_selection(), ele_tag_selection(), ELECTRON_MASS, lowPtElectrons_cff::electrons, EleID_, SimCluster::energy(), reco::LeafCandidate::eta(), SimCluster::eta(), fBeamspotToken, fConversionToken, fGsfElectronName_token, fHLTObjTag_token, fHLTTag_token, MonitorElement::Fill(), HcalObjRepresent::Fill(), fPVName_token, fRhoToken, fSCName_token, fTrigger, fTriggerNamesID, edm::Event::getByToken(), h_ee_mass_HLT_fail_central, h_ee_mass_HLT_fail_forward, h_ee_mass_HLT_pass_central, h_ee_mass_HLT_pass_forward, h_ee_mass_id_fail_central, h_ee_mass_id_fail_forward, h_ee_mass_id_pass_central, h_ee_mass_id_pass_forward, h_ee_yield_Z_ebeb, h_ee_yield_Z_ebee, h_ee_yield_Z_eeee, initHLT(), isElectronTrigger(), isElectronTriggerObj(), edm::Ptr< T >::isNonnull(), edm::HandleBase::isValid(), eostools::ls(), edm::EventBase::luminosityBlock(), or, edm::TriggerNames::parameterSetID(), ElectronIdentifier::passID(), reco::LeafCandidate::phi(), SimCluster::phi(), funct::pow(), edm::Handle< T >::product(), EnergyCorrector::pt, reco::LeafCandidate::pt(), hiDetachedQuadStep_cff::pt1, SimDataFormats::CaloAnalysis::sc, ElectronIdentifier::setRho(), mathSSE::sqrt(), edm::Event::triggerNames(), extraflags_cff::vtx, VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

480  {
481  edm::LogInfo("ZCounting") << "ZCounting::analyzeElectrons" << std::endl;
482 
483  //-------------------------------
484  //--- Vertex
485  //-------------------------------
487  iEvent.getByToken(fPVName_token,hVertexProduct);
488  if(!hVertexProduct.isValid()) return;
489 
490  const reco::VertexCollection *pvCol = hVertexProduct.product();
491  int nvtx = 0;
492 
493  for(auto const & vtx : *pvCol) {
494  if(vtx.isFake()) continue;
495  if(vtx.tracksSize() < VtxNTracksFitCut_) continue;
496  if(vtx.ndof() < VtxNdofCut_) continue;
497  if(fabs(vtx.z()) > VtxAbsZCut_) continue;
498  if(vtx.position().Rho() > VtxRhoCut_) continue;
499 
500  nvtx++;
501  }
502 
503  // Good vertex requirement
504  if(nvtx==0) return;
505 
506  //-------------------------------
507  //--- Trigger
508  //-------------------------------
510  iEvent.getByToken(fHLTTag_token,hTrgRes);
511  if(!hTrgRes.isValid()) return;
512 
514  iEvent.getByToken(fHLTObjTag_token,hTrgEvt);
515 
516 
517  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*hTrgRes);
518  Bool_t config_changed = false;
519  if(fTriggerNamesID != triggerNames.parameterSetID()) {
520  fTriggerNamesID = triggerNames.parameterSetID();
521  config_changed = true;
522  }
523  if(config_changed) {
524  initHLT(*hTrgRes, triggerNames);
525  }
526 
527  TriggerBits triggerBits;
528  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
529  if(fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1) continue;
530  if(hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
531  triggerBits [fTrigger->fRecords[irec].baconTrigBit] = true;
532  }
533  }
534 
535  // Trigger requirement
536  if(!isElectronTrigger(*fTrigger, triggerBits)) return;
537 
538  // Get Electrons
540  iEvent.getByToken(fGsfElectronName_token, electrons);
541 
542  // Get SuperClusters
544  iEvent.getByToken(fSCName_token, superclusters);
545 
546  // Get Rho
547  edm::Handle<double> rhoHandle;
548  iEvent.getByToken(fRhoToken, rhoHandle);
549  EleID_.setRho(*rhoHandle);
550 
551  // Get beamspot
552  edm::Handle<reco::BeamSpot> beamspotHandle;
553  iEvent.getByToken(fBeamspotToken, beamspotHandle);
554 
555  // Conversions
556  edm::Handle<reco::ConversionCollection> conversionsHandle;
557  iEvent.getByToken(fConversionToken, conversionsHandle);
558 
559 
561  enum { eEleEle2HLT=1, eEleEle1HLT1L1, eEleEle1HLT, eEleEleNoSel, eEleSC }; // event category enum
562 
563  // Loop over Tags
564  for (size_t itag = 0; itag < electrons->size(); ++itag){
565  const auto el1 = electrons->ptrAt(itag);
566  if( not EleID_.passID(el1,beamspotHandle,conversionsHandle) ) continue;
567 
568  float pt1 = el1->pt();
569  float eta1 = el1->eta();
570  float phi1 = el1->phi();
571 
572  if(!isElectronTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt))) continue;
573  TLorentzVector vTag(0.,0.,0.,0.);
574  vTag.SetPtEtaPhiM(pt1, eta1, phi1, ELECTRON_MASS);
575 
576 
577  // Tag selection: kinematic cuts, lepton selection and trigger matching
578  double tag_pt = vTag.Pt();
579  double tag_abseta = fabs(vTag.Eta());
580 
581  bool tag_is_valid_tag = ele_tag_selection(tag_pt,tag_abseta);
582  bool tag_is_valid_probe = ele_probe_selection(tag_pt,tag_abseta);
583 
584  if( not (tag_is_valid_tag or tag_is_valid_probe) ) continue;
585 
586  // Loop over probes
587  for (size_t iprobe = 0; iprobe < superclusters->size(); ++iprobe){
588  // Initialize probe
589  const auto sc = superclusters->ptrAt(iprobe);
590  if(*sc == *(el1->superCluster())) {
591  continue;
592  }
593 
594  // Find matching electron
595  for (size_t iele = 0; iele < electrons->size(); ++iele){
596  if(iele == itag) continue;
597  const auto ele = electrons->ptrAt(iele);
598  if(*sc == *(ele->superCluster())) {
599  eleProbe = ele;
600  break;
601  }
602  }
603 
604  // Assign final probe 4-vector
605  TLorentzVector vProbe(0.,0.,0.,0.);
606  if(eleProbe.isNonnull()){
607  vProbe.SetPtEtaPhiM( eleProbe->pt(), eleProbe->eta(), eleProbe->phi(), ELECTRON_MASS);
608  } else {
609  double pt = sc->energy() * sqrt( 1 - pow(tanh(sc->eta()),2) );
610  vProbe.SetPtEtaPhiM( pt, sc->eta(), sc->phi(), ELECTRON_MASS);
611  }
612 
613  // Probe Selection
614  double probe_pt = vProbe.Pt();
615  double probe_abseta = fabs(sc->eta());
616  bool probe_is_valid_probe = ele_probe_selection(probe_pt, probe_abseta);
617  if( !probe_is_valid_probe ) continue;
618 
619  // Good Probe found!
620 
621  // Require good Z
622  TLorentzVector vDilep = vTag + vProbe;
623 
624  if((vDilep.M()<ELE_MASS_CUT_LOW) || (vDilep.M()>ELE_MASS_CUT_HIGH)) continue;
625  if(eleProbe.isNonnull() and (eleProbe->charge() != - el1->charge())) continue;
626 
627  // Good Z found!
628 
629  long ls = iEvent.luminosityBlock();
630  bool probe_pass_trigger = isElectronTriggerObj(*fTrigger, TriggerTools::matchHLT(vProbe.Eta(), vProbe.Phi(), fTrigger->fRecords, *hTrgEvt));
631  bool probe_pass_id = eleProbe.isNonnull() and EleID_.passID(eleProbe,beamspotHandle,conversionsHandle);
632 
634  bool probe_is_forward = probe_abseta > ELE_ETA_CRACK_LOW;
635  bool tag_is_forward = tag_abseta > ELE_ETA_CRACK_LOW;
636 
637  if(probe_pass_id) {
638  if(probe_is_forward and tag_is_forward) {
639  h_ee_yield_Z_eeee -> Fill(ls);
640  } else if(!probe_is_forward and !tag_is_forward) {
641  h_ee_yield_Z_ebeb -> Fill(ls);
642  } else {
643  h_ee_yield_Z_ebee -> Fill(ls);
644  }
645  }
646 
647  if(!tag_is_valid_tag) continue;
648 
650  if(probe_pass_id) {
651  if(probe_is_forward) {
652  h_ee_mass_id_pass_forward->Fill(ls, vDilep.M());
653  } else {
654  h_ee_mass_id_pass_central->Fill(ls, vDilep.M());
655  }
656  } else {
657  if(probe_is_forward) {
658  h_ee_mass_id_fail_forward->Fill(ls, vDilep.M());
659  } else {
660  h_ee_mass_id_fail_central->Fill(ls, vDilep.M());
661  }
662  }
663 
665  if(probe_pass_id and probe_pass_trigger) {
666  if(probe_is_forward) {
667  h_ee_mass_HLT_pass_forward->Fill(ls, vDilep.M());
668  } else {
669  h_ee_mass_HLT_pass_central->Fill(ls, vDilep.M());
670  }
671  } else if (probe_pass_id) {
672  if(probe_is_forward) {
673  h_ee_mass_HLT_fail_forward->Fill(ls, vDilep.M());
674  } else {
675  h_ee_mass_HLT_fail_central->Fill(ls, vDilep.M());
676  }
677  }
678  } // End of probe loop
679  }//End of tag loop
680 
681 }
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:764
double eta() const final
momentum pseudorapidity
float phi() const
Momentum azimuthal angle. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:140
bool accept() const
Has at least one path accepted the event?
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
int charge() const final
electric charge
Definition: LeafCandidate.h:91
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:97
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:769
ElectronIdentifier EleID_
Definition: ZCounting.h:162
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:194
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:195
void Fill(long long x)
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:33
double VtxRhoCut_
Definition: ZCounting.h:143
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:77
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:156
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:83
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:18
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:140
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool passID(const reco::GsfElectronPtr &ele, edm::Handle< reco::BeamSpot > beamspot, edm::Handle< reco::ConversionCollection > conversions)
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:699
float energy() const
Energy. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:104
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:201
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:200
double VtxNdofCut_
Definition: ZCounting.h:141
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:196
bool isValid() const
Definition: HandleBase.h:74
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:689
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:155
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:159
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:80
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:190
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:193
def ls(path, rec=False)
Definition: eostools.py:349
void setRho(double rho)
T const * product() const
Definition: Handle.h:74
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:199
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:110
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:81
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:683
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:188
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:191
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:104
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:189
const float ELECTRON_MASS
Definition: ZCounting.h:149
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:107
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:115
double phi() const final
momentum azimuthal angle
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:99
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double VtxAbsZCut_
Definition: ZCounting.h:142
float eta() const
Momentum pseudorapidity. Note this is taken from the simtrack before the calorimeter.
Definition: SimCluster.h:148
void ZCounting::analyzeMuons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Definition at line 228 of file ZCounting.cc.

References edm::HLTGlobalStatus::accept(), EtaCutL1_, EtaCutL2_, fHLTObjTag_token, fHLTTag_token, MonitorElement::Fill(), fMuonName_token, fPVName_token, fTrackName_token, fTrigger, fTriggerNamesID, edm::Event::getByToken(), h_mass_Glo_fail_central, h_mass_Glo_fail_forward, h_mass_Glo_pass_central, h_mass_Glo_pass_forward, h_mass_HLT_fail_central, h_mass_HLT_fail_forward, h_mass_HLT_pass_central, h_mass_HLT_pass_forward, h_mass_SIT_fail_central, h_mass_SIT_fail_forward, h_mass_SIT_pass_central, h_mass_SIT_pass_forward, h_mass_yield_Z, h_npv, h_npv_yield_Z, h_yieldBB_Z, h_yieldEE_Z, IDType_, initHLT(), reco::isMuon(), isMuonTrigger(), isMuonTriggerObj(), IsoCut_, IsoType_, edm::HandleBase::isValid(), edm::EventBase::luminosityBlock(), MassMax_, MassMin_, MUON_BOUND, MUON_MASS, edm::TriggerNames::parameterSetID(), passMuonID(), passMuonIso(), edm::Handle< T >::product(), hiDetachedQuadStep_cff::pt1, hiDetachedQuadStep_cff::pt2, PtCutL1_, PtCutL2_, MetAnalyzer::pv(), q1, q2, edm::Event::triggerNames(), VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

Referenced by analyze().

228  {
229  edm::LogInfo("ZCounting") << "ZCounting::analyzeMuons" << std::endl;
230  //-------------------------------
231  //--- Vertex
232  //-------------------------------
234  iEvent.getByToken(fPVName_token,hVertexProduct);
235  if(!hVertexProduct.isValid()){
236  edm::LogWarning("ZCounting") << "ZCounting::analyzeMuons - no valid primary vertex product found" << std::endl;
237  return;
238  }
239  const reco::VertexCollection *pvCol = hVertexProduct.product();
240  const reco::Vertex* pv = &(*pvCol->begin());
241  int nvtx = 0;
242 
243  for(auto const & itVtx : *hVertexProduct) {
244  if(itVtx.isFake()) continue;
245  if(itVtx.tracksSize() < VtxNTracksFitCut_) continue;
246  if(itVtx.ndof() < VtxNdofCut_) continue;
247  if(fabs(itVtx.z()) > VtxAbsZCut_) continue;
248  if(itVtx.position().Rho() > VtxRhoCut_) continue;
249 
250  if(nvtx==0) {
251  pv = &itVtx;
252  }
253  nvtx++;
254  }
255 
256  h_npv->Fill(iEvent.luminosityBlock(), nvtx);
257 
258  // Good vertex requirement
259  if(nvtx==0) return;
260 
261  //-------------------------------
262  //--- Trigger
263  //-------------------------------
265  iEvent.getByToken(fHLTTag_token,hTrgRes);
266  if(!hTrgRes.isValid()) return;
267 
269  iEvent.getByToken(fHLTObjTag_token,hTrgEvt);
270 
271  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*hTrgRes);
272  bool config_changed = false;
273  if(fTriggerNamesID != triggerNames.parameterSetID()) {
274  fTriggerNamesID = triggerNames.parameterSetID();
275  config_changed = true;
276  }
277  if(config_changed) {
278  initHLT(*hTrgRes, triggerNames);
279  }
280 
281  TriggerBits triggerBits;
282  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
283  if(fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1) continue;
284  if(hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
285  triggerBits [fTrigger->fRecords[irec].baconTrigBit] = true;
286  }
287  }
288  //if(fSkipOnHLTFail && triggerBits == 0) return;
289 
290  // Trigger requirement
291  if(!isMuonTrigger(*fTrigger, triggerBits)) return;
292 
293  //-------------------------------
294  //--- Muons and Tracks
295  //-------------------------------
297  iEvent.getByToken(fMuonName_token,hMuonProduct);
298  if(!hMuonProduct.isValid()) return;
299 
301  iEvent.getByToken(fTrackName_token,hTrackProduct);
302  if(!hTrackProduct.isValid()) return;
303 
304  TLorentzVector vTag(0.,0.,0.,0.);
305  TLorentzVector vProbe(0.,0.,0.,0.);
306  TLorentzVector vTrack(0.,0.,0.,0.);
307 
308 // Tag loop
309  for(auto const & itMu1 : *hMuonProduct) {
310 
311  float pt1 = itMu1.muonBestTrack()->pt();
312  float eta1 = itMu1.muonBestTrack()->eta();
313  float phi1 = itMu1.muonBestTrack()->phi();
314  float q1 = itMu1.muonBestTrack()->charge();
315 
316  // Tag selection: kinematic cuts, lepton selection and trigger matching
317  if(pt1 < PtCutL1_) continue;
318  if(fabs(eta1) > EtaCutL1_) continue;
319  if(!(passMuonID(itMu1, *pv, IDType_) && passMuonIso(itMu1, IsoType_, IsoCut_))) continue;
320  if(!isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt))) continue;
321 
322  vTag.SetPtEtaPhiM(pt1, eta1, phi1, MUON_MASS);
323 
324  // Probe loop over muons
325  for(auto const & itMu2 : *hMuonProduct) {
326  if(&itMu2 == &itMu1) continue;
327 
328  float pt2 = itMu2.muonBestTrack()->pt();
329  float eta2 = itMu2.muonBestTrack()->eta();
330  float phi2 = itMu2.muonBestTrack()->phi();
331  float q2 = itMu2.muonBestTrack()->charge();
332 
333  // Probe selection: kinematic cuts and opposite charge requirement
334  if(pt2 < PtCutL2_) continue;
335  if(fabs(eta2) > EtaCutL2_) continue;
336  if(q1 == q2) continue;
337 
338  vProbe.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
339 
340  // Mass window
341  TLorentzVector vDilep = vTag + vProbe;
342  float dilepMass = vDilep.M();
343  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
344 
345  bool isTagCentral = false;
346  bool isProbeCentral = false;
347  if(fabs(eta1) < MUON_BOUND) isTagCentral = true;
348  if(fabs(eta2) < MUON_BOUND) isProbeCentral = true;
349 
350  // Determine event category for efficiency calculation
351  if(passMuonID(itMu2, *pv, IDType_) && passMuonIso(itMu2, IsoType_, IsoCut_)){
352  if(isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta2, phi2, fTrigger->fRecords, *hTrgEvt))){
353  // category 2HLT: both muons passing trigger requirements
354  if(&itMu1>&itMu2) continue; // make sure we don't double count MuMu2HLT category
355 
356  // Fill twice for each event, since both muons pass trigger
357  if(isTagCentral){
358  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
359  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
360  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
361  }
362  else
363  {
364  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
365  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
366  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
367  }
368 
369  if(isProbeCentral){
370  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
371  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
372  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
373  }
374  else
375  {
376  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
377  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
378  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
379  }
380 
381  }
382  else{
383  // category 1HLT: probe passing selection but not trigger
384  if(isProbeCentral){
385  h_mass_HLT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
386  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
387  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
388  }
389  else
390  {
391  h_mass_HLT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
392  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
393  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
394  }
395 
396  }
397  // category 2HLT + 1HLT: Fill once for Z yield
398  h_npv_yield_Z->Fill(iEvent.luminosityBlock(), nvtx);
399  h_mass_yield_Z->Fill(iEvent.luminosityBlock(), dilepMass);
400  if(isTagCentral && isProbeCentral) h_yieldBB_Z->Fill(iEvent.luminosityBlock());
401  else if(!isTagCentral && !isProbeCentral) h_yieldEE_Z->Fill(iEvent.luminosityBlock());
402  }
403  else if(itMu2.isGlobalMuon()){
404  // category Glo: probe is a Global muon but failing selection
405  if(isProbeCentral){
406  h_mass_SIT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
407  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
408  }
409  else
410  {
411  h_mass_SIT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
412  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
413  }
414  }
415  else if(itMu2.isStandAloneMuon()){
416  // category Sta: probe is a Standalone muon
417  if(isProbeCentral){
418  h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
419  }
420  else
421  {
422  h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
423  }
424  }
425  else if(itMu2.innerTrack()->hitPattern().trackerLayersWithMeasurement() >= 6 && itMu2.innerTrack()->hitPattern().numberOfValidPixelHits() >= 1){
426  // cateogry Trk: probe is a tracker track
427  if(isProbeCentral){
428  h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
429  }
430  else
431  {
432  h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
433  }
434  }
435 
436  }// End of probe loop over muons
437 
438  // Probe loop over tracks, only for standalone efficiency calculation
439  for(auto const & itTrk : *hTrackProduct) {
440 
441  // Check track is not a muon
442  bool isMuon = false;
443  for(auto const & itMu : *hMuonProduct) {
444  if(itMu.innerTrack().isNonnull() && itMu.innerTrack().get() == &itTrk) {
445  isMuon = true;
446  break;
447  }
448  }
449  if(isMuon) continue;
450 
451  float pt2 = itTrk.pt();
452  float eta2 = itTrk.eta();
453  float phi2 = itTrk.phi();
454  float q2 = itTrk.charge();
455 
456  // Probe selection: kinematic cuts and opposite charge requirement
457  if(pt2 < PtCutL2_) continue;
458  if(fabs(eta2) > EtaCutL2_) continue;
459  if(q1 == q2) continue;
460 
461  vTrack.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
462 
463  TLorentzVector vDilep = vTag + vTrack;
464  float dilepMass = vDilep.M();
465  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
466 
467  bool isTrackCentral = false;
468  if(fabs(eta2) > MUON_BOUND) isTrackCentral = true;
469 
470  if(itTrk.hitPattern().trackerLayersWithMeasurement() >= 6 && itTrk.hitPattern().numberOfValidPixelHits() >= 1){
471  if(isTrackCentral) h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
472  else h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
473  }
474 
475  }//End of probe loop over tracks
476 
477  }//End of tag loop
478 
479 }
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:177
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:179
double IsoCut_
Definition: ZCounting.h:121
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:173
double PtCutL1_
Definition: ZCounting.h:123
bool isMuon(const Candidate &part)
Definition: pdgIdUtils.h:11
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:172
bool accept() const
Has at least one path accepted the event?
MuonIsoTypes IsoType_
Definition: ZCounting.h:120
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
bool passMuonID(const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
Definition: ZCounting.cc:744
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:167
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:183
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:176
double q2[4]
Definition: TauolaWrapper.h:88
void Fill(long long x)
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:33
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:93
const double MUON_MASS
Definition: ZCounting.h:145
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:87
double VtxRhoCut_
Definition: ZCounting.h:143
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:77
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:83
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:185
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:140
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:182
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:726
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:699
def pv(vc)
Definition: MetAnalyzer.py:7
double VtxNdofCut_
Definition: ZCounting.h:141
bool isValid() const
Definition: HandleBase.h:74
MuonIDTypes IDType_
Definition: ZCounting.h:119
MonitorElement * h_npv
Definition: ZCounting.h:181
double PtCutL2_
Definition: ZCounting.h:124
const double MUON_BOUND
Definition: ZCounting.h:146
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:80
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:174
T const * product() const
Definition: Handle.h:74
double q1[4]
Definition: TauolaWrapper.h:87
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:166
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:81
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:169
double EtaCutL1_
Definition: ZCounting.h:125
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:754
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:184
double MassMax_
Definition: ZCounting.h:130
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:178
double MassMin_
Definition: ZCounting.h:129
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:171
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:115
double EtaCutL2_
Definition: ZCounting.h:126
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:168
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:735
double VtxAbsZCut_
Definition: ZCounting.h:142
void ZCounting::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 136 of file ZCounting.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), h_mass_Glo_fail_central, h_mass_Glo_fail_forward, h_mass_Glo_pass_central, h_mass_Glo_pass_forward, h_mass_HLT_fail_central, h_mass_HLT_fail_forward, h_mass_HLT_pass_central, h_mass_HLT_pass_forward, h_mass_SIT_fail_central, h_mass_SIT_fail_forward, h_mass_SIT_pass_central, h_mass_SIT_pass_forward, h_mass_yield_Z, h_npv, h_npv_yield_Z, h_yieldBB_Z, h_yieldEE_Z, LumiBin_, LumiMax_, LumiMin_, MassBin_, MassMax_, MassMin_, PVBin_, PVMax_, PVMin_, MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

137 {
138  edm::LogInfo("ZCounting") << "ZCounting::bookHistograms" << std::endl;
139  ibooker_.cd();
140  ibooker_.setCurrentFolder("ZCounting/Histograms");
141 
142 
143  // Muon histograms
144  h_mass_HLT_pass_central = ibooker_.book2D("h_mass_HLT_pass_central", "Muon HLT passing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
145  h_mass_HLT_pass_forward = ibooker_.book2D("h_mass_HLT_pass_forward", "Muon HLT passing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
146  h_mass_HLT_fail_central = ibooker_.book2D("h_mass_HLT_fail_central", "Muon HLT failing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
147  h_mass_HLT_fail_forward = ibooker_.book2D("h_mass_HLT_fail_forward", "Muon HLT failing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
148 
149  h_mass_SIT_pass_central = ibooker_.book2D("h_mass_SIT_pass_central", "Muon SIT passing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
150  h_mass_SIT_pass_forward = ibooker_.book2D("h_mass_SIT_pass_forward", "Muon SIT passing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
151  h_mass_SIT_fail_central = ibooker_.book2D("h_mass_SIT_fail_central", "Muon SIT_failing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
152  h_mass_SIT_fail_forward = ibooker_.book2D("h_mass_SIT_fail_forward", "Muon SIT failing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
153 
154  h_mass_Glo_pass_central = ibooker_.book2D("h_mass_Glo_pass_central", "Muon Glo passing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
155  h_mass_Glo_pass_forward = ibooker_.book2D("h_mass_Glo_pass_forward", "Muon Glo passing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
156  h_mass_Glo_fail_central = ibooker_.book2D("h_mass_Glo_fail_central", "Muon Glo failing probes central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
157  h_mass_Glo_fail_forward = ibooker_.book2D("h_mass_Glo_fail_forward", "Muon Glo failing probes forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
158 
159  h_npv = ibooker_.book2D("h_npv", "Events with valid primary vertex", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
160  h_mass_yield_Z = ibooker_.book2D("h_mass_yield_Z", "reconstructed Z bosons", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
161  h_npv_yield_Z = ibooker_.book2D("h_npv_yield_Z", "reconstructed Z bosons", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
162  h_yieldBB_Z = ibooker_.book1D("h_yieldBB_Z", "reconstructed Z bosons in barrel", LumiBin_, LumiMin_, LumiMax_);
163  h_yieldEE_Z = ibooker_.book1D("h_yieldEE_Z", "reconstructed Z bosons in endcap", LumiBin_, LumiMin_, LumiMax_);
164 
165  // Axis titles
166  h_mass_HLT_pass_central ->setAxisTitle("luminosiry section",1);
167  h_mass_HLT_pass_forward ->setAxisTitle("luminosiry section",1);
168  h_mass_HLT_fail_central ->setAxisTitle("luminosiry section",1);
169  h_mass_HLT_fail_forward ->setAxisTitle("luminosiry section",1);
170  h_mass_SIT_pass_central ->setAxisTitle("luminosiry section",1);
171  h_mass_SIT_pass_forward ->setAxisTitle("luminosiry section",1);
172  h_mass_SIT_fail_central ->setAxisTitle("luminosiry section",1);
173  h_mass_SIT_fail_forward ->setAxisTitle("luminosiry section",1);
174  h_mass_Glo_pass_central ->setAxisTitle("luminosiry section",1);
175  h_mass_Glo_pass_forward ->setAxisTitle("luminosiry section",1);
176  h_mass_Glo_fail_central ->setAxisTitle("luminosiry section",1);
177  h_mass_Glo_fail_forward ->setAxisTitle("luminosiry section",1);
178  h_mass_HLT_pass_central ->setAxisTitle("tag and probe mass",2);
179  h_mass_HLT_pass_forward ->setAxisTitle("tag and probe mass",2);
180  h_mass_HLT_fail_central ->setAxisTitle("tag and probe mass",2);
181  h_mass_HLT_fail_forward ->setAxisTitle("tag and probe mass",2);
182  h_mass_SIT_pass_central ->setAxisTitle("tag and probe mass",2);
183  h_mass_SIT_pass_forward ->setAxisTitle("tag and probe mass",2);
184  h_mass_SIT_fail_central ->setAxisTitle("tag and probe mass",2);
185  h_mass_SIT_fail_forward ->setAxisTitle("tag and probe mass",2);
186  h_mass_Glo_pass_central ->setAxisTitle("tag and probe mass",2);
187  h_mass_Glo_pass_forward ->setAxisTitle("tag and probe mass",2);
188  h_mass_Glo_fail_central ->setAxisTitle("tag and probe mass",2);
189  h_mass_Glo_fail_forward ->setAxisTitle("tag and probe mass",2);
190  h_npv ->setAxisTitle("luminosity section", 1);
191  h_npv ->setAxisTitle("number of primary vertices", 2);
192  h_npv_yield_Z ->setAxisTitle("luminosiry section",1);
193  h_npv_yield_Z ->setAxisTitle("number of primary vertices",2);
194  h_mass_yield_Z ->setAxisTitle("luminosiry section",1);
195  h_mass_yield_Z ->setAxisTitle("tag and probe mass",2);
196 
197  h_yieldBB_Z ->setAxisTitle("luminosiry section",1);
198  h_yieldEE_Z ->setAxisTitle("luminosiry section",1);
199 
200  /*
201  // Electron histograms
202  h_ee_mass_id_pass_central = ibooker_.book2D("h_ee_mass_id_pass_central", "h_ee_mass_id_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
203  h_ee_mass_id_fail_central = ibooker_.book2D("h_ee_mass_id_fail_central", "h_ee_mass_id_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
204  h_ee_mass_id_pass_forward = ibooker_.book2D("h_ee_mass_id_pass_forward", "h_ee_mass_id_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
205  h_ee_mass_id_fail_forward = ibooker_.book2D("h_ee_mass_id_fail_forward", "h_ee_mass_id_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
206 
207  h_ee_mass_HLT_pass_central = ibooker_.book2D("h_ee_mass_HLT_pass_central", "h_ee_mass_HLT_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
208  h_ee_mass_HLT_fail_central = ibooker_.book2D("h_ee_mass_HLT_fail_central", "h_ee_mass_HLT_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
209  h_ee_mass_HLT_pass_forward = ibooker_.book2D("h_ee_mass_HLT_pass_forward", "h_ee_mass_HLT_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
210  h_ee_mass_HLT_fail_forward = ibooker_.book2D("h_ee_mass_HLT_fail_forward", "h_ee_mass_HLT_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
211 
212  h_ee_yield_Z_ebeb = ibooker_.book1D("h_ee_yield_Z_ebeb", "h_ee_yield_Z_ebeb", LumiBin_, LumiMin_, LumiMax_);
213  h_ee_yield_Z_ebee = ibooker_.book1D("h_ee_yield_Z_ebee", "h_ee_yield_Z_ebee", LumiBin_, LumiMin_, LumiMax_);
214  h_ee_yield_Z_eeee = ibooker_.book1D("h_ee_yield_Z_eeee", "h_ee_yield_Z_eeee", LumiBin_, LumiMin_, LumiMax_);*/
215 }
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:177
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:179
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:173
double LumiMax_
Definition: ZCounting.h:134
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:172
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:167
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:183
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:176
double LumiMin_
Definition: ZCounting.h:133
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:185
int PVBin_
Definition: ZCounting.h:136
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:182
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * h_npv
Definition: ZCounting.h:181
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:174
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:166
int MassBin_
Definition: ZCounting.h:128
int LumiBin_
Definition: ZCounting.h:132
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:169
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:184
double MassMax_
Definition: ZCounting.h:130
double PVMax_
Definition: ZCounting.h:138
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:178
double MassMin_
Definition: ZCounting.h:129
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:171
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double PVMin_
Definition: ZCounting.h:137
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:168
void ZCounting::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 125 of file ZCounting.cc.

References fMuonHLTNames, fMuonHLTObjectNames, and fTrigger.

126 {
127  edm::LogInfo("ZCounting") << "ZCounting::beginRun" << std::endl;
128 
129  // Triggers
131 
132 }
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:88
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:89
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:115
bool ZCounting::ele_probe_selection ( double  pt,
double  abseta 
)
private

Definition at line 683 of file ZCounting.cc.

References ELE_ETA_CRACK_HIGH, ELE_ETA_CRACK_LOW, ELE_ETA_CUT_PROBE, and ELE_PT_CUT_PROBE.

Referenced by analyzeElectrons().

683  {
684  if(pt < ELE_PT_CUT_PROBE) return false;
685  if(abseta > ELE_ETA_CUT_PROBE) return false;
686  if( (abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH) ) return false;
687  return true;
688 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:160
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:152
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:159
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:154
bool ZCounting::ele_tag_selection ( double  pt,
double  abseta 
)
private

Definition at line 689 of file ZCounting.cc.

References ELE_ETA_CRACK_HIGH, ELE_ETA_CRACK_LOW, ELE_ETA_CUT_TAG, and ELE_PT_CUT_TAG.

Referenced by analyzeElectrons().

689  {
690  if(pt < ELE_PT_CUT_TAG) return false;
691  if(abseta > ELE_ETA_CUT_TAG) return false;
692  if( (abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH) ) return false;
693  return true;
694 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:160
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:153
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:159
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:151
void ZCounting::initHLT ( const edm::TriggerResults result,
const edm::TriggerNames triggerNames 
)
private

Definition at line 699 of file ZCounting.cc.

References fTrigger, createfilelist::int, edm::is_glob(), match(), patRefSel_triggerMatching_cfi::matches, listBenchmarks::pattern, edm::regexMatch(), edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), and edm::TriggerNames::triggerNames().

Referenced by analyzeElectrons(), and analyzeMuons().

700 {
701  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
702  fTrigger->fRecords[irec].hltPathName = "";
703  fTrigger->fRecords[irec].hltPathIndex = (unsigned int)-1;
704  const std::string pattern = fTrigger->fRecords[irec].hltPattern;
705  if(edm::is_glob(pattern)) { // handle pattern with wildcards (*,?)
706  std::vector<std::vector<std::string>::const_iterator> matches = edm::regexMatch(triggerNames.triggerNames(), pattern);
707  if(matches.empty()) {
708  edm::LogWarning("ZCounting") << "requested pattern [" << pattern << "] does not match any HLT paths" << std::endl;
709  } else {
710  for(auto const& match : matches) {
711  fTrigger->fRecords[irec].hltPathName = *match;
712  }
713  }
714  } else { // take full HLT path name given
715  fTrigger->fRecords[irec].hltPathName = pattern;
716  }
717  // Retrieve index in trigger menu corresponding to HLT path
718  unsigned int index = triggerNames.triggerIndex(fTrigger->fRecords[irec].hltPathName);
719  if(index < result.size()) { // check for valid index
720  fTrigger->fRecords[irec].hltPathIndex = index;
721  }
722  }
723 }
bool is_glob(std::string const &pattern)
Definition: RegexMatch.cc:17
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:24
unsigned int size() const
Get number of paths stored.
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const &regexp)
Definition: RegexMatch.cc:26
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:115
bool ZCounting::isElectronTrigger ( ZCountingTrigger::TTrigger  triggerMenu,
TriggerBits  hltBits 
)
private

Definition at line 764 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::pass().

Referenced by analyzeElectrons().

765 {
766  return triggerMenu.pass("HLT_Ele35_WPTight_Gsf_v*",hltBits);
767 }
bool pass(const std::string &iName, const TriggerBits &iTrig) const
Definition: TTrigger.cc:61
bool ZCounting::isElectronTriggerObj ( ZCountingTrigger::TTrigger  triggerMenu,
TriggerObjects  hltMatchBits 
)
private

Definition at line 769 of file ZCounting.cc.

References DEFINE_FWK_MODULE, and ZCountingTrigger::TTrigger::passObj().

Referenced by analyzeElectrons().

770 {
771  return triggerMenu.passObj("HLT_Ele35_WPTight_Gsf_v*","hltEle35noerWPTightGsfTrackIsoFilter",hltMatchBits);
772 }
bool passObj(const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
Definition: TTrigger.cc:69
bool ZCounting::isMuonTrigger ( const ZCountingTrigger::TTrigger triggerMenu,
const TriggerBits hltBits 
)
private

Definition at line 726 of file ZCounting.cc.

References fMuonHLTNames, mps_fire::i, and ZCountingTrigger::TTrigger::pass().

Referenced by analyzeMuons().

727 {
728  for(unsigned int i = 0; i< fMuonHLTNames.size(); ++i){
729  if(triggerMenu.pass(fMuonHLTNames.at(i), hltBits)) return true;
730  }
731  return false;
732 }
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:88
bool pass(const std::string &iName, const TriggerBits &iTrig) const
Definition: TTrigger.cc:61
bool ZCounting::isMuonTriggerObj ( const ZCountingTrigger::TTrigger triggerMenu,
const TriggerObjects hltMatchBits 
)
private

Definition at line 735 of file ZCounting.cc.

References fMuonHLTNames, fMuonHLTObjectNames, mps_fire::i, and ZCountingTrigger::TTrigger::passObj().

Referenced by analyzeMuons().

736 {
737  for(unsigned int i = 0; i< fMuonHLTNames.size(); ++i){
738  if(triggerMenu.passObj(fMuonHLTNames.at(i), fMuonHLTObjectNames.at(i), hltMatchBits)) return true;
739  }
740  return false;
741 }
bool passObj(const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
Definition: TTrigger.cc:69
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:88
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:89
bool ZCounting::passMuonID ( const reco::Muon muon,
const reco::Vertex vtx,
const MuonIDTypes idType 
)
private

Definition at line 744 of file ZCounting.cc.

References muon::isLooseMuon(), muon::isMediumMuon(), muon::isTightMuon(), LooseID, MediumID, NoneID, and TightID.

Referenced by analyzeMuons().

745 {//Muon ID selection, using internal function "DataFormats/MuonReco/src/MuonSelectors.cc
746 
747  if (idType == LooseID && muon::isLooseMuon(muon)) return true;
748  else if(idType == MediumID && muon::isMediumMuon(muon)) return true;
749  else if(idType == TightID && muon::isTightMuon(muon, vtx)) return true;
750  else if(idType == NoneID) return true;
751  else return false;
752 }
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
bool isLooseMuon(const reco::Muon &)
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
bool ZCounting::passMuonIso ( const reco::Muon muon,
const MuonIsoTypes isoType,
const float  isoCut 
)
private

Definition at line 754 of file ZCounting.cc.

References reco::Muon::isolationR03(), SiStripPI::max, NoneIso, PFIso, reco::Muon::pfIsolationR04(), reco::MuonPFIsolation::sumChargedHadronPt, reco::MuonPFIsolation::sumNeutralHadronEt, reco::MuonPFIsolation::sumPhotonEt, reco::MuonIsolation::sumPt, reco::MuonPFIsolation::sumPUPt, and TrackerIso.

Referenced by analyzeMuons().

755 {//Muon isolation selection, up-to-date with MUO POG recommendation
756 
757  if(isoType == TrackerIso && muon.isolationR03().sumPt < isoCut) return true;
758  else if(isoType == PFIso && muon.pfIsolationR04().sumChargedHadronPt + std::max(0.,muon.pfIsolationR04().sumNeutralHadronEt + muon.pfIsolationR04().sumPhotonEt - 0.5*muon.pfIsolationR04().sumPUPt) < isoCut) return true;
759  else if(isoType == NoneIso) return true;
760  else return false;
761 }
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
float sumPhotonEt
sum pt of PF photons
float sumNeutralHadronEt
sum pt of neutral hadrons
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
const MuonPFIsolation & pfIsolationR04() const
Definition: Muon.h:168
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
float sumChargedHadronPt
sum-pt of charged Hadron

Member Data Documentation

const float ZCounting::ELE_ETA_CRACK_HIGH = 1.56
private

Definition at line 160 of file ZCounting.h.

Referenced by ele_probe_selection(), and ele_tag_selection().

const float ZCounting::ELE_ETA_CRACK_LOW = 1.4442
private

Definition at line 159 of file ZCounting.h.

Referenced by analyzeElectrons(), ele_probe_selection(), and ele_tag_selection().

const float ZCounting::ELE_ETA_CUT_PROBE
private

Definition at line 154 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_ETA_CUT_TAG
private

Definition at line 153 of file ZCounting.h.

Referenced by ele_tag_selection().

const std::string ZCounting::ELE_ID_WP
private

Definition at line 158 of file ZCounting.h.

Referenced by ZCounting().

const float ZCounting::ELE_MASS_CUT_HIGH
private

Definition at line 156 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_MASS_CUT_LOW
private

Definition at line 155 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_PT_CUT_PROBE
private

Definition at line 152 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_PT_CUT_TAG
private

Definition at line 151 of file ZCounting.h.

Referenced by ele_tag_selection().

const float ZCounting::ELECTRON_MASS = 0.000511
private

Definition at line 149 of file ZCounting.h.

Referenced by analyzeElectrons().

ElectronIdentifier ZCounting::EleID_
private

Definition at line 162 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

double ZCounting::EtaCutL1_
private

Definition at line 125 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::EtaCutL2_
private

Definition at line 126 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

edm::InputTag ZCounting::fBeamspotTag
private

Definition at line 106 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<reco::BeamSpot> ZCounting::fBeamspotToken
private

Definition at line 107 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

edm::InputTag ZCounting::fConversionTag
private

Definition at line 109 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<reco::ConversionCollection> ZCounting::fConversionToken
private

Definition at line 110 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fElectronName
private

Definition at line 96 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<edm::View<reco::GsfElectron> > ZCounting::fGsfElectronName_token
private

Definition at line 97 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

edm::InputTag ZCounting::fHLTObjTag
private

Definition at line 78 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<trigger::TriggerEvent> ZCounting::fHLTObjTag_token
private

Definition at line 80 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

edm::InputTag ZCounting::fHLTTag
private

Definition at line 79 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<edm::TriggerResults> ZCounting::fHLTTag_token
private

Definition at line 81 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

std::vector<std::string> ZCounting::fMuonHLTNames
private

Definition at line 88 of file ZCounting.h.

Referenced by dqmBeginRun(), isMuonTrigger(), isMuonTriggerObj(), and ZCounting().

std::vector<std::string> ZCounting::fMuonHLTObjectNames
private

Definition at line 89 of file ZCounting.h.

Referenced by dqmBeginRun(), isMuonTriggerObj(), and ZCounting().

std::string ZCounting::fMuonName
private

Definition at line 86 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<reco::MuonCollection> ZCounting::fMuonName_token
private

Definition at line 87 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::fPVName
private

Definition at line 82 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<reco::VertexCollection> ZCounting::fPVName_token
private

Definition at line 83 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

edm::InputTag ZCounting::fRhoTag
private

Definition at line 103 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<double> ZCounting::fRhoToken
private

Definition at line 104 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fSCName
private

Definition at line 98 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<edm::View<reco::SuperCluster> > ZCounting::fSCName_token
private

Definition at line 99 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fTrackName
private

Definition at line 92 of file ZCounting.h.

Referenced by ZCounting().

edm::EDGetTokenT<reco::TrackCollection> ZCounting::fTrackName_token
private

Definition at line 93 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::unique_ptr<ZCountingTrigger::TTrigger> ZCounting::fTrigger
private

Definition at line 115 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), dqmBeginRun(), and initHLT().

edm::ParameterSetID ZCounting::fTriggerNamesID
private

Definition at line 77 of file ZCounting.h.

Referenced by analyzeElectrons(), and analyzeMuons().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_central
private

Definition at line 194 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_forward
private

Definition at line 196 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_central
private

Definition at line 193 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_forward
private

Definition at line 195 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_fail_central
private

Definition at line 189 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_fail_forward
private

Definition at line 191 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_pass_central
private

Definition at line 188 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_pass_forward
private

Definition at line 190 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_ebeb
private

Definition at line 199 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_ebee
private

Definition at line 200 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_eeee
private

Definition at line 201 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_mass_Glo_fail_central
private

Definition at line 178 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_fail_forward
private

Definition at line 179 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_pass_central
private

Definition at line 176 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_pass_forward
private

Definition at line 177 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_central
private

Definition at line 168 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_forward
private

Definition at line 169 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_central
private

Definition at line 166 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_forward
private

Definition at line 167 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_central
private

Definition at line 173 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_forward
private

Definition at line 174 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_central
private

Definition at line 171 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_forward
private

Definition at line 172 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_yield_Z
private

Definition at line 183 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_npv
private

Definition at line 181 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_npv_yield_Z
private

Definition at line 182 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldBB_Z
private

Definition at line 184 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldEE_Z
private

Definition at line 185 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MuonIDTypes ZCounting::IDType_ {NoneID}
private

Definition at line 119 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IDTypestr_
private

Definition at line 117 of file ZCounting.h.

Referenced by ZCounting().

double ZCounting::IsoCut_
private

Definition at line 121 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

MuonIsoTypes ZCounting::IsoType_ {NoneIso}
private

Definition at line 120 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IsoTypestr_
private

Definition at line 118 of file ZCounting.h.

Referenced by ZCounting().

int ZCounting::LumiBin_
private

Definition at line 132 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMax_
private

Definition at line 134 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMin_
private

Definition at line 133 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

int ZCounting::MassBin_
private

Definition at line 128 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::MassMax_
private

Definition at line 130 of file ZCounting.h.

Referenced by analyzeMuons(), bookHistograms(), and ZCounting().

double ZCounting::MassMin_
private

Definition at line 129 of file ZCounting.h.

Referenced by analyzeMuons(), bookHistograms(), and ZCounting().

const double ZCounting::MUON_BOUND = 0.9
private

Definition at line 146 of file ZCounting.h.

Referenced by analyzeMuons().

const double ZCounting::MUON_MASS = 0.105658369
private

Definition at line 145 of file ZCounting.h.

Referenced by analyzeMuons().

double ZCounting::PtCutL1_
private

Definition at line 123 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::PtCutL2_
private

Definition at line 124 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

int ZCounting::PVBin_
private

Definition at line 136 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMax_
private

Definition at line 138 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMin_
private

Definition at line 137 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::VtxAbsZCut_
private

Definition at line 142 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

double ZCounting::VtxNdofCut_
private

Definition at line 141 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

double ZCounting::VtxNTracksFitCut_
private

Definition at line 140 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().

double ZCounting::VtxRhoCut_
private

Definition at line 143 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), and ZCounting().