CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

enum  MuonIDTypes { NoneID, LooseID, MediumID, TightID }
 
enum  MuonIsoTypes { NoneIso, TrackerIso, PFIso }
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

 ZCounting (const edm::ParameterSet &ps)
 
 ~ZCounting () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

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::ConversionCollection
fConversionToken
 
std::string fElectronName
 
edm::EDGetTokenT< edm::View
< reco::GsfElectron > > 
fGsfElectronName_token
 
edm::InputTag fHLTObjTag
 
edm::EDGetTokenT
< trigger::TriggerEvent
fHLTObjTag_token
 
edm::InputTag fHLTTag
 
edm::EDGetTokenT
< edm::TriggerResults
fHLTTag_token
 
std::vector< std::string > fMuonHLTNames
 
std::vector< std::string > fMuonHLTObjectNames
 
std::string fMuonName
 
edm::EDGetTokenT
< reco::MuonCollection
fMuonName_token
 
std::string fPVName
 
edm::EDGetTokenT
< reco::VertexCollection
fPVName_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::TrackCollection
fTrackName_token
 
std::unique_ptr
< ZCountingTrigger::TTrigger
fTrigger
 
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_
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 41 of file ZCounting.h.

Member Enumeration Documentation

Enumerator
NoneID 
LooseID 
MediumID 
TightID 

Definition at line 46 of file ZCounting.h.

Enumerator
NoneIso 
TrackerIso 
PFIso 

Definition at line 47 of file ZCounting.h.

Constructor & Destructor Documentation

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

Definition at line 26 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_.

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

Definition at line 126 of file ZCounting.cc.

126 { edm::LogInfo("ZCounting") << "Destructor ZCounting::~ZCounting " << std::endl; }
Log< level::Info, false > LogInfo

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 310 of file ZCounting.cc.

References analyzeMuons().

310  { // Fill event tree on the fly
311  edm::LogInfo("ZCounting") << "ZCounting::analyze" << std::endl;
312  analyzeMuons(iEvent, iSetup);
313  //analyzeElectrons(iEvent, iSetup);
314 }
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:316
int iEvent
Definition: GenABIO.cc:224
Log< level::Info, false > LogInfo
void ZCounting::analyzeElectrons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Fill for ID efficiency

Fill for HLT efficiency

Definition at line 582 of file ZCounting.cc.

References ELE_ETA_CRACK_LOW, ELE_MASS_CUT_HIGH, ELE_MASS_CUT_LOW, ele_probe_selection(), ele_tag_selection(), ELECTRON_MASS, HI_PhotonSkim_cff::electrons, EleID_, HLT_FULL_cff::eta1, fBeamspotToken, fConversionToken, fGsfElectronName_token, fHLTObjTag_token, fHLTTag_token, dqm::impl::MonitorElement::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(), funct::pow(), edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::pt, ElectronIdentifier::setRho(), mathSSE::sqrt(), L1TMuonDQMOffline_cfi::triggerNames, edm::Event::triggerNames(), VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

582  {
583  edm::LogInfo("ZCounting") << "ZCounting::analyzeElectrons" << std::endl;
584 
585  //-------------------------------
586  //--- Vertex
587  //-------------------------------
589  iEvent.getByToken(fPVName_token, hVertexProduct);
590  if (!hVertexProduct.isValid())
591  return;
592 
593  const reco::VertexCollection* pvCol = hVertexProduct.product();
594  int nvtx = 0;
595 
596  for (auto const& vtx : *pvCol) {
597  if (vtx.isFake())
598  continue;
599  if (vtx.tracksSize() < VtxNTracksFitCut_)
600  continue;
601  if (vtx.ndof() < VtxNdofCut_)
602  continue;
603  if (fabs(vtx.z()) > VtxAbsZCut_)
604  continue;
605  if (vtx.position().Rho() > VtxRhoCut_)
606  continue;
607 
608  nvtx++;
609  }
610 
611  // Good vertex requirement
612  if (nvtx == 0)
613  return;
614 
615  //-------------------------------
616  //--- Trigger
617  //-------------------------------
619  iEvent.getByToken(fHLTTag_token, hTrgRes);
620  if (!hTrgRes.isValid())
621  return;
622 
624  iEvent.getByToken(fHLTObjTag_token, hTrgEvt);
625 
626  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*hTrgRes);
627  Bool_t config_changed = false;
628  if (fTriggerNamesID != triggerNames.parameterSetID()) {
629  fTriggerNamesID = triggerNames.parameterSetID();
630  config_changed = true;
631  }
632  if (config_changed) {
633  initHLT(*hTrgRes, triggerNames);
634  }
635 
636  TriggerBits triggerBits;
637  for (unsigned int irec = 0; irec < fTrigger->fRecords.size(); irec++) {
638  if (fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1)
639  continue;
640  if (hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
641  triggerBits[fTrigger->fRecords[irec].baconTrigBit] = true;
642  }
643  }
644 
645  // Trigger requirement
646  if (!isElectronTrigger(*fTrigger, triggerBits))
647  return;
648 
649  // Get Electrons
651  iEvent.getByToken(fGsfElectronName_token, electrons);
652 
653  // Get SuperClusters
655  iEvent.getByToken(fSCName_token, superclusters);
656 
657  // Get Rho
658  edm::Handle<double> rhoHandle;
659  iEvent.getByToken(fRhoToken, rhoHandle);
660  EleID_.setRho(*rhoHandle);
661 
662  // Get beamspot
663  edm::Handle<reco::BeamSpot> beamspotHandle;
664  iEvent.getByToken(fBeamspotToken, beamspotHandle);
665 
666  // Conversions
667  edm::Handle<reco::ConversionCollection> conversionsHandle;
668  iEvent.getByToken(fConversionToken, conversionsHandle);
669 
671  enum { eEleEle2HLT = 1, eEleEle1HLT1L1, eEleEle1HLT, eEleEleNoSel, eEleSC }; // event category enum
672 
673  // Loop over Tags
674  for (size_t itag = 0; itag < electrons->size(); ++itag) {
675  const auto el1 = electrons->ptrAt(itag);
676  if (not EleID_.passID(el1, beamspotHandle, conversionsHandle))
677  continue;
678 
679  float pt1 = el1->pt();
680  float eta1 = el1->eta();
681  float phi1 = el1->phi();
682 
683  if (!isElectronTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt)))
684  continue;
685  TLorentzVector vTag(0., 0., 0., 0.);
686  vTag.SetPtEtaPhiM(pt1, eta1, phi1, ELECTRON_MASS);
687 
688  // Tag selection: kinematic cuts, lepton selection and trigger matching
689  double tag_pt = vTag.Pt();
690  double tag_abseta = fabs(vTag.Eta());
691 
692  bool tag_is_valid_tag = ele_tag_selection(tag_pt, tag_abseta);
693  bool tag_is_valid_probe = ele_probe_selection(tag_pt, tag_abseta);
694 
695  if (not(tag_is_valid_tag or tag_is_valid_probe))
696  continue;
697 
698  // Loop over probes
699  for (size_t iprobe = 0; iprobe < superclusters->size(); ++iprobe) {
700  // Initialize probe
701  const auto sc = superclusters->ptrAt(iprobe);
702  if (*sc == *(el1->superCluster())) {
703  continue;
704  }
705 
706  // Find matching electron
707  for (size_t iele = 0; iele < electrons->size(); ++iele) {
708  if (iele == itag)
709  continue;
710  const auto ele = electrons->ptrAt(iele);
711  if (*sc == *(ele->superCluster())) {
712  eleProbe = ele;
713  break;
714  }
715  }
716 
717  // Assign final probe 4-vector
718  TLorentzVector vProbe(0., 0., 0., 0.);
719  if (eleProbe.isNonnull()) {
720  vProbe.SetPtEtaPhiM(eleProbe->pt(), eleProbe->eta(), eleProbe->phi(), ELECTRON_MASS);
721  } else {
722  double pt = sc->energy() * sqrt(1 - pow(tanh(sc->eta()), 2));
723  vProbe.SetPtEtaPhiM(pt, sc->eta(), sc->phi(), ELECTRON_MASS);
724  }
725 
726  // Probe Selection
727  double probe_pt = vProbe.Pt();
728  double probe_abseta = fabs(sc->eta());
729  bool probe_is_valid_probe = ele_probe_selection(probe_pt, probe_abseta);
730  if (!probe_is_valid_probe)
731  continue;
732 
733  // Good Probe found!
734 
735  // Require good Z
736  TLorentzVector vDilep = vTag + vProbe;
737 
738  if ((vDilep.M() < ELE_MASS_CUT_LOW) || (vDilep.M() > ELE_MASS_CUT_HIGH))
739  continue;
740  if (eleProbe.isNonnull() and (eleProbe->charge() != -el1->charge()))
741  continue;
742 
743  // Good Z found!
744 
745  long ls = iEvent.luminosityBlock();
746  bool probe_pass_trigger = isElectronTriggerObj(
747  *fTrigger, TriggerTools::matchHLT(vProbe.Eta(), vProbe.Phi(), fTrigger->fRecords, *hTrgEvt));
748  bool probe_pass_id = eleProbe.isNonnull() and EleID_.passID(eleProbe, beamspotHandle, conversionsHandle);
749 
751  bool probe_is_forward = probe_abseta > ELE_ETA_CRACK_LOW;
752  bool tag_is_forward = tag_abseta > ELE_ETA_CRACK_LOW;
753 
754  if (probe_pass_id) {
755  if (probe_is_forward and tag_is_forward) {
756  h_ee_yield_Z_eeee->Fill(ls);
757  } else if (!probe_is_forward and !tag_is_forward) {
758  h_ee_yield_Z_ebeb->Fill(ls);
759  } else {
760  h_ee_yield_Z_ebee->Fill(ls);
761  }
762  }
763 
764  if (!tag_is_valid_tag)
765  continue;
766 
768  if (probe_pass_id) {
769  if (probe_is_forward) {
770  h_ee_mass_id_pass_forward->Fill(ls, vDilep.M());
771  } else {
772  h_ee_mass_id_pass_central->Fill(ls, vDilep.M());
773  }
774  } else {
775  if (probe_is_forward) {
776  h_ee_mass_id_fail_forward->Fill(ls, vDilep.M());
777  } else {
778  h_ee_mass_id_fail_central->Fill(ls, vDilep.M());
779  }
780  }
781 
783  if (probe_pass_id and probe_pass_trigger) {
784  if (probe_is_forward) {
785  h_ee_mass_HLT_pass_forward->Fill(ls, vDilep.M());
786  } else {
787  h_ee_mass_HLT_pass_central->Fill(ls, vDilep.M());
788  }
789  } else if (probe_pass_id) {
790  if (probe_is_forward) {
791  h_ee_mass_HLT_fail_forward->Fill(ls, vDilep.M());
792  } else {
793  h_ee_mass_HLT_fail_central->Fill(ls, vDilep.M());
794  }
795  }
796  } // End of probe loop
797  } //End of tag loop
798 }
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:905
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
def ls
Definition: eostools.py:349
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:93
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:909
ElectronIdentifier EleID_
Definition: ZCounting.h:153
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:184
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:185
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:61
void Fill(long long x)
double VtxRhoCut_
Definition: ZCounting.h:135
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:73
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:147
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:79
T sqrt(T t)
Definition: SSEVec.h:19
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:132
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:822
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:190
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:189
double VtxNdofCut_
Definition: ZCounting.h:133
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:186
bool isValid() const
Definition: HandleBase.h:70
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:809
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:146
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:150
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:76
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:180
Log< level::Info, false > LogInfo
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:183
void setRho(double rho)
T const * product() const
Definition: Handle.h:70
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:188
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:104
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:77
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:800
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:178
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:181
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:98
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:179
const float ELECTRON_MASS
Definition: ZCounting.h:140
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:101
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:95
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
double VtxAbsZCut_
Definition: ZCounting.h:134
void ZCounting::analyzeMuons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Definition at line 316 of file ZCounting.cc.

References HLT_FULL_cff::eta1, HLT_FULL_cff::eta2, EtaCutL1_, EtaCutL2_, fHLTObjTag_token, fHLTTag_token, dqm::impl::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(), PtCutL1_, PtCutL2_, MetAnalyzer::pv(), L1TMuonDQMOffline_cfi::triggerNames, edm::Event::triggerNames(), VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

Referenced by analyze().

316  {
317  edm::LogInfo("ZCounting") << "ZCounting::analyzeMuons" << std::endl;
318  //-------------------------------
319  //--- Vertex
320  //-------------------------------
322  iEvent.getByToken(fPVName_token, hVertexProduct);
323  if (!hVertexProduct.isValid()) {
324  edm::LogWarning("ZCounting") << "ZCounting::analyzeMuons - no valid primary vertex product found" << std::endl;
325  return;
326  }
327  const reco::VertexCollection* pvCol = hVertexProduct.product();
328  const reco::Vertex* pv = &(*pvCol->begin());
329  int nvtx = 0;
330 
331  for (auto const& itVtx : *hVertexProduct) {
332  if (itVtx.isFake())
333  continue;
334  if (itVtx.tracksSize() < VtxNTracksFitCut_)
335  continue;
336  if (itVtx.ndof() < VtxNdofCut_)
337  continue;
338  if (fabs(itVtx.z()) > VtxAbsZCut_)
339  continue;
340  if (itVtx.position().Rho() > VtxRhoCut_)
341  continue;
342 
343  if (nvtx == 0) {
344  pv = &itVtx;
345  }
346  nvtx++;
347  }
348 
349  h_npv->Fill(iEvent.luminosityBlock(), nvtx);
350 
351  // Good vertex requirement
352  if (nvtx == 0)
353  return;
354 
355  //-------------------------------
356  //--- Trigger
357  //-------------------------------
359  iEvent.getByToken(fHLTTag_token, hTrgRes);
360  if (!hTrgRes.isValid())
361  return;
362 
364  iEvent.getByToken(fHLTObjTag_token, hTrgEvt);
365 
366  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*hTrgRes);
367  bool config_changed = false;
368  if (fTriggerNamesID != triggerNames.parameterSetID()) {
369  fTriggerNamesID = triggerNames.parameterSetID();
370  config_changed = true;
371  }
372  if (config_changed) {
373  initHLT(*hTrgRes, triggerNames);
374  }
375 
376  TriggerBits triggerBits;
377  for (unsigned int irec = 0; irec < fTrigger->fRecords.size(); irec++) {
378  if (fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1)
379  continue;
380  if (hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
381  triggerBits[fTrigger->fRecords[irec].baconTrigBit] = true;
382  }
383  }
384  //if(fSkipOnHLTFail && triggerBits == 0) return;
385 
386  // Trigger requirement
387  if (!isMuonTrigger(*fTrigger, triggerBits))
388  return;
389 
390  //-------------------------------
391  //--- Muons and Tracks
392  //-------------------------------
394  iEvent.getByToken(fMuonName_token, hMuonProduct);
395  if (!hMuonProduct.isValid())
396  return;
397 
399  iEvent.getByToken(fTrackName_token, hTrackProduct);
400  if (!hTrackProduct.isValid())
401  return;
402 
403  TLorentzVector vTag(0., 0., 0., 0.);
404  TLorentzVector vProbe(0., 0., 0., 0.);
405  TLorentzVector vTrack(0., 0., 0., 0.);
406 
407  // Tag loop
408  for (auto const& itMu1 : *hMuonProduct) {
409  float pt1 = itMu1.muonBestTrack()->pt();
410  float eta1 = itMu1.muonBestTrack()->eta();
411  float phi1 = itMu1.muonBestTrack()->phi();
412  float q1 = itMu1.muonBestTrack()->charge();
413 
414  // Tag selection: kinematic cuts, lepton selection and trigger matching
415  if (pt1 < PtCutL1_)
416  continue;
417  if (fabs(eta1) > EtaCutL1_)
418  continue;
419  if (!(passMuonID(itMu1, *pv, IDType_) && passMuonIso(itMu1, IsoType_, IsoCut_)))
420  continue;
421  if (!isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt)))
422  continue;
423 
424  vTag.SetPtEtaPhiM(pt1, eta1, phi1, MUON_MASS);
425 
426  // Probe loop over muons
427  for (auto const& itMu2 : *hMuonProduct) {
428  if (&itMu2 == &itMu1)
429  continue;
430 
431  float pt2 = itMu2.muonBestTrack()->pt();
432  float eta2 = itMu2.muonBestTrack()->eta();
433  float phi2 = itMu2.muonBestTrack()->phi();
434  float q2 = itMu2.muonBestTrack()->charge();
435 
436  // Probe selection: kinematic cuts and opposite charge requirement
437  if (pt2 < PtCutL2_)
438  continue;
439  if (fabs(eta2) > EtaCutL2_)
440  continue;
441  if (q1 == q2)
442  continue;
443 
444  vProbe.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
445 
446  // Mass window
447  TLorentzVector vDilep = vTag + vProbe;
448  float dilepMass = vDilep.M();
449  if ((dilepMass < MassMin_) || (dilepMass > MassMax_))
450  continue;
451 
452  bool isTagCentral = false;
453  bool isProbeCentral = false;
454  if (fabs(eta1) < MUON_BOUND)
455  isTagCentral = true;
456  if (fabs(eta2) < MUON_BOUND)
457  isProbeCentral = true;
458 
459  // Determine event category for efficiency calculation
460  if (passMuonID(itMu2, *pv, IDType_) && passMuonIso(itMu2, IsoType_, IsoCut_)) {
461  if (isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta2, phi2, fTrigger->fRecords, *hTrgEvt))) {
462  // category 2HLT: both muons passing trigger requirements
463  if (&itMu1 > &itMu2)
464  continue; // make sure we don't double count MuMu2HLT category
465 
466  // Fill twice for each event, since both muons pass trigger
467  if (isTagCentral) {
468  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
469  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
470  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
471  } else {
472  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
473  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
474  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
475  }
476 
477  if (isProbeCentral) {
478  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
479  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
480  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
481  } else {
482  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
483  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
484  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
485  }
486 
487  } else {
488  // category 1HLT: probe passing selection but not trigger
489  if (isProbeCentral) {
490  h_mass_HLT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
491  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
492  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
493  } else {
494  h_mass_HLT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
495  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
496  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
497  }
498  }
499  // category 2HLT + 1HLT: Fill once for Z yield
500  h_npv_yield_Z->Fill(iEvent.luminosityBlock(), nvtx);
501  h_mass_yield_Z->Fill(iEvent.luminosityBlock(), dilepMass);
502  if (isTagCentral && isProbeCentral)
503  h_yieldBB_Z->Fill(iEvent.luminosityBlock());
504  else if (!isTagCentral && !isProbeCentral)
505  h_yieldEE_Z->Fill(iEvent.luminosityBlock());
506  } else if (itMu2.isGlobalMuon()) {
507  // category Glo: probe is a Global muon but failing selection
508  if (isProbeCentral) {
509  h_mass_SIT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
510  h_mass_Glo_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
511  } else {
512  h_mass_SIT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
513  h_mass_Glo_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
514  }
515  } else if (itMu2.isStandAloneMuon()) {
516  // category Sta: probe is a Standalone muon
517  if (isProbeCentral) {
518  h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
519  } else {
520  h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
521  }
522  } else if (itMu2.innerTrack()->hitPattern().trackerLayersWithMeasurement() >= 6 &&
523  itMu2.innerTrack()->hitPattern().numberOfValidPixelHits() >= 1) {
524  // cateogry Trk: probe is a tracker track
525  if (isProbeCentral) {
526  h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
527  } else {
528  h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
529  }
530  }
531 
532  } // End of probe loop over muons
533 
534  // Probe loop over tracks, only for standalone efficiency calculation
535  for (auto const& itTrk : *hTrackProduct) {
536  // Check track is not a muon
537  bool isMuon = false;
538  for (auto const& itMu : *hMuonProduct) {
539  if (itMu.innerTrack().isNonnull() && itMu.innerTrack().get() == &itTrk) {
540  isMuon = true;
541  break;
542  }
543  }
544  if (isMuon)
545  continue;
546 
547  float pt2 = itTrk.pt();
548  float eta2 = itTrk.eta();
549  float phi2 = itTrk.phi();
550  float q2 = itTrk.charge();
551 
552  // Probe selection: kinematic cuts and opposite charge requirement
553  if (pt2 < PtCutL2_)
554  continue;
555  if (fabs(eta2) > EtaCutL2_)
556  continue;
557  if (q1 == q2)
558  continue;
559 
560  vTrack.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
561 
562  TLorentzVector vDilep = vTag + vTrack;
563  float dilepMass = vDilep.M();
564  if ((dilepMass < MassMin_) || (dilepMass > MassMax_))
565  continue;
566 
567  bool isTrackCentral = false;
568  if (fabs(eta2) > MUON_BOUND)
569  isTrackCentral = true;
570 
571  if (itTrk.hitPattern().trackerLayersWithMeasurement() >= 6 && itTrk.hitPattern().numberOfValidPixelHits() >= 1) {
572  if (isTrackCentral)
573  h_mass_Glo_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
574  else
575  h_mass_Glo_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
576  }
577 
578  } //End of probe loop over tracks
579 
580  } //End of tag loop
581 }
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:167
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:169
double IsoCut_
Definition: ZCounting.h:113
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:163
double PtCutL1_
Definition: ZCounting.h:115
bool isMuon(const Candidate &part)
Definition: pdgIdUtils.h:9
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:162
MuonIsoTypes IsoType_
Definition: ZCounting.h:112
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:868
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:157
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:173
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:166
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:61
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:89
void Fill(long long x)
const double MUON_MASS
Definition: ZCounting.h:137
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:83
double VtxRhoCut_
Definition: ZCounting.h:135
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:73
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:79
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:175
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:132
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:172
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:850
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:822
double VtxNdofCut_
Definition: ZCounting.h:133
bool isValid() const
Definition: HandleBase.h:70
MuonIDTypes IDType_
Definition: ZCounting.h:111
MonitorElement * h_npv
Definition: ZCounting.h:171
double PtCutL2_
Definition: ZCounting.h:116
const double MUON_BOUND
Definition: ZCounting.h:138
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:76
Log< level::Info, false > LogInfo
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:164
T const * product() const
Definition: Handle.h:70
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:156
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:77
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:159
double EtaCutL1_
Definition: ZCounting.h:117
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:885
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:174
double MassMax_
Definition: ZCounting.h:122
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:168
Log< level::Warning, false > LogWarning
double MassMin_
Definition: ZCounting.h:121
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:161
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
double EtaCutL2_
Definition: ZCounting.h:118
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:158
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:859
double VtxAbsZCut_
Definition: ZCounting.h:134
void ZCounting::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 140 of file ZCounting.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::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_, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

140  {
141  edm::LogInfo("ZCounting") << "ZCounting::bookHistograms" << std::endl;
142  ibooker_.cd();
143  ibooker_.setCurrentFolder("ZCounting/Histograms");
144 
145  // Muon histograms
146  h_mass_HLT_pass_central = ibooker_.book2D("h_mass_HLT_pass_central",
147  "Muon HLT passing probes central",
148  LumiBin_,
149  LumiMin_,
150  LumiMax_,
151  MassBin_,
152  MassMin_,
153  MassMax_);
154  h_mass_HLT_pass_forward = ibooker_.book2D("h_mass_HLT_pass_forward",
155  "Muon HLT passing probes forward",
156  LumiBin_,
157  LumiMin_,
158  LumiMax_,
159  MassBin_,
160  MassMin_,
161  MassMax_);
162  h_mass_HLT_fail_central = ibooker_.book2D("h_mass_HLT_fail_central",
163  "Muon HLT failing probes central",
164  LumiBin_,
165  LumiMin_,
166  LumiMax_,
167  MassBin_,
168  MassMin_,
169  MassMax_);
170  h_mass_HLT_fail_forward = ibooker_.book2D("h_mass_HLT_fail_forward",
171  "Muon HLT failing probes forward",
172  LumiBin_,
173  LumiMin_,
174  LumiMax_,
175  MassBin_,
176  MassMin_,
177  MassMax_);
178 
179  h_mass_SIT_pass_central = ibooker_.book2D("h_mass_SIT_pass_central",
180  "Muon SIT passing probes central",
181  LumiBin_,
182  LumiMin_,
183  LumiMax_,
184  MassBin_,
185  MassMin_,
186  MassMax_);
187  h_mass_SIT_pass_forward = ibooker_.book2D("h_mass_SIT_pass_forward",
188  "Muon SIT passing probes forward",
189  LumiBin_,
190  LumiMin_,
191  LumiMax_,
192  MassBin_,
193  MassMin_,
194  MassMax_);
195  h_mass_SIT_fail_central = ibooker_.book2D("h_mass_SIT_fail_central",
196  "Muon SIT_failing probes central",
197  LumiBin_,
198  LumiMin_,
199  LumiMax_,
200  MassBin_,
201  MassMin_,
202  MassMax_);
203  h_mass_SIT_fail_forward = ibooker_.book2D("h_mass_SIT_fail_forward",
204  "Muon SIT failing probes forward",
205  LumiBin_,
206  LumiMin_,
207  LumiMax_,
208  MassBin_,
209  MassMin_,
210  MassMax_);
211 
212  h_mass_Glo_pass_central = ibooker_.book2D("h_mass_Glo_pass_central",
213  "Muon Glo passing probes central",
214  LumiBin_,
215  LumiMin_,
216  LumiMax_,
217  MassBin_,
218  MassMin_,
219  MassMax_);
220  h_mass_Glo_pass_forward = ibooker_.book2D("h_mass_Glo_pass_forward",
221  "Muon Glo passing probes forward",
222  LumiBin_,
223  LumiMin_,
224  LumiMax_,
225  MassBin_,
226  MassMin_,
227  MassMax_);
228  h_mass_Glo_fail_central = ibooker_.book2D("h_mass_Glo_fail_central",
229  "Muon Glo failing probes central",
230  LumiBin_,
231  LumiMin_,
232  LumiMax_,
233  MassBin_,
234  MassMin_,
235  MassMax_);
236  h_mass_Glo_fail_forward = ibooker_.book2D("h_mass_Glo_fail_forward",
237  "Muon Glo failing probes forward",
238  LumiBin_,
239  LumiMin_,
240  LumiMax_,
241  MassBin_,
242  MassMin_,
243  MassMax_);
244 
245  h_npv = ibooker_.book2D(
246  "h_npv", "Events with valid primary vertex", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
247  h_mass_yield_Z = ibooker_.book2D(
248  "h_mass_yield_Z", "reconstructed Z bosons", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
249  h_npv_yield_Z =
250  ibooker_.book2D("h_npv_yield_Z", "reconstructed Z bosons", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
251  h_yieldBB_Z = ibooker_.book1D("h_yieldBB_Z", "reconstructed Z bosons in barrel", LumiBin_, LumiMin_, LumiMax_);
252  h_yieldEE_Z = ibooker_.book1D("h_yieldEE_Z", "reconstructed Z bosons in endcap", LumiBin_, LumiMin_, LumiMax_);
253 
254  // Axis titles
255  h_mass_HLT_pass_central->setAxisTitle("luminosiry section", 1);
256  h_mass_HLT_pass_forward->setAxisTitle("luminosiry section", 1);
257  h_mass_HLT_fail_central->setAxisTitle("luminosiry section", 1);
258  h_mass_HLT_fail_forward->setAxisTitle("luminosiry section", 1);
259  h_mass_SIT_pass_central->setAxisTitle("luminosiry section", 1);
260  h_mass_SIT_pass_forward->setAxisTitle("luminosiry section", 1);
261  h_mass_SIT_fail_central->setAxisTitle("luminosiry section", 1);
262  h_mass_SIT_fail_forward->setAxisTitle("luminosiry section", 1);
263  h_mass_Glo_pass_central->setAxisTitle("luminosiry section", 1);
264  h_mass_Glo_pass_forward->setAxisTitle("luminosiry section", 1);
265  h_mass_Glo_fail_central->setAxisTitle("luminosiry section", 1);
266  h_mass_Glo_fail_forward->setAxisTitle("luminosiry section", 1);
267  h_mass_HLT_pass_central->setAxisTitle("tag and probe mass", 2);
268  h_mass_HLT_pass_forward->setAxisTitle("tag and probe mass", 2);
269  h_mass_HLT_fail_central->setAxisTitle("tag and probe mass", 2);
270  h_mass_HLT_fail_forward->setAxisTitle("tag and probe mass", 2);
271  h_mass_SIT_pass_central->setAxisTitle("tag and probe mass", 2);
272  h_mass_SIT_pass_forward->setAxisTitle("tag and probe mass", 2);
273  h_mass_SIT_fail_central->setAxisTitle("tag and probe mass", 2);
274  h_mass_SIT_fail_forward->setAxisTitle("tag and probe mass", 2);
275  h_mass_Glo_pass_central->setAxisTitle("tag and probe mass", 2);
276  h_mass_Glo_pass_forward->setAxisTitle("tag and probe mass", 2);
277  h_mass_Glo_fail_central->setAxisTitle("tag and probe mass", 2);
278  h_mass_Glo_fail_forward->setAxisTitle("tag and probe mass", 2);
279  h_npv->setAxisTitle("luminosity section", 1);
280  h_npv->setAxisTitle("number of primary vertices", 2);
281  h_npv_yield_Z->setAxisTitle("luminosiry section", 1);
282  h_npv_yield_Z->setAxisTitle("number of primary vertices", 2);
283  h_mass_yield_Z->setAxisTitle("luminosiry section", 1);
284  h_mass_yield_Z->setAxisTitle("tag and probe mass", 2);
285 
286  h_yieldBB_Z->setAxisTitle("luminosiry section", 1);
287  h_yieldEE_Z->setAxisTitle("luminosiry section", 1);
288 
289  /*
290  // Electron histograms
291  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_);
292  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_);
293  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_);
294  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_);
295 
296  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_);
297  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_);
298  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_);
299  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_);
300 
301  h_ee_yield_Z_ebeb = ibooker_.book1D("h_ee_yield_Z_ebeb", "h_ee_yield_Z_ebeb", LumiBin_, LumiMin_, LumiMax_);
302  h_ee_yield_Z_ebee = ibooker_.book1D("h_ee_yield_Z_ebee", "h_ee_yield_Z_ebee", LumiBin_, LumiMin_, LumiMax_);
303  h_ee_yield_Z_eeee = ibooker_.book1D("h_ee_yield_Z_eeee", "h_ee_yield_Z_eeee", LumiBin_, LumiMin_, LumiMax_);*/
304 }
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:167
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:169
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:163
double LumiMax_
Definition: ZCounting.h:126
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:162
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:157
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:173
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:166
double LumiMin_
Definition: ZCounting.h:125
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:175
int PVBin_
Definition: ZCounting.h:128
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:172
MonitorElement * h_npv
Definition: ZCounting.h:171
Log< level::Info, false > LogInfo
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:164
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:156
int MassBin_
Definition: ZCounting.h:120
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
int LumiBin_
Definition: ZCounting.h:124
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:159
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:174
double MassMax_
Definition: ZCounting.h:122
double PVMax_
Definition: ZCounting.h:130
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:168
double MassMin_
Definition: ZCounting.h:121
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:161
double PVMin_
Definition: ZCounting.h:129
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:158
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void ZCounting::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 131 of file ZCounting.cc.

References fMuonHLTNames, fMuonHLTObjectNames, and fTrigger.

131  {
132  edm::LogInfo("ZCounting") << "ZCounting::beginRun" << std::endl;
133 
134  // Triggers
135  fTrigger = std::make_unique<ZCountingTrigger::TTrigger>(fMuonHLTNames, fMuonHLTObjectNames);
136 }
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:84
Log< level::Info, false > LogInfo
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:85
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
bool ZCounting::ele_probe_selection ( double  pt,
double  abseta 
)
private

Definition at line 800 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().

800  {
801  if (pt < ELE_PT_CUT_PROBE)
802  return false;
803  if (abseta > ELE_ETA_CUT_PROBE)
804  return false;
805  if ((abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH))
806  return false;
807  return true;
808 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:151
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:143
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:150
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:145
bool ZCounting::ele_tag_selection ( double  pt,
double  abseta 
)
private

Definition at line 809 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().

809  {
810  if (pt < ELE_PT_CUT_TAG)
811  return false;
812  if (abseta > ELE_ETA_CUT_TAG)
813  return false;
814  if ((abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH))
815  return false;
816  return true;
817 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:151
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:144
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:150
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:142
void ZCounting::initHLT ( const edm::TriggerResults result,
const edm::TriggerNames triggerNames 
)
private

Definition at line 822 of file ZCounting.cc.

References fTrigger, edm::is_glob(), match(), edm::regexMatch(), edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), and edm::TriggerNames::triggerNames().

Referenced by analyzeElectrons(), and analyzeMuons().

822  {
823  for (unsigned int irec = 0; irec < fTrigger->fRecords.size(); irec++) {
824  fTrigger->fRecords[irec].hltPathName = "";
825  fTrigger->fRecords[irec].hltPathIndex = (unsigned int)-1;
826  const std::string pattern = fTrigger->fRecords[irec].hltPattern;
827  if (edm::is_glob(pattern)) { // handle pattern with wildcards (*,?)
828  std::vector<std::vector<std::string>::const_iterator> matches =
829  edm::regexMatch(triggerNames.triggerNames(), pattern);
830  if (matches.empty()) {
831  edm::LogWarning("ZCounting") << "requested pattern [" << pattern << "] does not match any HLT paths"
832  << std::endl;
833  } else {
834  for (auto const& match : matches) {
835  fTrigger->fRecords[irec].hltPathName = *match;
836  }
837  }
838  } else { // take full HLT path name given
839  fTrigger->fRecords[irec].hltPathName = pattern;
840  }
841  // Retrieve index in trigger menu corresponding to HLT path
842  unsigned int index = triggerNames.triggerIndex(fTrigger->fRecords[irec].hltPathName);
843  if (index < result.size()) { // check for valid index
844  fTrigger->fRecords[irec].hltPathIndex = index;
845  }
846  }
847 }
bool is_glob(std::string const &pattern)
Definition: RegexMatch.cc:17
unsigned int triggerIndex(std::string_view name) const
Definition: TriggerNames.cc:52
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
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
Log< level::Warning, false > LogWarning
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
bool ZCounting::isElectronTrigger ( ZCountingTrigger::TTrigger  triggerMenu,
TriggerBits  hltBits 
)
private

Definition at line 905 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::pass().

Referenced by analyzeElectrons().

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

Definition at line 909 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::passObj().

Referenced by analyzeElectrons().

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

Definition at line 850 of file ZCounting.cc.

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

Referenced by analyzeMuons().

850  {
851  for (unsigned int i = 0; i < fMuonHLTNames.size(); ++i) {
852  if (triggerMenu.pass(fMuonHLTNames.at(i), hltBits))
853  return true;
854  }
855  return false;
856 }
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:84
bool pass(const std::string &iName, const TriggerBits &iTrig) const
Definition: TTrigger.cc:65
bool ZCounting::isMuonTriggerObj ( const ZCountingTrigger::TTrigger triggerMenu,
const TriggerObjects hltMatchBits 
)
private

Definition at line 859 of file ZCounting.cc.

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

Referenced by analyzeMuons().

859  {
860  for (unsigned int i = 0; i < fMuonHLTNames.size(); ++i) {
861  if (triggerMenu.passObj(fMuonHLTNames.at(i), fMuonHLTObjectNames.at(i), hltMatchBits))
862  return true;
863  }
864  return false;
865 }
bool passObj(const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
Definition: TTrigger.cc:74
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:84
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:85
bool ZCounting::passMuonID ( const reco::Muon muon,
const reco::Vertex vtx,
const MuonIDTypes idType 
)
private

Definition at line 868 of file ZCounting.cc.

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

Referenced by analyzeMuons().

871  { //Muon ID selection, using internal function "DataFormats/MuonReco/src/MuonSelectors.cc
872 
873  if (idType == LooseID && muon::isLooseMuon(muon))
874  return true;
875  else if (idType == MediumID && muon::isMediumMuon(muon))
876  return true;
877  else if (idType == TightID && muon::isTightMuon(muon, vtx))
878  return true;
879  else if (idType == NoneID)
880  return true;
881  else
882  return false;
883 }
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 885 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().

887  { //Muon isolation selection, up-to-date with MUO POG recommendation
888 
889  if (isoType == TrackerIso && muon.isolationR03().sumPt < isoCut)
890  return true;
891  else if (isoType == PFIso &&
893  std::max(0.,
895  0.5 * muon.pfIsolationR04().sumPUPt) <
896  isoCut)
897  return true;
898  else if (isoType == NoneIso)
899  return true;
900  else
901  return false;
902 }
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:6
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:172
const MuonIsolation & isolationR03() const
Definition: Muon.h:166
float sumChargedHadronPt
sum-pt of charged Hadron

Member Data Documentation

const float ZCounting::ELE_ETA_CRACK_HIGH = 1.56
private

Definition at line 151 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 150 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 145 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_ETA_CUT_TAG
private

Definition at line 144 of file ZCounting.h.

Referenced by ele_tag_selection().

const std::string ZCounting::ELE_ID_WP
private

Definition at line 149 of file ZCounting.h.

Referenced by ZCounting().

const float ZCounting::ELE_MASS_CUT_HIGH
private

Definition at line 147 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_MASS_CUT_LOW
private

Definition at line 146 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_PT_CUT_PROBE
private

Definition at line 143 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_PT_CUT_TAG
private

Definition at line 142 of file ZCounting.h.

Referenced by ele_tag_selection().

const float ZCounting::ELECTRON_MASS = 0.000511
private

Definition at line 140 of file ZCounting.h.

Referenced by analyzeElectrons().

ElectronIdentifier ZCounting::EleID_
private

Definition at line 153 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

double ZCounting::EtaCutL1_
private

Definition at line 117 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::EtaCutL2_
private

Definition at line 118 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

edm::InputTag ZCounting::fBeamspotTag
private

Definition at line 100 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 101 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

edm::InputTag ZCounting::fConversionTag
private

Definition at line 103 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 104 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fElectronName
private

Definition at line 92 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 93 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

edm::InputTag ZCounting::fHLTObjTag
private

Definition at line 74 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 76 of file ZCounting.h.

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

edm::InputTag ZCounting::fHLTTag
private

Definition at line 75 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 77 of file ZCounting.h.

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

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

Definition at line 84 of file ZCounting.h.

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

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

Definition at line 85 of file ZCounting.h.

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

std::string ZCounting::fMuonName
private

Definition at line 82 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 83 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::fPVName
private

Definition at line 78 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 79 of file ZCounting.h.

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

edm::InputTag ZCounting::fRhoTag
private

Definition at line 97 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 98 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fSCName
private

Definition at line 94 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 95 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

std::string ZCounting::fTrackName
private

Definition at line 88 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 89 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

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

Definition at line 107 of file ZCounting.h.

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

edm::ParameterSetID ZCounting::fTriggerNamesID
private

Definition at line 73 of file ZCounting.h.

Referenced by analyzeElectrons(), and analyzeMuons().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_central
private

Definition at line 184 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_forward
private

Definition at line 186 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_central
private

Definition at line 183 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_forward
private

Definition at line 185 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_fail_central
private

Definition at line 179 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_fail_forward
private

Definition at line 181 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_pass_central
private

Definition at line 178 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_mass_id_pass_forward
private

Definition at line 180 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_ebeb
private

Definition at line 188 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_ebee
private

Definition at line 189 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_ee_yield_Z_eeee
private

Definition at line 190 of file ZCounting.h.

Referenced by analyzeElectrons().

MonitorElement* ZCounting::h_mass_Glo_fail_central
private

Definition at line 168 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_fail_forward
private

Definition at line 169 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_pass_central
private

Definition at line 166 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Glo_pass_forward
private

Definition at line 167 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_central
private

Definition at line 158 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_forward
private

Definition at line 159 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_central
private

Definition at line 156 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_forward
private

Definition at line 157 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_central
private

Definition at line 163 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_forward
private

Definition at line 164 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_central
private

Definition at line 161 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_forward
private

Definition at line 162 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_yield_Z
private

Definition at line 173 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_npv
private

Definition at line 171 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_npv_yield_Z
private

Definition at line 172 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldBB_Z
private

Definition at line 174 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldEE_Z
private

Definition at line 175 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MuonIDTypes ZCounting::IDType_ {NoneID}
private

Definition at line 111 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IDTypestr_
private

Definition at line 109 of file ZCounting.h.

Referenced by ZCounting().

double ZCounting::IsoCut_
private

Definition at line 113 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

MuonIsoTypes ZCounting::IsoType_ {NoneIso}
private

Definition at line 112 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IsoTypestr_
private

Definition at line 110 of file ZCounting.h.

Referenced by ZCounting().

int ZCounting::LumiBin_
private

Definition at line 124 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMax_
private

Definition at line 126 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMin_
private

Definition at line 125 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

int ZCounting::MassBin_
private

Definition at line 120 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::MassMax_
private

Definition at line 122 of file ZCounting.h.

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

double ZCounting::MassMin_
private

Definition at line 121 of file ZCounting.h.

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

const double ZCounting::MUON_BOUND = 0.9
private

Definition at line 138 of file ZCounting.h.

Referenced by analyzeMuons().

const double ZCounting::MUON_MASS = 0.105658369
private

Definition at line 137 of file ZCounting.h.

Referenced by analyzeMuons().

double ZCounting::PtCutL1_
private

Definition at line 115 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::PtCutL2_
private

Definition at line 116 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

int ZCounting::PVBin_
private

Definition at line 128 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMax_
private

Definition at line 130 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMin_
private

Definition at line 129 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::VtxAbsZCut_
private

Definition at line 134 of file ZCounting.h.

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

double ZCounting::VtxNdofCut_
private

Definition at line 133 of file ZCounting.h.

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

double ZCounting::VtxNTracksFitCut_
private

Definition at line 132 of file ZCounting.h.

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

double ZCounting::VtxRhoCut_
private

Definition at line 135 of file ZCounting.h.

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