CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalRecHitsAnalyzer.h
Go to the documentation of this file.
1 #ifndef _DQMOFFLINE_HCAL_HCALRECHITSANALYZER_H_
2 #define _DQMOFFLINE_HCAL_HCALRECHITSANALYZER_H_
3 
14 
16 
19 
23 
35 
37 #include <algorithm>
38 #include <cmath>
39 #include <ostream>
40 #include <string>
41 #include <utility>
42 #include <vector>
43 
45 // channel status
48 
51 
52 // severity level assignment for HCAL
55 
56 // severity level assignment for ECAL
58 
60 public:
62 
63  void analyze(edm::Event const &ev, edm::EventSetup const &) override;
64  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
65  // virtual void beginRun(edm::Run const& run, edm::EventSetup const&)
66  // override;
67  void dqmBeginRun(const edm::Run &run, const edm::EventSetup &) override;
68 
69 private:
70  virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev);
71  double dR(double eta1, double phi1, double eta2, double phi2);
72  double phi12(double phi1, double en1, double phi2, double en2);
73  double dPhiWsign(double phi1, double phi2);
74 
76 
82  bool hep17_;
84  bool famos_;
85 
87 
88  int nChannels_[5]; // 0:any, 1:HB, 2:HE
89 
92 
95 
96  // RecHit Collection input tags
102 
109 
110  // choice of subdetector in config : noise/HB/HE/HO/HF/ALL (0/1/2/3/4/5)
111  int subdet_;
112 
113  // single/multi-particle sample (1/2)
114  int etype_;
115  int iz;
116  int imc;
117 
118  // Hcal topology
119  const HcalTopology *theHcalTopology = nullptr;
120  // for checking the status of ECAL and HCAL channels stored in the DB
122  // calculator of severety level for HCAL
124  int hcalSevLvl(const CaloRecHit *hit);
125 
127 
132 
133  // RecHits counters
134  std::vector<MonitorElement *> Nhb;
135  std::vector<MonitorElement *> Nhe;
136  std::vector<MonitorElement *> Nho;
137  std::vector<MonitorElement *> Nhf;
138 
139  // In ALL other cases : 2D ieta-iphi maps
140  // without and with cuts (a la "Scheme B") on energy
141  // - only in the cone around particle for single-part samples (mc = "yes")
142  // - for all calls in milti-particle samples (mc = "no")
143 
145 
146  std::vector<MonitorElement *> emap;
148 
149  std::vector<MonitorElement *> emean_vs_ieta_HB;
150  std::vector<MonitorElement *> emean_vs_ieta_HBM0;
151  std::vector<MonitorElement *> emean_vs_ieta_HBM3;
152  std::vector<MonitorElement *> emean_vs_ieta_HE;
153  std::vector<MonitorElement *> emean_vs_ieta_HEM0;
154  std::vector<MonitorElement *> emean_vs_ieta_HEM3;
155  std::vector<MonitorElement *> emean_vs_ieta_HEP17;
156  std::vector<MonitorElement *> emean_vs_ieta_HEP17M0;
157  std::vector<MonitorElement *> emean_vs_ieta_HEP17M3;
158  std::vector<MonitorElement *> emean_vs_ieta_HF;
160 
161  std::vector<MonitorElement *> occupancy_map_HB;
162  std::vector<MonitorElement *> occupancy_map_HE;
163  std::vector<MonitorElement *> occupancy_map_HF;
165 
166  std::vector<MonitorElement *> occupancy_vs_ieta_HB;
167  std::vector<MonitorElement *> occupancy_vs_ieta_HE;
168  std::vector<MonitorElement *> occupancy_vs_ieta_HF;
170 
171  std::vector<MonitorElement *> nrechits_vs_iphi_HBP, nrechits_vs_iphi_HBM;
172  std::vector<MonitorElement *> nrechits_vs_iphi_HEP, nrechits_vs_iphi_HEM;
173  std::vector<MonitorElement *> nrechits_vs_iphi_HFP, nrechits_vs_iphi_HFM;
175 
176  // for single monoenergetic particles - cone collection profile vs ieta.
180  // Single particles - deviation of cluster from MC truth
183 
184  // time?
189 
190  // energy of rechits
199 
204  std::vector<MonitorElement *> meRecHitsEnergyHEP17;
205  std::vector<MonitorElement *> meRecHitsEnergyHEP17M0;
206  std::vector<MonitorElement *> meRecHitsEnergyHEP17M3;
211 
214 
217 
225 
231 
236 
241 
246 
253 
256 
261 
262  // 2D plot of sum of RecHits in HCAL as function of ECAL's one
265 
266  // number of ECAL's rechits in cone 0.3
269 
270  CaloGeometry const *geometry = nullptr;
271 
272  // Status word histos
278 
279  // Status word correlation
282 
283  // Aux Status word histos
288 
289  // Filling vectors with essential RecHits data
290  std::vector<int> csub;
291  std::vector<int> cieta;
292  std::vector<int> ciphi;
293  std::vector<int> cdepth;
294  std::vector<double> cen;
295  std::vector<double> cenM0;
296  std::vector<double> cenM3;
297  std::vector<double> cchi2;
298  std::vector<double> ceta;
299  std::vector<double> cphi;
300  std::vector<double> ctime;
301  std::vector<double> cz;
302  std::vector<uint32_t> cstwd;
303  std::vector<uint32_t> cauxstwd;
304  std::vector<int> csevlev;
305 
306  // counter
307  int nevtot;
308 };
309 
310 #endif
MonitorElement * nrechits_vs_iphi_HOP
MonitorElement * sevLvl_HF
std::vector< MonitorElement * > emean_vs_ieta_HEP17M3
MonitorElement * meTEprofileHB_High
MonitorElement * RecHit_StatusWord_HE
std::vector< int > csub
std::vector< int > csevlev
MonitorElement * meRecHitsM2Chi2HB
MonitorElement * meTimeHF
std::vector< double > cphi
std::vector< int > hcalHOSevLvlVec
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * RecHit_StatusWord_HF
MonitorElement * meSumRecHitsEnergyConeHO
MonitorElement * meRecHitsEnergyM3vM2HE
std::vector< MonitorElement * > Nho
std::vector< MonitorElement * > emean_vs_ieta_HBM3
MonitorElement * sevLvl_HE
std::vector< MonitorElement * > occupancy_vs_ieta_HB
MonitorElement * RecHit_Aux_StatusWord_HO
double dPhiWsign(double phi1, double phi2)
MonitorElement * meNumEcalRecHitsConeHE
MonitorElement * meTE_Low_HE
MonitorElement * meRecHitsEnergyHEM3
std::vector< int > cdepth
MonitorElement * meSumRecHitsEnergyHB
std::vector< MonitorElement * > occupancy_map_HE
const HcalTopology * theHcalTopology
int hcalSevLvl(const CaloRecHit *hit)
MonitorElement * meSumRecHitsEnergyHF
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
MonitorElement * meSumRecHitsEnergyConeHF
std::vector< int > hcalHBSevLvlVec
MonitorElement * occupancy_map_HO
MonitorElement * meEcalHcalEnergyConeHO
std::vector< MonitorElement * > occupancy_map_HF
std::vector< double > ceta
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * meEnConeEtaProfile_EH
void analyze(edm::Event const &ev, edm::EventSetup const &) override
std::vector< int > hcalHESevLvlVec
double phi12(double phi1, double en1, double phi2, double en2)
MonitorElement * meRecHitsEnergyM3vM0HE
std::vector< MonitorElement * > Nhe
MonitorElement * meTE_Low_HB
MonitorElement * meTEprofileHF_Low
const HcalSeverityLevelComputer * theHcalSevLvlComputer
std::vector< MonitorElement * > Nhf
MonitorElement * meTE_HB
MonitorElement * meSumRecHitsEnergyConeHB
MonitorElement * meRecHitsEnergyM2vM0HB
std::vector< MonitorElement * > nrechits_vs_iphi_HEP
MonitorElement * sevLvl_HO
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
std::vector< MonitorElement * > emean_vs_ieta_HEP17
MonitorElement * meEcalHcalEnergyHB
std::vector< MonitorElement * > emean_vs_ieta_HBM0
MonitorElement * meRecHitsEnergyM2vM0HE
MonitorElement * meEcalHcalEnergyHE
std::vector< MonitorElement * > occupancy_vs_ieta_HF
CaloGeometry const * geometry
MonitorElement * emap_HO
std::vector< MonitorElement * > occupancy_vs_ieta_HE
MonitorElement * meSumRecHitsEnergyConeHE
std::vector< MonitorElement * > emean_vs_ieta_HB
MonitorElement * meTE_HO
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryRunToken_
const HcalChannelQuality * theHcalChStatus
std::vector< MonitorElement * > occupancy_map_HB
MonitorElement * meEnConeEtaProfile_E
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryEventToken_
std::vector< MonitorElement * > emap
std::vector< MonitorElement * > nrechits_vs_iphi_HFP
MonitorElement * meTEprofileHO
MonitorElement * meTEprofileHB
edm::EDGetTokenT< HORecHitCollection > tok_ho_
std::vector< double > cchi2
MonitorElement * meLog10Chi2profileHE
std::vector< MonitorElement * > nrechits_vs_iphi_HFM
MonitorElement * meRecHitsEnergyHBM0
MonitorElement * meTE_High_HO
MonitorElement * meRecHitsEnergyHO
MonitorElement * meRecHitsM2Chi2HE
MonitorElement * meDeltaEta
MonitorElement * meTE_HF
std::vector< uint32_t > cauxstwd
MonitorElement * meRecHitsEnergyHEM0
MonitorElement * occupancy_vs_ieta_HO
MonitorElement * meTEprofileHE_Low
MonitorElement * RecHit_StatusWord_HO
MonitorElement * meEcalHcalEnergyConeHF
MonitorElement * meRecHitsEnergyHB
std::vector< MonitorElement * > emean_vs_ieta_HE
std::vector< int > ciphi
MonitorElement * nrechits_vs_iphi_HOM
MonitorElement * emean_vs_ieta_HO
MonitorElement * sevLvl_HB
std::vector< MonitorElement * > emean_vs_ieta_HEP17M0
MonitorElement * meDeltaPhi
std::vector< double > cz
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &) override
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
MonitorElement * map_ecal
std::vector< MonitorElement * > nrechits_vs_iphi_HBP
MonitorElement * meTimeHE
std::vector< int > cieta
MonitorElement * meEcalHcalEnergyConeHE
MonitorElement * meSumRecHitsEnergyHE
std::vector< MonitorElement * > nrechits_vs_iphi_HEM
MonitorElement * meTimeHO
MonitorElement * meRecHitsEnergyHF
std::vector< double > cenM3
HcalRecHitsAnalyzer(edm::ParameterSet const &conf)
MonitorElement * meEnConeEtaProfile
std::vector< MonitorElement * > emean_vs_ieta_HEM3
MonitorElement * meRecHitsCleanedEnergyHF
MonitorElement * meTEprofileHE
std::vector< uint32_t > cstwd
std::vector< MonitorElement * > meRecHitsEnergyHEP17
MonitorElement * RecHit_Aux_StatusWord_HB
MonitorElement * meEcalHcalEnergyConeHB
std::vector< MonitorElement * > emean_vs_ieta_HF
MonitorElement * meRecHitsEnergyM3vM2HB
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::vector< MonitorElement * > meRecHitsEnergyHEP17M0
MonitorElement * meLog10Chi2profileHB
std::vector< MonitorElement * > nrechits_vs_iphi_HBM
MonitorElement * RecHit_StatusWord_HF67
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hcalDDDRecConstantsToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meRecHitsCleanedEnergyHB
MonitorElement * meTE_High_HB
std::vector< int > hcalHFSevLvlVec
MonitorElement * RecHit_StatusWord_HB
MonitorElement * meTEprofileHO_High
MonitorElement * meEnergyHcalVsEcalHE
MonitorElement * meTEprofileHB_Low
edm::EDGetTokenT< EERecHitCollection > tok_EE_
std::vector< MonitorElement * > Nhb
MonitorElement * meRecHitsCleanedEnergyHE
std::vector< double > ctime
std::vector< double > cen
MonitorElement * meRecHitsEnergyM3vM0HB
MonitorElement * meRecHitsEnergyHBM3
std::vector< double > cenM0
MonitorElement * RecHit_StatusWordCorr_HE
MonitorElement * meTimeHB
MonitorElement * meTEprofileHF
MonitorElement * RecHit_Aux_StatusWord_HF
MonitorElement * RecHit_Aux_StatusWord_HE
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > hcalSeverityLevelComputerToken_
MonitorElement * RecHit_StatusWordCorr_HB
MonitorElement * meEnergyHcalVsEcalHB
std::vector< MonitorElement * > meRecHitsEnergyHEP17M3
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
Definition: Run.h:45
MonitorElement * meSumRecHitsEnergyConeHFL
MonitorElement * meRecHitsCleanedEnergyHO
MonitorElement * meTE_HE
MonitorElement * meNumEcalRecHitsConeHB
std::vector< MonitorElement * > emean_vs_ieta_HEM0
MonitorElement * meSumRecHitsEnergyHO
MonitorElement * meSumRecHitsEnergyConeHFS
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF