CMS 3D CMS Logo

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 
32 
33 #include <vector>
34 #include <utility>
35 #include <ostream>
36 #include <string>
37 #include <algorithm>
38 #include <cmath>
41 
43 // channel status
46 
49 
50 // severity level assignment for HCAL
53 
54 // severity level assignment for ECAL
56 
57 
59  public:
61 
62  void analyze(edm::Event const& ev, edm::EventSetup const& c) override;
63  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
64  //virtual void beginRun(edm::Run const& run, edm::EventSetup const& c) override;
65  void dqmBeginRun(const edm::Run& run, const edm::EventSetup& c) override;
66  private:
67 
68  virtual void fillRecHitsTmp(int subdet_, edm::Event const& ev);
69  double dR(double eta1, double phi1, double eta2, double phi2);
70  double phi12(double phi1, double en1, double phi2, double en2);
71  double dPhiWsign(double phi1,double phi2);
72 
74 
80  bool hep17_;
82  bool famos_;
83 
86 
87 
88  int nChannels_[5]; // 0:any, 1:HB, 2:HE
89 
92 
95 
96  //RecHit Collection input tags
102 
103  // choice of subdetector in config : noise/HB/HE/HO/HF/ALL (0/1/2/3/4/5)
104  int subdet_;
105 
106  // single/multi-particle sample (1/2)
107  int etype_;
108  int iz;
109  int imc;
110 
111  //Hcal topology
113  // for checking the status of ECAL and HCAL channels stored in the DB
115  // calculator of severety level for HCAL
117  int hcalSevLvl(const CaloRecHit* hit);
118 
120 
125 
126  // RecHits counters
127  std::vector<MonitorElement*> Nhb;
128  std::vector<MonitorElement*> Nhe;
129  std::vector<MonitorElement*> Nho;
130  std::vector<MonitorElement*> Nhf;
131 
132  // In ALL other cases : 2D ieta-iphi maps
133  // without and with cuts (a la "Scheme B") on energy
134  // - only in the cone around particle for single-part samples (mc = "yes")
135  // - for all calls in milti-particle samples (mc = "no")
136 
138 
139  std::vector<MonitorElement*> emap;
141 
142  std::vector<MonitorElement*> emean_vs_ieta_HB;
143  std::vector<MonitorElement*> emean_vs_ieta_HBM0;
144  std::vector<MonitorElement*> emean_vs_ieta_HBM3;
145  std::vector<MonitorElement*> emean_vs_ieta_HE;
146  std::vector<MonitorElement*> emean_vs_ieta_HEM0;
147  std::vector<MonitorElement*> emean_vs_ieta_HEM3;
148  std::vector<MonitorElement*> emean_vs_ieta_HEP17;
149  std::vector<MonitorElement*> emean_vs_ieta_HEP17M0;
150  std::vector<MonitorElement*> emean_vs_ieta_HEP17M3;
151  std::vector<MonitorElement*> emean_vs_ieta_HF;
153 
154  std::vector<MonitorElement*> occupancy_map_HB;
155  std::vector<MonitorElement*> occupancy_map_HE;
156  std::vector<MonitorElement*> occupancy_map_HF;
158 
159  std::vector<MonitorElement*> occupancy_vs_ieta_HB;
160  std::vector<MonitorElement*> occupancy_vs_ieta_HE;
161  std::vector<MonitorElement*> occupancy_vs_ieta_HF;
163 
164  std::vector<MonitorElement*> nrechits_vs_iphi_HBP, nrechits_vs_iphi_HBM;
165  std::vector<MonitorElement*> nrechits_vs_iphi_HEP, nrechits_vs_iphi_HEM;
166  std::vector<MonitorElement*> nrechits_vs_iphi_HFP, nrechits_vs_iphi_HFM;
168 
169  // for single monoenergetic particles - cone collection profile vs ieta.
173  // Single particles - deviation of cluster from MC truth
176 
177  // time?
182 
183  // energy of rechits
191 
195  std::vector<MonitorElement*> meRecHitsEnergyHEP17;
196  std::vector<MonitorElement*> meRecHitsEnergyHEP17M0;
197  std::vector<MonitorElement*> meRecHitsEnergyHEP17M3;
202 
204 
206 
214 
220 
225 
230 
231 
236 
237 
244 
245 
248 
253 
254  // 2D plot of sum of RecHits in HCAL as function of ECAL's one
257 
258  // number of ECAL's rechits in cone 0.3
261 
263 
264  //Status word histos
270 
271  //Status word correlation
274 
275  //Aux Status word histos
280 
281  // Filling vectors with essential RecHits data
282  std::vector<int> csub;
283  std::vector<int> cieta;
284  std::vector<int> ciphi;
285  std::vector<int> cdepth;
286  std::vector<double> cen;
287  std::vector<double> cenM0;
288  std::vector<double> cenM3;
289  std::vector<double> cchi2;
290  std::vector<double> ceta;
291  std::vector<double> cphi;
292  std::vector<double> ctime;
293  std::vector<double> cz;
294  std::vector<uint32_t> cstwd;
295  std::vector<uint32_t> cauxstwd;
296 
297  // counter
298  int nevtot;
299 
300 };
301 
302 #endif
std::vector< MonitorElement * > emean_vs_ieta_HEP17
MonitorElement * nrechits_vs_iphi_HOP
MonitorElement * sevLvl_HF
MonitorElement * meTEprofileHB_High
MonitorElement * RecHit_StatusWord_HE
std::vector< int > csub
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
MonitorElement * sevLvl_HE
MonitorElement * RecHit_Aux_StatusWord_HO
double dPhiWsign(double phi1, double phi2)
MonitorElement * meNumEcalRecHitsConeHE
MonitorElement * meTE_Low_HE
std::vector< MonitorElement * > Nhb
MonitorElement * meRecHitsEnergyHEM3
std::vector< int > cdepth
MonitorElement * meSumRecHitsEnergyHB
const HcalTopology * theHcalTopology
int hcalSevLvl(const CaloRecHit *hit)
MonitorElement * meSumRecHitsEnergyHF
MonitorElement * meSumRecHitsEnergyConeHF
std::vector< int > hcalHBSevLvlVec
std::vector< MonitorElement * > emap
bool ev
MonitorElement * occupancy_map_HO
MonitorElement * meEcalHcalEnergyConeHO
std::vector< MonitorElement * > emean_vs_ieta_HBM3
std::vector< double > ceta
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * meEnConeEtaProfile_EH
std::vector< MonitorElement * > nrechits_vs_iphi_HEP
std::vector< MonitorElement * > emean_vs_ieta_HBM0
std::vector< MonitorElement * > nrechits_vs_iphi_HBP
std::vector< MonitorElement * > emean_vs_ieta_HF
std::vector< int > hcalHESevLvlVec
double phi12(double phi1, double en1, double phi2, double en2)
MonitorElement * meRecHitsEnergyM3vM0HE
MonitorElement * meTE_Low_HB
MonitorElement * meTEprofileHF_Low
const HcalSeverityLevelComputer * theHcalSevLvlComputer
MonitorElement * meTE_HB
MonitorElement * meSumRecHitsEnergyConeHB
MonitorElement * meRecHitsEnergyM2vM0HB
MonitorElement * sevLvl_HO
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
std::vector< MonitorElement * > Nhe
std::vector< MonitorElement * > emean_vs_ieta_HEM0
MonitorElement * meEcalHcalEnergyHB
MonitorElement * meRecHitsEnergyM2vM0HE
MonitorElement * meEcalHcalEnergyHE
MonitorElement * emap_HO
MonitorElement * meSumRecHitsEnergyConeHE
MonitorElement * meTE_HO
std::vector< MonitorElement * > occupancy_vs_ieta_HF
const HcalChannelQuality * theHcalChStatus
MonitorElement * meEnConeEtaProfile_E
MonitorElement * meTEprofileHO
MonitorElement * meTEprofileHB
edm::EDGetTokenT< HORecHitCollection > tok_ho_
std::vector< double > cchi2
MonitorElement * meLog10Chi2profileHE
MonitorElement * meRecHitsEnergyHBM0
MonitorElement * meTE_High_HO
MonitorElement * meRecHitsEnergyHO
MonitorElement * meRecHitsM2Chi2HE
std::vector< MonitorElement * > nrechits_vs_iphi_HFM
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< int > ciphi
MonitorElement * nrechits_vs_iphi_HOM
MonitorElement * emean_vs_ieta_HO
MonitorElement * sevLvl_HB
MonitorElement * meDeltaPhi
std::vector< MonitorElement * > nrechits_vs_iphi_HEM
std::vector< double > cz
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< MonitorElement * > occupancy_vs_ieta_HB
MonitorElement * map_ecal
MonitorElement * meTimeHE
std::vector< int > cieta
MonitorElement * meEcalHcalEnergyConeHE
MonitorElement * meSumRecHitsEnergyHE
MonitorElement * meTimeHO
MonitorElement * meRecHitsEnergyHF
std::vector< MonitorElement * > emean_vs_ieta_HB
std::vector< double > cenM3
HcalRecHitsAnalyzer(edm::ParameterSet const &conf)
std::vector< MonitorElement * > nrechits_vs_iphi_HBM
MonitorElement * meEnConeEtaProfile
MonitorElement * meTEprofileHE
std::vector< uint32_t > cstwd
std::vector< MonitorElement * > Nho
std::vector< MonitorElement * > occupancy_map_HE
MonitorElement * RecHit_Aux_StatusWord_HB
void analyze(edm::Event const &ev, edm::EventSetup const &c) override
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
MonitorElement * meEcalHcalEnergyConeHB
MonitorElement * meRecHitsEnergyM3vM2HB
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
MonitorElement * meLog10Chi2profileHB
MonitorElement * RecHit_StatusWord_HF67
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< MonitorElement * > emean_vs_ieta_HEP17M0
MonitorElement * meTE_High_HB
std::vector< int > hcalHFSevLvlVec
MonitorElement * RecHit_StatusWord_HB
MonitorElement * meTEprofileHO_High
std::vector< MonitorElement * > meRecHitsEnergyHEP17M0
std::vector< MonitorElement * > emean_vs_ieta_HEM3
const HcalDDDRecConstants * hcons
MonitorElement * meEnergyHcalVsEcalHE
MonitorElement * meTEprofileHB_Low
std::vector< MonitorElement * > nrechits_vs_iphi_HFP
edm::EDGetTokenT< EERecHitCollection > tok_EE_
std::vector< double > ctime
std::vector< MonitorElement * > emean_vs_ieta_HEP17M3
std::vector< double > cen
MonitorElement * meRecHitsEnergyM3vM0HB
MonitorElement * meRecHitsEnergyHBM3
std::vector< double > cenM0
MonitorElement * RecHit_StatusWordCorr_HE
std::vector< MonitorElement * > occupancy_map_HF
MonitorElement * meTimeHB
std::vector< MonitorElement * > occupancy_map_HB
std::vector< MonitorElement * > meRecHitsEnergyHEP17M3
MonitorElement * meTEprofileHF
MonitorElement * RecHit_Aux_StatusWord_HF
MonitorElement * RecHit_Aux_StatusWord_HE
MonitorElement * RecHit_StatusWordCorr_HB
MonitorElement * meEnergyHcalVsEcalHB
std::vector< MonitorElement * > Nhf
std::vector< MonitorElement * > occupancy_vs_ieta_HE
edm::ESHandle< CaloGeometry > geometry
Definition: Run.h:43
MonitorElement * meSumRecHitsEnergyConeHFL
MonitorElement * meTE_HE
MonitorElement * meNumEcalRecHitsConeHB
std::vector< MonitorElement * > emean_vs_ieta_HE
MonitorElement * meSumRecHitsEnergyHO
MonitorElement * meSumRecHitsEnergyConeHFS
std::vector< MonitorElement * > meRecHitsEnergyHEP17
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF