CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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(const edm::ParameterSet &ps)
Definition: ZCounting.cc:26
MonitorElement * h_mass_Glo_pass_forward
Definition: ZCounting.h:167
MonitorElement * h_mass_Glo_fail_forward
Definition: ZCounting.h:169
bool isElectronTrigger(ZCountingTrigger::TTrigger triggerMenu, TriggerBits hltBits)
Definition: ZCounting.cc:905
double IsoCut_
Definition: ZCounting.h:113
edm::InputTag fRhoTag
Definition: ZCounting.h:97
edm::InputTag fBeamspotTag
Definition: ZCounting.h:100
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:163
double PtCutL1_
Definition: ZCounting.h:115
std::string fPVName
Definition: ZCounting.h:78
double LumiMax_
Definition: ZCounting.h:126
std::string fSCName
Definition: ZCounting.h:94
std::string fTrackName
Definition: ZCounting.h:88
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:162
std::vector< std::string > fMuonHLTNames
Definition: ZCounting.h:84
edm::InputTag fHLTObjTag
Definition: ZCounting.h:74
MuonIsoTypes IsoType_
Definition: ZCounting.h:112
bool passMuonID(const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
Definition: ZCounting.cc:868
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Definition: ZCounting.h:93
bool isElectronTriggerObj(ZCountingTrigger::TTrigger triggerMenu, TriggerObjects hltMatchBits)
Definition: ZCounting.cc:909
std::string fMuonName
Definition: ZCounting.h:82
edm::InputTag fConversionTag
Definition: ZCounting.h:103
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:157
ElectronIdentifier EleID_
Definition: ZCounting.h:153
const float ELE_ETA_CRACK_HIGH
Definition: ZCounting.h:151
const float ELE_ETA_CUT_TAG
Definition: ZCounting.h:144
MonitorElement * h_ee_mass_HLT_fail_central
Definition: ZCounting.h:184
MonitorElement * h_mass_yield_Z
Definition: ZCounting.h:173
MonitorElement * h_mass_Glo_pass_central
Definition: ZCounting.h:166
double LumiMin_
Definition: ZCounting.h:125
std::bitset< kNTrigObjectBit > TriggerObjects
Definition: TriggerDefs.h:9
edm::InputTag fHLTTag
Definition: ZCounting.h:75
MonitorElement * h_ee_mass_HLT_pass_forward
Definition: ZCounting.h:185
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:89
std::string IDTypestr_
Definition: ZCounting.h:109
const double MUON_MASS
Definition: ZCounting.h:137
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:83
void analyzeMuons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:316
double VtxRhoCut_
Definition: ZCounting.h:135
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:73
const float ELE_MASS_CUT_HIGH
Definition: ZCounting.h:147
const std::string ELE_ID_WP
Definition: ZCounting.h:149
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:79
MonitorElement * h_yieldEE_Z
Definition: ZCounting.h:175
int PVBin_
Definition: ZCounting.h:128
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
const float ELE_PT_CUT_PROBE
Definition: ZCounting.h:143
double VtxNTracksFitCut_
Definition: ZCounting.h:132
MonitorElement * h_npv_yield_Z
Definition: ZCounting.h:172
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:850
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:822
MonitorElement * h_ee_yield_Z_eeee
Definition: ZCounting.h:190
MonitorElement * h_ee_yield_Z_ebee
Definition: ZCounting.h:189
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:140
double VtxNdofCut_
Definition: ZCounting.h:133
MonitorElement * h_ee_mass_HLT_fail_forward
Definition: ZCounting.h:186
MuonIDTypes IDType_
Definition: ZCounting.h:111
bool ele_tag_selection(double pt, double abseta)
Definition: ZCounting.cc:809
MonitorElement * h_npv
Definition: ZCounting.h:171
double PtCutL2_
Definition: ZCounting.h:116
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:310
const float ELE_MASS_CUT_LOW
Definition: ZCounting.h:146
const double MUON_BOUND
Definition: ZCounting.h:138
const float ELE_ETA_CRACK_LOW
Definition: ZCounting.h:150
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:76
MonitorElement * h_ee_mass_id_pass_forward
Definition: ZCounting.h:180
MonitorElement * h_ee_mass_HLT_pass_central
Definition: ZCounting.h:183
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:164
MonitorElement * h_ee_yield_Z_ebeb
Definition: ZCounting.h:188
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:156
const float ELE_ETA_CUT_PROBE
Definition: ZCounting.h:145
int MassBin_
Definition: ZCounting.h:120
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
Definition: ZCounting.h:104
int LumiBin_
Definition: ZCounting.h:124
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:77
~ZCounting() override
Definition: ZCounting.cc:126
bool ele_probe_selection(double pt, double abseta)
Definition: ZCounting.cc:800
MonitorElement * h_ee_mass_id_pass_central
Definition: ZCounting.h:178
std::string fElectronName
Definition: ZCounting.h:92
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:159
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:131
double EtaCutL1_
Definition: ZCounting.h:117
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:885
MonitorElement * h_ee_mass_id_fail_forward
Definition: ZCounting.h:181
edm::EDGetTokenT< double > fRhoToken
Definition: ZCounting.h:98
MonitorElement * h_yieldBB_Z
Definition: ZCounting.h:174
std::vector< std::string > fMuonHLTObjectNames
Definition: ZCounting.h:85
MonitorElement * h_ee_mass_id_fail_central
Definition: ZCounting.h:179
double MassMax_
Definition: ZCounting.h:122
void analyzeElectrons(edm::Event const &e, edm::EventSetup const &eSetup)
Definition: ZCounting.cc:582
const float ELECTRON_MASS
Definition: ZCounting.h:140
double PVMax_
Definition: ZCounting.h:130
MonitorElement * h_mass_Glo_fail_central
Definition: ZCounting.h:168
double MassMin_
Definition: ZCounting.h:121
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
Definition: ZCounting.h:101
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:161
const float ELE_PT_CUT_TAG
Definition: ZCounting.h:142
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:107
std::string IsoTypestr_
Definition: ZCounting.h:110
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Definition: ZCounting.h:95
double EtaCutL2_
Definition: ZCounting.h:118
double PVMin_
Definition: ZCounting.h:129
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:158
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:859
Definition: Run.h:45
double VtxAbsZCut_
Definition: ZCounting.h:134