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