CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalRecHitsAnalyzer.cc
Go to the documentation of this file.
4 
6 
7  // DQM ROOT output
8  outputFile_ = conf.getUntrackedParameter<std::string>("outputFile", "myfile.root");
9 
10  if ( outputFile_.size() != 0 ) {
11  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'";
12  } else {
13  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved";
14  }
15 
16  nevtot = 0;
17 
18  hcalselector_ = conf.getUntrackedParameter<std::string>("hcalselector", "all");
19  ecalselector_ = conf.getUntrackedParameter<std::string>("ecalselector", "yes");
20  eventype_ = conf.getUntrackedParameter<std::string>("eventype", "single");
21  sign_ = conf.getUntrackedParameter<std::string>("sign", "*");
22  //useAllHistos_ = conf.getUntrackedParameter<bool>("useAllHistos", false);
23 
24  //Collections
25  tok_hbhe_ = consumes<HBHERecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HBHERecHitCollectionLabel"));
26  tok_hf_ = consumes<HFRecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HFRecHitCollectionLabel"));
27  tok_ho_ = consumes<HORecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HORecHitCollectionLabel"));
28  tok_EB_ = consumes<EBRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"));
29  tok_EE_ = consumes<EERecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"));
30 
31  subdet_ = 5;
32  if (hcalselector_ == "noise") subdet_ = 0;
33  if (hcalselector_ == "HB" ) subdet_ = 1;
34  if (hcalselector_ == "HE" ) subdet_ = 2;
35  if (hcalselector_ == "HO" ) subdet_ = 3;
36  if (hcalselector_ == "HF" ) subdet_ = 4;
37  if (hcalselector_ == "all" ) subdet_ = 5;
38  if (hcalselector_ == "ZS" ) subdet_ = 6;
39 
40  etype_ = 1;
41  if (eventype_ == "multi") etype_ = 2;
42 
43  iz = 1;
44  if(sign_ == "-") iz = -1;
45  if(sign_ == "*") iz = 0;
46 
47  imc = 0;
48 
49  }
50 
52 
54  es.get<HcalRecNumberingRecord>().get( pHRNDC );
55  hcons = &(*pHRNDC);
60 
62 
63  es.get<CaloGeometryRecord > ().get(geometry);
64 
65  const CaloGeometry* geo = geometry.product();
70 
71  nChannels_[1] = gHB->getHxSize(1);
72  nChannels_[2] = gHE->getHxSize(2);
73  nChannels_[3] = gHO->getHxSize(3);
74  nChannels_[4] = gHF->getHxSize(4);
75 
76  nChannels_[0] = nChannels_[1] + nChannels_[2] + nChannels_[3] + nChannels_[4];
77 
78  //std::cout << "Channels HB:" << nChannels_[1] << " HE:" << nChannels_[2] << " HO:" << nChannels_[3] << " HF:" << nChannels_[4] << std::endl;
79 
80  //We hardcode the HF depths because in the dual readout configuration, rechits are not defined for depths 3&4
81  maxDepthHF_ = (maxDepthHF_ > 2 ? 2 : maxDepthHF_); //We retain the dynamic possibility that HF might have 0 or 1 depths
82 
85 
86  //Get Phi segmentation from geometry, use the max phi number so that all iphi values are included.
87 
88  int NphiMax = hcons->getNPhi(0);
89 
90  NphiMax = (hcons->getNPhi(1) > NphiMax ? hcons->getNPhi(1) : NphiMax);
91  NphiMax = (hcons->getNPhi(2) > NphiMax ? hcons->getNPhi(2) : NphiMax);
92  NphiMax = (hcons->getNPhi(3) > NphiMax ? hcons->getNPhi(3) : NphiMax);
93 
94  //Center the iphi bins on the integers
95  iphi_min_ = 0.5;
96  iphi_max_ = NphiMax + 0.5;
97  iphi_bins_ = (int) (iphi_max_ - iphi_min_);
98 
99  //Retain classic behavior, all plots have same ieta range.
100 
101  int iEtaMax = (hcons->getEtaRange(0).second > hcons->getEtaRange(1).second ? hcons->getEtaRange(0).second : hcons->getEtaRange(1).second);
102  iEtaMax = (iEtaMax > hcons->getEtaRange(2).second ? iEtaMax : hcons->getEtaRange(2).second);
103  iEtaMax = (iEtaMax > hcons->getEtaRange(3).second ? iEtaMax : hcons->getEtaRange(3).second);
104 
105  //Give an empty bin around the subdet ieta range to make it clear that all ieta rings have been included
106  ieta_min_ = -iEtaMax - 1.5;
107  ieta_max_ = iEtaMax + 1.5;
108  ieta_bins_ = (int) (ieta_max_ - ieta_min_);
109 
110  }
111 
112  void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const & /* iRun*/, edm::EventSetup const & /* iSetup */)
113 
114 {
115 
116  Char_t histo[200];
117 
118  ibooker.setCurrentFolder("HcalRecHitsD/HcalRecHitTask");
119 
120  // General counters (drawn)
121 
122  //Produce both a total per subdetector, and number of rechits per subdetector depth
123  // The bins are 1 unit wide, and the range is determined by the number of channels per subdetector
124 
125  for(int depth = 0; depth <= maxDepthHB_; depth++){
126  if(depth == 0){ sprintf (histo, "N_HB" );}
127  else{ sprintf (histo, "N_HB_depth%d",depth );}
128  int NBins = (int) (nChannels_[1] * 1.1);
129  Nhb.push_back( ibooker.book1D(histo, histo, NBins, 0., (float)NBins) );
130  }
131  for(int depth = 0; depth <= maxDepthHE_; depth++){
132  if(depth == 0){ sprintf (histo, "N_HE" );}
133  else{ sprintf (histo, "N_HE_depth%d",depth );}
134  int NBins = (int) (nChannels_[2] * 1.1);
135  Nhe.push_back( ibooker.book1D(histo, histo, NBins,0., (float)NBins) );
136  }
137  for(int depth = 0; depth <= maxDepthHO_; depth++){
138  if(depth == 0){ sprintf (histo, "N_HO" );}
139  else{ sprintf (histo, "N_HO_depth%d",depth );}
140  int NBins = (int) (nChannels_[3] * 1.1);
141  Nho.push_back( ibooker.book1D(histo, histo, NBins,0., (float)NBins) );
142  }
143  for(int depth = 0; depth <= maxDepthHF_; depth++){
144  if(depth == 0){ sprintf (histo, "N_HF" );}
145  else{ sprintf (histo, "N_HF_depth%d",depth );}
146  int NBins = (int) (nChannels_[4] * 1.1);
147  Nhf.push_back( ibooker.book1D(histo, histo, NBins,0., (float)NBins) );
148  }
149 
150  // ZS
151  if(subdet_ == 6) {
152 
153  }
154 
155  // ALL others, except ZS
156  else {
157  for(int depth = 1; depth <= maxDepthAll_; depth++){
158  sprintf (histo, "emap_depth%d",depth );
159  emap.push_back( ibooker.book2D(histo, histo, 84, -42., 42., 72, 0., 72.) );
160  }
161 
162  //The mean energy histos are drawn, but not the RMS or emean seq
163 
164  for (int depth = 1; depth <= maxDepthHB_; depth++) {
165  sprintf (histo, "emean_vs_ieta_HB%d",depth );
166  emean_vs_ieta_HB.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
167 
168  sprintf (histo, "emean_vs_ieta_M0_HB%d",depth );
169  emean_vs_ieta_HBM0.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
170 
171  sprintf (histo, "emean_vs_ieta_M3_HB%d",depth );
172  emean_vs_ieta_HBM3.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
173  }
174  for (int depth = 1; depth <= maxDepthHE_; depth++) {
175  sprintf (histo, "emean_vs_ieta_HE%d",depth );
176  emean_vs_ieta_HE.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
177 
178  sprintf (histo, "emean_vs_ieta_M0_HE%d",depth );
179  emean_vs_ieta_HEM0.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
180 
181  sprintf (histo, "emean_vs_ieta_M3_HE%d",depth );
182  emean_vs_ieta_HEM3.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
183  }
184  for (int depth = 1; depth <= maxDepthHF_; depth++) {
185  sprintf (histo, "emean_vs_ieta_HF%d",depth );
186  emean_vs_ieta_HF.push_back( ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " ") );
187  }
188  sprintf (histo, "emean_vs_ieta_HO" );
189  emean_vs_ieta_HO = ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -10., 2000., " " );
190 
191  //The only occupancy histos drawn are occupancy vs. ieta
192  //but the maps are needed because this is where the latter are filled from
193 
194  for (int depth = 1; depth <= maxDepthHB_; depth++) {
195  sprintf (histo, "occupancy_map_HB%d",depth );
196  occupancy_map_HB.push_back( ibooker.book2D(histo, histo, ieta_bins_, ieta_min_, ieta_max_, iphi_bins_, iphi_min_, iphi_max_) );
197  }
198 
199  for (int depth = 1; depth <= maxDepthHE_; depth++) {
200  sprintf (histo, "occupancy_map_HE%d",depth );
201  occupancy_map_HE.push_back( ibooker.book2D(histo, histo, ieta_bins_, ieta_min_, ieta_max_, iphi_bins_, iphi_min_, iphi_max_) );
202  }
203 
204  sprintf (histo, "occupancy_map_HO" );
206 
207  for (int depth = 1; depth <= maxDepthHF_; depth++) {
208  sprintf (histo, "occupancy_map_HF%d",depth );
209  occupancy_map_HF.push_back( ibooker.book2D(histo, histo, ieta_bins_, ieta_min_, ieta_max_, iphi_bins_, iphi_min_, iphi_max_) );
210  }
211 
212  //These are drawn
213 
214  for (int depth = 1; depth <= maxDepthHB_; depth++) {
215  sprintf (histo, "occupancy_vs_ieta_HB%d",depth );
216  occupancy_vs_ieta_HB.push_back( ibooker.book1D(histo, histo, ieta_bins_, ieta_min_, ieta_max_) );
217  }
218 
219  for (int depth = 1; depth <= maxDepthHE_; depth++) {
220  sprintf (histo, "occupancy_vs_ieta_HE%d",depth );
221  occupancy_vs_ieta_HE.push_back( ibooker.book1D(histo, histo, ieta_bins_, ieta_min_, ieta_max_) );
222  }
223 
224  sprintf (histo, "occupancy_vs_ieta_HO" );
225  occupancy_vs_ieta_HO = ibooker.book1D(histo, histo, ieta_bins_, ieta_min_, ieta_max_);
226 
227  for (int depth = 1; depth <= maxDepthHF_; depth++) {
228  sprintf (histo, "occupancy_vs_ieta_HF%d",depth );
229  occupancy_vs_ieta_HF.push_back( ibooker.book1D(histo, histo, ieta_bins_, ieta_min_, ieta_max_) );
230  }
231 
232 
233  //All status word histos except HF67 are drawn
234  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HB" ) ;
235  RecHit_StatusWord_HB = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
236 
237  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HE" ) ;
238  RecHit_StatusWord_HE = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
239 
240  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HF" ) ;
241  RecHit_StatusWord_HF = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
242 
243  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HO" ) ;
244  RecHit_StatusWord_HO = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
245 
246  //Aux status word histos
247  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HB" ) ;
248  RecHit_Aux_StatusWord_HB = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
249 
250  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HE" ) ;
251  RecHit_Aux_StatusWord_HE = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
252 
253  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HF" ) ;
254  RecHit_Aux_StatusWord_HF = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
255 
256  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HO" ) ;
257  RecHit_Aux_StatusWord_HO = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
258 
259  } // end-of (subdet_ =! 6)
260 
261  //Status word correlations
262  sprintf (histo, "HcalRecHitTask_RecHit_StatusWordCorr_HB");
263  RecHit_StatusWordCorr_HB = ibooker.book2D(histo, histo, 2, -0.5, 1.5, 2, -0.5, 1.5);
264 
265  sprintf (histo, "HcalRecHitTask_RecHit_StatusWordCorr_HE");
266  RecHit_StatusWordCorr_HE = ibooker.book2D(histo, histo, 2, -0.5, 1.5, 2, -0.5, 1.5);
267 
268 
269  //======================= Now various cases one by one ===================
270 
271  //Histograms drawn for single pion scan
272  if(subdet_ != 0 && imc != 0) { // just not for noise
273  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
274  meEnConeEtaProfile = ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -100., 2000., " ");
275 
276  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
277  meEnConeEtaProfile_E = ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -100., 2000., " ");
278 
279  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
280  meEnConeEtaProfile_EH = ibooker.bookProfile(histo, histo, ieta_bins_, ieta_min_, ieta_max_, -100., 2000., " ");
281  }
282 
283  // ************** HB **********************************
284  if (subdet_ == 1 || subdet_ == 5 ){
285 
286  //Only severity level, energy of rechits and overall HB timing histos are drawn
287 
288  sprintf(histo, "HcalRecHitTask_severityLevel_HB");
289  sevLvl_HB = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
290 
291  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HB" ) ;
292  meRecHitsEnergyHB = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
293 
294  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M0_HB" ) ;
295  meRecHitsEnergyHBM0 = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
296 
297  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M3_HB" ) ;
298  meRecHitsEnergyHBM3 = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
299 
300  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M2vM0_HB" ) ;
301  meRecHitsEnergyM2vM0HB = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
302 
303  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M3vM0_HB" ) ;
304  meRecHitsEnergyM3vM0HB = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
305 
306  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M3vM2_HB" ) ;
307  meRecHitsEnergyM3vM2HB = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
308 
309  sprintf (histo, "HcalRecHitTask_M2Log10Chi2_of_rechits_HB" ) ;
310  meRecHitsM2Chi2HB = ibooker.book1D(histo, histo, 120 , -2. , 10.);
311 
312  sprintf (histo, "HcalRecHitTask_timing_HB" ) ;
313  meTimeHB = ibooker.book1D(histo, histo, 70, -48., 92.);
314 
315  //High, medium and low histograms to reduce RAM usage
316  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HB" ) ;
317  meTE_Low_HB = ibooker.book2D(histo, histo, 50, -5., 45., 70, -48., 92.);
318 
319  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HB" ) ;
320  meTE_HB = ibooker.book2D(histo, histo, 150, -5., 295., 70, -48., 92.);
321 
322  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HB" ) ;
323  meTE_High_HB = ibooker.book2D(histo, histo, 150, -5., 2995., 70, -48., 92.);
324 
325  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HB" ) ;
326  meTEprofileHB_Low = ibooker.bookProfile(histo, histo, 50, -5., 45., -48., 92., " ");
327 
328  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HB" ) ;
329  meTEprofileHB = ibooker.bookProfile(histo, histo, 150, -5., 295., -48., 92., " ");
330 
331  sprintf (histo, "HcalRecHitTask_Log10Chi2_vs_energy_profile_HB" ) ;
332  meLog10Chi2profileHB = ibooker.bookProfile(histo, histo, 150, -5., 295., -2., 10., " ");
333 
334  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HB" ) ;
335  meTEprofileHB_High = ibooker.bookProfile(histo, histo, 150, -5., 2995., -48., 92., " ");
336 
337  }
338 
339  // ********************** HE ************************************
340  if ( subdet_ == 2 || subdet_ == 5 ){
341 
342 
343  //Only severity level, energy of rechits and overall HB timing histos are drawn
344  sprintf(histo, "HcalRecHitTask_severityLevel_HE");
345  sevLvl_HE = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
346 
347  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HE" ) ;
348  meRecHitsEnergyHE = ibooker.book1D(histo, histo, 2010, -10., 2000.);
349 
350  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M0_HE" ) ;
351  meRecHitsEnergyHEM0 = ibooker.book1D(histo, histo, 2010, -10., 2000.);
352 
353  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M3_HE" ) ;
354  meRecHitsEnergyHEM3 = ibooker.book1D(histo, histo, 2010, -10., 2000.);
355 
356  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M2vM0_HE" ) ;
357  meRecHitsEnergyM2vM0HE = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
358 
359  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M3vM0_HE" ) ;
360  meRecHitsEnergyM3vM0HE = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
361 
362  sprintf (histo, "HcalRecHitTask_energy_of_rechits_M2vM0_HE" ) ;
363  meRecHitsEnergyM3vM2HE = ibooker.book2D(histo, histo, 42 , -10. , 200., 42, -10., 200.);
364 
365  sprintf (histo, "HcalRecHitTask_M2Log10Chi2_of_rechits_HE" ) ;
366  meRecHitsM2Chi2HE = ibooker.book1D(histo, histo, 120 , -2. , 10.);
367 
368  sprintf (histo, "HcalRecHitTask_timing_HE" ) ;
369  meTimeHE = ibooker.book1D(histo, histo, 70, -48., 92.);
370 
371  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HE" ) ;
372  meTE_Low_HE = ibooker.book2D(histo, histo, 80, -5., 75., 70, -48., 92.);
373 
374  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HE" ) ;
375  meTE_HE = ibooker.book2D(histo, histo, 200, -5., 395., 70, -48., 92.);
376 
377  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HE" ) ;
378  meTEprofileHE_Low = ibooker.bookProfile(histo, histo, 80, -5., 75., -48., 92., " ");
379 
380  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HE" ) ;
381  meTEprofileHE = ibooker.bookProfile(histo, histo, 200, -5., 395., -48., 92., " ");
382 
383  sprintf (histo, "HcalRecHitTask_Log10Chi2_vs_energy_profile_HE" ) ;
384  meLog10Chi2profileHE = ibooker.bookProfile(histo, histo, 200, -5., 395., -2., 10., " ");
385 
386 
387  }
388 
389  // ************** HO ****************************************
390  if ( subdet_ == 3 || subdet_ == 5 ){
391 
392  //Only severity level, energy of rechits and overall HB timing histos are drawn
393 
394  sprintf(histo, "HcalRecHitTask_severityLevel_HO");
395  sevLvl_HO = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
396 
397  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HO" ) ;
398  meRecHitsEnergyHO = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
399 
400  sprintf (histo, "HcalRecHitTask_timing_HO" ) ;
401  meTimeHO = ibooker.book1D(histo, histo, 70, -48., 92.);
402 
403  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HO" ) ;
404  meTE_HO= ibooker.book2D(histo, histo, 60, -5., 55., 70, -48., 92.);
405 
406  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HO" ) ;
407  meTE_High_HO= ibooker.book2D(histo, histo, 100, -5., 995., 70, -48., 92.);
408 
409  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HO" ) ;
410  meTEprofileHO = ibooker.bookProfile(histo, histo, 60, -5., 55., -48., 92., " ");
411 
412  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HO" ) ;
413  meTEprofileHO_High = ibooker.bookProfile(histo, histo, 100, -5., 995., -48., 92., " ");
414 
415  }
416 
417  // ********************** HF ************************************
418  if ( subdet_ == 4 || subdet_ == 5 ){
419 
420  //Only severity level, energy of rechits and overall HB timing histos are drawn
421 
422  sprintf(histo, "HcalRecHitTask_severityLevel_HF");
423  sevLvl_HF = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
424 
425  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HF" ) ;
426  meRecHitsEnergyHF = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
427 
428  sprintf (histo, "HcalRecHitTask_timing_HF" ) ;
429  meTimeHF = ibooker.book1D(histo, histo, 70, -48., 92.);
430 
431  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HF" ) ;
432  meTE_Low_HF = ibooker.book2D(histo, histo, 100, -5., 195., 70, -48., 92.);
433 
434  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HF" ) ;
435  meTE_HF = ibooker.book2D(histo, histo, 200, -5., 995., 70, -48., 92.);
436 
437  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HF" ) ;
438  meTEprofileHF_Low = ibooker.bookProfile(histo, histo, 100, -5., 195., -48., 92., " ");
439 
440  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HF" ) ;
441  meTEprofileHF = ibooker.bookProfile(histo, histo, 200, -5., 995., -48., 92., " ");
442 
443  }
444 
445 }
446 
447 
449 
450  using namespace edm;
451 
452  // cuts for each subdet_ector mimiking "Scheme B"
453  // double cutHB = 0.9, cutHE = 1.4, cutHO = 1.1, cutHFL = 1.2, cutHFS = 1.8;
454 
455  // energy in HCAL
456  double eHcal = 0.;
457  // Total numbet of RecHits in HCAL, in the cone, above 1 GeV theshold
458  int nrechits = 0;
459  int nrechitsThresh = 0;
460 
461  // energy in ECAL
462  double eEcal = 0.;
463  double eEcalB = 0.;
464  double eEcalE = 0.;
465  double eEcalCone = 0.;
466 
467  // HCAL energy around MC eta-phi at all depths;
468  double partR = 0.3;
469 
470  // Single particle samples: actual eta-phi position of cluster around
471  // hottest cell
472  double etaHot = 99999.;
473  double phiHot = 99999.;
474 
475  // previously was: c.get<IdealGeometryRecord>().get (geometry);
476  c.get<CaloGeometryRecord>().get (geometry);
477 
478  // HCAL channel status map ****************************************
480  c.get<HcalChannelQualityRcd>().get( "withTopo", hcalChStatus );
481  theHcalChStatus = hcalChStatus.product();
482 
483  // Assignment of severity levels **********************************
484  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
485  c.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
486  theHcalSevLvlComputer = hcalSevLvlComputerHndl.product();
487 
488  // Fill working vectors of HCAL RecHits quantities (all of these are drawn)
489  fillRecHitsTmp(subdet_, ev);
490 
491  // HB
492  if( subdet_ ==5 || subdet_ == 1 ){
493  for(unsigned int iv=0; iv<hcalHBSevLvlVec.size(); iv++){
495  }
496  }
497  // HE
498  if( subdet_ ==5 || subdet_ == 2 ){
499  for(unsigned int iv=0; iv<hcalHESevLvlVec.size(); iv++){
501  }
502  }
503  // HO
504  if( subdet_ ==5 || subdet_ == 3 ){
505  for(unsigned int iv=0; iv<hcalHOSevLvlVec.size(); iv++){
507  }
508  }
509  // HF
510  if( subdet_ ==5 || subdet_ == 4 ){
511  for(unsigned int iv=0; iv<hcalHFSevLvlVec.size(); iv++){
513  }
514  }
515 
516  //===========================================================================
517  // IN ALL other CASES : ieta-iphi maps
518  //===========================================================================
519 
520  // ECAL
521  if(ecalselector_ == "yes" && (subdet_ == 1 || subdet_ == 2 || subdet_ == 5)) {
523 
524 
525  ev.getByToken(tok_EB_, rhitEB);
526 
527  EcalRecHitCollection::const_iterator RecHit = rhitEB.product()->begin();
528  EcalRecHitCollection::const_iterator RecHitEnd = rhitEB.product()->end();
529 
530  for (; RecHit != RecHitEnd ; ++RecHit) {
531 
532  double en = RecHit->energy();
533  eEcal += en;
534  eEcalB += en;
535 
536 
537  }
538 
539 
541 
542  ev.getByToken(tok_EE_, rhitEE);
543 
544  RecHit = rhitEE.product()->begin();
545  RecHitEnd = rhitEE.product()->end();
546 
547  for (; RecHit != RecHitEnd ; ++RecHit) {
548 
549  double en = RecHit->energy();
550  eEcal += en;
551  eEcalE += en;
552 
553 
554  }
555  } // end of ECAL selection
556 
557  // Counting, including ZS items
558  // Filling HCAL maps ----------------------------------------------------
559  // double maxE = -99999.;
560 
561  // element 0: any depth. element 1,2,..: depth 1,2
562  std::vector<int> nhb_v(maxDepthHB_+1,0);
563  std::vector<int> nhe_v(maxDepthHE_+1,0);
564  std::vector<int> nho_v(maxDepthHO_+1,0);
565  std::vector<int> nhf_v(maxDepthHF_+1,0);
566 
567  for (unsigned int i = 0; i < cen.size(); i++) {
568 
569  int sub = csub[i];
570  int depth = cdepth[i];
571  int ieta = cieta[i];
572  int iphi = ciphi[i];
573  double en = cen[i];
574  double enM0 = cenM0[i];
575  double enM3 = cenM3[i];
576  // double eta = ceta[i];
577  // double phi = cphi[i];
578  uint32_t stwd = cstwd[i];
579  uint32_t auxstwd = cauxstwd[i];
580  // double z = cz[i];
581 
582  //Make sure that an invalid depth won't cause an error. We should probably report the problem as well.
583  if( depth < 1 ) continue;
584  if( sub == 1 && depth > maxDepthHB_ ) continue;
585  if( sub == 2 && depth > maxDepthHE_ ) continue;
586  if( sub == 3 && depth > maxDepthHO_ ) continue;
587  if( sub == 4 && depth > maxDepthHF_ ) continue;
588 
589  if( sub ==1 ){ nhb_v[depth]++; nhb_v[0]++;} // element 0: any depth, element 1,2,..: depth 1,2,...
590  if( sub ==2 ){ nhe_v[depth]++; nhe_v[0]++;} //
591  if( sub ==3 ){ nho_v[depth]++; nho_v[0]++;} //
592  if( sub ==4 ){ nhf_v[depth]++; nhf_v[0]++;} //
593 
594  if( subdet_ == 6) { // ZS specific
595  }
596 
597  if( subdet_ != 6) {
598  int ieta2 = ieta;
599  int depth2 = depth;
600  if(sub == 4){
601  if (ieta2 < 0) ieta2--;
602  else ieta2++;
603  }
604  if(sub == 3) depth2 = maxDepthAll_ - maxDepthHO_ + depth; //This will use the last depths for HO
605  emap[depth2-1]->Fill(double(ieta2),double(iphi),en);
606 
607  // to distinguish HE and HF
608  if( depth == 1 || depth == 2 ) {
609  int ieta1 = ieta;
610  if(sub == 4) {
611  if (ieta1 < 0) ieta1--;
612  else ieta1++;
613  }
614  }
615 
616  if ( sub == 1){
617  emean_vs_ieta_HB[depth-1]->Fill(double(ieta), en);
618  emean_vs_ieta_HBM0[depth-1]->Fill(double(ieta), enM0);
619  emean_vs_ieta_HBM3[depth-1]->Fill(double(ieta), enM3);
620  occupancy_map_HB[depth-1]->Fill(double(ieta),double(iphi));
621  }
622  if ( sub == 2){
623  emean_vs_ieta_HE[depth-1]->Fill(double(ieta), en);
624  emean_vs_ieta_HEM0[depth-1]->Fill(double(ieta), enM0);
625  emean_vs_ieta_HEM3[depth-1]->Fill(double(ieta), enM3);
626  occupancy_map_HE[depth-1]->Fill(double(ieta),double(iphi));
627  }
628  if ( sub == 3){
629  emean_vs_ieta_HO->Fill(double(ieta), en);
630  occupancy_map_HO->Fill(double(ieta),double(iphi));
631  }
632  if ( sub == 4){
633  emean_vs_ieta_HF[depth-1]->Fill(double(ieta), en);
634  occupancy_map_HF[depth-1]->Fill(double(ieta),double(iphi));
635  }
636  }
637 
638 
639 
640  //32-bit status word
641  uint32_t statadd;
642  unsigned int isw67 = 0;
643 
644  //Statusword correlation
645  unsigned int sw27 = 27;
646  unsigned int sw13 = 13;
647 
648  uint32_t statadd27 = 0x1<<sw27;
649  uint32_t statadd13 = 0x1<<sw13;
650 
651  float status27 = 0;
652  float status13 = 0;
653 
654  if(stwd & statadd27) status27 = 1;
655  if(stwd & statadd13) status13 = 1;
656 
657  if (sub == 1){
658  RecHit_StatusWordCorr_HB->Fill(status13, status27);
659  } else if (sub == 2){
660  RecHit_StatusWordCorr_HE->Fill(status13, status27);
661  }
662 
663 
664  for (unsigned int isw = 0; isw < 32; isw++){
665  statadd = 0x1<<(isw);
666  if (stwd & statadd){
667  if (sub == 1) RecHit_StatusWord_HB->Fill(isw);
668  else if (sub == 2) RecHit_StatusWord_HE->Fill(isw);
669  else if (sub == 3) RecHit_StatusWord_HO->Fill(isw);
670  else if (sub == 4){
672  if (isw == 6) isw67 += 1;
673  if (isw == 7) isw67 += 2;
674  }
675  }
676  }
677 
678  for (unsigned int isw =0; isw < 32; isw++){
679  statadd = 0x1<<(isw);
680  if( auxstwd & statadd ){
681  if (sub == 1) RecHit_Aux_StatusWord_HB->Fill(isw);
682  else if (sub == 2) RecHit_Aux_StatusWord_HE->Fill(isw);
683  else if (sub == 3) RecHit_Aux_StatusWord_HO->Fill(isw);
684  else if (sub == 4) RecHit_Aux_StatusWord_HF->Fill(isw);
685  }
686 
687  }
688 
689  }
690 
691  for(int depth = 0; depth <= maxDepthHB_; depth++) Nhb[depth]->Fill(double(nhb_v[depth]));
692  for(int depth = 0; depth <= maxDepthHE_; depth++) Nhe[depth]->Fill(double(nhe_v[depth]));
693  for(int depth = 0; depth <= maxDepthHO_; depth++) Nho[depth]->Fill(double(nho_v[depth]));
694  for(int depth = 0; depth <= maxDepthHF_; depth++) Nhf[depth]->Fill(double(nhf_v[depth]));
695 
696  //===========================================================================
697  // SUBSYSTEMS,
698  //===========================================================================
699 
700  if ((subdet_ != 6) && (subdet_ != 0)) {
701 
702  double clusEta = 999.;
703  double clusPhi = 999.;
704  double clusEn = 0.;
705 
706  double HcalCone = 0.;
707 
708  int ietaMax = 9999;
709  // double enMax1 = -9999.;
710  // double enMax2 = -9999.;
711  // double enMax3 = -9999.;
712  // double enMax4 = -9999.;
713  // double enMax = -9999.;
714  // double etaMax = 9999.;
715 
716  // CYCLE over cells ====================================================
717 
718  for (unsigned int i = 0; i < cen.size(); i++) {
719  int sub = csub[i];
720  double eta = ceta[i];
721  double phi = cphi[i];
722  double en = cen[i];
723  double enM0 = cenM0[i];
724  double enM3 = cenM3[i];
725  double chi2 = cchi2[i];
726  double t = ctime[i];
727 // int ieta = cieta[i];
728 
729  double rhot = dR(etaHot, phiHot, eta, phi);
730  if(rhot < partR && en > 1.) {
731  clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
732  clusPhi = phi12(clusPhi, clusEn, phi, en);
733  clusEn += en;
734  }
735 
736  nrechits++;
737  eHcal += en;
738 
739  if(en > 1. ) nrechitsThresh++;
740 
741  //The energy and overall timing histos are drawn while
742  //the ones split by depth are not
743  if(sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
744  meTimeHB->Fill(t);
745  meRecHitsEnergyHB->Fill(en);
746  meRecHitsEnergyHBM0->Fill(enM0);
747  meRecHitsEnergyHBM3->Fill(enM3);
748 
749  meRecHitsEnergyM2vM0HB->Fill(enM0,en);
750  meRecHitsEnergyM3vM0HB->Fill(enM0,enM3);
751  meRecHitsEnergyM3vM2HB->Fill(en,enM3);
752 
753  meRecHitsM2Chi2HB->Fill(log10(chi2));
754  meLog10Chi2profileHB->Fill(en,log10(chi2));
755 
756  meTE_Low_HB->Fill( en, t);
757  meTE_HB->Fill( en, t);
758  meTE_High_HB->Fill( en, t);
759  meTEprofileHB_Low->Fill(en, t);
760  meTEprofileHB->Fill(en, t);
761  meTEprofileHB_High->Fill(en, t);
762  }
763  if(sub == 2 && (subdet_ == 2 || subdet_ == 5)) {
764  meTimeHE->Fill(t);
765  meRecHitsEnergyHE->Fill(en);
766  meRecHitsEnergyHEM0->Fill(enM0);
767  meRecHitsEnergyHEM3->Fill(enM3);
768 
769  meRecHitsEnergyM2vM0HE->Fill(enM0,en);
770  meRecHitsEnergyM3vM0HE->Fill(enM0,enM3);
771  meRecHitsEnergyM3vM2HE->Fill(en,enM3);
772 
773  meRecHitsM2Chi2HE->Fill(log10(chi2));
774  meLog10Chi2profileHE->Fill(en,log10(chi2));
775 
776  meTE_Low_HE->Fill( en, t);
777  meTE_HE->Fill( en, t);
778  meTEprofileHE_Low->Fill(en, t);
779  meTEprofileHE->Fill(en, t);
780  }
781  if(sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
782  meTimeHF->Fill(t);
783  meRecHitsEnergyHF->Fill(en);
784 
785  meTE_Low_HF->Fill(en, t);
786  meTE_HF->Fill(en, t);
787  meTEprofileHF_Low->Fill(en, t);
788  meTEprofileHF->Fill(en, t);
789 
790  }
791  if(sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
792  meTimeHO->Fill(t);
793  meRecHitsEnergyHO->Fill(en);
794 
795  meTE_HO->Fill( en, t);
796  meTE_High_HO->Fill( en, t);
797  meTEprofileHO->Fill(en, t);
798  meTEprofileHO_High->Fill(en, t);
799  }
800  }
801 
802  if(imc != 0) {
803  //Cone by depth are not drawn, the others are used for pion scan
804  meEnConeEtaProfile ->Fill(double(ietaMax), HcalCone); //
805  meEnConeEtaProfile_E ->Fill(double(ietaMax), eEcalCone);
806  meEnConeEtaProfile_EH ->Fill(double(ietaMax), HcalCone+eEcalCone);
807  }
808 
809  // Single particle samples ONLY ! ======================================
810  // Fill up some histos for "integrated" subsustems.
811  // These are not drawn
812  }
813 
814  nevtot++;
815 }
816 
817 
820 
821  using namespace edm;
822 
823 
824  // initialize data vectors
825  csub.clear();
826  cen.clear();
827  cenM0.clear();
828  cenM3.clear();
829  cchi2.clear();
830  ceta.clear();
831  cphi.clear();
832  ctime.clear();
833  cieta.clear();
834  ciphi.clear();
835  cdepth.clear();
836  cz.clear();
837  cstwd.clear();
838  cauxstwd.clear();
839  hcalHBSevLvlVec.clear();
840  hcalHESevLvlVec.clear();
841  hcalHFSevLvlVec.clear();
842  hcalHOSevLvlVec.clear();
843 
844  if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
845 
846  //HBHE
848  ev.getByToken(tok_hbhe_, hbhecoll);
849 
850  for (HBHERecHitCollection::const_iterator j=hbhecoll->begin(); j != hbhecoll->end(); j++) {
851  HcalDetId cell(j->id());
852  const CaloCellGeometry* cellGeometry =
853  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
854  double eta = cellGeometry->getPosition().eta () ;
855  double phi = cellGeometry->getPosition().phi () ;
856  double zc = cellGeometry->getPosition().z ();
857  int sub = cell.subdet();
858  int depth = cell.depth();
859  int inteta = cell.ieta();
860  int intphi = cell.iphi();
861  double en = j->energy();
862  double enM0 = j->eraw();
863  double enM3 = j->eaux();
864  double chi2 = j->chi2();
865  double t = j->time();
866  int stwd = j->flags();
867  int auxstwd = j->aux();
868 
869  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
870  if( cell.subdet()==HcalBarrel ){
871  hcalHBSevLvlVec.push_back(severityLevel);
872  }else if (cell.subdet()==HcalEndcap ){
873  hcalHESevLvlVec.push_back(severityLevel);
874  }
875 
876  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
877 
878  csub.push_back(sub);
879  cen.push_back(en);
880  cenM0.push_back(enM0);
881  cenM3.push_back(enM3);
882  cchi2.push_back(chi2);
883  ceta.push_back(eta);
884  cphi.push_back(phi);
885  ctime.push_back(t);
886  cieta.push_back(inteta);
887  ciphi.push_back(intphi);
888  cdepth.push_back(depth);
889  cz.push_back(zc);
890  cstwd.push_back(stwd);
891  cauxstwd.push_back(auxstwd);
892  }
893  }
894 
895  }
896 
897  if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
898 
899  //HF
901  ev.getByToken(tok_hf_, hfcoll);
902 
903  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
904  HcalDetId cell(j->id());
905  const CaloCellGeometry* cellGeometry =
906  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
907  double eta = cellGeometry->getPosition().eta () ;
908  double phi = cellGeometry->getPosition().phi () ;
909  double zc = cellGeometry->getPosition().z ();
910  int sub = cell.subdet();
911  int depth = cell.depth();
912  int inteta = cell.ieta();
913  int intphi = cell.iphi();
914  double en = j->energy();
915  double enM0 = 0.;
916  double enM3 = 0.;
917  double chi2 = 0.;
918  double t = j->time();
919  int stwd = j->flags();
920  int auxstwd = j->aux();
921 
922  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
923  if( cell.subdet()==HcalForward ){
924  hcalHFSevLvlVec.push_back(severityLevel);
925  }
926 
927  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
928 
929  csub.push_back(sub);
930  cen.push_back(en);
931  cenM0.push_back(enM0);
932  cenM3.push_back(enM3);
933  cchi2.push_back(chi2);
934  ceta.push_back(eta);
935  cphi.push_back(phi);
936  ctime.push_back(t);
937  cieta.push_back(inteta);
938  ciphi.push_back(intphi);
939  cdepth.push_back(depth);
940  cz.push_back(zc);
941  cstwd.push_back(stwd);
942  cauxstwd.push_back(auxstwd);
943  }
944  }
945  }
946 
947  //HO
948  if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
949 
951  ev.getByToken(tok_ho_, hocoll);
952 
953  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
954  HcalDetId cell(j->id());
955  const CaloCellGeometry* cellGeometry =
956  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
957  double eta = cellGeometry->getPosition().eta () ;
958  double phi = cellGeometry->getPosition().phi () ;
959  double zc = cellGeometry->getPosition().z ();
960  int sub = cell.subdet();
961  int depth = cell.depth();
962  int inteta = cell.ieta();
963  int intphi = cell.iphi();
964  double t = j->time();
965  double en = j->energy();
966  double enM0 = 0.;
967  double enM3 = 0.;
968  double chi2 = 0.;
969  int stwd = j->flags();
970  int auxstwd = j->aux();
971 
972  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
973  if( cell.subdet()==HcalOuter ){
974  hcalHOSevLvlVec.push_back(severityLevel);
975  }
976 
977  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
978  csub.push_back(sub);
979  cen.push_back(en);
980  cenM0.push_back(enM0);
981  cenM3.push_back(enM3);
982  cchi2.push_back(chi2);
983  ceta.push_back(eta);
984  cphi.push_back(phi);
985  ctime.push_back(t);
986  cieta.push_back(inteta);
987  ciphi.push_back(intphi);
988  cdepth.push_back(depth);
989  cz.push_back(zc);
990  cstwd.push_back(stwd);
991  cauxstwd.push_back(auxstwd);
992  }
993  }
994  }
995 }
996 
997 double HcalRecHitsAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
998  double PI = 3.1415926535898;
999  double deltaphi= phi1 - phi2;
1000  if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1001  if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1002  double deltaeta = eta2 - eta1;
1003  double tmp = sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1004  return tmp;
1005 }
1006 
1007 double HcalRecHitsAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
1008  // weighted mean value of phi1 and phi2
1009 
1010  double tmp;
1011  double PI = 3.1415926535898;
1012  double a1 = phi1; double a2 = phi2;
1013 
1014  if( a1 > 0.5*PI && a2 < 0.) a2 += 2*PI;
1015  if( a2 > 0.5*PI && a1 < 0.) a1 += 2*PI;
1016  tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1017  if(tmp > PI) tmp -= 2.*PI;
1018 
1019  return tmp;
1020 
1021 }
1022 
1023 double HcalRecHitsAnalyzer::dPhiWsign(double phi1, double phi2) {
1024  // clockwise phi2 w.r.t phi1 means "+" phi distance
1025  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
1026 
1027  double PI = 3.1415926535898;
1028  double a1 = phi1; double a2 = phi2;
1029  double tmp = a2 - a1;
1030  if( a1*a2 < 0.) {
1031  if(a1 > 0.5 * PI) tmp += 2.*PI;
1032  if(a2 > 0.5 * PI) tmp -= 2.*PI;
1033  }
1034  return tmp;
1035 
1036 }
1037 
1039 
1040  const DetId id = hit->detid();
1041 
1042  const uint32_t recHitFlag = hit->flags();
1043  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1044 
1045  int severityLevel = theHcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag);
1046 
1047  return severityLevel;
1048 
1049 }
1050 
1052 
int getNPhi(const int type) const
MonitorElement * sevLvl_HF
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meTEprofileHB_High
MonitorElement * RecHit_StatusWord_HE
int i
Definition: DBlmapReader.cc:9
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 * meRecHitsEnergyM3vM2HE
MonitorElement * sevLvl_HE
MonitorElement * RecHit_Aux_StatusWord_HO
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
unsigned int getHxSize(const int type) const
double dPhiWsign(double phi1, double phi2)
const DetId & detid() const
Definition: CaloRecHit.h:21
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * meTE_Low_HE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< MonitorElement * > Nhb
MonitorElement * meRecHitsEnergyHEM3
std::vector< int > cdepth
int hcalSevLvl(const CaloRecHit *hit)
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< int > hcalHBSevLvlVec
std::vector< MonitorElement * > emap
bool ev
MonitorElement * occupancy_map_HO
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< MonitorElement * > emean_vs_ieta_HBM3
std::vector< double > ceta
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * meEnConeEtaProfile_EH
std::vector< MonitorElement * > emean_vs_ieta_HBM0
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 * meRecHitsEnergyM2vM0HB
void Fill(long long x)
MonitorElement * sevLvl_HO
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
int getMaxDepth(const int type) const
std::vector< MonitorElement * > Nhe
std::vector< MonitorElement * > emean_vs_ieta_HEM0
MonitorElement * meRecHitsEnergyM2vM0HE
MonitorElement * meTE_HO
std::vector< MonitorElement * > occupancy_vs_ieta_HF
const HcalChannelQuality * theHcalChStatus
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * meEnConeEtaProfile_E
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * meTEprofileHO
MonitorElement * meTEprofileHB
edm::EDGetTokenT< HORecHitCollection > tok_ho_
uint32_t flags() const
Definition: CaloRecHit.h:22
std::vector< double > cchi2
MonitorElement * meLog10Chi2profileHE
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * meRecHitsEnergyHBM0
MonitorElement * meTE_High_HO
MonitorElement * meRecHitsEnergyHO
int j
Definition: DBlmapReader.cc:9
MonitorElement * meRecHitsM2Chi2HE
MonitorElement * meTE_HF
std::vector< uint32_t > cauxstwd
MonitorElement * meRecHitsEnergyHEM0
MonitorElement * occupancy_vs_ieta_HO
MonitorElement * meTEprofileHE_Low
MonitorElement * RecHit_StatusWord_HO
MonitorElement * meRecHitsEnergyHB
std::vector< int > ciphi
MonitorElement * emean_vs_ieta_HO
MonitorElement * sevLvl_HB
#define PI
Definition: QcdUeDQM.h:36
std::vector< double > cz
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< MonitorElement * > occupancy_vs_ieta_HB
MonitorElement * meTimeHE
std::vector< int > cieta
MonitorElement * meTimeHO
MonitorElement * meRecHitsEnergyHF
Definition: DetId.h:18
std::vector< MonitorElement * > emean_vs_ieta_HB
std::vector< double > cenM3
HcalRecHitsAnalyzer(edm::ParameterSet const &conf)
MonitorElement * meEnConeEtaProfile
MonitorElement * meTEprofileHE
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
std::vector< uint32_t > cstwd
std::vector< MonitorElement * > Nho
std::vector< MonitorElement * > occupancy_map_HE
T const * product() const
Definition: Handle.h:81
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * RecHit_Aux_StatusWord_HB
virtual void analyze(edm::Event const &ev, edm::EventSetup const &c) override
virtual void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
MonitorElement * meRecHitsEnergyM3vM2HB
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
MonitorElement * meLog10Chi2profileHB
std::pair< int, int > getEtaRange(const int i) const
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
MonitorElement * meTE_High_HB
std::vector< int > hcalHFSevLvlVec
MonitorElement * RecHit_StatusWord_HB
MonitorElement * meTEprofileHO_High
std::vector< MonitorElement * > emean_vs_ieta_HEM3
const HcalDDDRecConstants * hcons
MonitorElement * meTEprofileHB_Low
edm::EDGetTokenT< EERecHitCollection > tok_EE_
std::vector< double > ctime
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
MonitorElement * meTEprofileHF
MonitorElement * RecHit_Aux_StatusWord_HF
MonitorElement * RecHit_Aux_StatusWord_HE
uint32_t getValue() const
MonitorElement * RecHit_StatusWordCorr_HB
std::vector< MonitorElement * > Nhf
std::vector< MonitorElement * > occupancy_vs_ieta_HE
edm::ESHandle< CaloGeometry > geometry
Definition: Run.h:42
MonitorElement * meTE_HE
std::vector< MonitorElement * > emean_vs_ieta_HE
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF