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, 510, -10., 500.);
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, 510 , -10. , 500.);
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, 1010 , -10. , 1000.);
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( hcalChStatus );
663  theHcalChStatus = hcalChStatus.product();
664  // Assignment of severity levels **********************************
665  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
666  c.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
667  theHcalSevLvlComputer = hcalSevLvlComputerHndl.product();
668 
669  // Fill working vectors of HCAL RecHits quantities (all of these are drawn)
670  fillRecHitsTmp(subdet_, ev);
671 
672  // HB
673  if( subdet_ ==5 || subdet_ == 1 ){
674  for(unsigned int iv=0; iv<hcalHBSevLvlVec.size(); iv++){
676  }
677  }
678  // HE
679  if( subdet_ ==5 || subdet_ == 2 ){
680  for(unsigned int iv=0; iv<hcalHESevLvlVec.size(); iv++){
682  }
683  }
684  // HO
685  if( subdet_ ==5 || subdet_ == 3 ){
686  for(unsigned int iv=0; iv<hcalHOSevLvlVec.size(); iv++){
688  }
689  }
690  // HF
691  if( subdet_ ==5 || subdet_ == 4 ){
692  for(unsigned int iv=0; iv<hcalHFSevLvlVec.size(); iv++){
694  }
695  }
696 
697  // std::cout << "*** 3" << std::endl;
698 
699 
700  //===========================================================================
701  // IN ALL other CASES : ieta-iphi maps
702  //===========================================================================
703 
704  // ECAL
705  if(ecalselector_ == "yes" && (subdet_ == 1 || subdet_ == 2 || subdet_ == 5)) {
707 
708 
709  ev.getByToken(tok_EB_, rhitEB);
710 
711  EcalRecHitCollection::const_iterator RecHit = rhitEB.product()->begin();
712  EcalRecHitCollection::const_iterator RecHitEnd = rhitEB.product()->end();
713 
714  for (; RecHit != RecHitEnd ; ++RecHit) {
715  EBDetId EBid = EBDetId(RecHit->id());
716 
717  const CaloCellGeometry* cellGeometry =
718  geometry->getSubdetectorGeometry (EBid)->getGeometry (EBid) ;
719  double eta = cellGeometry->getPosition ().eta () ;
720  double phi = cellGeometry->getPosition ().phi () ;
721  double en = RecHit->energy();
722  eEcal += en;
723  eEcalB += en;
724 
725  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
726 
727  }
728 
729 
731 
732  ev.getByToken(tok_EE_, rhitEE);
733 
734  RecHit = rhitEE.product()->begin();
735  RecHitEnd = rhitEE.product()->end();
736 
737  for (; RecHit != RecHitEnd ; ++RecHit) {
738  EEDetId EEid = EEDetId(RecHit->id());
739 
740  const CaloCellGeometry* cellGeometry =
741  geometry->getSubdetectorGeometry (EEid)->getGeometry (EEid) ;
742  double eta = cellGeometry->getPosition ().eta () ;
743  double phi = cellGeometry->getPosition ().phi () ;
744  double en = RecHit->energy();
745  eEcal += en;
746  eEcalE += en;
747 
748  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
749 
750  }
751  } // end of ECAL selection
752 
753 
754  // std::cout << "*** 4" << std::endl;
755 
756 
757  // Counting, including ZS items
758  // Filling HCAL maps ----------------------------------------------------
759 // double maxE = -99999.;
760 
761  int nhb1 = 0;
762  int nhb2 = 0;
763  int nhe1 = 0;
764  int nhe2 = 0;
765  int nhe3 = 0;
766  int nho = 0;
767  int nhf1 = 0;
768  int nhf2 = 0;
769 
770  for (unsigned int i = 0; i < cen.size(); i++) {
771 
772  int sub = csub[i];
773  int depth = cdepth[i];
774  int ieta = cieta[i];
775  int iphi = ciphi[i];
776  double en = cen[i];
777  // double eta = ceta[i];
778  // double phi = cphi[i];
779  uint32_t stwd = cstwd[i];
780  uint32_t auxstwd = cauxstwd[i];
781  // double z = cz[i];
782 
783  int index = ieta * 72 + iphi; // for sequential histos
784 
785  /*
786  std::cout << "*** point 4-1" << " ieta, iphi, depth, sub = "
787  << ieta << ", " << iphi << ", " << depth << ", " << sub
788  << std::endl;
789  */
790 
791 
792  if( sub == 1 && depth == 1) nhb1++;
793  if( sub == 1 && depth == 2) nhb2++;
794  if( sub == 2 && depth == 1) nhe1++;
795  if( sub == 2 && depth == 2) nhe2++;
796  if( sub == 2 && depth == 3) nhe3++;
797  if( sub == 3 && depth == 4) nho++;
798  if( sub == 4 && depth == 1) nhf1++;
799  if( sub == 4 && depth == 2) nhf2++;
800 
801  if( subdet_ == 6) { // ZS specific
802  if( en < emap_min[ieta+41][iphi][depth-1][sub-1] )
803  emap_min[ieta+41][iphi][depth-1][sub-1] = en;
804  }
805 
806 // double emin = 1.;
807 // if(fabs(eta) > 3.) emin = 5.;
808 
809  /*
810  if(ieta == 27 ) {
811  std::cout << "*** ieta=28, iphi = " << iphi << " det = "
812  << sub << " depth = " << depth << std::endl;
813  }
814  */
815 
816  if( subdet_ != 6) {
817 
818  // std::cout << "*** 4-1" << std::endl;
819  //The emean_vs_ieta histos are drawn as well as the e_maps
820 
821 
822  // to distinguish HE and HF
823  if( depth == 1 || depth == 2 ) {
824  int ieta1 = ieta;
825  if(sub == 4) {
826  if (ieta1 < 0) ieta1--;
827  else ieta1++;
828  }
829  if (depth == 1) emap_depth1->Fill(double(ieta1), double(iphi), en);
830  if (depth == 2) emap_depth2->Fill(double(ieta1), double(iphi), en);
831  }
832 
833  if( depth == 3) emap_depth3->Fill(double(ieta), double(iphi), en);
834  if( depth == 4) emap_depth4->Fill(double(ieta), double(iphi), en);
835 
836  if (depth == 1 && sub == 1 ) {
837  emean_vs_ieta_HB1->Fill(double(ieta), en);
838  occupancy_map_HB1->Fill(double(ieta), double(iphi));
839  if(useAllHistos_){
840  emean_seqHB1->Fill(double(index), en);
841  }
842  }
843  if (depth == 2 && sub == 1) {
844  emean_vs_ieta_HB2->Fill(double(ieta), en);
845  occupancy_map_HB2->Fill(double(ieta), double(iphi));
846  if(useAllHistos_){
847  emean_seqHB2->Fill(double(index), en);
848  }
849  }
850  if (depth == 1 && sub == 2) {
851  emean_vs_ieta_HE1->Fill(double(ieta), en);
852  occupancy_map_HE1->Fill(double(ieta), double(iphi));
853  if(useAllHistos_){
854  emean_seqHE1->Fill(double(index), en);
855  }
856  }
857  if (depth == 2 && sub == 2) {
858  emean_vs_ieta_HE2->Fill(double(ieta), en);
859  occupancy_map_HE2->Fill(double(ieta), double(iphi));
860  if(useAllHistos_){
861  emean_seqHE2->Fill(double(index), en);
862  }
863  }
864  if (depth == 3 && sub == 2) {
865  emean_vs_ieta_HE3->Fill(double(ieta), en);
866  occupancy_map_HE3->Fill(double(ieta), double(iphi));
867  if(useAllHistos_){
868  emean_seqHE3->Fill(double(index), en);
869  }
870  }
871  if (depth == 4 ) {
872  emean_vs_ieta_HO->Fill(double(ieta), en);
873  occupancy_map_HO->Fill(double(ieta), double(iphi));
874  if(useAllHistos_){
875  emean_seqHO->Fill(double(index), en);
876  }
877  }
878  if (depth == 1 && sub == 4) {
879  emean_vs_ieta_HF1->Fill(double(ieta), en);
880  occupancy_map_HF1->Fill(double(ieta), double(iphi));
881  if(useAllHistos_){
882  emean_seqHF1->Fill(double(index), en);
883  }
884  }
885  if (depth == 2 && sub == 4) {
886  emean_vs_ieta_HF2->Fill(double(ieta), en);
887  occupancy_map_HF2->Fill(double(ieta), double(iphi));
888  if(useAllHistos_){
889  emean_seqHF2->Fill(double(index), en);
890  }
891  }
892  }
893 
894 
895 // if( r < partR ) {
896 // if (depth == 1) ehcal_coneMC_1 += en;
897 // if (depth == 2) ehcal_coneMC_2 += en;
898 // if (depth == 3) ehcal_coneMC_3 += en;
899 // if (depth == 4) ehcal_coneMC_4 += en;
900 // }
901 
902  //32-bit status word
903  uint32_t statadd;
904  unsigned int isw67 = 0;
905  for (unsigned int isw = 0; isw < 32; isw++){
906  statadd = 0x1<<(isw);
907  if (stwd & statadd){
908  if (sub == 1) RecHit_StatusWord_HB->Fill(isw);
909  else if (sub == 2) RecHit_StatusWord_HE->Fill(isw);
910  else if (sub == 3) RecHit_StatusWord_HO->Fill(isw);
911  else if (sub == 4){
913  if (isw == 6) isw67 += 1;
914  if (isw == 7) isw67 += 2;
915  }
916  }
917  }
918  if (isw67 != 0 && useAllHistos_) RecHit_StatusWord_HF67->Fill(isw67); //This one is not drawn
919 
920  for (unsigned int isw =0; isw < 32; isw++){
921  statadd = 0x1<<(isw);
922  if( auxstwd & statadd ){
923  if (sub == 1) RecHit_Aux_StatusWord_HB->Fill(isw);
924  else if (sub == 2) RecHit_Aux_StatusWord_HE->Fill(isw);
925  else if (sub == 3) RecHit_Aux_StatusWord_HO->Fill(isw);
926  else if (sub == 4) RecHit_Aux_StatusWord_HF->Fill(isw);
927  }
928 
929  }
930 
931  }
932 
933  // std::cout << "*** 4-2" << std::endl;
934 
935  if( subdet_ == 6 && useAllHistos_) { // ZS plots; not drawn
936  ZS_nHB1->Fill(double(nhb1));
937  ZS_nHB2->Fill(double(nhb2));
938  ZS_nHE1->Fill(double(nhe1));
939  ZS_nHE2->Fill(double(nhe2));
940  ZS_nHE3->Fill(double(nhe3));
941  ZS_nHO ->Fill(double(nho));
942  ZS_nHF1->Fill(double(nhf1));
943  ZS_nHF2->Fill(double(nhf2));
944  }
945  else{
946  Nhb->Fill(double(nhb1 + nhb2));
947  Nhe->Fill(double(nhe1 + nhe2 + nhe3));
948  Nho->Fill(double(nho));
949  Nhf->Fill(double(nhf1 + nhf2));
950 
951  }
952 
953  // std::cout << "*** 5" << std::endl;
954 
955 
956  // NOISE =================================================================
957  //Not drawn
958  if (hcalselector_ == "noise" && useAllHistos_) {
959  for (unsigned int i = 0; i < cen.size(); i++) {
960 
961  int sub = csub[i];
962  int depth = cdepth[i];
963  double en = cen[i];
964 
965  if (sub == 1) e_hb->Fill(en);
966  if (sub == 2) e_he->Fill(en);
967  if (sub == 3) e_ho->Fill(en);
968  if (sub == 4) {
969  if(depth == 1)
970  e_hfl->Fill(en);
971  else
972  e_hfs->Fill(en);
973  }
974  }
975  }
976 
977  //===========================================================================
978  // SUBSYSTEMS,
979  //===========================================================================
980 
981  else if ((subdet_ != 6) && (subdet_ != 0)) {
982 
983  // std::cout << "*** 6" << std::endl;
984 
985 
986  double clusEta = 999.;
987  double clusPhi = 999.;
988  double clusEn = 0.;
989 
990  double HcalCone_d1 = 0.;
991  double HcalCone_d2 = 0.;
992  double HcalCone_d3 = 0.;
993  double HcalCone_d4 = 0.;
994  double HcalCone = 0.;
995 
996  int ietaMax1 = 9999;
997  int ietaMax2 = 9999;
998  int ietaMax3 = 9999;
999  int ietaMax4 = 9999;
1000  int ietaMax = 9999;
1001  // double enMax1 = -9999.;
1002  // double enMax2 = -9999.;
1003  // double enMax3 = -9999.;
1004  // double enMax4 = -9999.;
1005  // double enMax = -9999.;
1006  // double etaMax = 9999.;
1007 
1008  // CYCLE over cells ====================================================
1009 
1010  for (unsigned int i = 0; i < cen.size(); i++) {
1011  int sub = csub[i];
1012  int depth = cdepth[i];
1013  double eta = ceta[i];
1014  double phi = cphi[i];
1015  double en = cen[i];
1016  double t = ctime[i];
1017 // int ieta = cieta[i];
1018 
1019  double rhot = dR(etaHot, phiHot, eta, phi);
1020  if(rhot < partR && en > 1.) {
1021  clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
1022  clusPhi = phi12(clusPhi, clusEn, phi, en);
1023  clusEn += en;
1024  }
1025 
1026  nrechits++;
1027  eHcal += en;
1028  if(en > 1. ) nrechitsThresh++;
1029 
1030  //The energy and overall timing histos are drawn while
1031  //the ones split by depth are not
1032  if(sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
1033  meTimeHB->Fill(t);
1034  meRecHitsEnergyHB->Fill(en);
1035 
1036  meTE_Low_HB->Fill( en, t);
1037  meTE_HB->Fill( en, t);
1038  meTE_High_HB->Fill( en, t);
1039  meTEprofileHB_Low->Fill(en, t);
1040  meTEprofileHB->Fill(en, t);
1041  meTEprofileHB_High->Fill(en, t);
1042 
1043  if (useAllHistos_){
1044  if (depth == 1) meTE_HB1->Fill( en, t);
1045  else if (depth == 2) meTE_HB2->Fill( en, t);
1046  }
1047  }
1048  if(sub == 2 && (subdet_ == 2 || subdet_ == 5)) {
1049  meTimeHE->Fill(t);
1050  meRecHitsEnergyHE->Fill(en);
1051 
1052  meTE_Low_HE->Fill( en, t);
1053  meTE_HE->Fill( en, t);
1054  meTEprofileHE_Low->Fill(en, t);
1055  meTEprofileHE->Fill(en, t);
1056 
1057  if (useAllHistos_){
1058  if (depth == 1) meTE_HE1->Fill( en, t);
1059  else if (depth == 2) meTE_HE2->Fill( en, t);
1060  }
1061  }
1062  if(sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
1063  meTimeHF->Fill(t);
1064  meRecHitsEnergyHF->Fill(en);
1065 
1066  meTE_Low_HF->Fill(en, t);
1067  meTE_HF->Fill(en, t);
1068  meTEprofileHF_Low->Fill(en, t);
1069  meTEprofileHF->Fill(en, t);
1070 
1071  if (useAllHistos_){
1072  if (depth == 1) meTE_HFL->Fill( en, t);
1073  else meTE_HFS->Fill( en, t);
1074  }
1075  }
1076  if(sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
1077  meTimeHO->Fill(t);
1078  meRecHitsEnergyHO->Fill(en);
1079 
1080  meTE_HO->Fill( en, t);
1081  meTE_High_HO->Fill( en, t);
1082  meTEprofileHO->Fill(en, t);
1083  meTEprofileHO_High->Fill(en, t);
1084  }
1085  }
1086 
1087  if(imc != 0) {
1088  //Cone by depth are not drawn, the others are used for pion scan
1089  if (useAllHistos_){
1090  meEnConeEtaProfile_depth1->Fill(double(ietaMax1), HcalCone_d1);
1091  meEnConeEtaProfile_depth2->Fill(double(ietaMax2), HcalCone_d2);
1092  meEnConeEtaProfile_depth3->Fill(double(ietaMax3), HcalCone_d3);
1093  meEnConeEtaProfile_depth4->Fill(double(ietaMax4), HcalCone_d4);
1094  }
1095  meEnConeEtaProfile ->Fill(double(ietaMax), HcalCone); //
1096  meEnConeEtaProfile_E ->Fill(double(ietaMax), eEcalCone);
1097  meEnConeEtaProfile_EH ->Fill(double(ietaMax), HcalCone+eEcalCone);
1098  }
1099 
1100  // std::cout << "*** 7" << std::endl;
1101 
1102 
1103  // Single particle samples ONLY ! ======================================
1104  // Fill up some histos for "integrated" subsustems.
1105  // These are not drawn
1106  if(etype_ == 1 && useAllHistos_) {
1107 
1108  /*
1109  std::cout << "*** point 7-1" << " eta_MC, phi_MC clusEta, clusPhi = "
1110  << eta_MC << ", " << phi_MC << " "
1111  << clusEta << ", " << clusPhi
1112  << std::endl;
1113  */
1114 
1115 // double phidev = dPhiWsign(clusPhi, phi_MC);
1116 // meDeltaPhi->Fill(eta_MC, phidev);
1117 // double etadev = clusEta - eta_MC;
1118 // meDeltaEta->Fill(eta_MC, etadev);
1119 
1120  if(subdet_ == 1) {
1121  meSumRecHitsEnergyHB->Fill(eHcal);
1122  if(imc != 0) meSumRecHitsEnergyConeHB->Fill(eHcalConeHB);
1123  if(imc != 0) meNumRecHitsConeHB->Fill(double(nrechitsCone));
1124  meNumRecHitsThreshHB->Fill(double(nrechitsThresh));
1125  }
1126 
1127  if(subdet_ == 2) {
1128  meSumRecHitsEnergyHE->Fill(eHcal);
1129  if(imc != 0) meSumRecHitsEnergyConeHE->Fill(eHcalConeHE);
1130  if(imc != 0) meNumRecHitsConeHE->Fill(double(nrechitsCone));
1131  meNumRecHitsThreshHE->Fill(double(nrechitsThresh));
1132  }
1133 
1134  if(subdet_ == 3) {
1135  meSumRecHitsEnergyHO->Fill(eHcal);
1136  if(imc != 0) meSumRecHitsEnergyConeHO->Fill(eHcalConeHO);
1137  if(imc != 0) meNumRecHitsConeHO->Fill(double(nrechitsCone));
1138  meNumRecHitsThreshHO->Fill(double(nrechitsThresh));
1139  }
1140 
1141  if(subdet_ == 4) {
1142  if(eHcalConeHF > eps ) {
1143  meSumRecHitsEnergyHF ->Fill(eHcal);
1144  if(imc != 0) {
1145  meSumRecHitsEnergyConeHF ->Fill(eHcalConeHF);
1146  meNumRecHitsConeHF->Fill(double(nrechitsCone));
1147  meSumRecHitsEnergyConeHFL ->Fill(eHcalConeHFL);
1148  meSumRecHitsEnergyConeHFS ->Fill(eHcalConeHFS);
1149  }
1150  }
1151  }
1152 
1153  // std::cout << "*** 8" << std::endl;
1154 
1155 
1156  // Also combine with ECAL if needed
1157  if(subdet_ == 1 && ecalselector_ == "yes") {
1158 
1159  /*
1160  std::cout << "*** point 8-1"
1161  << " eEcalB " << eEcalB << " eHcal " << eHcal
1162  << " eEcalCone " << eEcalCone << " eHcalCone "
1163  << eHcalCone
1164  << " numrechitsEcal " << numrechitsEcal
1165  << std::endl;
1166 
1167  */
1168 
1169  meEcalHcalEnergyHB->Fill(eEcalB+eHcal);
1170  meEcalHcalEnergyConeHB->Fill(eEcalCone+eHcalCone);
1171  meNumEcalRecHitsConeHB->Fill(double(numrechitsEcal));
1172 
1173  }
1174 
1175  if(subdet_ == 2 && ecalselector_ == "yes"){
1176 
1177  /*
1178  std::cout << "*** point 8-2a"
1179  << " eEcalE " << eEcalE << " eHcal " << eHcal
1180  << " eEcalCone " << eEcalCone << " eHcalCone "
1181  << eHcalCone
1182  << " numrechitsEcal " << numrechitsEcal
1183  << std::endl;
1184  */
1185 
1186  meEcalHcalEnergyHE->Fill(eEcalE+eHcal);
1187  if(imc != 0) meEcalHcalEnergyConeHE->Fill(eEcalCone+eHcalCone);
1188  if(imc != 0) meNumEcalRecHitsConeHE->Fill(double(numrechitsEcal));
1189  }
1190 
1191  // Banana plots finally
1192  if(imc != 0) {
1193  if(subdet_ == 1 && ecalselector_ == "yes")
1194  meEnergyHcalVsEcalHB -> Fill(eEcalCone,eHcalCone);
1195  if(subdet_ == 2 && ecalselector_ == "yes")
1196  meEnergyHcalVsEcalHE -> Fill(eEcalCone,eHcalCone);
1197  }
1198  }
1199  }
1200  // std::cout << "*** 9" << std::endl;
1201 
1202  nevtot++;
1203 }
1204 
1205 
1208 
1209  using namespace edm;
1210 
1211 
1212  // initialize data vectors
1213  csub.clear();
1214  cen.clear();
1215  ceta.clear();
1216  cphi.clear();
1217  ctime.clear();
1218  cieta.clear();
1219  ciphi.clear();
1220  cdepth.clear();
1221  cz.clear();
1222  cstwd.clear();
1223  cauxstwd.clear();
1224  hcalHBSevLvlVec.clear();
1225  hcalHESevLvlVec.clear();
1226  hcalHFSevLvlVec.clear();
1227  hcalHOSevLvlVec.clear();
1228 
1229  if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1230 
1231  //HBHE
1233  ev.getByToken(tok_hbhe_, hbhecoll);
1234 
1235  for (HBHERecHitCollection::const_iterator j=hbhecoll->begin(); j != hbhecoll->end(); j++) {
1236  HcalDetId cell(j->id());
1237  const CaloCellGeometry* cellGeometry =
1238  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1239  double eta = cellGeometry->getPosition().eta () ;
1240  double phi = cellGeometry->getPosition().phi () ;
1241  double zc = cellGeometry->getPosition().z ();
1242  int sub = cell.subdet();
1243  int depth = cell.depth();
1244  int inteta = cell.ieta();
1245  if(inteta > 0) inteta -= 1;
1246  int intphi = cell.iphi()-1;
1247  double en = j->energy();
1248  double t = j->time();
1249  int stwd = j->flags();
1250  int auxstwd = j->aux();
1251 
1252  int serivityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1253  if( cell.subdet()==HcalBarrel ){
1254  hcalHBSevLvlVec.push_back(serivityLevel);
1255  }else if (cell.subdet()==HcalEndcap ){
1256  hcalHESevLvlVec.push_back(serivityLevel);
1257  }
1258 
1259  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1260 
1261  csub.push_back(sub);
1262  cen.push_back(en);
1263  ceta.push_back(eta);
1264  cphi.push_back(phi);
1265  ctime.push_back(t);
1266  cieta.push_back(inteta);
1267  ciphi.push_back(intphi);
1268  cdepth.push_back(depth);
1269  cz.push_back(zc);
1270  cstwd.push_back(stwd);
1271  cauxstwd.push_back(auxstwd);
1272  }
1273  }
1274 
1275  }
1276 
1277  if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1278 
1279  //HF
1281  ev.getByToken(tok_hf_, hfcoll);
1282 
1283  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
1284  HcalDetId cell(j->id());
1285  const CaloCellGeometry* cellGeometry =
1286  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1287  double eta = cellGeometry->getPosition().eta () ;
1288  double phi = cellGeometry->getPosition().phi () ;
1289  double zc = cellGeometry->getPosition().z ();
1290  int sub = cell.subdet();
1291  int depth = cell.depth();
1292  int inteta = cell.ieta();
1293  if(inteta > 0) inteta -= 1;
1294  int intphi = cell.iphi()-1;
1295  double en = j->energy();
1296  double t = j->time();
1297  int stwd = j->flags();
1298  int auxstwd = j->aux();
1299 
1300  int serivityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1301  if( cell.subdet()==HcalForward ){
1302  hcalHFSevLvlVec.push_back(serivityLevel);
1303  }
1304 
1305  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1306 
1307  csub.push_back(sub);
1308  cen.push_back(en);
1309  ceta.push_back(eta);
1310  cphi.push_back(phi);
1311  ctime.push_back(t);
1312  cieta.push_back(inteta);
1313  ciphi.push_back(intphi);
1314  cdepth.push_back(depth);
1315  cz.push_back(zc);
1316  cstwd.push_back(stwd);
1317  cauxstwd.push_back(auxstwd);
1318  }
1319  }
1320  }
1321 
1322  //HO
1323  if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1324 
1326  ev.getByToken(tok_ho_, hocoll);
1327 
1328  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
1329  HcalDetId cell(j->id());
1330  const CaloCellGeometry* cellGeometry =
1331  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1332  double eta = cellGeometry->getPosition().eta () ;
1333  double phi = cellGeometry->getPosition().phi () ;
1334  double zc = cellGeometry->getPosition().z ();
1335  int sub = cell.subdet();
1336  int depth = cell.depth();
1337  int inteta = cell.ieta();
1338  if(inteta > 0) inteta -= 1;
1339  int intphi = cell.iphi()-1;
1340  double t = j->time();
1341  double en = j->energy();
1342  int stwd = j->flags();
1343  int auxstwd = j->aux();
1344 
1345  int serivityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1346  if( cell.subdet()==HcalOuter ){
1347  hcalHOSevLvlVec.push_back(serivityLevel);
1348  }
1349 
1350  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1351  csub.push_back(sub);
1352  cen.push_back(en);
1353  ceta.push_back(eta);
1354  cphi.push_back(phi);
1355  ctime.push_back(t);
1356  cieta.push_back(inteta);
1357  ciphi.push_back(intphi);
1358  cdepth.push_back(depth);
1359  cz.push_back(zc);
1360  cstwd.push_back(stwd);
1361  cauxstwd.push_back(auxstwd);
1362  }
1363  }
1364  }
1365 }
1366 
1367 double HcalRecHitsAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
1368  double PI = 3.1415926535898;
1369  double deltaphi= phi1 - phi2;
1370  if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1371  if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1372  double deltaeta = eta2 - eta1;
1373  double tmp = sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1374  return tmp;
1375 }
1376 
1377 double HcalRecHitsAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
1378  // weighted mean value of phi1 and phi2
1379 
1380  double tmp;
1381  double PI = 3.1415926535898;
1382  double a1 = phi1; double a2 = phi2;
1383 
1384  if( a1 > 0.5*PI && a2 < 0.) a2 += 2*PI;
1385  if( a2 > 0.5*PI && a1 < 0.) a1 += 2*PI;
1386  tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1387  if(tmp > PI) tmp -= 2.*PI;
1388 
1389  return tmp;
1390 
1391 }
1392 
1393 double HcalRecHitsAnalyzer::dPhiWsign(double phi1, double phi2) {
1394  // clockwise phi2 w.r.t phi1 means "+" phi distance
1395  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
1396 
1397  double PI = 3.1415926535898;
1398  double a1 = phi1; double a2 = phi2;
1399  double tmp = a2 - a1;
1400  if( a1*a2 < 0.) {
1401  if(a1 > 0.5 * PI) tmp += 2.*PI;
1402  if(a2 > 0.5 * PI) tmp -= 2.*PI;
1403  }
1404  return tmp;
1405 
1406 }
1407 
1409 
1410  const DetId id = hit->detid();
1411 
1412  const uint32_t recHitFlag = hit->flags();
1413  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1414 
1415  int severityLevel = theHcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag);
1416 
1417  return severityLevel;
1418 
1419 }
1420 
1422 
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
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:446
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
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_
T eta() const
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
Definition: DDAxes.h:10
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF