CMS 3D CMS Logo

ZCounting.h
Go to the documentation of this file.
1 #ifndef ZCounting_H
2 #define ZCounting_H
3 
4 #include "FWCore/Framework/interface/MakerMacros.h" // definitions for declaring plug-in modules
5 #include "FWCore/Framework/interface/Frameworkfwd.h" // declaration of EDM types
6 #include "FWCore/Framework/interface/EDAnalyzer.h" // EDAnalyzer class
10 
11 #include <string> // string class
12 #include <cassert>
13 
20 
23 
28 
29 class TFile;
30 class TH1D;
31 class TTree;
32 class TClonesArray;
33 namespace edm {
34  class TriggerResults;
35  class TriggerNames;
36 } // namespace edm
37 namespace ZCountingTrigger {
38  class TTrigger;
39 }
40 
41 class ZCounting : public DQMEDAnalyzer {
42 public:
43  ZCounting(const edm::ParameterSet& ps);
44  ~ZCounting() override;
45 
48 
49 protected:
50  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
51  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
52  void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
53 
54 private:
55  //other functions
56  void analyzeMuons(edm::Event const& e, edm::EventSetup const& eSetup);
57  void analyzeElectrons(edm::Event const& e, edm::EventSetup const& eSetup);
58  bool isMuonTrigger(const ZCountingTrigger::TTrigger& triggerMenu, const TriggerBits& hltBits);
59  bool isMuonTriggerObj(const ZCountingTrigger::TTrigger& triggerMenu, const TriggerObjects& hltMatchBits);
60  bool passMuonID(const reco::Muon& muon, const reco::Vertex& vtx, const MuonIDTypes& idType);
61  bool passMuonIso(const reco::Muon& muon, const MuonIsoTypes& isoType, const float isoCut);
62 
63  // Electron-specific functions
64  bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits);
65  bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits);
66  bool ele_probe_selection(double pt, double abseta);
67  bool ele_tag_selection(double pt, double abseta);
68 
69  // initialization from HLT menu; needs to be called on every change in HLT menu
70  void initHLT(const edm::TriggerResults&, const edm::TriggerNames&);
71 
72  // EDM object collection names
80 
81  // Muons
84  std::vector<std::string> fMuonHLTNames;
85  std::vector<std::string> fMuonHLTObjectNames;
86 
87  // Tracks
90 
91  // Electrons
96 
99 
102 
105 
106  // bacon fillers
107  std::unique_ptr<ZCountingTrigger::TTrigger> fTrigger;
108 
113  double IsoCut_;
114 
115  double PtCutL1_;
116  double PtCutL2_;
117  double EtaCutL1_;
118  double EtaCutL2_;
119 
120  int MassBin_;
121  double MassMin_;
122  double MassMax_;
123 
124  int LumiBin_;
125  double LumiMin_;
126  double LumiMax_;
127 
128  int PVBin_;
129  double PVMin_;
130  double PVMax_;
131 
133  double VtxNdofCut_;
134  double VtxAbsZCut_;
135  double VtxRhoCut_;
136 
137  const double MUON_MASS = 0.105658369;
138  const double MUON_BOUND = 0.9;
139 
140  const float ELECTRON_MASS = 0.000511;
141 
142  const float ELE_PT_CUT_TAG;
143  const float ELE_PT_CUT_PROBE;
144  const float ELE_ETA_CUT_TAG;
145  const float ELE_ETA_CUT_PROBE;
146  const float ELE_MASS_CUT_LOW;
147  const float ELE_MASS_CUT_HIGH;
148 
150  const float ELE_ETA_CRACK_LOW = 1.4442;
151  const float ELE_ETA_CRACK_HIGH = 1.56;
152  // Electron-specific members
154 
155  // Muon Histograms
160 
165 
170 
176 
177  // Electron Histograms
182 
187 
191 };
192 
193 #endif
ZCounting::h_npv
MonitorElement * h_npv
Definition: ZCounting.h:171
ZCounting::EtaCutL1_
double EtaCutL1_
Definition: ZCounting.h:117
ZCounting::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:131
ZCounting::ELE_MASS_CUT_HIGH
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:147
ZCounting::h_ee_mass_id_fail_forward
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:181
ZCounting::fPVName_token
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:79
ZCounting::ELE_ETA_CRACK_LOW
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:150
TTrigger.h
Muon.h
ZCounting::fHLTTag_token
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:77
ZCounting::ele_probe_selection
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:800
ZCounting::fBeamspotTag
edm::InputTag fBeamspotTag
Definition: ZCounting.h:100
muon
Definition: MuonCocktails.h:17
ZCounting::h_mass_HLT_pass_forward
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:157
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
ZCounting::h_ee_yield_Z_eeee
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:190
edm::Run
Definition: Run.h:45
TriggerEvent.h
edm::EDGetTokenT< trigger::TriggerEvent >
edm
HLT enums.
Definition: AlignableModifier.h:19
ZCounting::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:140
ZCounting::LumiMin_
double LumiMin_
Definition: ZCounting.h:125
ZCounting::fHLTObjTag
edm::InputTag fHLTObjTag
Definition: ZCounting.h:74
ZCounting::analyzeMuons
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:316
ZCounting::analyze
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:310
ZCounting::VtxAbsZCut_
double VtxAbsZCut_
Definition: ZCounting.h:134
ZCounting::fHLTObjTag_token
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:76
ZCounting::passMuonID
bool passMuonID(const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
Definition: ZCounting.cc:868
ZCounting::fRhoTag
edm::InputTag fRhoTag
Definition: ZCounting.h:97
DQMStore.h
ZCounting::h_ee_mass_id_pass_forward
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:180
ZCounting::ELE_MASS_CUT_LOW
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:146
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ZCounting::h_mass_Glo_fail_central
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:168
EDAnalyzer.h
ZCounting::MassMin_
double MassMin_
Definition: ZCounting.h:121
ZCounting::fMuonHLTObjectNames
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:85
ZCounting::h_mass_SIT_pass_central
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:161
ZCounting::h_yieldEE_Z
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:175
ZCounting::analyzeElectrons
void analyzeElectrons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:582
ZCounting::h_mass_yield_Z
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:173
ZCounting::IsoTypestr_
std::string IsoTypestr_
Definition: ZCounting.h:110
TriggerDefs.h
reco::Muon
Definition: Muon.h:27
ZCounting::isMuonTriggerObj
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:859
ZCounting::ELE_PT_CUT_TAG
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:142
ElectronIdentifier
Definition: ElectronIdentifier.h:40
ZCounting::LumiMax_
double LumiMax_
Definition: ZCounting.h:126
ZCounting::h_ee_yield_Z_ebee
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:189
ZCounting::fSCName_token
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:95
ZCounting::PVMin_
double PVMin_
Definition: ZCounting.h:129
ZCounting::~ZCounting
~ZCounting() override
Definition: ZCounting.cc:126
ZCounting::fPVName
std::string fPVName
Definition: ZCounting.h:78
ZCounting::MUON_MASS
const double MUON_MASS
Definition: ZCounting.h:137
ZCounting::h_ee_yield_Z_ebeb
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:188
ZCounting::h_ee_mass_HLT_fail_central
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:184
MakerMacros.h
TriggerTools.h
ZCounting::h_ee_mass_HLT_fail_forward
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:186
ZCounting::EtaCutL2_
double EtaCutL2_
Definition: ZCounting.h:118
ZCounting::MediumID
Definition: ZCounting.h:46
MuonSelectors.h
ZCounting::isElectronTriggerObj
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:909
MuonFwd.h
ZCounting::passMuonIso
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:885
ZCounting::fMuonHLTNames
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:84
ZCounting::IsoType_
MuonIsoTypes IsoType_
Definition: ZCounting.h:112
ZCounting::EleID_
ElectronIdentifier EleID_
Definition: ZCounting.h:153
edm::Hash< ParameterSetType >
ZCounting::fGsfElectronName_token
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:93
ZCounting::PVMax_
double PVMax_
Definition: ZCounting.h:130
ZCounting::ELE_ETA_CUT_PROBE
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:145
ZCounting::PFIso
Definition: ZCounting.h:47
ZCounting::fConversionToken
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:104
DQMEDAnalyzer.h
TriggerObjects
std::bitset< kNTrigObjectBit > TriggerObjects
Definition: TriggerDefs.h:9
ZCounting::fConversionTag
edm::InputTag fConversionTag
Definition: ZCounting.h:103
ZCounting::h_mass_HLT_pass_central
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:156
ZCounting::PtCutL1_
double PtCutL1_
Definition: ZCounting.h:115
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
ZCounting::ELECTRON_MASS
const float ELECTRON_MASS
Definition: ZCounting.h:140
ZCountingTrigger
Definition: TriggerRecord.h:8
ZCounting::fMuonName_token
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:83
edm::ParameterSet
Definition: ParameterSet.h:47
ZCounting::h_mass_Glo_pass_central
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:166
ZCounting::VtxRhoCut_
double VtxRhoCut_
Definition: ZCounting.h:135
ZCounting::TightID
Definition: ZCounting.h:46
ZCounting::fBeamspotToken
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:101
ZCounting::fTrigger
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
ElectronIdentifier.h
ZCounting::h_mass_HLT_fail_forward
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:159
ZCounting::ELE_ID_WP
const std::string ELE_ID_WP
Definition: ZCounting.h:149
ZCounting::ZCounting
ZCounting(const edm::ParameterSet &ps)
Definition: ZCounting.cc:26
ZCounting::h_yieldBB_Z
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:174
ZCounting::ELE_ETA_CRACK_HIGH
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:151
TriggerBits
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
ZCounting::isElectronTrigger
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:905
edm::EventSetup
Definition: EventSetup.h:58
ZCounting::fHLTTag
edm::InputTag fHLTTag
Definition: ZCounting.h:75
ZCounting::ELE_PT_CUT_PROBE
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:143
ZCounting::VtxNTracksFitCut_
double VtxNTracksFitCut_
Definition: ZCounting.h:132
ZCounting::h_npv_yield_Z
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:172
ZCounting::h_ee_mass_HLT_pass_forward
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:185
ZCounting::h_mass_Glo_pass_forward
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:167
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InputTag.h
ZCounting::MuonIsoTypes
MuonIsoTypes
Definition: ZCounting.h:47
ZCounting::VtxNdofCut_
double VtxNdofCut_
Definition: ZCounting.h:133
ZCounting::IDTypestr_
std::string IDTypestr_
Definition: ZCounting.h:109
VertexFwd.h
ZCounting::fSCName
std::string fSCName
Definition: ZCounting.h:94
ZCounting::IDType_
MuonIDTypes IDType_
Definition: ZCounting.h:111
ZCounting::isMuonTrigger
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:850
ZCounting::h_mass_HLT_fail_central
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:158
ZCounting::fTriggerNamesID
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:73
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:19
ZCounting::h_ee_mass_id_pass_central
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:178
Vertex.h
Frameworkfwd.h
ZCountingTrigger::TTrigger
Definition: TTrigger.h:8
edm::TriggerNames
Definition: TriggerNames.h:55
ZCounting::MassMax_
double MassMax_
Definition: ZCounting.h:122
ZCounting::NoneIso
Definition: ZCounting.h:47
ZCounting::PtCutL2_
double PtCutL2_
Definition: ZCounting.h:116
ZCounting::PVBin_
int PVBin_
Definition: ZCounting.h:128
ZCounting::IsoCut_
double IsoCut_
Definition: ZCounting.h:113
ZCounting::LooseID
Definition: ZCounting.h:46
ZCounting::h_mass_Glo_fail_forward
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:169
ZCounting::MUON_BOUND
const double MUON_BOUND
Definition: ZCounting.h:138
dqm::implementation::IBooker
Definition: DQMStore.h:43
ZCounting::NoneID
Definition: ZCounting.h:46
ZCounting::h_mass_SIT_fail_central
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:163
ZCounting::fRhoToken
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:98
ConsumesCollector.h
ZCounting::LumiBin_
int LumiBin_
Definition: ZCounting.h:124
ZCounting::ELE_ETA_CUT_TAG
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:144
ZCounting::h_mass_SIT_fail_forward
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:164
ParameterSet.h
ZCounting::fMuonName
std::string fMuonName
Definition: ZCounting.h:82
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
edm::Event
Definition: Event.h:73
ZCounting::initHLT
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:822
ZCounting::TrackerIso
Definition: ZCounting.h:47
ZCounting::ele_tag_selection
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:809
ZCounting::fTrackName
std::string fTrackName
Definition: ZCounting.h:88
ZCounting::MassBin_
int MassBin_
Definition: ZCounting.h:120
edm::InputTag
Definition: InputTag.h:15
ZCounting::fElectronName
std::string fElectronName
Definition: ZCounting.h:92
edm::TriggerResults
Definition: TriggerResults.h:35
ZCounting::MuonIDTypes
MuonIDTypes
Definition: ZCounting.h:46
reco::Vertex
Definition: Vertex.h:35
ZCounting::fTrackName_token
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:89
ZCounting::h_mass_SIT_pass_forward
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ZCounting::h_ee_mass_HLT_pass_central
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:183
ZCounting::h_ee_mass_id_fail_central
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:179
ZCounting
Definition: ZCounting.h:41