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 
8 
9  // DQM ROOT output
10  outputFile_ = conf.getUntrackedParameter<std::string>("outputFile", "myfile.root");
11 
12  if ( outputFile_.size() != 0 ) {
13  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'";
14  } else {
15  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved";
16  }
17 
18  nevtot = 0;
19 
20  hcalselector_ = conf.getUntrackedParameter<std::string>("hcalselector", "all");
21  ecalselector_ = conf.getUntrackedParameter<std::string>("ecalselector", "yes");
22  eventype_ = conf.getUntrackedParameter<std::string>("eventype", "single");
23  sign_ = conf.getUntrackedParameter<std::string>("sign", "*");
24  useAllHistos_ = conf.getUntrackedParameter<bool>("useAllHistos", false);
25 
26  //Collections
27  tok_hbhe_ = consumes<HBHERecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HBHERecHitCollectionLabel"));
28  tok_hf_ = consumes<HFRecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HFRecHitCollectionLabel"));
29  tok_ho_ = consumes<HORecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HORecHitCollectionLabel"));
30  tok_EB_ = consumes<EBRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"));
31  tok_EE_ = consumes<EERecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"));
32 
33  subdet_ = 5;
34  if (hcalselector_ == "noise") subdet_ = 0;
35  if (hcalselector_ == "HB" ) subdet_ = 1;
36  if (hcalselector_ == "HE" ) subdet_ = 2;
37  if (hcalselector_ == "HO" ) subdet_ = 3;
38  if (hcalselector_ == "HF" ) subdet_ = 4;
39  if (hcalselector_ == "all" ) subdet_ = 5;
40  if (hcalselector_ == "ZS" ) subdet_ = 6;
41 
42  etype_ = 1;
43  if (eventype_ == "multi") etype_ = 2;
44 
45  iz = 1;
46  if(sign_ == "-") iz = -1;
47  if(sign_ == "*") iz = 0;
48 
49  imc = 0;
50 
51  }
52 
53  void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const & /* iRun*/, edm::EventSetup const & /* iSetup */)
54 
55 {
56 
57  Char_t histo[200];
58 
59  ibooker.setCurrentFolder("HcalRecHitsD/HcalRecHitTask");
60 
61  // General counters (drawn)
62  sprintf (histo, "N_HB" );
63  Nhb = ibooker.book1D(histo, histo, 2600,0.,2600.);
64  sprintf (histo, "N_HE" );
65  Nhe = ibooker.book1D(histo, histo, 2600,0.,2600.);
66  sprintf (histo, "N_HO" );
67  Nho = ibooker.book1D(histo, histo, 2200,0.,2200.);
68  sprintf (histo, "N_HF" );
69  Nhf = ibooker.book1D(histo, histo, 1800,0., 1800.);
70 
71  // ZS
72  if(subdet_ == 6) {
73 
74  for (unsigned int i1 = 0; i1 < 82; i1++) {
75  for (unsigned int i2 = 0; i2 < 72; i2++) {
76  for (unsigned int i3 = 0; i3 < 4; i3++) {
77  for (unsigned int i4 = 0; i4 < 4; i4++) {
78  emap_min [i1][i2][i3][i4] = 99999.;
79  }
80  }
81  }
82  }
83 
84  //None of the ZS histos are drawn
85  if (useAllHistos_){
86  sprintf (histo, "ZSmin_map_depth1" );
87  map_depth1 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
88  sprintf (histo, "ZSmin_map_depth2" );
89  map_depth2 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
90  sprintf (histo, "ZSmin_map_depth3" );
91  map_depth3 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
92  sprintf (histo, "ZSmin_map_depth4" );
93  map_depth4 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
94 
95 
96  sprintf (histo, "ZS_Nreco_HB1" );
97  ZS_nHB1 = ibooker.book1D(histo, histo, 2500, 0., 2500.);
98  sprintf (histo, "ZS_Nreco_HB2" );
99  ZS_nHB2 = ibooker.book1D(histo, histo, 500, 0., 500.);
100  sprintf (histo, "ZS_Nreco_HE1" );
101  ZS_nHE1 = ibooker.book1D(histo, histo, 2000, 0., 2000.);
102  sprintf (histo, "ZS_Nreco_HE2" );
103  ZS_nHE2 = ibooker.book1D(histo, histo, 2000, 0., 2000.);
104  sprintf (histo, "ZS_Nreco_HE3" );
105  ZS_nHE3 = ibooker.book1D(histo, histo, 500, 0., 500.);
106  sprintf (histo, "ZS_Nreco_HO" );
107  ZS_nHO = ibooker.book1D(histo, histo, 2500, 0., 2500.);
108  sprintf (histo, "ZS_Nreco_HF1" );
109  ZS_nHF1 = ibooker.book1D(histo, histo, 1000, 0., 1000.);
110  sprintf (histo, "ZS_Nreco_HF2" );
111  ZS_nHF2 = ibooker.book1D(histo, histo, 1000, 0., 1000.);
112 
113  sprintf (histo, "ZSmin_simple1D_HB1" );
114  ZS_HB1 = ibooker.book1D(histo, histo,120, -2., 10.);
115  sprintf (histo, "ZSmin_simple1D_HB2" );
116  ZS_HB2 = ibooker.book1D(histo, histo,120, -2., 10.);
117  sprintf (histo, "ZSmin_simple1D_HE1" );
118  ZS_HE1 = ibooker.book1D(histo, histo,120, -2., 10.);
119  sprintf (histo, "ZSmin_simple1D_HE2" );
120  ZS_HE2 = ibooker.book1D(histo, histo,120, -2., 10.);
121  sprintf (histo, "ZSmin_simple1D_HE3" );
122  ZS_HE3 = ibooker.book1D(histo, histo,120, -2., 10.);
123  sprintf (histo, "ZSmin_simple1D_HO" );
124  ZS_HO = ibooker.book1D(histo, histo,120, -2., 10.);
125  sprintf (histo, "ZSmin_simple1D_HF1" );
126  ZS_HF1 = ibooker.book1D(histo, histo,200, -10., 10.);
127  sprintf (histo, "ZSmin_simple1D_HF2" );
128  ZS_HF2 = ibooker.book1D(histo, histo,200, -10., 10.);
129 
130  sprintf (histo, "ZSmin_sequential1D_HB1" );
131  ZS_seqHB1 = ibooker.book1D(histo, histo,2400, -1200., 1200.);
132  sprintf (histo, "ZSmin_sequential1D_HB2" );
133  ZS_seqHB2 = ibooker.book1D(histo, histo,2400, -1200., 1200.);
134  sprintf (histo, "ZSmin_sequential1D_HE1" );
135  ZS_seqHE1 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
136  sprintf (histo, "ZSmin_sequential1D_HE2" );
137  ZS_seqHE2 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
138  sprintf (histo, "ZSmin_sequential1D_HE3" );
139  ZS_seqHE3 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
140  sprintf (histo, "ZSmin_sequential1D_HO" );
141  ZS_seqHO = ibooker.book1D(histo, histo,2400, -1200., 1200.);
142  sprintf (histo, "ZSmin_sequential1D_HF1" );
143  ZS_seqHF1 = ibooker.book1D(histo, histo,6000, -3000., 3000.);
144  sprintf (histo, "ZSmin_sequential1D_HF2" );
145  ZS_seqHF2 = ibooker.book1D(histo, histo,6000, -3000., 3000.);
146  }
147  }
148 
149  // ALL others, except ZS
150  else {
151 
152  sprintf (histo, "emap_depth1" );
153  emap_depth1 = ibooker.book2D(histo, histo, 84, -42., 42., 72, 0., 72.);
154  sprintf (histo, "emap_depth2" );
155  emap_depth2 = ibooker.book2D(histo, histo, 84, -42., 42., 72, 0., 72.);
156  sprintf (histo, "emap_depth3" );
157  emap_depth3 = ibooker.book2D(histo, histo, 84, -42., 42., 72, 0., 72.);
158  sprintf (histo, "emap_depth4" );
159  emap_depth4 = ibooker.book2D(histo, histo, 84, -42., 42., 72, 0., 72.);
160 
161  if (useAllHistos_){
162 
163  if (ecalselector_ == "yes") {
164  sprintf (histo, "map_ecal" );
165  map_ecal = ibooker.book2D(histo, histo, 70, -3.045, 3.045, 72, -3.1415926536, 3.1415926536);
166  }
167  }
168 
169  //The mean energy histos are drawn, but not the RMS or emean seq
170  sprintf (histo, "emean_vs_ieta_HB1" );
171  emean_vs_ieta_HB1 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000.);
172  sprintf (histo, "emean_vs_ieta_HB2" );
173  emean_vs_ieta_HB2 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000.);
174  sprintf (histo, "emean_vs_ieta_HE1" );
175  emean_vs_ieta_HE1 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10. ,2000.);
176  sprintf (histo, "emean_vs_ieta_HE2" );
177  emean_vs_ieta_HE2 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000.);
178  sprintf (histo, "emean_vs_ieta_HE3" );
179  emean_vs_ieta_HE3 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000. );
180  sprintf (histo, "emean_vs_ieta_HO" );
181  emean_vs_ieta_HO = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000. );
182  sprintf (histo, "emean_vs_ieta_HF1" );
183  emean_vs_ieta_HF1 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000. );
184  sprintf (histo, "emean_vs_ieta_HF2" );
185  emean_vs_ieta_HF2 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2010, -10., 2000. );
186 
187  if (useAllHistos_){
188  sprintf (histo, "RMS_vs_ieta_HB1" );
189  RMS_vs_ieta_HB1 = ibooker.book1D(histo, histo, 82, -41., 41.);
190  sprintf (histo, "RMS_vs_ieta_HB2" );
191  RMS_vs_ieta_HB2 = ibooker.book1D(histo, histo, 82, -41., 41.);
192  sprintf (histo, "RMS_vs_ieta_HE1" );
193  RMS_vs_ieta_HE1 = ibooker.book1D(histo, histo, 82, -41., 41.);
194  sprintf (histo, "RMS_vs_ieta_HE2" );
195  RMS_vs_ieta_HE2 = ibooker.book1D(histo, histo, 82, -41., 41.);
196  sprintf (histo, "RMS_vs_ieta_HE3" );
197  RMS_vs_ieta_HE3 = ibooker.book1D(histo, histo, 82, -41., 41.);
198  sprintf (histo, "RMS_vs_ieta_HO" );
199  RMS_vs_ieta_HO = ibooker.book1D(histo, histo, 82, -41., 41.);
200  sprintf (histo, "RMS_vs_ieta_HF1" );
201  RMS_vs_ieta_HF1 = ibooker.book1D(histo, histo, 82, -41., 41.);
202  sprintf (histo, "RMS_vs_ieta_HF2" );
203  RMS_vs_ieta_HF2 = ibooker.book1D(histo, histo, 82, -41., 41.);
204 
205  // Sequential emean and RMS
206  sprintf (histo, "emean_seq_HB1" );
207  emean_seqHB1 = ibooker.bookProfile(histo, histo, 2400, -1200., 1200., 2010, -10., 2000. );
208  sprintf (histo, "emean_seq_HB2" );
209  emean_seqHB2 = ibooker.bookProfile(histo, histo, 2400, -1200., 1200., 2010, -10., 2000. );
210  sprintf (histo, "emean_seq_HE1" );
211  emean_seqHE1 = ibooker.bookProfile(histo, histo, 4400, -2200., 2200., 2010, -10., 2000. );
212  sprintf (histo, "emean_seq_HE2" );
213  emean_seqHE2 = ibooker.bookProfile(histo, histo, 4400, -2200., 2200., 2010, -10., 2000. );
214  sprintf (histo, "emean_seq_HE3" );
215  emean_seqHE3 = ibooker.bookProfile(histo, histo, 4400, -2200., 2200., 2010, -10., 2000. );
216  sprintf (histo, "emean_seq_HO" );
217  emean_seqHO = ibooker.bookProfile(histo, histo, 2400, -1200., 1200., 2010, -10., 2000. );
218  sprintf (histo, "emean_seq_HF1" );
219  emean_seqHF1 = ibooker.bookProfile(histo, histo, 6000, -3000., 3000., 2010, -10., 2000. );
220  sprintf (histo, "emean_seq_HF2" );
221  emean_seqHF2 = ibooker.bookProfile(histo, histo, 6000, -3000., 3000., 2010, -10., 2000. );
222 
223  sprintf (histo, "RMS_seq_HB1" );
224  RMS_seq_HB1 = ibooker.book1D(histo, histo, 2400, -1200., 1200.);
225  sprintf (histo, "RMS_seq_HB2" );
226  RMS_seq_HB2 = ibooker.book1D(histo, histo, 2400, -1200., 1200.);
227  sprintf (histo, "RMS_seq_HE1" );
228  RMS_seq_HE1 = ibooker.book1D(histo, histo, 4400, -2200., 2200.);
229  sprintf (histo, "RMS_seq_HE2" );
230  RMS_seq_HE2 = ibooker.book1D(histo, histo, 4400, -2200., 2200.);
231  sprintf (histo, "RMS_seq_HE3" );
232  RMS_seq_HE3 = ibooker.book1D(histo, histo, 4400, -2200., 2200.);
233  sprintf (histo, "RMS_seq_HO" );
234  RMS_seq_HO = ibooker.book1D(histo, histo, 2400, -1200., 1200.);
235  sprintf (histo, "RMS_seq_HF1" );
236  RMS_seq_HF1 = ibooker.book1D(histo, histo, 6000, -3000., 3000.);
237  sprintf (histo, "RMS_seq_HF2" );
238  RMS_seq_HF2 = ibooker.book1D(histo, histo, 6000, -3000., 3000.);
239  }
240  // Occupancy
241  //The only occupancy histos drawn are occupancy vs. ieta
242  //but the maps are needed because this is where the latter are filled from
243  sprintf (histo, "occupancy_map_HB1" );
244  occupancy_map_HB1 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
245  sprintf (histo, "occupancy_map_HB2" );
246  occupancy_map_HB2 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
247  sprintf (histo, "occupancy_map_HE1" );
248  occupancy_map_HE1 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
249  sprintf (histo, "occupancy_map_HE2" );
250  occupancy_map_HE2 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
251  sprintf (histo, "occupancy_map_HE3" );
252  occupancy_map_HE3 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
253  sprintf (histo, "occupancy_map_HO" );
254  occupancy_map_HO = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
255  sprintf (histo, "occupancy_map_HF1" );
256  occupancy_map_HF1 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
257  sprintf (histo, "occupancy_map_HF2" );
258  occupancy_map_HF2 = ibooker.book2D(histo, histo, 82, -41., 41., 72, 0., 72.);
259 
260  //These are drawn
261  sprintf (histo, "occupancy_vs_ieta_HB1" );
262  occupancy_vs_ieta_HB1 = ibooker.book1D(histo, histo, 82, -41., 41.);
263  sprintf (histo, "occupancy_vs_ieta_HB2" );
264  occupancy_vs_ieta_HB2 = ibooker.book1D(histo, histo, 82, -41., 41.);
265  sprintf (histo, "occupancy_vs_ieta_HE1" );
266  occupancy_vs_ieta_HE1 = ibooker.book1D(histo, histo, 82, -41., 41.);
267  sprintf (histo, "occupancy_vs_ieta_HE2" );
268  occupancy_vs_ieta_HE2 = ibooker.book1D(histo, histo, 82, -41., 41.);
269  sprintf (histo, "occupancy_vs_ieta_HE3" );
270  occupancy_vs_ieta_HE3 = ibooker.book1D(histo, histo, 82, -41., 41.);
271  sprintf (histo, "occupancy_vs_ieta_HO" );
272  occupancy_vs_ieta_HO = ibooker.book1D(histo, histo, 82, -41., 41.);
273  sprintf (histo, "occupancy_vs_ieta_HF1" );
274  occupancy_vs_ieta_HF1 = ibooker.book1D(histo, histo, 82, -41., 41.);
275  sprintf (histo, "occupancy_vs_ieta_HF2" );
276  occupancy_vs_ieta_HF2 = ibooker.book1D(histo, histo, 82, -41., 41.);
277 
278  //These are not
279  if (useAllHistos_){
280  sprintf (histo, "occ_sequential1D_HB1" );
281  occupancy_seqHB1 = ibooker.book1D(histo, histo,2400, -1200., 1200.);
282  sprintf (histo, "occ_sequential1D_HB2" );
283  occupancy_seqHB2 = ibooker.book1D(histo, histo,2400, -1200., 1200.);
284  sprintf (histo, "occ_sequential1D_HE1" );
285  occupancy_seqHE1 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
286  sprintf (histo, "occ_sequential1D_HE2" );
287  occupancy_seqHE2 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
288  sprintf (histo, "occ_sequential1D_HE3" );
289  occupancy_seqHE3 = ibooker.book1D(histo, histo,4400, -2200., 2200.);
290  sprintf (histo, "occ_sequential1D_HO" );
291  occupancy_seqHO = ibooker.book1D(histo, histo,2400, -1200., 1200.);
292  sprintf (histo, "occ_sequential1D_HF1" );
293  occupancy_seqHF1 = ibooker.book1D(histo, histo,6000, -3000., 3000.);
294  sprintf (histo, "occ_sequential1D_HF2" );
295  occupancy_seqHF2 = ibooker.book1D(histo, histo,6000, -3000., 3000.);
296  }
297 
298  //All status word histos except HF67 are drawn
299  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HB" ) ;
300  RecHit_StatusWord_HB = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
301 
302  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HE" ) ;
303  RecHit_StatusWord_HE = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
304 
305  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HF" ) ;
306  RecHit_StatusWord_HF = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
307 
308  if (useAllHistos_){
309  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HF67" ) ;
310  RecHit_StatusWord_HF67 = ibooker.book1D(histo, histo, 3 , 0.5, 3.5);
311  }
312  sprintf (histo, "HcalRecHitTask_RecHit_StatusWord_HO" ) ;
313  RecHit_StatusWord_HO = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
314 
315  //Aux status word histos
316  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HB" ) ;
317  RecHit_Aux_StatusWord_HB = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
318 
319  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HE" ) ;
320  RecHit_Aux_StatusWord_HE = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
321 
322  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HF" ) ;
323  RecHit_Aux_StatusWord_HF = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
324 
325  sprintf (histo, "HcalRecHitTask_RecHit_Aux_StatusWord_HO" ) ;
326  RecHit_Aux_StatusWord_HO = ibooker.book1D(histo, histo, 32 , -0.5, 31.5);
327 
328  } // end-of (subdet_ =! 6)
329 
330  //======================= Now various cases one by one ===================
331 
332  //Histograms drawn for single pion scan
333  if(subdet_ != 0 && imc != 0) { // just not for noise
334  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
335  meEnConeEtaProfile = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
336 
337  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
338  meEnConeEtaProfile_E = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
339 
340  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
341  meEnConeEtaProfile_EH = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
342  }
343  //The other cone profile, delta ieta/phi and noise histos are not drawn
344  if (useAllHistos_){
345  if(subdet_ != 0 && imc != 0) { // just not for noise
346 
347  // meEnConeEtaProfiel_depth1->Fill(eta_RecHit, HcalCone_d1);
348 
349  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth1");
350  meEnConeEtaProfile_depth1 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
351 
352  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth2");
353  meEnConeEtaProfile_depth2 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
354 
355  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth3");
356  meEnConeEtaProfile_depth3 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
357 
358  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth4");
359  meEnConeEtaProfile_depth4 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
360 
361  }
362 
363  if(etype_ == 1 && subdet_ != 0) { // single part., not for noise
364 
365  sprintf (histo, "Delta_phi_cluster-MC");
366  meDeltaPhi = ibooker.book2D(histo, histo, 520, -5.2, 5.2, 60, -0.6, 0.6);
367 
368  sprintf (histo, "Delta_eta_cluster-MC");
369  meDeltaEta = ibooker.book2D(histo, histo, 520, -5.2, 5.2, 60, -0.6, 0.6);
370 
371  }
372  // NOISE-specific
373 
374  if (hcalselector_ == "noise" ){
375 
376  sprintf (histo, "e_hb" ) ;
377  e_hb = ibooker.book1D(histo, histo,1000, -5., 5.);
378  sprintf (histo, "e_he" ) ;
379  e_he = ibooker.book1D(histo, histo,1000, -5., 5.);
380  sprintf (histo, "e_ho" ) ;
381  e_ho = ibooker.book1D(histo, histo,1000, -5., 5.);
382  sprintf (histo, "e_hfl" ) ;
383  e_hfl = ibooker.book1D(histo, histo,2000, -10., 10.);
384  sprintf (histo, "e_hfs" ) ;
385  e_hfs = ibooker.book1D(histo, histo,2000, -10., 10.);
386  }
387  }
388  // ************** HB **********************************
389  if (subdet_ == 1 || subdet_ == 5 ){
390 
391  //Only severity level, energy of rechits and overall HB timing histos are drawn
392  if (useAllHistos_){
393  if(etype_ == 1 && subdet_ == 1 ) {
394  if(imc != 0) {
395  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HB" ) ;
396  meNumRecHitsConeHB = ibooker.book1D(histo, histo, 100, 0., 100.);
397 
398  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HB" ) ;
399  meSumRecHitsEnergyConeHB = ibooker.book1D(histo,histo, 60 ,-20., 280.);
400  }
401 
402  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HB");
403  meNumRecHitsThreshHB = ibooker.book1D(histo, histo, 30, 0., 30.);
404 
405  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HB" ) ;
406  meSumRecHitsEnergyHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
407 
408  if (ecalselector_ == "yes") {
409  if(imc != 0) {
410  sprintf (histo, "HcalRecHitTask_number_of_ecalrechits_in_cone_HB");
411  meNumEcalRecHitsConeHB = ibooker.book1D(histo, histo, 300, 0., 300.);
412  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HB");
413  meEcalHcalEnergyConeHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
414  }
415 
416  sprintf (histo, "HcalRecHitTask_energy_hcal_vs_ecal_HB");
417  meEnergyHcalVsEcalHB = ibooker.book2D(histo, histo, 300, 0., 150., 300, 0., 150.);
418  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_HB" ) ;
419  meEcalHcalEnergyHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
420  }
421  }
422  }
423 
424  sprintf(histo, "HcalRecHitTask_severityLevel_HB");
425  sevLvl_HB = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
426 
427  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HB" ) ;
428  meRecHitsEnergyHB = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
429 
430  sprintf (histo, "HcalRecHitTask_timing_HB" ) ;
431  meTimeHB = ibooker.book1D(histo, histo, 70, -48., 92.);
432 
433  //High, medium and low histograms to reduce RAM usage
434  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HB" ) ;
435  meTE_Low_HB = ibooker.book2D(histo, histo, 50, -5., 45., 70, -48., 92.);
436 
437  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HB" ) ;
438  meTE_HB = ibooker.book2D(histo, histo, 150, -5., 295., 70, -48., 92.);
439 
440  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HB" ) ;
441  meTE_High_HB = ibooker.book2D(histo, histo, 150, -5., 2995., 70, -48., 92.);
442 
443  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HB" ) ;
444  meTEprofileHB_Low = ibooker.bookProfile(histo, histo, 50, -5., 45., 70, -48., 92.);
445 
446  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HB" ) ;
447  meTEprofileHB = ibooker.bookProfile(histo, histo, 150, -5., 295., 70, -48., 92.);
448 
449  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HB" ) ;
450  meTEprofileHB_High = ibooker.bookProfile(histo, histo, 150, -5., 2995., 70, -48., 92.);
451 
452  }
453 
454  // ********************** HE ************************************
455  if ( subdet_ == 2 || subdet_ == 5 ){
456 
457  //None of these are drawn
458  if (useAllHistos_){
459  if(etype_ == 1 && subdet_ == 2 ) {
460 
461  if(imc != 0) {
462  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HE" ) ;
463  meNumRecHitsConeHE = ibooker.book1D(histo, histo, 100, 0., 100.);
464 
465  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HE" ) ;
466  meSumRecHitsEnergyConeHE = ibooker.book1D(histo,histo, 60 ,-20., 280.);
467  }
468 
469  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HE");
470  meNumRecHitsThreshHE = ibooker.book1D(histo, histo, 30, 0., 30.);
471 
472  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HE" ) ;
473  meSumRecHitsEnergyHE = ibooker.book1D(histo,histo, 60 , -20., 280.);
474 
475  if (ecalselector_ == "yes") {
476  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_HE" ) ;
477  meEcalHcalEnergyHE = ibooker.book1D(histo,histo, 80, -20., 380.);
478 
479  sprintf (histo, "HcalRecHitTask_energy_hcal_vs_ecal_HE");
480  meEnergyHcalVsEcalHE = ibooker.book2D(histo, histo, 300, 0., 150., 300, 0., 150.);
481  if(imc != 0) {
482  sprintf (histo, "HcalRecHitTask_number_of_ecalrechits_in_cone_HE");
483  meNumEcalRecHitsConeHE = ibooker.book1D(histo, histo, 300, 0., 300.);
484  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HE");
485  meEcalHcalEnergyConeHE = ibooker.book1D(histo,histo, 60,-20., 280.);
486  }
487  }
488  }
489  }
490 
491  //Only severity level, energy of rechits and overall HB timing histos are drawn
492  sprintf(histo, "HcalRecHitTask_severityLevel_HE");
493  sevLvl_HE = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
494 
495  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HE" ) ;
496  meRecHitsEnergyHE = ibooker.book1D(histo, histo, 2010, -10., 2000.);
497 
498  sprintf (histo, "HcalRecHitTask_timing_HE" ) ;
499  meTimeHE = ibooker.book1D(histo, histo, 70, -48., 92.);
500 
501  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HE" ) ;
502  meTE_Low_HE = ibooker.book2D(histo, histo, 80, -5., 75., 70, -48., 92.);
503 
504  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HE" ) ;
505  meTE_HE = ibooker.book2D(histo, histo, 200, -5., 395., 70, -48., 92.);
506 
507  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HE" ) ;
508  meTEprofileHE_Low = ibooker.bookProfile(histo, histo, 80, -5., 75., 70, -48., 92.);
509 
510  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HE" ) ;
511  meTEprofileHE = ibooker.bookProfile(histo, histo, 200, -5., 395., 70, -48., 92.);
512 
513  }
514 
515  // ************** HO ****************************************
516  if ( subdet_ == 3 || subdet_ == 5 ){
517 
518  //Only severity level, energy of rechits and overall HB timing histos are drawn
519  if (useAllHistos_){
520  if(etype_ == 1 && subdet_ == 3) {
521  if (imc != 0) {
522  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HO" ) ;
523  meNumRecHitsConeHO = ibooker.book1D(histo, histo, 100, 0 , 100.);
524 
525  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HO" ) ;
526  meSumRecHitsEnergyConeHO = ibooker.book1D(histo,histo, 80 ,-20., 380.);
527  }
528 
529  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HO");
530  meNumRecHitsThreshHO = ibooker.book1D(histo, histo, 100, 0., 100.);
531 
532  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HO" ) ;
533  meSumRecHitsEnergyHO = ibooker.book1D(histo,histo, 80 , -20., 380.);
534  }
535  }
536 
537  sprintf(histo, "HcalRecHitTask_severityLevel_HO");
538  sevLvl_HO = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
539 
540  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HO" ) ;
541  meRecHitsEnergyHO = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
542 
543  sprintf (histo, "HcalRecHitTask_timing_HO" ) ;
544  meTimeHO = ibooker.book1D(histo, histo, 70, -48., 92.);
545 
546  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HO" ) ;
547  meTE_HO= ibooker.book2D(histo, histo, 60, -5., 55., 70, -48., 92.);
548 
549  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HO" ) ;
550  meTE_High_HO= ibooker.book2D(histo, histo, 100, -5., 995., 70, -48., 92.);
551 
552  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HO" ) ;
553  meTEprofileHO = ibooker.bookProfile(histo, histo, 60, -5., 55., 70, -48., 92.);
554 
555  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HO" ) ;
556  meTEprofileHO_High = ibooker.bookProfile(histo, histo, 100, -5., 995., 70, -48., 92.);
557 
558  }
559 
560  // ********************** HF ************************************
561  if ( subdet_ == 4 || subdet_ == 5 ){
562 
563  //Only severity level, energy of rechits and overall HB timing histos are drawn
564  if (useAllHistos_){
565  if(etype_ == 1 && subdet_ == 4) {
566 
567  if(imc != 0) {
568  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HF" ) ;
569  meNumRecHitsConeHF = ibooker.book1D(histo, histo, 30, 0 , 30.);
570 
571  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HF" ) ;
572  meSumRecHitsEnergyConeHF = ibooker.book1D(histo,histo,100, -20., 180.);
573 
574  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HFL" );
575  meSumRecHitsEnergyConeHFL = ibooker.book1D(histo,histo,100,-20., 180.);
576 
577  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HFS");
578  meSumRecHitsEnergyConeHFS = ibooker.book1D(histo,histo,100,-20., 180.);
579  }
580  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HF" ) ;
581  meSumRecHitsEnergyHF = ibooker.book1D(histo,histo, 80 , -20., 380.);
582  }
583  }
584 
585  sprintf(histo, "HcalRecHitTask_severityLevel_HF");
586  sevLvl_HF = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
587 
588  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HF" ) ;
589  meRecHitsEnergyHF = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
590 
591  sprintf (histo, "HcalRecHitTask_timing_HF" ) ;
592  meTimeHF = ibooker.book1D(histo, histo, 70, -48., 92.);
593 
594  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HF" ) ;
595  meTE_Low_HF = ibooker.book2D(histo, histo, 100, -5., 195., 70, -48., 92.);
596 
597  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HF" ) ;
598  meTE_HF = ibooker.book2D(histo, histo, 200, -5., 995., 70, -48., 92.);
599 
600  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HF" ) ;
601  meTEprofileHF_Low = ibooker.bookProfile(histo, histo, 100, -5., 195., 70, -48., 92.);
602 
603  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HF" ) ;
604  meTEprofileHF = ibooker.bookProfile(histo, histo, 200, -5., 995., 70, -48., 92.);
605 
606  }
607 // } //end-of if(_dbe)
608 
609 }
610 
611 
613 
614  using namespace edm;
615 
616  // cuts for each subdet_ector mimiking "Scheme B"
617  // double cutHB = 0.9, cutHE = 1.4, cutHO = 1.1, cutHFL = 1.2, cutHFS = 1.8;
618 
619  // energy in HCAL
620  double eHcal = 0.;
621  double eHcalCone = 0.;
622  double eHcalConeHB = 0.;
623  double eHcalConeHE = 0.;
624  double eHcalConeHO = 0.;
625  double eHcalConeHF = 0.;
626  double eHcalConeHFL = 0.;
627  double eHcalConeHFS = 0.;
628  // Total numbet of RecHits in HCAL, in the cone, above 1 GeV theshold
629  int nrechits = 0;
630  int nrechitsCone = 0;
631  int nrechitsThresh = 0;
632 
633  // energy in ECAL
634  double eEcal = 0.;
635  double eEcalB = 0.;
636  double eEcalE = 0.;
637  double eEcalCone = 0.;
638  int numrechitsEcal = 0;
639 
640  // HCAL energy around MC eta-phi at all depths;
641  double partR = 0.3;
642 // double ehcal_coneMC_1 = 0.;
643 // double ehcal_coneMC_2 = 0.;
644 // double ehcal_coneMC_3 = 0.;
645 // double ehcal_coneMC_4 = 0.;
646 
647  // Cone size for serach of the hottest HCAL cell around MC
648 // double searchR = 1.0;
649  double eps = 0.001;
650 
651  // Single particle samples: actual eta-phi position of cluster around
652  // hottest cell
653  double etaHot = 99999.;
654  double phiHot = 99999.;
655 
656  // std::cout << "*** 2" << std::endl;
657  // previously was: c.get<IdealGeometryRecord>().get (geometry);
658  c.get<CaloGeometryRecord>().get (geometry);
659 
660  // HCAL channel status map ****************************************
662  c.get<HcalChannelQualityRcd>().get( "withTopo", hcalChStatus );
663  theHcalChStatus = hcalChStatus.product();
664 
665  // Assignment of severity levels **********************************
666  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
667  c.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
668  theHcalSevLvlComputer = hcalSevLvlComputerHndl.product();
669 
670  // Fill working vectors of HCAL RecHits quantities (all of these are drawn)
671  fillRecHitsTmp(subdet_, ev);
672 
673  // HB
674  if( subdet_ ==5 || subdet_ == 1 ){
675  for(unsigned int iv=0; iv<hcalHBSevLvlVec.size(); iv++){
677  }
678  }
679  // HE
680  if( subdet_ ==5 || subdet_ == 2 ){
681  for(unsigned int iv=0; iv<hcalHESevLvlVec.size(); iv++){
683  }
684  }
685  // HO
686  if( subdet_ ==5 || subdet_ == 3 ){
687  for(unsigned int iv=0; iv<hcalHOSevLvlVec.size(); iv++){
689  }
690  }
691  // HF
692  if( subdet_ ==5 || subdet_ == 4 ){
693  for(unsigned int iv=0; iv<hcalHFSevLvlVec.size(); iv++){
695  }
696  }
697 
698  // std::cout << "*** 3" << std::endl;
699 
700 
701  //===========================================================================
702  // IN ALL other CASES : ieta-iphi maps
703  //===========================================================================
704 
705  // ECAL
706  if(ecalselector_ == "yes" && (subdet_ == 1 || subdet_ == 2 || subdet_ == 5)) {
708 
709 
710  ev.getByToken(tok_EB_, rhitEB);
711 
712  EcalRecHitCollection::const_iterator RecHit = rhitEB.product()->begin();
713  EcalRecHitCollection::const_iterator RecHitEnd = rhitEB.product()->end();
714 
715  for (; RecHit != RecHitEnd ; ++RecHit) {
716  EBDetId EBid = EBDetId(RecHit->id());
717 
718  const CaloCellGeometry* cellGeometry =
719  geometry->getSubdetectorGeometry (EBid)->getGeometry (EBid) ;
720  double eta = cellGeometry->getPosition ().eta () ;
721  double phi = cellGeometry->getPosition ().phi () ;
722  double en = RecHit->energy();
723  eEcal += en;
724  eEcalB += en;
725 
726  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
727 
728  }
729 
730 
732 
733  ev.getByToken(tok_EE_, rhitEE);
734 
735  RecHit = rhitEE.product()->begin();
736  RecHitEnd = rhitEE.product()->end();
737 
738  for (; RecHit != RecHitEnd ; ++RecHit) {
739  EEDetId EEid = EEDetId(RecHit->id());
740 
741  const CaloCellGeometry* cellGeometry =
742  geometry->getSubdetectorGeometry (EEid)->getGeometry (EEid) ;
743  double eta = cellGeometry->getPosition ().eta () ;
744  double phi = cellGeometry->getPosition ().phi () ;
745  double en = RecHit->energy();
746  eEcal += en;
747  eEcalE += en;
748 
749  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
750 
751  }
752  } // end of ECAL selection
753 
754 
755  // std::cout << "*** 4" << std::endl;
756 
757 
758  // Counting, including ZS items
759  // Filling HCAL maps ----------------------------------------------------
760 // double maxE = -99999.;
761 
762  int nhb1 = 0;
763  int nhb2 = 0;
764  int nhe1 = 0;
765  int nhe2 = 0;
766  int nhe3 = 0;
767  int nho = 0;
768  int nhf1 = 0;
769  int nhf2 = 0;
770 
771  for (unsigned int i = 0; i < cen.size(); i++) {
772 
773  int sub = csub[i];
774  int depth = cdepth[i];
775  int ieta = cieta[i];
776  int iphi = ciphi[i];
777  double en = cen[i];
778  // double eta = ceta[i];
779  // double phi = cphi[i];
780  uint32_t stwd = cstwd[i];
781  uint32_t auxstwd = cauxstwd[i];
782  // double z = cz[i];
783 
784  int index = ieta * 72 + iphi; // for sequential histos
785 
786  /*
787  std::cout << "*** point 4-1" << " ieta, iphi, depth, sub = "
788  << ieta << ", " << iphi << ", " << depth << ", " << sub
789  << std::endl;
790  */
791 
792 
793  if( sub == 1 && depth == 1) nhb1++;
794  if( sub == 1 && depth == 2) nhb2++;
795  if( sub == 2 && depth == 1) nhe1++;
796  if( sub == 2 && depth == 2) nhe2++;
797  if( sub == 2 && depth == 3) nhe3++;
798  if( sub == 3 && depth == 4) nho++;
799  if( sub == 4 && depth == 1) nhf1++;
800  if( sub == 4 && depth == 2) nhf2++;
801 
802  if( subdet_ == 6) { // ZS specific
803  if( en < emap_min[ieta+41][iphi][depth-1][sub-1] )
804  emap_min[ieta+41][iphi][depth-1][sub-1] = en;
805  }
806 
807 // double emin = 1.;
808 // if(fabs(eta) > 3.) emin = 5.;
809 
810  /*
811  if(ieta == 27 ) {
812  std::cout << "*** ieta=28, iphi = " << iphi << " det = "
813  << sub << " depth = " << depth << std::endl;
814  }
815  */
816 
817  if( subdet_ != 6) {
818 
819  // std::cout << "*** 4-1" << std::endl;
820  //The emean_vs_ieta histos are drawn as well as the e_maps
821 
822 
823  // to distinguish HE and HF
824  if( depth == 1 || depth == 2 ) {
825  int ieta1 = ieta;
826  if(sub == 4) {
827  if (ieta1 < 0) ieta1--;
828  else ieta1++;
829  }
830  if (depth == 1) emap_depth1->Fill(double(ieta1), double(iphi), en);
831  if (depth == 2) emap_depth2->Fill(double(ieta1), double(iphi), en);
832  }
833 
834  if( depth == 3) emap_depth3->Fill(double(ieta), double(iphi), en);
835  if( depth == 4) emap_depth4->Fill(double(ieta), double(iphi), en);
836 
837  if (depth == 1 && sub == 1 ) {
838  emean_vs_ieta_HB1->Fill(double(ieta), en);
839  occupancy_map_HB1->Fill(double(ieta), double(iphi));
840  if(useAllHistos_){
841  emean_seqHB1->Fill(double(index), en);
842  }
843  }
844  if (depth == 2 && sub == 1) {
845  emean_vs_ieta_HB2->Fill(double(ieta), en);
846  occupancy_map_HB2->Fill(double(ieta), double(iphi));
847  if(useAllHistos_){
848  emean_seqHB2->Fill(double(index), en);
849  }
850  }
851  if (depth == 1 && sub == 2) {
852  emean_vs_ieta_HE1->Fill(double(ieta), en);
853  occupancy_map_HE1->Fill(double(ieta), double(iphi));
854  if(useAllHistos_){
855  emean_seqHE1->Fill(double(index), en);
856  }
857  }
858  if (depth == 2 && sub == 2) {
859  emean_vs_ieta_HE2->Fill(double(ieta), en);
860  occupancy_map_HE2->Fill(double(ieta), double(iphi));
861  if(useAllHistos_){
862  emean_seqHE2->Fill(double(index), en);
863  }
864  }
865  if (depth == 3 && sub == 2) {
866  emean_vs_ieta_HE3->Fill(double(ieta), en);
867  occupancy_map_HE3->Fill(double(ieta), double(iphi));
868  if(useAllHistos_){
869  emean_seqHE3->Fill(double(index), en);
870  }
871  }
872  if (depth == 4 ) {
873  emean_vs_ieta_HO->Fill(double(ieta), en);
874  occupancy_map_HO->Fill(double(ieta), double(iphi));
875  if(useAllHistos_){
876  emean_seqHO->Fill(double(index), en);
877  }
878  }
879  if (depth == 1 && sub == 4) {
880  emean_vs_ieta_HF1->Fill(double(ieta), en);
881  occupancy_map_HF1->Fill(double(ieta), double(iphi));
882  if(useAllHistos_){
883  emean_seqHF1->Fill(double(index), en);
884  }
885  }
886  if (depth == 2 && sub == 4) {
887  emean_vs_ieta_HF2->Fill(double(ieta), en);
888  occupancy_map_HF2->Fill(double(ieta), double(iphi));
889  if(useAllHistos_){
890  emean_seqHF2->Fill(double(index), en);
891  }
892  }
893  }
894 
895 
896 // if( r < partR ) {
897 // if (depth == 1) ehcal_coneMC_1 += en;
898 // if (depth == 2) ehcal_coneMC_2 += en;
899 // if (depth == 3) ehcal_coneMC_3 += en;
900 // if (depth == 4) ehcal_coneMC_4 += en;
901 // }
902 
903  //32-bit status word
904  uint32_t statadd;
905  unsigned int isw67 = 0;
906  for (unsigned int isw = 0; isw < 32; isw++){
907  statadd = 0x1<<(isw);
908  if (stwd & statadd){
909  if (sub == 1) RecHit_StatusWord_HB->Fill(isw);
910  else if (sub == 2) RecHit_StatusWord_HE->Fill(isw);
911  else if (sub == 3) RecHit_StatusWord_HO->Fill(isw);
912  else if (sub == 4){
914  if (isw == 6) isw67 += 1;
915  if (isw == 7) isw67 += 2;
916  }
917  }
918  }
919  if (isw67 != 0 && useAllHistos_) RecHit_StatusWord_HF67->Fill(isw67); //This one is not drawn
920 
921  for (unsigned int isw =0; isw < 32; isw++){
922  statadd = 0x1<<(isw);
923  if( auxstwd & statadd ){
924  if (sub == 1) RecHit_Aux_StatusWord_HB->Fill(isw);
925  else if (sub == 2) RecHit_Aux_StatusWord_HE->Fill(isw);
926  else if (sub == 3) RecHit_Aux_StatusWord_HO->Fill(isw);
927  else if (sub == 4) RecHit_Aux_StatusWord_HF->Fill(isw);
928  }
929 
930  }
931 
932  }
933 
934  // std::cout << "*** 4-2" << std::endl;
935 
936  if( subdet_ == 6 && useAllHistos_) { // ZS plots; not drawn
937  ZS_nHB1->Fill(double(nhb1));
938  ZS_nHB2->Fill(double(nhb2));
939  ZS_nHE1->Fill(double(nhe1));
940  ZS_nHE2->Fill(double(nhe2));
941  ZS_nHE3->Fill(double(nhe3));
942  ZS_nHO ->Fill(double(nho));
943  ZS_nHF1->Fill(double(nhf1));
944  ZS_nHF2->Fill(double(nhf2));
945  }
946  else{
947  Nhb->Fill(double(nhb1 + nhb2));
948  Nhe->Fill(double(nhe1 + nhe2 + nhe3));
949  Nho->Fill(double(nho));
950  Nhf->Fill(double(nhf1 + nhf2));
951 
952  }
953 
954  // std::cout << "*** 5" << std::endl;
955 
956 
957  // NOISE =================================================================
958  //Not drawn
959  if (hcalselector_ == "noise" && useAllHistos_) {
960  for (unsigned int i = 0; i < cen.size(); i++) {
961 
962  int sub = csub[i];
963  int depth = cdepth[i];
964  double en = cen[i];
965 
966  if (sub == 1) e_hb->Fill(en);
967  if (sub == 2) e_he->Fill(en);
968  if (sub == 3) e_ho->Fill(en);
969  if (sub == 4) {
970  if(depth == 1)
971  e_hfl->Fill(en);
972  else
973  e_hfs->Fill(en);
974  }
975  }
976  }
977 
978  //===========================================================================
979  // SUBSYSTEMS,
980  //===========================================================================
981 
982  else if ((subdet_ != 6) && (subdet_ != 0)) {
983 
984  // std::cout << "*** 6" << std::endl;
985 
986 
987  double clusEta = 999.;
988  double clusPhi = 999.;
989  double clusEn = 0.;
990 
991  double HcalCone_d1 = 0.;
992  double HcalCone_d2 = 0.;
993  double HcalCone_d3 = 0.;
994  double HcalCone_d4 = 0.;
995  double HcalCone = 0.;
996 
997  int ietaMax1 = 9999;
998  int ietaMax2 = 9999;
999  int ietaMax3 = 9999;
1000  int ietaMax4 = 9999;
1001  int ietaMax = 9999;
1002  // double enMax1 = -9999.;
1003  // double enMax2 = -9999.;
1004  // double enMax3 = -9999.;
1005  // double enMax4 = -9999.;
1006  // double enMax = -9999.;
1007  // double etaMax = 9999.;
1008 
1009  // CYCLE over cells ====================================================
1010 
1011  for (unsigned int i = 0; i < cen.size(); i++) {
1012  int sub = csub[i];
1013  int depth = cdepth[i];
1014  double eta = ceta[i];
1015  double phi = cphi[i];
1016  double en = cen[i];
1017  double t = ctime[i];
1018 // int ieta = cieta[i];
1019 
1020  double rhot = dR(etaHot, phiHot, eta, phi);
1021  if(rhot < partR && en > 1.) {
1022  clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
1023  clusPhi = phi12(clusPhi, clusEn, phi, en);
1024  clusEn += en;
1025  }
1026 
1027  nrechits++;
1028  eHcal += en;
1029  if(en > 1. ) nrechitsThresh++;
1030 
1031  //The energy and overall timing histos are drawn while
1032  //the ones split by depth are not
1033  if(sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
1034  meTimeHB->Fill(t);
1035  meRecHitsEnergyHB->Fill(en);
1036 
1037  meTE_Low_HB->Fill( en, t);
1038  meTE_HB->Fill( en, t);
1039  meTE_High_HB->Fill( en, t);
1040  meTEprofileHB_Low->Fill(en, t);
1041  meTEprofileHB->Fill(en, t);
1042  meTEprofileHB_High->Fill(en, t);
1043 
1044  if (useAllHistos_){
1045  if (depth == 1) meTE_HB1->Fill( en, t);
1046  else if (depth == 2) meTE_HB2->Fill( en, t);
1047  }
1048  }
1049  if(sub == 2 && (subdet_ == 2 || subdet_ == 5)) {
1050  meTimeHE->Fill(t);
1051  meRecHitsEnergyHE->Fill(en);
1052 
1053  meTE_Low_HE->Fill( en, t);
1054  meTE_HE->Fill( en, t);
1055  meTEprofileHE_Low->Fill(en, t);
1056  meTEprofileHE->Fill(en, t);
1057 
1058  if (useAllHistos_){
1059  if (depth == 1) meTE_HE1->Fill( en, t);
1060  else if (depth == 2) meTE_HE2->Fill( en, t);
1061  }
1062  }
1063  if(sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
1064  meTimeHF->Fill(t);
1065  meRecHitsEnergyHF->Fill(en);
1066 
1067  meTE_Low_HF->Fill(en, t);
1068  meTE_HF->Fill(en, t);
1069  meTEprofileHF_Low->Fill(en, t);
1070  meTEprofileHF->Fill(en, t);
1071 
1072  if (useAllHistos_){
1073  if (depth == 1) meTE_HFL->Fill( en, t);
1074  else meTE_HFS->Fill( en, t);
1075  }
1076  }
1077  if(sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
1078  meTimeHO->Fill(t);
1079  meRecHitsEnergyHO->Fill(en);
1080 
1081  meTE_HO->Fill( en, t);
1082  meTE_High_HO->Fill( en, t);
1083  meTEprofileHO->Fill(en, t);
1084  meTEprofileHO_High->Fill(en, t);
1085  }
1086  }
1087 
1088  if(imc != 0) {
1089  //Cone by depth are not drawn, the others are used for pion scan
1090  if (useAllHistos_){
1091  meEnConeEtaProfile_depth1->Fill(double(ietaMax1), HcalCone_d1);
1092  meEnConeEtaProfile_depth2->Fill(double(ietaMax2), HcalCone_d2);
1093  meEnConeEtaProfile_depth3->Fill(double(ietaMax3), HcalCone_d3);
1094  meEnConeEtaProfile_depth4->Fill(double(ietaMax4), HcalCone_d4);
1095  }
1096  meEnConeEtaProfile ->Fill(double(ietaMax), HcalCone); //
1097  meEnConeEtaProfile_E ->Fill(double(ietaMax), eEcalCone);
1098  meEnConeEtaProfile_EH ->Fill(double(ietaMax), HcalCone+eEcalCone);
1099  }
1100 
1101  // std::cout << "*** 7" << std::endl;
1102 
1103 
1104  // Single particle samples ONLY ! ======================================
1105  // Fill up some histos for "integrated" subsustems.
1106  // These are not drawn
1107  if(etype_ == 1 && useAllHistos_) {
1108 
1109  /*
1110  std::cout << "*** point 7-1" << " eta_MC, phi_MC clusEta, clusPhi = "
1111  << eta_MC << ", " << phi_MC << " "
1112  << clusEta << ", " << clusPhi
1113  << std::endl;
1114  */
1115 
1116 // double phidev = dPhiWsign(clusPhi, phi_MC);
1117 // meDeltaPhi->Fill(eta_MC, phidev);
1118 // double etadev = clusEta - eta_MC;
1119 // meDeltaEta->Fill(eta_MC, etadev);
1120 
1121  if(subdet_ == 1) {
1122  meSumRecHitsEnergyHB->Fill(eHcal);
1123  if(imc != 0) meSumRecHitsEnergyConeHB->Fill(eHcalConeHB);
1124  if(imc != 0) meNumRecHitsConeHB->Fill(double(nrechitsCone));
1125  meNumRecHitsThreshHB->Fill(double(nrechitsThresh));
1126  }
1127 
1128  if(subdet_ == 2) {
1129  meSumRecHitsEnergyHE->Fill(eHcal);
1130  if(imc != 0) meSumRecHitsEnergyConeHE->Fill(eHcalConeHE);
1131  if(imc != 0) meNumRecHitsConeHE->Fill(double(nrechitsCone));
1132  meNumRecHitsThreshHE->Fill(double(nrechitsThresh));
1133  }
1134 
1135  if(subdet_ == 3) {
1136  meSumRecHitsEnergyHO->Fill(eHcal);
1137  if(imc != 0) meSumRecHitsEnergyConeHO->Fill(eHcalConeHO);
1138  if(imc != 0) meNumRecHitsConeHO->Fill(double(nrechitsCone));
1139  meNumRecHitsThreshHO->Fill(double(nrechitsThresh));
1140  }
1141 
1142  if(subdet_ == 4) {
1143  if(eHcalConeHF > eps ) {
1144  meSumRecHitsEnergyHF ->Fill(eHcal);
1145  if(imc != 0) {
1146  meSumRecHitsEnergyConeHF ->Fill(eHcalConeHF);
1147  meNumRecHitsConeHF->Fill(double(nrechitsCone));
1148  meSumRecHitsEnergyConeHFL ->Fill(eHcalConeHFL);
1149  meSumRecHitsEnergyConeHFS ->Fill(eHcalConeHFS);
1150  }
1151  }
1152  }
1153 
1154  // std::cout << "*** 8" << std::endl;
1155 
1156 
1157  // Also combine with ECAL if needed
1158  if(subdet_ == 1 && ecalselector_ == "yes") {
1159 
1160  /*
1161  std::cout << "*** point 8-1"
1162  << " eEcalB " << eEcalB << " eHcal " << eHcal
1163  << " eEcalCone " << eEcalCone << " eHcalCone "
1164  << eHcalCone
1165  << " numrechitsEcal " << numrechitsEcal
1166  << std::endl;
1167 
1168  */
1169 
1170  meEcalHcalEnergyHB->Fill(eEcalB+eHcal);
1171  meEcalHcalEnergyConeHB->Fill(eEcalCone+eHcalCone);
1172  meNumEcalRecHitsConeHB->Fill(double(numrechitsEcal));
1173 
1174  }
1175 
1176  if(subdet_ == 2 && ecalselector_ == "yes"){
1177 
1178  /*
1179  std::cout << "*** point 8-2a"
1180  << " eEcalE " << eEcalE << " eHcal " << eHcal
1181  << " eEcalCone " << eEcalCone << " eHcalCone "
1182  << eHcalCone
1183  << " numrechitsEcal " << numrechitsEcal
1184  << std::endl;
1185  */
1186 
1187  meEcalHcalEnergyHE->Fill(eEcalE+eHcal);
1188  if(imc != 0) meEcalHcalEnergyConeHE->Fill(eEcalCone+eHcalCone);
1189  if(imc != 0) meNumEcalRecHitsConeHE->Fill(double(numrechitsEcal));
1190  }
1191 
1192  // Banana plots finally
1193  if(imc != 0) {
1194  if(subdet_ == 1 && ecalselector_ == "yes")
1195  meEnergyHcalVsEcalHB -> Fill(eEcalCone,eHcalCone);
1196  if(subdet_ == 2 && ecalselector_ == "yes")
1197  meEnergyHcalVsEcalHE -> Fill(eEcalCone,eHcalCone);
1198  }
1199  }
1200  }
1201  // std::cout << "*** 9" << std::endl;
1202 
1203  nevtot++;
1204 }
1205 
1206 
1209 
1210  using namespace edm;
1211 
1212 
1213  // initialize data vectors
1214  csub.clear();
1215  cen.clear();
1216  ceta.clear();
1217  cphi.clear();
1218  ctime.clear();
1219  cieta.clear();
1220  ciphi.clear();
1221  cdepth.clear();
1222  cz.clear();
1223  cstwd.clear();
1224  cauxstwd.clear();
1225  hcalHBSevLvlVec.clear();
1226  hcalHESevLvlVec.clear();
1227  hcalHFSevLvlVec.clear();
1228  hcalHOSevLvlVec.clear();
1229 
1230  if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1231 
1232  //HBHE
1234  ev.getByToken(tok_hbhe_, hbhecoll);
1235 
1236  for (HBHERecHitCollection::const_iterator j=hbhecoll->begin(); j != hbhecoll->end(); j++) {
1237  HcalDetId cell(j->id());
1238  const CaloCellGeometry* cellGeometry =
1239  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1240  double eta = cellGeometry->getPosition().eta () ;
1241  double phi = cellGeometry->getPosition().phi () ;
1242  double zc = cellGeometry->getPosition().z ();
1243  int sub = cell.subdet();
1244  int depth = cell.depth();
1245  int inteta = cell.ieta();
1246  if(inteta > 0) inteta -= 1;
1247  int intphi = cell.iphi()-1;
1248  double en = j->energy();
1249  double t = j->time();
1250  int stwd = j->flags();
1251  int auxstwd = j->aux();
1252 
1253  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1254  if( cell.subdet()==HcalBarrel ){
1255  hcalHBSevLvlVec.push_back(severityLevel);
1256  }else if (cell.subdet()==HcalEndcap ){
1257  hcalHESevLvlVec.push_back(severityLevel);
1258  }
1259 
1260  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1261 
1262  csub.push_back(sub);
1263  cen.push_back(en);
1264  ceta.push_back(eta);
1265  cphi.push_back(phi);
1266  ctime.push_back(t);
1267  cieta.push_back(inteta);
1268  ciphi.push_back(intphi);
1269  cdepth.push_back(depth);
1270  cz.push_back(zc);
1271  cstwd.push_back(stwd);
1272  cauxstwd.push_back(auxstwd);
1273  }
1274  }
1275 
1276  }
1277 
1278  if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1279 
1280  //HF
1282  ev.getByToken(tok_hf_, hfcoll);
1283 
1284  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
1285  HcalDetId cell(j->id());
1286  const CaloCellGeometry* cellGeometry =
1287  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1288  double eta = cellGeometry->getPosition().eta () ;
1289  double phi = cellGeometry->getPosition().phi () ;
1290  double zc = cellGeometry->getPosition().z ();
1291  int sub = cell.subdet();
1292  int depth = cell.depth();
1293  int inteta = cell.ieta();
1294  if(inteta > 0) inteta -= 1;
1295  int intphi = cell.iphi()-1;
1296  double en = j->energy();
1297  double t = j->time();
1298  int stwd = j->flags();
1299  int auxstwd = j->aux();
1300 
1301  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1302  if( cell.subdet()==HcalForward ){
1303  hcalHFSevLvlVec.push_back(severityLevel);
1304  }
1305 
1306  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1307 
1308  csub.push_back(sub);
1309  cen.push_back(en);
1310  ceta.push_back(eta);
1311  cphi.push_back(phi);
1312  ctime.push_back(t);
1313  cieta.push_back(inteta);
1314  ciphi.push_back(intphi);
1315  cdepth.push_back(depth);
1316  cz.push_back(zc);
1317  cstwd.push_back(stwd);
1318  cauxstwd.push_back(auxstwd);
1319  }
1320  }
1321  }
1322 
1323  //HO
1324  if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1325 
1327  ev.getByToken(tok_ho_, hocoll);
1328 
1329  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
1330  HcalDetId cell(j->id());
1331  const CaloCellGeometry* cellGeometry =
1332  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1333  double eta = cellGeometry->getPosition().eta () ;
1334  double phi = cellGeometry->getPosition().phi () ;
1335  double zc = cellGeometry->getPosition().z ();
1336  int sub = cell.subdet();
1337  int depth = cell.depth();
1338  int inteta = cell.ieta();
1339  if(inteta > 0) inteta -= 1;
1340  int intphi = cell.iphi()-1;
1341  double t = j->time();
1342  double en = j->energy();
1343  int stwd = j->flags();
1344  int auxstwd = j->aux();
1345 
1346  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1347  if( cell.subdet()==HcalOuter ){
1348  hcalHOSevLvlVec.push_back(severityLevel);
1349  }
1350 
1351  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1352  csub.push_back(sub);
1353  cen.push_back(en);
1354  ceta.push_back(eta);
1355  cphi.push_back(phi);
1356  ctime.push_back(t);
1357  cieta.push_back(inteta);
1358  ciphi.push_back(intphi);
1359  cdepth.push_back(depth);
1360  cz.push_back(zc);
1361  cstwd.push_back(stwd);
1362  cauxstwd.push_back(auxstwd);
1363  }
1364  }
1365  }
1366 }
1367 
1368 double HcalRecHitsAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
1369  double PI = 3.1415926535898;
1370  double deltaphi= phi1 - phi2;
1371  if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1372  if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1373  double deltaeta = eta2 - eta1;
1374  double tmp = sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1375  return tmp;
1376 }
1377 
1378 double HcalRecHitsAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
1379  // weighted mean value of phi1 and phi2
1380 
1381  double tmp;
1382  double PI = 3.1415926535898;
1383  double a1 = phi1; double a2 = phi2;
1384 
1385  if( a1 > 0.5*PI && a2 < 0.) a2 += 2*PI;
1386  if( a2 > 0.5*PI && a1 < 0.) a1 += 2*PI;
1387  tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1388  if(tmp > PI) tmp -= 2.*PI;
1389 
1390  return tmp;
1391 
1392 }
1393 
1394 double HcalRecHitsAnalyzer::dPhiWsign(double phi1, double phi2) {
1395  // clockwise phi2 w.r.t phi1 means "+" phi distance
1396  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
1397 
1398  double PI = 3.1415926535898;
1399  double a1 = phi1; double a2 = phi2;
1400  double tmp = a2 - a1;
1401  if( a1*a2 < 0.) {
1402  if(a1 > 0.5 * PI) tmp += 2.*PI;
1403  if(a2 > 0.5 * PI) tmp -= 2.*PI;
1404  }
1405  return tmp;
1406 
1407 }
1408 
1410 
1411  const DetId id = hit->detid();
1412 
1413  const uint32_t recHitFlag = hit->flags();
1414  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1415 
1416  int severityLevel = theHcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag);
1417 
1418  return severityLevel;
1419 
1420 }
1421 
1423 
MonitorElement * map_depth4
MonitorElement * sevLvl_HF
MonitorElement * ZS_seqHE1
MonitorElement * ZS_seqHF2
MonitorElement * ZS_nHB1
MonitorElement * occupancy_map_HF1
T getUntrackedParameter(std::string const &, T const &) const
tuple t
Definition: tree.py:139
MonitorElement * meTEprofileHB_High
MonitorElement * RecHit_StatusWord_HE
int i
Definition: DBlmapReader.cc:9
MonitorElement * meTE_HB2
std::vector< int > csub
MonitorElement * occupancy_seqHE1
MonitorElement * occupancy_vs_ieta_HE1
MonitorElement * meTimeHF
std::vector< double > cphi
MonitorElement * occupancy_map_HE3
MonitorElement * emean_seqHE3
std::vector< int > hcalHOSevLvlVec
MonitorElement * RMS_vs_ieta_HE2
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * RecHit_StatusWord_HF
MonitorElement * RMS_seq_HE3
MonitorElement * meSumRecHitsEnergyConeHO
MonitorElement * sevLvl_HE
#define PI
MonitorElement * RecHit_Aux_StatusWord_HO
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * RMS_seq_HE2
MonitorElement * RMS_vs_ieta_HB1
MonitorElement * ZS_nHE2
double dPhiWsign(double phi1, double phi2)
const DetId & detid() const
Definition: CaloRecHit.h:20
MonitorElement * meNumEcalRecHitsConeHE
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * ZS_HB2
MonitorElement * meTE_Low_HE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
double emap_min[82][72][4][4]
MonitorElement * emean_vs_ieta_HF2
MonitorElement * occupancy_map_HF2
MonitorElement * ZS_seqHB2
std::vector< int > cdepth
MonitorElement * meSumRecHitsEnergyHB
int hcalSevLvl(const CaloRecHit *hit)
MonitorElement * meSumRecHitsEnergyHF
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * RMS_seq_HF2
MonitorElement * meSumRecHitsEnergyConeHF
std::vector< int > hcalHBSevLvlVec
MonitorElement * meEnConeEtaProfile_depth1
bool ev
MonitorElement * occupancy_map_HO
MonitorElement * occupancy_seqHO
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< double > ceta
MonitorElement * ZS_nHO
MonitorElement * occupancy_seqHF2
MonitorElement * occupancy_vs_ieta_HF1
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * emap_depth4
MonitorElement * emean_vs_ieta_HB2
MonitorElement * meEnConeEtaProfile_EH
std::vector< int > hcalHESevLvlVec
double phi12(double phi1, double en1, double phi2, double en2)
MonitorElement * emean_vs_ieta_HB1
MonitorElement * emean_seqHE1
MonitorElement * meTE_Low_HB
MonitorElement * meTEprofileHF_Low
MonitorElement * ZS_nHB2
const HcalSeverityLevelComputer * theHcalSevLvlComputer
MonitorElement * meTE_HB
MonitorElement * meSumRecHitsEnergyConeHB
MonitorElement * emap_depth1
MonitorElement * RMS_vs_ieta_HE3
void Fill(long long x)
MonitorElement * RMS_vs_ieta_HB2
MonitorElement * ZS_HF1
MonitorElement * sevLvl_HO
MonitorElement * ZS_nHE1
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
MonitorElement * occupancy_seqHF1
MonitorElement * meEcalHcalEnergyHB
MonitorElement * emean_seqHB1
MonitorElement * meEcalHcalEnergyHE
MonitorElement * ZS_HB1
MonitorElement * emean_seqHF2
MonitorElement * meSumRecHitsEnergyConeHE
MonitorElement * meTE_HO
MonitorElement * occupancy_seqHB2
MonitorElement * RMS_vs_ieta_HF2
const HcalChannelQuality * theHcalChStatus
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * meEnConeEtaProfile_E
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * meTE_HFL
MonitorElement * meTEprofileHO
MonitorElement * meTEprofileHB
edm::EDGetTokenT< HORecHitCollection > tok_ho_
uint32_t flags() const
Definition: CaloRecHit.h:21
MonitorElement * RMS_vs_ieta_HE1
MonitorElement * ZS_HE1
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * occupancy_map_HB1
MonitorElement * meTE_High_HO
MonitorElement * meRecHitsEnergyHO
int j
Definition: DBlmapReader.cc:9
MonitorElement * occupancy_seqHB1
MonitorElement * meTE_HE2
MonitorElement * meDeltaEta
MonitorElement * meTE_HF
std::vector< uint32_t > cauxstwd
MonitorElement * emap_depth3
MonitorElement * ZS_nHF2
MonitorElement * occupancy_vs_ieta_HO
MonitorElement * occupancy_vs_ieta_HE2
MonitorElement * meTEprofileHE_Low
MonitorElement * e_hfl
MonitorElement * RecHit_StatusWord_HO
MonitorElement * meRecHitsEnergyHB
MonitorElement * ZS_seqHO
std::vector< int > ciphi
MonitorElement * occupancy_vs_ieta_HB2
MonitorElement * RMS_seq_HF1
MonitorElement * emean_vs_ieta_HO
MonitorElement * ZS_seqHE3
MonitorElement * sevLvl_HB
MonitorElement * meDeltaPhi
std::vector< double > cz
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
MonitorElement * occupancy_seqHE3
MonitorElement * meNumRecHitsThreshHE
tuple conf
Definition: dbtoconf.py:185
MonitorElement * map_ecal
MonitorElement * map_depth3
MonitorElement * meTimeHE
std::vector< int > cieta
MonitorElement * meEcalHcalEnergyConeHE
MonitorElement * meSumRecHitsEnergyHE
MonitorElement * meTimeHO
MonitorElement * ZS_seqHF1
MonitorElement * emean_vs_ieta_HE1
MonitorElement * meRecHitsEnergyHF
Definition: DetId.h:18
MonitorElement * occupancy_vs_ieta_HB1
MonitorElement * ZS_HF2
MonitorElement * RMS_seq_HB1
HcalRecHitsAnalyzer(edm::ParameterSet const &conf)
MonitorElement * meEnConeEtaProfile
MonitorElement * meTEprofileHE
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::vector< uint32_t > cstwd
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
MonitorElement * map_depth2
const T & get() const
Definition: EventSetup.h:55
MonitorElement * occupancy_map_HE1
MonitorElement * meEcalHcalEnergyConeHB
MonitorElement * emean_seqHE2
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
MonitorElement * meNumRecHitsConeHO
MonitorElement * emean_vs_ieta_HE3
MonitorElement * ZS_nHF1
MonitorElement * ZS_nHE3
MonitorElement * emean_seqHO
MonitorElement * meNumRecHitsConeHB
MonitorElement * meTE_HE1
MonitorElement * RecHit_StatusWord_HF67
MonitorElement * meNumRecHitsThreshHB
MonitorElement * occupancy_vs_ieta_HE3
MonitorElement * RMS_seq_HO
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
MonitorElement * emean_seqHF1
MonitorElement * ZS_seqHE2
MonitorElement * ZS_seqHB1
MonitorElement * meTE_High_HB
MonitorElement * occupancy_map_HB2
MonitorElement * emean_vs_ieta_HE2
MonitorElement * emean_vs_ieta_HF1
std::vector< int > hcalHFSevLvlVec
MonitorElement * RecHit_StatusWord_HB
MonitorElement * map_depth1
MonitorElement * meTEprofileHO_High
MonitorElement * meNumRecHitsThreshHO
MonitorElement * meEnConeEtaProfile_depth4
MonitorElement * meEnConeEtaProfile_depth2
MonitorElement * ZS_HO
MonitorElement * meEnergyHcalVsEcalHE
MonitorElement * meTEprofileHB_Low
edm::EDGetTokenT< EERecHitCollection > tok_EE_
std::vector< double > ctime
std::vector< double > cen
MonitorElement * occupancy_vs_ieta_HF2
MonitorElement * RMS_vs_ieta_HF1
MonitorElement * occupancy_seqHE2
MonitorElement * meNumRecHitsConeHF
MonitorElement * meTimeHB
MonitorElement * ZS_HE3
MonitorElement * meTEprofileHF
MonitorElement * occupancy_map_HE2
MonitorElement * RecHit_Aux_StatusWord_HF
MonitorElement * RecHit_Aux_StatusWord_HE
MonitorElement * e_hfs
uint32_t getValue() const
MonitorElement * meEnConeEtaProfile_depth3
MonitorElement * meEnergyHcalVsEcalHB
MonitorElement * emap_depth2
MonitorElement * RMS_vs_ieta_HO
MonitorElement * RMS_seq_HB2
MonitorElement * emean_seqHB2
MonitorElement * meNumRecHitsConeHE
edm::ESHandle< CaloGeometry > geometry
MonitorElement * ZS_HE2
MonitorElement * RMS_seq_HE1
Definition: Run.h:41
MonitorElement * meSumRecHitsEnergyConeHFL
MonitorElement * meTE_HE
MonitorElement * meNumEcalRecHitsConeHB
MonitorElement * meTE_HB1
MonitorElement * meSumRecHitsEnergyHO
MonitorElement * meSumRecHitsEnergyConeHFS
MonitorElement * meTE_HFS
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF