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  bool isCustomTightMuon(const reco::Muon& muon);
63 
64  // Electron-specific functions
65  bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits);
66  bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits);
67  bool ele_probe_selection(double pt, double abseta);
68  bool ele_tag_selection(double pt, double abseta);
69 
70  // initialization from HLT menu; needs to be called on every change in HLT menu
71  void initHLT(const edm::TriggerResults&, const edm::TriggerNames&);
72 
73  // EDM object collection names
81 
82  // Muons
85  std::vector<std::string> fMuonHLTNames;
86  std::vector<std::string> fMuonHLTObjectNames;
87 
88  // Tracks
91 
92  // Electrons
97 
100 
103 
106 
107  // bacon fillers
108  std::unique_ptr<ZCountingTrigger::TTrigger> fTrigger;
109 
114  double IsoCut_;
115 
116  double PtCutL1_;
117  double PtCutL2_;
118  double EtaCutL1_;
119  double EtaCutL2_;
120 
121  int MassBin_;
122  double MassMin_;
123  double MassMax_;
124 
125  int LumiBin_;
126  double LumiMin_;
127  double LumiMax_;
128 
129  int PVBin_;
130  double PVMin_;
131  double PVMax_;
132 
134  double VtxNdofCut_;
135  double VtxAbsZCut_;
136  double VtxRhoCut_;
137 
138  const double MUON_MASS = 0.105658369;
139  const double MUON_BOUND = 0.9;
140 
141  const float ELECTRON_MASS = 0.000511;
142 
143  const float ELE_PT_CUT_TAG;
144  const float ELE_PT_CUT_PROBE;
145  const float ELE_ETA_CUT_TAG;
146  const float ELE_ETA_CUT_PROBE;
147  const float ELE_MASS_CUT_LOW;
148  const float ELE_MASS_CUT_HIGH;
149 
151  const float ELE_ETA_CRACK_LOW = 1.4442;
152  const float ELE_ETA_CRACK_HIGH = 1.56;
153  // Electron-specific members
155 
156  // Muon Histograms
161 
166 
171 
177 
178  // Electron Histograms
183 
188 
192 };
193 
194 #endif
ZCounting(const edm::ParameterSet &ps)
Definition: ZCounting.cc:26
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:168
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:170
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:917
double IsoCut_
Definition: ZCounting.h:114
edm::InputTag fRhoTag
Definition: ZCounting.h:98
edm::InputTag fBeamspotTag
Definition: ZCounting.h:101
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:164
double PtCutL1_
Definition: ZCounting.h:116
std::string fPVName
Definition: ZCounting.h:79
double LumiMax_
Definition: ZCounting.h:127
std::string fSCName
Definition: ZCounting.h:95
std::string fTrackName
Definition: ZCounting.h:89
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:163
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:85
edm::InputTag fHLTObjTag
Definition: ZCounting.h:75
MuonIsoTypes IsoType_
Definition: ZCounting.h:113
bool passMuonID(const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
Definition: ZCounting.cc:878
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:94
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:921
std::string fMuonName
Definition: ZCounting.h:83
edm::InputTag fConversionTag
Definition: ZCounting.h:104
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:158
ElectronIdentifier EleID_
Definition: ZCounting.h:154
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:152
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:145
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:185
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:174
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:167
double LumiMin_
Definition: ZCounting.h:126
std::bitset< kNTrigObjectBit > TriggerObjects
Definition: TriggerDefs.h:9
edm::InputTag fHLTTag
Definition: ZCounting.h:76
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:186
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:90
std::string IDTypestr_
Definition: ZCounting.h:110
bool isCustomTightMuon(const reco::Muon &muon)
Definition: ZCounting.cc:865
const double MUON_MASS
Definition: ZCounting.h:138
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:84
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:316
double VtxRhoCut_
Definition: ZCounting.h:136
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:74
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:148
const std::string ELE_ID_WP
Definition: ZCounting.h:150
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:80
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:176
int PVBin_
Definition: ZCounting.h:129
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:144
double VtxNTracksFitCut_
Definition: ZCounting.h:133
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:173
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:846
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:818
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:191
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:190
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:140
double VtxNdofCut_
Definition: ZCounting.h:134
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:187
MuonIDTypes IDType_
Definition: ZCounting.h:112
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:805
MonitorElement * h_npv
Definition: ZCounting.h:172
double PtCutL2_
Definition: ZCounting.h:117
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:310
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:147
const double MUON_BOUND
Definition: ZCounting.h:139
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:151
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:77
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:181
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:184
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:165
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:189
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:157
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:146
int MassBin_
Definition: ZCounting.h:121
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:105
int LumiBin_
Definition: ZCounting.h:125
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:78
~ZCounting() override
Definition: ZCounting.cc:126
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:796
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:179
std::string fElectronName
Definition: ZCounting.h:93
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:160
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:131
HLT enums.
double EtaCutL1_
Definition: ZCounting.h:118
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:897
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:182
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:99
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:175
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:86
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:180
double MassMax_
Definition: ZCounting.h:123
void analyzeElectrons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:578
const float ELECTRON_MASS
Definition: ZCounting.h:141
double PVMax_
Definition: ZCounting.h:131
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:169
double MassMin_
Definition: ZCounting.h:122
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:102
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:162
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:143
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:108
std::string IsoTypestr_
Definition: ZCounting.h:111
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:96
double EtaCutL2_
Definition: ZCounting.h:119
double PVMin_
Definition: ZCounting.h:130
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:159
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:855
Definition: Run.h:45
double VtxAbsZCut_
Definition: ZCounting.h:135