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:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

enum  MuonIDTypes { NoneID, LooseID, MediumID, TightID }
 
enum  MuonIsoTypes { NoneIso, TrackerIso, PFIso }
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 ZCounting (const edm::ParameterSet &ps)
 
 ~ZCounting () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, 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
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private 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::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_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_Sta_fail_central
 
MonitorElementh_mass_Sta_fail_forward
 
MonitorElementh_mass_Sta_pass_central
 
MonitorElementh_mass_Sta_pass_forward
 
MonitorElementh_npv
 
MonitorElementh_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 edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

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 25 of file ZCounting.cc.

References ELE_ID_WP, EleID_, EtaCutL1_, EtaCutL2_, fBeamspotTag, fBeamspotToken, fConversionTag, fConversionToken, fElectronName, fGsfElectronName_token, fHLTObjTag, fHLTObjTag_token, fHLTTag, fHLTTag_token, fMuonName, fMuonName_token, fPVName, fPVName_token, fRhoTag, fRhoToken, fSCName, fSCName_token, fTrackName, fTrackName_token, 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_.

25  :
26  fHLTObjTag (iConfig.getParameter<edm::InputTag>("TriggerEvent")),
27  fHLTTag (iConfig.getParameter<edm::InputTag>("TriggerResults")),
28  fPVName (iConfig.getUntrackedParameter<std::string>("edmPVName","offlinePrimaryVertices")),
29  fMuonName (iConfig.getUntrackedParameter<std::string>("edmName","muons")),
30  fTrackName (iConfig.getUntrackedParameter<std::string>("edmTrackName","generalTracks")),
31 
32  // Electron-specific Parameters
33  fElectronName( iConfig.getUntrackedParameter<std::string>("edmGsfEleName","gedGsfElectrons")),
34  fSCName( iConfig.getUntrackedParameter<std::string>("edmSCName","particleFlowEGamma")),
35 
36  // Electron-specific Tags
37  fRhoTag( iConfig.getParameter<edm::InputTag>("rhoname") ),
38  fBeamspotTag(iConfig.getParameter<edm::InputTag>("beamspotName") ),
39  fConversionTag( iConfig.getParameter<edm::InputTag>("conversionsName")),
40 
41  // Electron-specific Cuts
42  ELE_PT_CUT_TAG(iConfig.getUntrackedParameter<double>("PtCutEleTag")),
43  ELE_PT_CUT_PROBE(iConfig.getUntrackedParameter<double>("PtCutEleProbe")),
44  ELE_ETA_CUT_TAG(iConfig.getUntrackedParameter<double>("EtaCutEleTag")),
45  ELE_ETA_CUT_PROBE(iConfig.getUntrackedParameter<double>("EtaCutEleProbe")),
46 
47  ELE_MASS_CUT_LOW(iConfig.getUntrackedParameter<double>("MassCutEleLow")),
48  ELE_MASS_CUT_HIGH(iConfig.getUntrackedParameter<double>("MassCutEleHigh")),
49 
50  ELE_ID_WP( iConfig.getUntrackedParameter<std::string>("ElectronIDType","TIGHT")),
51  EleID_(ElectronIdentifier(iConfig))
52 {
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  // Electron-specific parameters
63  fGsfElectronName_token = consumes<edm::View<reco::GsfElectron>>(fElectronName);
64  fSCName_token = consumes<edm::View<reco::SuperCluster>>(fSCName);
65  fRhoToken = consumes<double>(fRhoTag);
66  fBeamspotToken = consumes<reco::BeamSpot>(fBeamspotTag);
67  fConversionToken = consumes<reco::ConversionCollection>(fConversionTag);
68 
69  // Muon-specific Cuts
70  IDTypestr_ = iConfig.getUntrackedParameter<std::string>("IDType");
71  IsoTypestr_ = iConfig.getUntrackedParameter<std::string>("IsoType");
72  IsoCut_ = iConfig.getUntrackedParameter<double>("IsoCut");
73 
74  if (IDTypestr_ == "Loose") IDType_ = LooseID;
75  else if(IDTypestr_ == "Medium") IDType_ = MediumID;
76  else if(IDTypestr_ == "Tight") IDType_ = TightID;
77  else IDType_ = NoneID;
78 
79  if (IsoTypestr_ == "Tracker-based") IsoType_ = TrackerIso;
80  else if(IsoTypestr_ == "PF-based") IsoType_ = PFIso;
81  else IsoType_ = NoneIso;
82 
83  PtCutL1_ = iConfig.getUntrackedParameter<double>("PtCutL1");
84  PtCutL2_ = iConfig.getUntrackedParameter<double>("PtCutL2");
85  EtaCutL1_ = iConfig.getUntrackedParameter<double>("EtaCutL1");
86  EtaCutL2_ = iConfig.getUntrackedParameter<double>("EtaCutL2");
87 
88  MassBin_ = iConfig.getUntrackedParameter<int>("MassBin");
89  MassMin_ = iConfig.getUntrackedParameter<double>("MassMin");
90  MassMax_ = iConfig.getUntrackedParameter<double>("MassMax");
91 
92  LumiBin_ = iConfig.getUntrackedParameter<int>("LumiBin");
93  LumiMin_ = iConfig.getUntrackedParameter<double>("LumiMin");
94  LumiMax_ = iConfig.getUntrackedParameter<double>("LumiMax");
95 
96  PVBin_ = iConfig.getUntrackedParameter<int>("PVBin");
97  PVMin_ = iConfig.getUntrackedParameter<double>("PVMin");
98  PVMax_ = iConfig.getUntrackedParameter<double>("PVMax");
99 
100  VtxNTracksFitCut_ = iConfig.getUntrackedParameter<double>("VtxNTracksFitMin");
101  VtxNdofCut_ = iConfig.getUntrackedParameter<double>("VtxNdofMin");
102  VtxAbsZCut_ = iConfig.getUntrackedParameter<double>("VtxAbsZMax");
103  VtxRhoCut_ = iConfig.getUntrackedParameter<double>("VtxRhoMax");
104 
106 }
double IsoCut_
Definition: ZCounting.h:117
edm::InputTag fRhoTag
Definition: ZCounting.h:99
edm::InputTag fBeamspotTag
Definition: ZCounting.h:102
double PtCutL1_
Definition: ZCounting.h:119
std::string fPVName
Definition: ZCounting.h:84
double LumiMax_
Definition: ZCounting.h:130
std::string fSCName
Definition: ZCounting.h:94
std::string fTrackName
Definition: ZCounting.h:88
edm::InputTag fHLTObjTag
Definition: ZCounting.h:80
MuonIsoTypes IsoType_
Definition: ZCounting.h:116
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:93
std::string fMuonName
Definition: ZCounting.h:86
edm::InputTag fConversionTag
Definition: ZCounting.h:105
ElectronIdentifier EleID_
Definition: ZCounting.h:158
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:149
double LumiMin_
Definition: ZCounting.h:129
edm::InputTag fHLTTag
Definition: ZCounting.h:81
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:89
std::string IDTypestr_
Definition: ZCounting.h:113
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:87
double VtxRhoCut_
Definition: ZCounting.h:139
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:152
const std::string ELE_ID_WP
Definition: ZCounting.h:154
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:85
int PVBin_
Definition: ZCounting.h:132
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:148
double VtxNTracksFitCut_
Definition: ZCounting.h:136
double VtxNdofCut_
Definition: ZCounting.h:137
MuonIDTypes IDType_
Definition: ZCounting.h:115
double PtCutL2_
Definition: ZCounting.h:120
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:151
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:82
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:150
int MassBin_
Definition: ZCounting.h:124
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:106
int LumiBin_
Definition: ZCounting.h:128
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:83
std::string fElectronName
Definition: ZCounting.h:92
double EtaCutL1_
Definition: ZCounting.h:121
void setID(std::string ID)
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:100
double MassMax_
Definition: ZCounting.h:126
double PVMax_
Definition: ZCounting.h:134
double MassMin_
Definition: ZCounting.h:125
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:103
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:147
std::string IsoTypestr_
Definition: ZCounting.h:114
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:95
double EtaCutL2_
Definition: ZCounting.h:122
double PVMin_
Definition: ZCounting.h:133
double VtxAbsZCut_
Definition: ZCounting.h:138
ZCounting::~ZCounting ( )
override

Definition at line 111 of file ZCounting.cc.

112 {
113  edm::LogInfo("ZCounting") << "Destructor ZCounting::~ZCounting " << std::endl;
114 }

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 188 of file ZCounting.cc.

References analyzeElectrons(), and analyzeMuons().

189 {// Fill event tree on the fly
190  edm::LogInfo("ZCounting") << "ZCounting::analyze" << std::endl;
191  analyzeMuons(iEvent, iSetup);
192  analyzeElectrons(iEvent, iSetup);
193 }
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:195
int iEvent
Definition: GenABIO.cc:230
void analyzeElectrons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:444
void ZCounting::analyzeElectrons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Fill for ID efficiency

Fill for HLT efficiency

Definition at line 444 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, electrons_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(), badGlobalMuonTaggersAOD_cff::vtx, VtxAbsZCut_, VtxNdofCut_, VtxNTracksFitCut_, and VtxRhoCut_.

Referenced by analyze().

444  {
445  edm::LogInfo("ZCounting") << "ZCounting::analyzeElectrons" << std::endl;
446 
447  //-------------------------------
448  //--- Vertex
449  //-------------------------------
451  iEvent.getByToken(fPVName_token,hVertexProduct);
452  if(!hVertexProduct.isValid()) return;
453 
454  const reco::VertexCollection *pvCol = hVertexProduct.product();
455  int nvtx = 0;
456 
457  for(auto const & vtx : *pvCol) {
458  if(vtx.isFake()) continue;
459  if(vtx.tracksSize() < VtxNTracksFitCut_) continue;
460  if(vtx.ndof() < VtxNdofCut_) continue;
461  if(fabs(vtx.z()) > VtxAbsZCut_) continue;
462  if(vtx.position().Rho() > VtxRhoCut_) continue;
463 
464  nvtx++;
465  }
466 
467  // Good vertex requirement
468  if(nvtx==0) return;
469 
470  //-------------------------------
471  //--- Trigger
472  //-------------------------------
474  iEvent.getByToken(fHLTTag_token,hTrgRes);
475  if(!hTrgRes.isValid()) return;
476 
478  iEvent.getByToken(fHLTObjTag_token,hTrgEvt);
479 
480 
481  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*hTrgRes);
482  Bool_t config_changed = false;
483  if(fTriggerNamesID != triggerNames.parameterSetID()) {
484  fTriggerNamesID = triggerNames.parameterSetID();
485  config_changed = true;
486  }
487  if(config_changed) {
488  initHLT(*hTrgRes, triggerNames);
489  }
490 
491  TriggerBits triggerBits;
492  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
493  if(fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1) continue;
494  if(hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
495  triggerBits [fTrigger->fRecords[irec].baconTrigBit] = true;
496  }
497  }
498 
499  // Trigger requirement
500  if(!isElectronTrigger(*fTrigger, triggerBits)) return;
501 
502  // Get Electrons
504  iEvent.getByToken(fGsfElectronName_token, electrons);
505 
506  // Get SuperClusters
508  iEvent.getByToken(fSCName_token, superclusters);
509 
510  // Get Rho
511  edm::Handle<double> rhoHandle;
512  iEvent.getByToken(fRhoToken, rhoHandle);
513  EleID_.setRho(*rhoHandle);
514 
515  // Get beamspot
516  edm::Handle<reco::BeamSpot> beamspotHandle;
517  iEvent.getByToken(fBeamspotToken, beamspotHandle);
518 
519  // Conversions
520  edm::Handle<reco::ConversionCollection> conversionsHandle;
521  iEvent.getByToken(fConversionToken, conversionsHandle);
522 
523 
525  enum { eEleEle2HLT=1, eEleEle1HLT1L1, eEleEle1HLT, eEleEleNoSel, eEleSC }; // event category enum
526 
527  // Loop over Tags
528  for (size_t itag = 0; itag < electrons->size(); ++itag){
529  const auto el1 = electrons->ptrAt(itag);
530  if( not EleID_.passID(el1,beamspotHandle,conversionsHandle) ) continue;
531 
532  float pt1 = el1->pt();
533  float eta1 = el1->eta();
534  float phi1 = el1->phi();
535 
536  if(!isElectronTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt))) continue;
537  TLorentzVector vTag(0.,0.,0.,0.);
538  vTag.SetPtEtaPhiM(pt1, eta1, phi1, ELECTRON_MASS);
539 
540 
541  // Tag selection: kinematic cuts, lepton selection and trigger matching
542  double tag_pt = vTag.Pt();
543  double tag_abseta = fabs(vTag.Eta());
544 
545  bool tag_is_valid_tag = ele_tag_selection(tag_pt,tag_abseta);
546  bool tag_is_valid_probe = ele_probe_selection(tag_pt,tag_abseta);
547 
548  if( not (tag_is_valid_tag or tag_is_valid_probe) ) continue;
549 
550  // Loop over probes
551  for (size_t iprobe = 0; iprobe < superclusters->size(); ++iprobe){
552  // Initialize probe
553  const auto sc = superclusters->ptrAt(iprobe);
554  if(*sc == *(el1->superCluster())) {
555  continue;
556  }
557 
558  // Find matching electron
559  for (size_t iele = 0; iele < electrons->size(); ++iele){
560  if(iele == itag) continue;
561  const auto ele = electrons->ptrAt(iele);
562  if(*sc == *(ele->superCluster())) {
563  eleProbe = ele;
564  break;
565  }
566  }
567 
568  // Assign final probe 4-vector
569  TLorentzVector vProbe(0.,0.,0.,0.);
570  if(eleProbe.isNonnull()){
571  vProbe.SetPtEtaPhiM( eleProbe->pt(), eleProbe->eta(), eleProbe->phi(), ELECTRON_MASS);
572  } else {
573  double pt = sc->energy() * sqrt( 1 - pow(tanh(sc->eta()),2) );
574  vProbe.SetPtEtaPhiM( pt, sc->eta(), sc->phi(), ELECTRON_MASS);
575  }
576 
577  // Probe Selection
578  double probe_pt = vProbe.Pt();
579  double probe_abseta = fabs(sc->eta());
580  bool probe_is_valid_probe = ele_probe_selection(probe_pt, probe_abseta);
581  if( !probe_is_valid_probe ) continue;
582 
583  // Good Probe found!
584 
585  // Require good Z
586  TLorentzVector vDilep = vTag + vProbe;
587 
588  if((vDilep.M()<ELE_MASS_CUT_LOW) || (vDilep.M()>ELE_MASS_CUT_HIGH)) continue;
589  if(eleProbe.isNonnull() and (eleProbe->charge() != - el1->charge())) continue;
590 
591  // Good Z found!
592 
593  long ls = iEvent.luminosityBlock();
594  bool probe_pass_trigger = isElectronTriggerObj(*fTrigger, TriggerTools::matchHLT(vProbe.Eta(), vProbe.Phi(), fTrigger->fRecords, *hTrgEvt));
595  bool probe_pass_id = eleProbe.isNonnull() and EleID_.passID(eleProbe,beamspotHandle,conversionsHandle);
596 
598  bool probe_is_forward = probe_abseta > ELE_ETA_CRACK_LOW;
599  bool tag_is_forward = tag_abseta > ELE_ETA_CRACK_LOW;
600 
601  if(probe_pass_id) {
602  if(probe_is_forward and tag_is_forward) {
603  h_ee_yield_Z_eeee -> Fill(ls);
604  } else if(!probe_is_forward and !tag_is_forward) {
605  h_ee_yield_Z_ebeb -> Fill(ls);
606  } else {
607  h_ee_yield_Z_ebee -> Fill(ls);
608  }
609  }
610 
611  if(!tag_is_valid_tag) continue;
612 
614  if(probe_pass_id) {
615  if(probe_is_forward) {
616  h_ee_mass_id_pass_forward->Fill(ls, vDilep.M());
617  } else {
618  h_ee_mass_id_pass_central->Fill(ls, vDilep.M());
619  }
620  } else {
621  if(probe_is_forward) {
622  h_ee_mass_id_fail_forward->Fill(ls, vDilep.M());
623  } else {
624  h_ee_mass_id_fail_central->Fill(ls, vDilep.M());
625  }
626  }
627 
629  if(probe_pass_id and probe_pass_trigger) {
630  if(probe_is_forward) {
631  h_ee_mass_HLT_pass_forward->Fill(ls, vDilep.M());
632  } else {
633  h_ee_mass_HLT_pass_central->Fill(ls, vDilep.M());
634  }
635  } else if (probe_pass_id) {
636  if(probe_is_forward) {
637  h_ee_mass_HLT_fail_forward->Fill(ls, vDilep.M());
638  } else {
639  h_ee_mass_HLT_fail_central->Fill(ls, vDilep.M());
640  }
641  }
642  } // End of probe loop
643  }//End of tag loop
644 
645 }
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:730
double eta() const final
momentum pseudorapidity
float phi() const
Momentum azimuthal angle. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:161
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:93
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:735
ElectronIdentifier EleID_
Definition: ZCounting.h:158
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:189
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:190
void Fill(long long x)
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
double VtxRhoCut_
Definition: ZCounting.h:139
int iEvent
Definition: GenABIO.cc:230
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:79
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:152
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:85
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:136
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:671
float energy() const
Energy. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:111
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:196
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:195
double VtxNdofCut_
Definition: ZCounting.h:137
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:191
bool isValid() const
Definition: HandleBase.h:74
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:653
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:151
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:155
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:82
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:185
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:188
def ls(path, rec=False)
Definition: eostools.py:348
void setRho(double rho)
T const * product() const
Definition: Handle.h:81
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:194
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:106
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:83
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:647
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:183
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:186
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:100
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:184
const float ELECTRON_MASS
Definition: ZCounting.h:145
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:103
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:111
double phi() const final
momentum azimuthal angle
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:40
double VtxAbsZCut_
Definition: ZCounting.h:138
float eta() const
Momentum pseudorapidity. Note this is taken from the simtrack before the calorimeter.
Definition: SimCluster.h:171
void ZCounting::analyzeMuons ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
private

Definition at line 195 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_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_Sta_fail_central, h_mass_Sta_fail_forward, h_mass_Sta_pass_central, h_mass_Sta_pass_forward, h_npv, h_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().

195  {
196  edm::LogInfo("ZCounting") << "ZCounting::analyzeMuons" << std::endl;
197  //-------------------------------
198  //--- Vertex
199  //-------------------------------
201  iEvent.getByToken(fPVName_token,hVertexProduct);
202  if(!hVertexProduct.isValid()) return;
203 
204  const reco::VertexCollection *pvCol = hVertexProduct.product();
205  const reco::Vertex* pv = &(*pvCol->begin());
206  int nvtx = 0;
207 
208  for(auto const & itVtx : *hVertexProduct) {
209  if(itVtx.isFake()) continue;
210  if(itVtx.tracksSize() < VtxNTracksFitCut_) continue;
211  if(itVtx.ndof() < VtxNdofCut_) continue;
212  if(fabs(itVtx.z()) > VtxAbsZCut_) continue;
213  if(itVtx.position().Rho() > VtxRhoCut_) continue;
214 
215  if(nvtx==0) {
216  pv = &itVtx;
217  }
218  nvtx++;
219  }
220 
221  h_npv->Fill(iEvent.luminosityBlock(), nvtx);
222 
223  // Good vertex requirement
224  if(nvtx==0) return;
225 
226  //-------------------------------
227  //--- Trigger
228  //-------------------------------
230  iEvent.getByToken(fHLTTag_token,hTrgRes);
231  if(!hTrgRes.isValid()) return;
232 
234  iEvent.getByToken(fHLTObjTag_token,hTrgEvt);
235 
236  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*hTrgRes);
237  bool config_changed = false;
238  if(fTriggerNamesID != triggerNames.parameterSetID()) {
239  fTriggerNamesID = triggerNames.parameterSetID();
240  config_changed = true;
241  }
242  if(config_changed) {
243  initHLT(*hTrgRes, triggerNames);
244  }
245 
246  TriggerBits triggerBits;
247  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
248  if(fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1) continue;
249  if(hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
250  triggerBits [fTrigger->fRecords[irec].baconTrigBit] = true;
251  }
252  }
253  //if(fSkipOnHLTFail && triggerBits == 0) return;
254 
255  // Trigger requirement
256  if(!isMuonTrigger(*fTrigger, triggerBits)) return;
257 
258  //-------------------------------
259  //--- Muons and Tracks
260  //-------------------------------
262  iEvent.getByToken(fMuonName_token,hMuonProduct);
263  if(!hMuonProduct.isValid()) return;
264 
266  iEvent.getByToken(fTrackName_token,hTrackProduct);
267  if(!hTrackProduct.isValid()) return;
268 
269  TLorentzVector vTag(0.,0.,0.,0.);
270  TLorentzVector vProbe(0.,0.,0.,0.);
271  TLorentzVector vTrack(0.,0.,0.,0.);
272 
273  // Tag loop
274  for(auto const & itMu1 : *hMuonProduct) {
275 
276  float pt1 = itMu1.muonBestTrack()->pt();
277  float eta1 = itMu1.muonBestTrack()->eta();
278  float phi1 = itMu1.muonBestTrack()->phi();
279  float q1 = itMu1.muonBestTrack()->charge();
280 
281  // Tag selection: kinematic cuts, lepton selection and trigger matching
282  if(pt1 < PtCutL1_) continue;
283  if(fabs(eta1) > EtaCutL1_) continue;
284  if(!(passMuonID(itMu1, *pv, IDType_) && passMuonIso(itMu1, IsoType_, IsoCut_))) continue;
285  if(!isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt))) continue;
286 
287  vTag.SetPtEtaPhiM(pt1, eta1, phi1, MUON_MASS);
288 
289  // Probe loop over muons
290  for(auto const & itMu2 : *hMuonProduct) {
291  if(&itMu2 == &itMu1) continue;
292 
293  float pt2 = itMu2.muonBestTrack()->pt();
294  float eta2 = itMu2.muonBestTrack()->eta();
295  float phi2 = itMu2.muonBestTrack()->phi();
296  float q2 = itMu2.muonBestTrack()->charge();
297 
298  // Probe selection: kinematic cuts and opposite charge requirement
299  if(pt2 < PtCutL2_) continue;
300  if(fabs(eta2) > EtaCutL2_) continue;
301  if(q1 == q2) continue;
302 
303  vProbe.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
304 
305  // Mass window
306  TLorentzVector vDilep = vTag + vProbe;
307  float dilepMass = vDilep.M();
308  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
309 
310  bool isTagCentral = false;
311  bool isProbeCentral = false;
312  if(fabs(eta1) < MUON_BOUND) isTagCentral = true;
313  if(fabs(eta2) < MUON_BOUND) isProbeCentral = true;
314 
315  // Determine event category for efficiency calculation
316  if(passMuonID(itMu2, *pv, IDType_) && passMuonIso(itMu2, IsoType_, IsoCut_)){
317  if(isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta2, phi2, fTrigger->fRecords, *hTrgEvt))){
318  // category 2HLT: both muons passing trigger requirements
319  if(&itMu1>&itMu2) continue; // make sure we don't double count MuMu2HLT category
320 
321  // Fill twice for each event, since both muons pass trigger
322  if(isTagCentral){
323  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
324  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
325  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
326  }
327  else
328  {
329  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
330  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
331  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
332  }
333 
334  if(isProbeCentral){
335  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
336  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
337  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
338  }
339  else
340  {
341  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
342  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
343  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
344  }
345 
346  }
347  else{
348  // category 1HLT: probe passing selection but not trigger
349  if(isProbeCentral){
350  h_mass_HLT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
351  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
352  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
353  }
354  else
355  {
356  h_mass_HLT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
357  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
358  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
359  }
360 
361  }
362  // category 2HLT + 1HLT: Fill once for Z yield
363  h_yield_Z->Fill(iEvent.luminosityBlock());
364  if(isTagCentral && isProbeCentral) h_yieldBB_Z->Fill(iEvent.luminosityBlock());
365  else if(!isTagCentral && !isProbeCentral) h_yieldEE_Z->Fill(iEvent.luminosityBlock());
366  }
367  else if(itMu2.isGlobalMuon()){
368  // category NoSel: probe is a GLB muon but failing selection
369  if(isProbeCentral){
370  h_mass_SIT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
371  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
372  }
373  else
374  {
375  h_mass_SIT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
376  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
377  }
378  }
379  else if(itMu2.isStandAloneMuon()){
380  // category STA: probe is a STA muon
381  if(isProbeCentral){
382  h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
383  }
384  else
385  {
386  h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
387  }
388  }
389  else if(itMu2.innerTrack()->hitPattern().trackerLayersWithMeasurement() >= 6 && itMu2.innerTrack()->hitPattern().numberOfValidPixelHits() >= 1){
390  // cateogry Trk: probe is a tracker track
391  if(isProbeCentral){
392  h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
393  }
394  else
395  {
396  h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
397  }
398  }
399 
400  }// End of probe loop over muons
401 
402  // Probe loop over tracks, only for standalone efficiency calculation
403  for(auto const & itTrk : *hTrackProduct) {
404 
405  // Check track is not a muon
406  bool isMuon = false;
407  for(auto const & itMu : *hMuonProduct) {
408  if(itMu.innerTrack().isNonnull() && itMu.innerTrack().get() == &itTrk) {
409  isMuon = true;
410  break;
411  }
412  }
413  if(isMuon) continue;
414 
415  float pt2 = itTrk.pt();
416  float eta2 = itTrk.eta();
417  float phi2 = itTrk.phi();
418  float q2 = itTrk.charge();
419 
420  // Probe selection: kinematic cuts and opposite charge requirement
421  if(pt2 < PtCutL2_) continue;
422  if(fabs(eta2) > EtaCutL2_) continue;
423  if(q1 == q2) continue;
424 
425  vTrack.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
426 
427  TLorentzVector vDilep = vTag + vTrack;
428  float dilepMass = vDilep.M();
429  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
430 
431  bool isTrackCentral = false;
432  if(fabs(eta2) > MUON_BOUND) isTrackCentral = true;
433 
434  if(itTrk.hitPattern().trackerLayersWithMeasurement() >= 6 && itTrk.hitPattern().numberOfValidPixelHits() >= 1){
435  if(isTrackCentral) h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
436  else h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
437  }
438 
439  }//End of probe loop over tracks
440 
441  }//End of tag loop
442 
443 }
MonitorElement * h_mass_Sta_fail_central
Definition: ZCounting.h:174
MonitorElement * h_mass_Sta_pass_central
Definition: ZCounting.h:172
double IsoCut_
Definition: ZCounting.h:117
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:169
double PtCutL1_
Definition: ZCounting.h:119
bool isMuon(const Candidate &part)
Definition: pdgIdUtils.h:11
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:168
bool accept() const
Has at least one path accepted the event?
MonitorElement * h_yield_Z
Definition: ZCounting.h:178
MuonIsoTypes IsoType_
Definition: ZCounting.h:116
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:710
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:163
double q2[4]
Definition: TauolaWrapper.h:88
void Fill(long long x)
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:89
const double MUON_MASS
Definition: ZCounting.h:141
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:87
double VtxRhoCut_
Definition: ZCounting.h:139
int iEvent
Definition: GenABIO.cc:230
MonitorElement * h_mass_Sta_pass_forward
Definition: ZCounting.h:173
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:79
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:85
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:180
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:136
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:698
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:671
def pv(vc)
Definition: MetAnalyzer.py:6
double VtxNdofCut_
Definition: ZCounting.h:137
bool isValid() const
Definition: HandleBase.h:74
MuonIDTypes IDType_
Definition: ZCounting.h:115
MonitorElement * h_npv
Definition: ZCounting.h:177
double PtCutL2_
Definition: ZCounting.h:120
MonitorElement * h_mass_Sta_fail_forward
Definition: ZCounting.h:175
const double MUON_BOUND
Definition: ZCounting.h:142
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:82
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:170
T const * product() const
Definition: Handle.h:81
double q1[4]
Definition: TauolaWrapper.h:87
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:162
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:83
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:165
double EtaCutL1_
Definition: ZCounting.h:121
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:720
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:179
double MassMax_
Definition: ZCounting.h:126
double MassMin_
Definition: ZCounting.h:125
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:167
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:111
double EtaCutL2_
Definition: ZCounting.h:122
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:164
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:704
double VtxAbsZCut_
Definition: ZCounting.h:138
void ZCounting::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 178 of file ZCounting.cc.

179 {
180  edm::LogInfo("ZCounting") << "ZCounting::beginLuminosityBlock" << std::endl;
181 }
void ZCounting::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 130 of file ZCounting.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), 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, 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_Sta_fail_central, h_mass_Sta_fail_forward, h_mass_Sta_pass_central, h_mass_Sta_pass_forward, h_npv, h_yield_Z, h_yieldBB_Z, h_yieldEE_Z, LumiBin_, LumiMax_, LumiMin_, MassBin_, MassMax_, MassMin_, PVBin_, PVMax_, PVMin_, and DQMStore::IBooker::setCurrentFolder().

131 {
132  edm::LogInfo("ZCounting") << "ZCounting::bookHistograms" << std::endl;
133 
134  ibooker_.cd();
135  ibooker_.setCurrentFolder("ZCounting/Histograms");
136 
137 
138  // Muon histograms
139  h_mass_HLT_pass_central = ibooker_.book2D("h_mass_HLT_pass_central", "h_mass_HLT_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
140  h_mass_HLT_pass_forward = ibooker_.book2D("h_mass_HLT_pass_forward", "h_mass_HLT_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
141  h_mass_HLT_fail_central = ibooker_.book2D("h_mass_HLT_fail_central", "h_mass_HLT_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
142  h_mass_HLT_fail_forward = ibooker_.book2D("h_mass_HLT_fail_forward", "h_mass_HLT_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
143 
144  h_mass_SIT_pass_central = ibooker_.book2D("h_mass_SIT_pass_central", "h_mass_SIT_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
145  h_mass_SIT_pass_forward = ibooker_.book2D("h_mass_SIT_pass_forward", "h_mass_SIT_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
146  h_mass_SIT_fail_central = ibooker_.book2D("h_mass_SIT_fail_central", "h_mass_SIT_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
147  h_mass_SIT_fail_forward = ibooker_.book2D("h_mass_SIT_fail_forward", "h_mass_SIT_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
148 
149  h_mass_Sta_pass_central = ibooker_.book2D("h_mass_Sta_pass_central", "h_mass_Sta_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
150  h_mass_Sta_pass_forward = ibooker_.book2D("h_mass_Sta_pass_forward", "h_mass_Sta_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
151  h_mass_Sta_fail_central = ibooker_.book2D("h_mass_Sta_fail_central", "h_mass_Sta_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
152  h_mass_Sta_fail_forward = ibooker_.book2D("h_mass_Sta_fail_forward", "h_mass_Sta_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
153 
154  h_npv = ibooker_.book2D("h_npv", "h_npv", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
155  h_yield_Z = ibooker_.book1D("h_yield_Z", "h_yield_Z", LumiBin_, LumiMin_, LumiMax_);
156  h_yieldBB_Z = ibooker_.book1D("h_yieldBB_Z", "h_yieldBB_Z", LumiBin_, LumiMin_, LumiMax_);
157  h_yieldEE_Z = ibooker_.book1D("h_yieldEE_Z", "h_yieldEE_Z", LumiBin_, LumiMin_, LumiMax_);
158 
159 
160  // Electron histograms
161  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_);
162  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_);
163  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_);
164  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_);
165 
166  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_);
167  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_);
168  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_);
169  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_);
170 
171  h_ee_yield_Z_ebeb = ibooker_.book1D("h_ee_yield_Z_ebeb", "h_ee_yield_Z_ebeb", LumiBin_, LumiMin_, LumiMax_);
172  h_ee_yield_Z_ebee = ibooker_.book1D("h_ee_yield_Z_ebee", "h_ee_yield_Z_ebee", LumiBin_, LumiMin_, LumiMax_);
173  h_ee_yield_Z_eeee = ibooker_.book1D("h_ee_yield_Z_eeee", "h_ee_yield_Z_eeee", LumiBin_, LumiMin_, LumiMax_);
174 }
MonitorElement * h_mass_Sta_fail_central
Definition: ZCounting.h:174
MonitorElement * h_mass_Sta_pass_central
Definition: ZCounting.h:172
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:169
double LumiMax_
Definition: ZCounting.h:130
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:168
MonitorElement * h_yield_Z
Definition: ZCounting.h:178
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:163
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:189
double LumiMin_
Definition: ZCounting.h:129
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:190
MonitorElement * h_mass_Sta_pass_forward
Definition: ZCounting.h:173
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:180
int PVBin_
Definition: ZCounting.h:132
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:196
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:195
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:191
MonitorElement * h_npv
Definition: ZCounting.h:177
MonitorElement * h_mass_Sta_fail_forward
Definition: ZCounting.h:175
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:185
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:188
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:170
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:194
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:162
int MassBin_
Definition: ZCounting.h:124
int LumiBin_
Definition: ZCounting.h:128
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:183
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:165
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:186
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:179
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:184
double MassMax_
Definition: ZCounting.h:126
double PVMax_
Definition: ZCounting.h:134
double MassMin_
Definition: ZCounting.h:125
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:167
double PVMin_
Definition: ZCounting.h:133
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:164
void ZCounting::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 119 of file ZCounting.cc.

References fTrigger.

120 {
121  edm::LogInfo("ZCounting") << "ZCounting::beginRun" << std::endl;
122 
123  // Triggers
125 
126 }
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:111
bool ZCounting::ele_probe_selection ( double  pt,
double  abseta 
)
private

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

647  {
648  if(pt < ELE_PT_CUT_PROBE) return false;
649  if(abseta > ELE_ETA_CUT_PROBE) return false;
650  if( (abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH) ) return false;
651  return true;
652 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:156
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:148
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:155
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:150
bool ZCounting::ele_tag_selection ( double  pt,
double  abseta 
)
private

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

653  {
654  if(pt < ELE_PT_CUT_TAG) return false;
655  if(abseta > ELE_ETA_CUT_TAG) return false;
656  if( (abseta > ELE_ETA_CRACK_LOW) and (abseta < ELE_ETA_CRACK_HIGH) ) return false;
657  return true;
658 }
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:156
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:149
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:155
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:147
void ZCounting::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 662 of file ZCounting.cc.

663 {
664  edm::LogInfo("ZCounting") << "ZCounting::endLuminosityBlock" << std::endl;
665 }
void ZCounting::initHLT ( const edm::TriggerResults result,
const edm::TriggerNames triggerNames 
)
private

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

672 {
673  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
674  fTrigger->fRecords[irec].hltPathName = "";
675  fTrigger->fRecords[irec].hltPathIndex = (unsigned int)-1;
676  const std::string pattern = fTrigger->fRecords[irec].hltPattern;
677  if(edm::is_glob(pattern)) { // handle pattern with wildcards (*,?)
678  std::vector<std::vector<std::string>::const_iterator> matches = edm::regexMatch(triggerNames.triggerNames(), pattern);
679  if(matches.empty()) {
680  edm::LogWarning("ZCounting") << "requested pattern [" << pattern << "] does not match any HLT paths" << std::endl;
681  } else {
682  BOOST_FOREACH(std::vector<std::string>::const_iterator match, matches) {
683  fTrigger->fRecords[irec].hltPathName = *match;
684  }
685  }
686  } else { // take full HLT path name given
687  fTrigger->fRecords[irec].hltPathName = pattern;
688  }
689  // Retrieve index in trigger menu corresponding to HLT path
690  unsigned int index = triggerNames.triggerIndex(fTrigger->fRecords[irec].hltPathName);
691  if(index < result.size()) { // check for valid index
692  fTrigger->fRecords[irec].hltPathIndex = index;
693  }
694  }
695 }
bool is_glob(std::string const &pattern)
Definition: RegexMatch.cc:18
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
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:30
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:111
bool ZCounting::isElectronTrigger ( ZCountingTrigger::TTrigger  triggerMenu,
TriggerBits  hltBits 
)
private

Definition at line 730 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::pass().

Referenced by analyzeElectrons().

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

Definition at line 735 of file ZCounting.cc.

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

Referenced by analyzeElectrons().

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

Definition at line 698 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::pass().

Referenced by analyzeMuons().

699 {
700  return triggerMenu.pass("HLT_IsoMu27_v*",hltBits);
701 }
bool pass(const std::string &iName, const TriggerBits &iTrig) const
Definition: TTrigger.cc:59
bool ZCounting::isMuonTriggerObj ( const ZCountingTrigger::TTrigger triggerMenu,
const TriggerObjects hltMatchBits 
)
private

Definition at line 704 of file ZCounting.cc.

References ZCountingTrigger::TTrigger::passObj().

Referenced by analyzeMuons().

705 {
706  return triggerMenu.passObj("HLT_IsoMu27_v*","hltL3crIsoL1sMu22Or25L1f0L2f10QL3f27QL3trkIsoFiltered0p07",hltMatchBits);
707 }
bool passObj(const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
Definition: TTrigger.cc:67
bool ZCounting::passMuonID ( const reco::Muon muon,
const reco::Vertex vtx,
const MuonIDTypes idType 
)
private

Definition at line 710 of file ZCounting.cc.

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

Referenced by analyzeMuons().

711 {//Muon ID selection, using internal function "DataFormats/MuonReco/src/MuonSelectors.cc
712 
713  if (idType == LooseID && muon::isLooseMuon(muon)) return true;
714  else if(idType == MediumID && muon::isMediumMuon(muon)) return true;
715  else if(idType == TightID && muon::isTightMuon(muon, vtx)) return true;
716  else if(idType == NoneID) return true;
717  else return false;
718 }
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 720 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().

721 {//Muon isolation selection, up-to-date with MUO POG recommendation
722 
723  if(isoType == TrackerIso && muon.isolationR03().sumPt < isoCut) return true;
724  else if(isoType == PFIso && muon.pfIsolationR04().sumChargedHadronPt + std::max(0.,muon.pfIsolationR04().sumNeutralHadronEt + muon.pfIsolationR04().sumPhotonEt - 0.5*muon.pfIsolationR04().sumPUPt) < isoCut) return true;
725  else if(isoType == NoneIso) return true;
726  else return false;
727 }
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 156 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 155 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 150 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_ETA_CUT_TAG
private

Definition at line 149 of file ZCounting.h.

Referenced by ele_tag_selection().

const std::string ZCounting::ELE_ID_WP
private

Definition at line 154 of file ZCounting.h.

Referenced by ZCounting().

const float ZCounting::ELE_MASS_CUT_HIGH
private

Definition at line 152 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_MASS_CUT_LOW
private

Definition at line 151 of file ZCounting.h.

Referenced by analyzeElectrons().

const float ZCounting::ELE_PT_CUT_PROBE
private

Definition at line 148 of file ZCounting.h.

Referenced by ele_probe_selection().

const float ZCounting::ELE_PT_CUT_TAG
private

Definition at line 147 of file ZCounting.h.

Referenced by ele_tag_selection().

const float ZCounting::ELECTRON_MASS = 0.000511
private

Definition at line 145 of file ZCounting.h.

Referenced by analyzeElectrons().

ElectronIdentifier ZCounting::EleID_
private

Definition at line 158 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

double ZCounting::EtaCutL1_
private

Definition at line 121 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::EtaCutL2_
private

Definition at line 122 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

edm::InputTag ZCounting::fBeamspotTag
private

Definition at line 102 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 103 of file ZCounting.h.

Referenced by analyzeElectrons(), and ZCounting().

edm::InputTag ZCounting::fConversionTag
private

Definition at line 105 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 106 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 80 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 82 of file ZCounting.h.

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

edm::InputTag ZCounting::fHLTTag
private

Definition at line 81 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 83 of file ZCounting.h.

Referenced by analyzeElectrons(), analyzeMuons(), 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 84 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 85 of file ZCounting.h.

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

edm::InputTag ZCounting::fRhoTag
private

Definition at line 99 of file ZCounting.h.

Referenced by ZCounting().

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

Definition at line 100 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 111 of file ZCounting.h.

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

edm::ParameterSetID ZCounting::fTriggerNamesID
private

Definition at line 79 of file ZCounting.h.

Referenced by analyzeElectrons(), and analyzeMuons().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_central
private

Definition at line 189 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_HLT_fail_forward
private

Definition at line 191 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_central
private

Definition at line 188 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_HLT_pass_forward
private

Definition at line 190 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_id_fail_central
private

Definition at line 184 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_id_fail_forward
private

Definition at line 186 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_id_pass_central
private

Definition at line 183 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_mass_id_pass_forward
private

Definition at line 185 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_yield_Z_ebeb
private

Definition at line 194 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_yield_Z_ebee
private

Definition at line 195 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_ee_yield_Z_eeee
private

Definition at line 196 of file ZCounting.h.

Referenced by analyzeElectrons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_central
private

Definition at line 164 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_fail_forward
private

Definition at line 165 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_central
private

Definition at line 162 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_HLT_pass_forward
private

Definition at line 163 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_central
private

Definition at line 169 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_fail_forward
private

Definition at line 170 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_central
private

Definition at line 167 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_SIT_pass_forward
private

Definition at line 168 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Sta_fail_central
private

Definition at line 174 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Sta_fail_forward
private

Definition at line 175 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Sta_pass_central
private

Definition at line 172 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_mass_Sta_pass_forward
private

Definition at line 173 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_npv
private

Definition at line 177 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yield_Z
private

Definition at line 178 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldBB_Z
private

Definition at line 179 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MonitorElement* ZCounting::h_yieldEE_Z
private

Definition at line 180 of file ZCounting.h.

Referenced by analyzeMuons(), and bookHistograms().

MuonIDTypes ZCounting::IDType_ {NoneID}
private

Definition at line 115 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IDTypestr_
private

Definition at line 113 of file ZCounting.h.

Referenced by ZCounting().

double ZCounting::IsoCut_
private

Definition at line 117 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

MuonIsoTypes ZCounting::IsoType_ {NoneIso}
private

Definition at line 116 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

std::string ZCounting::IsoTypestr_
private

Definition at line 114 of file ZCounting.h.

Referenced by ZCounting().

int ZCounting::LumiBin_
private

Definition at line 128 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMax_
private

Definition at line 130 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::LumiMin_
private

Definition at line 129 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

int ZCounting::MassBin_
private

Definition at line 124 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::MassMax_
private

Definition at line 126 of file ZCounting.h.

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

double ZCounting::MassMin_
private

Definition at line 125 of file ZCounting.h.

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

const double ZCounting::MUON_BOUND = 0.9
private

Definition at line 142 of file ZCounting.h.

Referenced by analyzeMuons().

const double ZCounting::MUON_MASS = 0.105658369
private

Definition at line 141 of file ZCounting.h.

Referenced by analyzeMuons().

double ZCounting::PtCutL1_
private

Definition at line 119 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

double ZCounting::PtCutL2_
private

Definition at line 120 of file ZCounting.h.

Referenced by analyzeMuons(), and ZCounting().

int ZCounting::PVBin_
private

Definition at line 132 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMax_
private

Definition at line 134 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::PVMin_
private

Definition at line 133 of file ZCounting.h.

Referenced by bookHistograms(), and ZCounting().

double ZCounting::VtxAbsZCut_
private

Definition at line 138 of file ZCounting.h.

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

double ZCounting::VtxNdofCut_
private

Definition at line 137 of file ZCounting.h.

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

double ZCounting::VtxNTracksFitCut_
private

Definition at line 136 of file ZCounting.h.

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

double ZCounting::VtxRhoCut_
private

Definition at line 139 of file ZCounting.h.

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