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  //Status word correlations
331  sprintf (histo, "HcalRecHitTask_RecHit_StatusWordCorr_HB");
332  RecHit_StatusWordCorr_HB = ibooker.book2D(histo, histo, 2, -0.5, 1.5, 2, -0.5, 1.5);
333 
334  sprintf (histo, "HcalRecHitTask_RecHit_StatusWordCorr_HE");
335  RecHit_StatusWordCorr_HE = ibooker.book2D(histo, histo, 2, -0.5, 1.5, 2, -0.5, 1.5);
336 
337 
338  //======================= Now various cases one by one ===================
339 
340  //Histograms drawn for single pion scan
341  if(subdet_ != 0 && imc != 0) { // just not for noise
342  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
343  meEnConeEtaProfile = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
344 
345  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
346  meEnConeEtaProfile_E = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
347 
348  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
349  meEnConeEtaProfile_EH = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
350  }
351  //The other cone profile, delta ieta/phi and noise histos are not drawn
352  if (useAllHistos_){
353  if(subdet_ != 0 && imc != 0) { // just not for noise
354 
355  // meEnConeEtaProfiel_depth1->Fill(eta_RecHit, HcalCone_d1);
356 
357  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth1");
358  meEnConeEtaProfile_depth1 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
359 
360  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth2");
361  meEnConeEtaProfile_depth2 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
362 
363  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth3");
364  meEnConeEtaProfile_depth3 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
365 
366  sprintf (histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth4");
367  meEnConeEtaProfile_depth4 = ibooker.bookProfile(histo, histo, 82, -41., 41., 2100, -100., 2000.);
368 
369  }
370 
371  if(etype_ == 1 && subdet_ != 0) { // single part., not for noise
372 
373  sprintf (histo, "Delta_phi_cluster-MC");
374  meDeltaPhi = ibooker.book2D(histo, histo, 520, -5.2, 5.2, 60, -0.6, 0.6);
375 
376  sprintf (histo, "Delta_eta_cluster-MC");
377  meDeltaEta = ibooker.book2D(histo, histo, 520, -5.2, 5.2, 60, -0.6, 0.6);
378 
379  }
380  // NOISE-specific
381 
382  if (hcalselector_ == "noise" ){
383 
384  sprintf (histo, "e_hb" ) ;
385  e_hb = ibooker.book1D(histo, histo,1000, -5., 5.);
386  sprintf (histo, "e_he" ) ;
387  e_he = ibooker.book1D(histo, histo,1000, -5., 5.);
388  sprintf (histo, "e_ho" ) ;
389  e_ho = ibooker.book1D(histo, histo,1000, -5., 5.);
390  sprintf (histo, "e_hfl" ) ;
391  e_hfl = ibooker.book1D(histo, histo,2000, -10., 10.);
392  sprintf (histo, "e_hfs" ) ;
393  e_hfs = ibooker.book1D(histo, histo,2000, -10., 10.);
394  }
395  }
396  // ************** HB **********************************
397  if (subdet_ == 1 || subdet_ == 5 ){
398 
399  //Only severity level, energy of rechits and overall HB timing histos are drawn
400  if (useAllHistos_){
401  if(etype_ == 1 && subdet_ == 1 ) {
402  if(imc != 0) {
403  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HB" ) ;
404  meNumRecHitsConeHB = ibooker.book1D(histo, histo, 100, 0., 100.);
405 
406  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HB" ) ;
407  meSumRecHitsEnergyConeHB = ibooker.book1D(histo,histo, 60 ,-20., 280.);
408  }
409 
410  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HB");
411  meNumRecHitsThreshHB = ibooker.book1D(histo, histo, 30, 0., 30.);
412 
413  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HB" ) ;
414  meSumRecHitsEnergyHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
415 
416  if (ecalselector_ == "yes") {
417  if(imc != 0) {
418  sprintf (histo, "HcalRecHitTask_number_of_ecalrechits_in_cone_HB");
419  meNumEcalRecHitsConeHB = ibooker.book1D(histo, histo, 300, 0., 300.);
420  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HB");
421  meEcalHcalEnergyConeHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
422  }
423 
424  sprintf (histo, "HcalRecHitTask_energy_hcal_vs_ecal_HB");
425  meEnergyHcalVsEcalHB = ibooker.book2D(histo, histo, 300, 0., 150., 300, 0., 150.);
426  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_HB" ) ;
427  meEcalHcalEnergyHB = ibooker.book1D(histo,histo, 60 , -20., 280.);
428  }
429  }
430  }
431 
432  sprintf(histo, "HcalRecHitTask_severityLevel_HB");
433  sevLvl_HB = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
434 
435  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HB" ) ;
436  meRecHitsEnergyHB = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
437 
438  sprintf (histo, "HcalRecHitTask_timing_HB" ) ;
439  meTimeHB = ibooker.book1D(histo, histo, 70, -48., 92.);
440 
441  //High, medium and low histograms to reduce RAM usage
442  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HB" ) ;
443  meTE_Low_HB = ibooker.book2D(histo, histo, 50, -5., 45., 70, -48., 92.);
444 
445  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HB" ) ;
446  meTE_HB = ibooker.book2D(histo, histo, 150, -5., 295., 70, -48., 92.);
447 
448  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HB" ) ;
449  meTE_High_HB = ibooker.book2D(histo, histo, 150, -5., 2995., 70, -48., 92.);
450 
451  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HB" ) ;
452  meTEprofileHB_Low = ibooker.bookProfile(histo, histo, 50, -5., 45., 70, -48., 92.);
453 
454  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HB" ) ;
455  meTEprofileHB = ibooker.bookProfile(histo, histo, 150, -5., 295., 70, -48., 92.);
456 
457  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HB" ) ;
458  meTEprofileHB_High = ibooker.bookProfile(histo, histo, 150, -5., 2995., 70, -48., 92.);
459 
460  }
461 
462  // ********************** HE ************************************
463  if ( subdet_ == 2 || subdet_ == 5 ){
464 
465  //None of these are drawn
466  if (useAllHistos_){
467  if(etype_ == 1 && subdet_ == 2 ) {
468 
469  if(imc != 0) {
470  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HE" ) ;
471  meNumRecHitsConeHE = ibooker.book1D(histo, histo, 100, 0., 100.);
472 
473  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HE" ) ;
474  meSumRecHitsEnergyConeHE = ibooker.book1D(histo,histo, 60 ,-20., 280.);
475  }
476 
477  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HE");
478  meNumRecHitsThreshHE = ibooker.book1D(histo, histo, 30, 0., 30.);
479 
480  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HE" ) ;
481  meSumRecHitsEnergyHE = ibooker.book1D(histo,histo, 60 , -20., 280.);
482 
483  if (ecalselector_ == "yes") {
484  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_HE" ) ;
485  meEcalHcalEnergyHE = ibooker.book1D(histo,histo, 80, -20., 380.);
486 
487  sprintf (histo, "HcalRecHitTask_energy_hcal_vs_ecal_HE");
488  meEnergyHcalVsEcalHE = ibooker.book2D(histo, histo, 300, 0., 150., 300, 0., 150.);
489  if(imc != 0) {
490  sprintf (histo, "HcalRecHitTask_number_of_ecalrechits_in_cone_HE");
491  meNumEcalRecHitsConeHE = ibooker.book1D(histo, histo, 300, 0., 300.);
492  sprintf (histo, "HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HE");
493  meEcalHcalEnergyConeHE = ibooker.book1D(histo,histo, 60,-20., 280.);
494  }
495  }
496  }
497  }
498 
499  //Only severity level, energy of rechits and overall HB timing histos are drawn
500  sprintf(histo, "HcalRecHitTask_severityLevel_HE");
501  sevLvl_HE = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
502 
503  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HE" ) ;
504  meRecHitsEnergyHE = ibooker.book1D(histo, histo, 2010, -10., 2000.);
505 
506  sprintf (histo, "HcalRecHitTask_timing_HE" ) ;
507  meTimeHE = ibooker.book1D(histo, histo, 70, -48., 92.);
508 
509  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HE" ) ;
510  meTE_Low_HE = ibooker.book2D(histo, histo, 80, -5., 75., 70, -48., 92.);
511 
512  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HE" ) ;
513  meTE_HE = ibooker.book2D(histo, histo, 200, -5., 395., 70, -48., 92.);
514 
515  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HE" ) ;
516  meTEprofileHE_Low = ibooker.bookProfile(histo, histo, 80, -5., 75., 70, -48., 92.);
517 
518  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HE" ) ;
519  meTEprofileHE = ibooker.bookProfile(histo, histo, 200, -5., 395., 70, -48., 92.);
520 
521  }
522 
523  // ************** HO ****************************************
524  if ( subdet_ == 3 || subdet_ == 5 ){
525 
526  //Only severity level, energy of rechits and overall HB timing histos are drawn
527  if (useAllHistos_){
528  if(etype_ == 1 && subdet_ == 3) {
529  if (imc != 0) {
530  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HO" ) ;
531  meNumRecHitsConeHO = ibooker.book1D(histo, histo, 100, 0 , 100.);
532 
533  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HO" ) ;
534  meSumRecHitsEnergyConeHO = ibooker.book1D(histo,histo, 80 ,-20., 380.);
535  }
536 
537  sprintf (histo, "HcalRecHitTask_number_of_rechits_above_1GeV_HO");
538  meNumRecHitsThreshHO = ibooker.book1D(histo, histo, 100, 0., 100.);
539 
540  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HO" ) ;
541  meSumRecHitsEnergyHO = ibooker.book1D(histo,histo, 80 , -20., 380.);
542  }
543  }
544 
545  sprintf(histo, "HcalRecHitTask_severityLevel_HO");
546  sevLvl_HO = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
547 
548  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HO" ) ;
549  meRecHitsEnergyHO = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
550 
551  sprintf (histo, "HcalRecHitTask_timing_HO" ) ;
552  meTimeHO = ibooker.book1D(histo, histo, 70, -48., 92.);
553 
554  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HO" ) ;
555  meTE_HO= ibooker.book2D(histo, histo, 60, -5., 55., 70, -48., 92.);
556 
557  sprintf (histo, "HcalRecHitTask_timing_vs_energy_High_HO" ) ;
558  meTE_High_HO= ibooker.book2D(histo, histo, 100, -5., 995., 70, -48., 92.);
559 
560  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HO" ) ;
561  meTEprofileHO = ibooker.bookProfile(histo, histo, 60, -5., 55., 70, -48., 92.);
562 
563  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_High_HO" ) ;
564  meTEprofileHO_High = ibooker.bookProfile(histo, histo, 100, -5., 995., 70, -48., 92.);
565 
566  }
567 
568  // ********************** HF ************************************
569  if ( subdet_ == 4 || subdet_ == 5 ){
570 
571  //Only severity level, energy of rechits and overall HB timing histos are drawn
572  if (useAllHistos_){
573  if(etype_ == 1 && subdet_ == 4) {
574 
575  if(imc != 0) {
576  sprintf (histo, "HcalRecHitTask_number_of_rechits_in_cone_HF" ) ;
577  meNumRecHitsConeHF = ibooker.book1D(histo, histo, 30, 0 , 30.);
578 
579  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HF" ) ;
580  meSumRecHitsEnergyConeHF = ibooker.book1D(histo,histo,100, -20., 180.);
581 
582  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HFL" );
583  meSumRecHitsEnergyConeHFL = ibooker.book1D(histo,histo,100,-20., 180.);
584 
585  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_in_cone_HFS");
586  meSumRecHitsEnergyConeHFS = ibooker.book1D(histo,histo,100,-20., 180.);
587  }
588  sprintf (histo, "HcalRecHitTask_sum_of_rechits_energy_HF" ) ;
589  meSumRecHitsEnergyHF = ibooker.book1D(histo,histo, 80 , -20., 380.);
590  }
591  }
592 
593  sprintf(histo, "HcalRecHitTask_severityLevel_HF");
594  sevLvl_HF = ibooker.book1D(histo, histo, 25, -0.5, 24.5);
595 
596  sprintf (histo, "HcalRecHitTask_energy_of_rechits_HF" ) ;
597  meRecHitsEnergyHF = ibooker.book1D(histo, histo, 2010 , -10. , 2000.);
598 
599  sprintf (histo, "HcalRecHitTask_timing_HF" ) ;
600  meTimeHF = ibooker.book1D(histo, histo, 70, -48., 92.);
601 
602  sprintf (histo, "HcalRecHitTask_timing_vs_energy_Low_HF" ) ;
603  meTE_Low_HF = ibooker.book2D(histo, histo, 100, -5., 195., 70, -48., 92.);
604 
605  sprintf (histo, "HcalRecHitTask_timing_vs_energy_HF" ) ;
606  meTE_HF = ibooker.book2D(histo, histo, 200, -5., 995., 70, -48., 92.);
607 
608  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HF" ) ;
609  meTEprofileHF_Low = ibooker.bookProfile(histo, histo, 100, -5., 195., 70, -48., 92.);
610 
611  sprintf (histo, "HcalRecHitTask_timing_vs_energy_profile_HF" ) ;
612  meTEprofileHF = ibooker.bookProfile(histo, histo, 200, -5., 995., 70, -48., 92.);
613 
614  }
615 // } //end-of if(_dbe)
616 
617 }
618 
619 
621 
622  using namespace edm;
623 
624  // cuts for each subdet_ector mimiking "Scheme B"
625  // double cutHB = 0.9, cutHE = 1.4, cutHO = 1.1, cutHFL = 1.2, cutHFS = 1.8;
626 
627  // energy in HCAL
628  double eHcal = 0.;
629  double eHcalCone = 0.;
630  double eHcalConeHB = 0.;
631  double eHcalConeHE = 0.;
632  double eHcalConeHO = 0.;
633  double eHcalConeHF = 0.;
634  double eHcalConeHFL = 0.;
635  double eHcalConeHFS = 0.;
636  // Total numbet of RecHits in HCAL, in the cone, above 1 GeV theshold
637  int nrechits = 0;
638  int nrechitsCone = 0;
639  int nrechitsThresh = 0;
640 
641  // energy in ECAL
642  double eEcal = 0.;
643  double eEcalB = 0.;
644  double eEcalE = 0.;
645  double eEcalCone = 0.;
646  int numrechitsEcal = 0;
647 
648  // HCAL energy around MC eta-phi at all depths;
649  double partR = 0.3;
650 // double ehcal_coneMC_1 = 0.;
651 // double ehcal_coneMC_2 = 0.;
652 // double ehcal_coneMC_3 = 0.;
653 // double ehcal_coneMC_4 = 0.;
654 
655  // Cone size for serach of the hottest HCAL cell around MC
656 // double searchR = 1.0;
657  double eps = 0.001;
658 
659  // Single particle samples: actual eta-phi position of cluster around
660  // hottest cell
661  double etaHot = 99999.;
662  double phiHot = 99999.;
663 
664  // std::cout << "*** 2" << std::endl;
665  // previously was: c.get<IdealGeometryRecord>().get (geometry);
666  c.get<CaloGeometryRecord>().get (geometry);
667 
668  // HCAL channel status map ****************************************
670  c.get<HcalChannelQualityRcd>().get( "withTopo", hcalChStatus );
671  theHcalChStatus = hcalChStatus.product();
672 
673  // Assignment of severity levels **********************************
674  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
675  c.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
676  theHcalSevLvlComputer = hcalSevLvlComputerHndl.product();
677 
678  // Fill working vectors of HCAL RecHits quantities (all of these are drawn)
679  fillRecHitsTmp(subdet_, ev);
680 
681  // HB
682  if( subdet_ ==5 || subdet_ == 1 ){
683  for(unsigned int iv=0; iv<hcalHBSevLvlVec.size(); iv++){
685  }
686  }
687  // HE
688  if( subdet_ ==5 || subdet_ == 2 ){
689  for(unsigned int iv=0; iv<hcalHESevLvlVec.size(); iv++){
691  }
692  }
693  // HO
694  if( subdet_ ==5 || subdet_ == 3 ){
695  for(unsigned int iv=0; iv<hcalHOSevLvlVec.size(); iv++){
697  }
698  }
699  // HF
700  if( subdet_ ==5 || subdet_ == 4 ){
701  for(unsigned int iv=0; iv<hcalHFSevLvlVec.size(); iv++){
703  }
704  }
705 
706  // std::cout << "*** 3" << std::endl;
707 
708 
709  //===========================================================================
710  // IN ALL other CASES : ieta-iphi maps
711  //===========================================================================
712 
713  // ECAL
714  if(ecalselector_ == "yes" && (subdet_ == 1 || subdet_ == 2 || subdet_ == 5)) {
716 
717 
718  ev.getByToken(tok_EB_, rhitEB);
719 
720  EcalRecHitCollection::const_iterator RecHit = rhitEB.product()->begin();
721  EcalRecHitCollection::const_iterator RecHitEnd = rhitEB.product()->end();
722 
723  for (; RecHit != RecHitEnd ; ++RecHit) {
724  EBDetId EBid = EBDetId(RecHit->id());
725 
726  const CaloCellGeometry* cellGeometry =
727  geometry->getSubdetectorGeometry (EBid)->getGeometry (EBid) ;
728  double eta = cellGeometry->getPosition ().eta () ;
729  double phi = cellGeometry->getPosition ().phi () ;
730  double en = RecHit->energy();
731  eEcal += en;
732  eEcalB += en;
733 
734  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
735 
736  }
737 
738 
740 
741  ev.getByToken(tok_EE_, rhitEE);
742 
743  RecHit = rhitEE.product()->begin();
744  RecHitEnd = rhitEE.product()->end();
745 
746  for (; RecHit != RecHitEnd ; ++RecHit) {
747  EEDetId EEid = EEDetId(RecHit->id());
748 
749  const CaloCellGeometry* cellGeometry =
750  geometry->getSubdetectorGeometry (EEid)->getGeometry (EEid) ;
751  double eta = cellGeometry->getPosition ().eta () ;
752  double phi = cellGeometry->getPosition ().phi () ;
753  double en = RecHit->energy();
754  eEcal += en;
755  eEcalE += en;
756 
757  if (useAllHistos_) map_ecal->Fill(eta, phi, en);
758 
759  }
760  } // end of ECAL selection
761 
762 
763  // std::cout << "*** 4" << std::endl;
764 
765 
766  // Counting, including ZS items
767  // Filling HCAL maps ----------------------------------------------------
768 // double maxE = -99999.;
769 
770  int nhb1 = 0;
771  int nhb2 = 0;
772  int nhe1 = 0;
773  int nhe2 = 0;
774  int nhe3 = 0;
775  int nho = 0;
776  int nhf1 = 0;
777  int nhf2 = 0;
778 
779  for (unsigned int i = 0; i < cen.size(); i++) {
780 
781  int sub = csub[i];
782  int depth = cdepth[i];
783  int ieta = cieta[i];
784  int iphi = ciphi[i];
785  double en = cen[i];
786  // double eta = ceta[i];
787  // double phi = cphi[i];
788  uint32_t stwd = cstwd[i];
789  uint32_t auxstwd = cauxstwd[i];
790  // double z = cz[i];
791 
792  int index = ieta * 72 + iphi; // for sequential histos
793 
794  /*
795  std::cout << "*** point 4-1" << " ieta, iphi, depth, sub = "
796  << ieta << ", " << iphi << ", " << depth << ", " << sub
797  << std::endl;
798  */
799 
800 
801  if( sub == 1 && depth == 1) nhb1++;
802  if( sub == 1 && depth == 2) nhb2++;
803  if( sub == 2 && depth == 1) nhe1++;
804  if( sub == 2 && depth == 2) nhe2++;
805  if( sub == 2 && depth == 3) nhe3++;
806  if( sub == 3 && depth == 4) nho++;
807  if( sub == 4 && depth == 1) nhf1++;
808  if( sub == 4 && depth == 2) nhf2++;
809 
810  if( subdet_ == 6) { // ZS specific
811  if( en < emap_min[ieta+41][iphi][depth-1][sub-1] )
812  emap_min[ieta+41][iphi][depth-1][sub-1] = en;
813  }
814 
815 // double emin = 1.;
816 // if(fabs(eta) > 3.) emin = 5.;
817 
818  /*
819  if(ieta == 27 ) {
820  std::cout << "*** ieta=28, iphi = " << iphi << " det = "
821  << sub << " depth = " << depth << std::endl;
822  }
823  */
824 
825  if( subdet_ != 6) {
826 
827  // std::cout << "*** 4-1" << std::endl;
828  //The emean_vs_ieta histos are drawn as well as the e_maps
829 
830 
831  // to distinguish HE and HF
832  if( depth == 1 || depth == 2 ) {
833  int ieta1 = ieta;
834  if(sub == 4) {
835  if (ieta1 < 0) ieta1--;
836  else ieta1++;
837  }
838  if (depth == 1) emap_depth1->Fill(double(ieta1), double(iphi), en);
839  if (depth == 2) emap_depth2->Fill(double(ieta1), double(iphi), en);
840  }
841 
842  if( depth == 3) emap_depth3->Fill(double(ieta), double(iphi), en);
843  if( depth == 4) emap_depth4->Fill(double(ieta), double(iphi), en);
844 
845  if (depth == 1 && sub == 1 ) {
846  emean_vs_ieta_HB1->Fill(double(ieta), en);
847  occupancy_map_HB1->Fill(double(ieta), double(iphi));
848  if(useAllHistos_){
849  emean_seqHB1->Fill(double(index), en);
850  }
851  }
852  if (depth == 2 && sub == 1) {
853  emean_vs_ieta_HB2->Fill(double(ieta), en);
854  occupancy_map_HB2->Fill(double(ieta), double(iphi));
855  if(useAllHistos_){
856  emean_seqHB2->Fill(double(index), en);
857  }
858  }
859  if (depth == 1 && sub == 2) {
860  emean_vs_ieta_HE1->Fill(double(ieta), en);
861  occupancy_map_HE1->Fill(double(ieta), double(iphi));
862  if(useAllHistos_){
863  emean_seqHE1->Fill(double(index), en);
864  }
865  }
866  if (depth == 2 && sub == 2) {
867  emean_vs_ieta_HE2->Fill(double(ieta), en);
868  occupancy_map_HE2->Fill(double(ieta), double(iphi));
869  if(useAllHistos_){
870  emean_seqHE2->Fill(double(index), en);
871  }
872  }
873  if (depth == 3 && sub == 2) {
874  emean_vs_ieta_HE3->Fill(double(ieta), en);
875  occupancy_map_HE3->Fill(double(ieta), double(iphi));
876  if(useAllHistos_){
877  emean_seqHE3->Fill(double(index), en);
878  }
879  }
880  if (depth == 4 ) {
881  emean_vs_ieta_HO->Fill(double(ieta), en);
882  occupancy_map_HO->Fill(double(ieta), double(iphi));
883  if(useAllHistos_){
884  emean_seqHO->Fill(double(index), en);
885  }
886  }
887  if (depth == 1 && sub == 4) {
888  emean_vs_ieta_HF1->Fill(double(ieta), en);
889  occupancy_map_HF1->Fill(double(ieta), double(iphi));
890  if(useAllHistos_){
891  emean_seqHF1->Fill(double(index), en);
892  }
893  }
894  if (depth == 2 && sub == 4) {
895  emean_vs_ieta_HF2->Fill(double(ieta), en);
896  occupancy_map_HF2->Fill(double(ieta), double(iphi));
897  if(useAllHistos_){
898  emean_seqHF2->Fill(double(index), en);
899  }
900  }
901  }
902 
903 
904 // if( r < partR ) {
905 // if (depth == 1) ehcal_coneMC_1 += en;
906 // if (depth == 2) ehcal_coneMC_2 += en;
907 // if (depth == 3) ehcal_coneMC_3 += en;
908 // if (depth == 4) ehcal_coneMC_4 += en;
909 // }
910 
911  //32-bit status word
912  uint32_t statadd;
913  unsigned int isw67 = 0;
914 
915  //Statusword correlation
916  unsigned int sw27 = 27;
917  unsigned int sw13 = 13;
918 
919  uint32_t statadd27 = 0x1<<sw27;
920  uint32_t statadd13 = 0x1<<sw13;
921 
922  float status27 = 0;
923  float status13 = 0;
924 
925  if(stwd & statadd27) status27 = 1;
926  if(stwd & statadd13) status13 = 1;
927 
928  if (sub == 1){
929  RecHit_StatusWordCorr_HB->Fill(status13, status27);
930  } else if (sub == 2){
931  RecHit_StatusWordCorr_HE->Fill(status13, status27);
932  }
933 
934 
935  for (unsigned int isw = 0; isw < 32; isw++){
936  statadd = 0x1<<(isw);
937  if (stwd & statadd){
938  if (sub == 1) RecHit_StatusWord_HB->Fill(isw);
939  else if (sub == 2) RecHit_StatusWord_HE->Fill(isw);
940  else if (sub == 3) RecHit_StatusWord_HO->Fill(isw);
941  else if (sub == 4){
943  if (isw == 6) isw67 += 1;
944  if (isw == 7) isw67 += 2;
945  }
946  }
947  }
948  if (isw67 != 0 && useAllHistos_) RecHit_StatusWord_HF67->Fill(isw67); //This one is not drawn
949 
950  for (unsigned int isw =0; isw < 32; isw++){
951  statadd = 0x1<<(isw);
952  if( auxstwd & statadd ){
953  if (sub == 1) RecHit_Aux_StatusWord_HB->Fill(isw);
954  else if (sub == 2) RecHit_Aux_StatusWord_HE->Fill(isw);
955  else if (sub == 3) RecHit_Aux_StatusWord_HO->Fill(isw);
956  else if (sub == 4) RecHit_Aux_StatusWord_HF->Fill(isw);
957  }
958 
959  }
960 
961  }
962 
963  // std::cout << "*** 4-2" << std::endl;
964 
965  if( subdet_ == 6 && useAllHistos_) { // ZS plots; not drawn
966  ZS_nHB1->Fill(double(nhb1));
967  ZS_nHB2->Fill(double(nhb2));
968  ZS_nHE1->Fill(double(nhe1));
969  ZS_nHE2->Fill(double(nhe2));
970  ZS_nHE3->Fill(double(nhe3));
971  ZS_nHO ->Fill(double(nho));
972  ZS_nHF1->Fill(double(nhf1));
973  ZS_nHF2->Fill(double(nhf2));
974  }
975  else{
976  Nhb->Fill(double(nhb1 + nhb2));
977  Nhe->Fill(double(nhe1 + nhe2 + nhe3));
978  Nho->Fill(double(nho));
979  Nhf->Fill(double(nhf1 + nhf2));
980 
981  }
982 
983  // std::cout << "*** 5" << std::endl;
984 
985 
986  // NOISE =================================================================
987  //Not drawn
988  if (hcalselector_ == "noise" && useAllHistos_) {
989  for (unsigned int i = 0; i < cen.size(); i++) {
990 
991  int sub = csub[i];
992  int depth = cdepth[i];
993  double en = cen[i];
994 
995  if (sub == 1) e_hb->Fill(en);
996  if (sub == 2) e_he->Fill(en);
997  if (sub == 3) e_ho->Fill(en);
998  if (sub == 4) {
999  if(depth == 1)
1000  e_hfl->Fill(en);
1001  else
1002  e_hfs->Fill(en);
1003  }
1004  }
1005  }
1006 
1007  //===========================================================================
1008  // SUBSYSTEMS,
1009  //===========================================================================
1010 
1011  else if ((subdet_ != 6) && (subdet_ != 0)) {
1012 
1013  // std::cout << "*** 6" << std::endl;
1014 
1015 
1016  double clusEta = 999.;
1017  double clusPhi = 999.;
1018  double clusEn = 0.;
1019 
1020  double HcalCone_d1 = 0.;
1021  double HcalCone_d2 = 0.;
1022  double HcalCone_d3 = 0.;
1023  double HcalCone_d4 = 0.;
1024  double HcalCone = 0.;
1025 
1026  int ietaMax1 = 9999;
1027  int ietaMax2 = 9999;
1028  int ietaMax3 = 9999;
1029  int ietaMax4 = 9999;
1030  int ietaMax = 9999;
1031  // double enMax1 = -9999.;
1032  // double enMax2 = -9999.;
1033  // double enMax3 = -9999.;
1034  // double enMax4 = -9999.;
1035  // double enMax = -9999.;
1036  // double etaMax = 9999.;
1037 
1038  // CYCLE over cells ====================================================
1039 
1040  for (unsigned int i = 0; i < cen.size(); i++) {
1041  int sub = csub[i];
1042  int depth = cdepth[i];
1043  double eta = ceta[i];
1044  double phi = cphi[i];
1045  double en = cen[i];
1046  double t = ctime[i];
1047 // int ieta = cieta[i];
1048 
1049  double rhot = dR(etaHot, phiHot, eta, phi);
1050  if(rhot < partR && en > 1.) {
1051  clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
1052  clusPhi = phi12(clusPhi, clusEn, phi, en);
1053  clusEn += en;
1054  }
1055 
1056  nrechits++;
1057  eHcal += en;
1058  if(en > 1. ) nrechitsThresh++;
1059 
1060  //The energy and overall timing histos are drawn while
1061  //the ones split by depth are not
1062  if(sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
1063  meTimeHB->Fill(t);
1064  meRecHitsEnergyHB->Fill(en);
1065 
1066  meTE_Low_HB->Fill( en, t);
1067  meTE_HB->Fill( en, t);
1068  meTE_High_HB->Fill( en, t);
1069  meTEprofileHB_Low->Fill(en, t);
1070  meTEprofileHB->Fill(en, t);
1071  meTEprofileHB_High->Fill(en, t);
1072 
1073  if (useAllHistos_){
1074  if (depth == 1) meTE_HB1->Fill( en, t);
1075  else if (depth == 2) meTE_HB2->Fill( en, t);
1076  }
1077  }
1078  if(sub == 2 && (subdet_ == 2 || subdet_ == 5)) {
1079  meTimeHE->Fill(t);
1080  meRecHitsEnergyHE->Fill(en);
1081 
1082  meTE_Low_HE->Fill( en, t);
1083  meTE_HE->Fill( en, t);
1084  meTEprofileHE_Low->Fill(en, t);
1085  meTEprofileHE->Fill(en, t);
1086 
1087  if (useAllHistos_){
1088  if (depth == 1) meTE_HE1->Fill( en, t);
1089  else if (depth == 2) meTE_HE2->Fill( en, t);
1090  }
1091  }
1092  if(sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
1093  meTimeHF->Fill(t);
1094  meRecHitsEnergyHF->Fill(en);
1095 
1096  meTE_Low_HF->Fill(en, t);
1097  meTE_HF->Fill(en, t);
1098  meTEprofileHF_Low->Fill(en, t);
1099  meTEprofileHF->Fill(en, t);
1100 
1101  if (useAllHistos_){
1102  if (depth == 1) meTE_HFL->Fill( en, t);
1103  else meTE_HFS->Fill( en, t);
1104  }
1105  }
1106  if(sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
1107  meTimeHO->Fill(t);
1108  meRecHitsEnergyHO->Fill(en);
1109 
1110  meTE_HO->Fill( en, t);
1111  meTE_High_HO->Fill( en, t);
1112  meTEprofileHO->Fill(en, t);
1113  meTEprofileHO_High->Fill(en, t);
1114  }
1115  }
1116 
1117  if(imc != 0) {
1118  //Cone by depth are not drawn, the others are used for pion scan
1119  if (useAllHistos_){
1120  meEnConeEtaProfile_depth1->Fill(double(ietaMax1), HcalCone_d1);
1121  meEnConeEtaProfile_depth2->Fill(double(ietaMax2), HcalCone_d2);
1122  meEnConeEtaProfile_depth3->Fill(double(ietaMax3), HcalCone_d3);
1123  meEnConeEtaProfile_depth4->Fill(double(ietaMax4), HcalCone_d4);
1124  }
1125  meEnConeEtaProfile ->Fill(double(ietaMax), HcalCone); //
1126  meEnConeEtaProfile_E ->Fill(double(ietaMax), eEcalCone);
1127  meEnConeEtaProfile_EH ->Fill(double(ietaMax), HcalCone+eEcalCone);
1128  }
1129 
1130  // std::cout << "*** 7" << std::endl;
1131 
1132 
1133  // Single particle samples ONLY ! ======================================
1134  // Fill up some histos for "integrated" subsustems.
1135  // These are not drawn
1136  if(etype_ == 1 && useAllHistos_) {
1137 
1138  /*
1139  std::cout << "*** point 7-1" << " eta_MC, phi_MC clusEta, clusPhi = "
1140  << eta_MC << ", " << phi_MC << " "
1141  << clusEta << ", " << clusPhi
1142  << std::endl;
1143  */
1144 
1145 // double phidev = dPhiWsign(clusPhi, phi_MC);
1146 // meDeltaPhi->Fill(eta_MC, phidev);
1147 // double etadev = clusEta - eta_MC;
1148 // meDeltaEta->Fill(eta_MC, etadev);
1149 
1150  if(subdet_ == 1) {
1151  meSumRecHitsEnergyHB->Fill(eHcal);
1152  if(imc != 0) meSumRecHitsEnergyConeHB->Fill(eHcalConeHB);
1153  if(imc != 0) meNumRecHitsConeHB->Fill(double(nrechitsCone));
1154  meNumRecHitsThreshHB->Fill(double(nrechitsThresh));
1155  }
1156 
1157  if(subdet_ == 2) {
1158  meSumRecHitsEnergyHE->Fill(eHcal);
1159  if(imc != 0) meSumRecHitsEnergyConeHE->Fill(eHcalConeHE);
1160  if(imc != 0) meNumRecHitsConeHE->Fill(double(nrechitsCone));
1161  meNumRecHitsThreshHE->Fill(double(nrechitsThresh));
1162  }
1163 
1164  if(subdet_ == 3) {
1165  meSumRecHitsEnergyHO->Fill(eHcal);
1166  if(imc != 0) meSumRecHitsEnergyConeHO->Fill(eHcalConeHO);
1167  if(imc != 0) meNumRecHitsConeHO->Fill(double(nrechitsCone));
1168  meNumRecHitsThreshHO->Fill(double(nrechitsThresh));
1169  }
1170 
1171  if(subdet_ == 4) {
1172  if(eHcalConeHF > eps ) {
1173  meSumRecHitsEnergyHF ->Fill(eHcal);
1174  if(imc != 0) {
1175  meSumRecHitsEnergyConeHF ->Fill(eHcalConeHF);
1176  meNumRecHitsConeHF->Fill(double(nrechitsCone));
1177  meSumRecHitsEnergyConeHFL ->Fill(eHcalConeHFL);
1178  meSumRecHitsEnergyConeHFS ->Fill(eHcalConeHFS);
1179  }
1180  }
1181  }
1182 
1183  // std::cout << "*** 8" << std::endl;
1184 
1185 
1186  // Also combine with ECAL if needed
1187  if(subdet_ == 1 && ecalselector_ == "yes") {
1188 
1189  /*
1190  std::cout << "*** point 8-1"
1191  << " eEcalB " << eEcalB << " eHcal " << eHcal
1192  << " eEcalCone " << eEcalCone << " eHcalCone "
1193  << eHcalCone
1194  << " numrechitsEcal " << numrechitsEcal
1195  << std::endl;
1196 
1197  */
1198 
1199  meEcalHcalEnergyHB->Fill(eEcalB+eHcal);
1200  meEcalHcalEnergyConeHB->Fill(eEcalCone+eHcalCone);
1201  meNumEcalRecHitsConeHB->Fill(double(numrechitsEcal));
1202 
1203  }
1204 
1205  if(subdet_ == 2 && ecalselector_ == "yes"){
1206 
1207  /*
1208  std::cout << "*** point 8-2a"
1209  << " eEcalE " << eEcalE << " eHcal " << eHcal
1210  << " eEcalCone " << eEcalCone << " eHcalCone "
1211  << eHcalCone
1212  << " numrechitsEcal " << numrechitsEcal
1213  << std::endl;
1214  */
1215 
1216  meEcalHcalEnergyHE->Fill(eEcalE+eHcal);
1217  if(imc != 0) meEcalHcalEnergyConeHE->Fill(eEcalCone+eHcalCone);
1218  if(imc != 0) meNumEcalRecHitsConeHE->Fill(double(numrechitsEcal));
1219  }
1220 
1221  // Banana plots finally
1222  if(imc != 0) {
1223  if(subdet_ == 1 && ecalselector_ == "yes")
1224  meEnergyHcalVsEcalHB -> Fill(eEcalCone,eHcalCone);
1225  if(subdet_ == 2 && ecalselector_ == "yes")
1226  meEnergyHcalVsEcalHE -> Fill(eEcalCone,eHcalCone);
1227  }
1228  }
1229  }
1230  // std::cout << "*** 9" << std::endl;
1231 
1232  nevtot++;
1233 }
1234 
1235 
1238 
1239  using namespace edm;
1240 
1241 
1242  // initialize data vectors
1243  csub.clear();
1244  cen.clear();
1245  ceta.clear();
1246  cphi.clear();
1247  ctime.clear();
1248  cieta.clear();
1249  ciphi.clear();
1250  cdepth.clear();
1251  cz.clear();
1252  cstwd.clear();
1253  cauxstwd.clear();
1254  hcalHBSevLvlVec.clear();
1255  hcalHESevLvlVec.clear();
1256  hcalHFSevLvlVec.clear();
1257  hcalHOSevLvlVec.clear();
1258 
1259  if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1260 
1261  //HBHE
1263  ev.getByToken(tok_hbhe_, hbhecoll);
1264 
1265  for (HBHERecHitCollection::const_iterator j=hbhecoll->begin(); j != hbhecoll->end(); j++) {
1266  HcalDetId cell(j->id());
1267  const CaloCellGeometry* cellGeometry =
1268  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1269  double eta = cellGeometry->getPosition().eta () ;
1270  double phi = cellGeometry->getPosition().phi () ;
1271  double zc = cellGeometry->getPosition().z ();
1272  int sub = cell.subdet();
1273  int depth = cell.depth();
1274  int inteta = cell.ieta();
1275  if(inteta > 0) inteta -= 1;
1276  int intphi = cell.iphi()-1;
1277  double en = j->energy();
1278  double t = j->time();
1279  int stwd = j->flags();
1280  int auxstwd = j->aux();
1281 
1282  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1283  if( cell.subdet()==HcalBarrel ){
1284  hcalHBSevLvlVec.push_back(severityLevel);
1285  }else if (cell.subdet()==HcalEndcap ){
1286  hcalHESevLvlVec.push_back(severityLevel);
1287  }
1288 
1289  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1290 
1291  csub.push_back(sub);
1292  cen.push_back(en);
1293  ceta.push_back(eta);
1294  cphi.push_back(phi);
1295  ctime.push_back(t);
1296  cieta.push_back(inteta);
1297  ciphi.push_back(intphi);
1298  cdepth.push_back(depth);
1299  cz.push_back(zc);
1300  cstwd.push_back(stwd);
1301  cauxstwd.push_back(auxstwd);
1302  }
1303  }
1304 
1305  }
1306 
1307  if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1308 
1309  //HF
1311  ev.getByToken(tok_hf_, hfcoll);
1312 
1313  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
1314  HcalDetId cell(j->id());
1315  const CaloCellGeometry* cellGeometry =
1316  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1317  double eta = cellGeometry->getPosition().eta () ;
1318  double phi = cellGeometry->getPosition().phi () ;
1319  double zc = cellGeometry->getPosition().z ();
1320  int sub = cell.subdet();
1321  int depth = cell.depth();
1322  int inteta = cell.ieta();
1323  if(inteta > 0) inteta -= 1;
1324  int intphi = cell.iphi()-1;
1325  double en = j->energy();
1326  double t = j->time();
1327  int stwd = j->flags();
1328  int auxstwd = j->aux();
1329 
1330  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1331  if( cell.subdet()==HcalForward ){
1332  hcalHFSevLvlVec.push_back(severityLevel);
1333  }
1334 
1335  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1336 
1337  csub.push_back(sub);
1338  cen.push_back(en);
1339  ceta.push_back(eta);
1340  cphi.push_back(phi);
1341  ctime.push_back(t);
1342  cieta.push_back(inteta);
1343  ciphi.push_back(intphi);
1344  cdepth.push_back(depth);
1345  cz.push_back(zc);
1346  cstwd.push_back(stwd);
1347  cauxstwd.push_back(auxstwd);
1348  }
1349  }
1350  }
1351 
1352  //HO
1353  if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1354 
1356  ev.getByToken(tok_ho_, hocoll);
1357 
1358  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
1359  HcalDetId cell(j->id());
1360  const CaloCellGeometry* cellGeometry =
1361  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1362  double eta = cellGeometry->getPosition().eta () ;
1363  double phi = cellGeometry->getPosition().phi () ;
1364  double zc = cellGeometry->getPosition().z ();
1365  int sub = cell.subdet();
1366  int depth = cell.depth();
1367  int inteta = cell.ieta();
1368  if(inteta > 0) inteta -= 1;
1369  int intphi = cell.iphi()-1;
1370  double t = j->time();
1371  double en = j->energy();
1372  int stwd = j->flags();
1373  int auxstwd = j->aux();
1374 
1375  int severityLevel = hcalSevLvl( (CaloRecHit*) &*j );
1376  if( cell.subdet()==HcalOuter ){
1377  hcalHOSevLvlVec.push_back(severityLevel);
1378  }
1379 
1380  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
1381  csub.push_back(sub);
1382  cen.push_back(en);
1383  ceta.push_back(eta);
1384  cphi.push_back(phi);
1385  ctime.push_back(t);
1386  cieta.push_back(inteta);
1387  ciphi.push_back(intphi);
1388  cdepth.push_back(depth);
1389  cz.push_back(zc);
1390  cstwd.push_back(stwd);
1391  cauxstwd.push_back(auxstwd);
1392  }
1393  }
1394  }
1395 }
1396 
1397 double HcalRecHitsAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
1398  double PI = 3.1415926535898;
1399  double deltaphi= phi1 - phi2;
1400  if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1401  if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1402  double deltaeta = eta2 - eta1;
1403  double tmp = sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1404  return tmp;
1405 }
1406 
1407 double HcalRecHitsAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
1408  // weighted mean value of phi1 and phi2
1409 
1410  double tmp;
1411  double PI = 3.1415926535898;
1412  double a1 = phi1; double a2 = phi2;
1413 
1414  if( a1 > 0.5*PI && a2 < 0.) a2 += 2*PI;
1415  if( a2 > 0.5*PI && a1 < 0.) a1 += 2*PI;
1416  tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1417  if(tmp > PI) tmp -= 2.*PI;
1418 
1419  return tmp;
1420 
1421 }
1422 
1423 double HcalRecHitsAnalyzer::dPhiWsign(double phi1, double phi2) {
1424  // clockwise phi2 w.r.t phi1 means "+" phi distance
1425  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
1426 
1427  double PI = 3.1415926535898;
1428  double a1 = phi1; double a2 = phi2;
1429  double tmp = a2 - a1;
1430  if( a1*a2 < 0.) {
1431  if(a1 > 0.5 * PI) tmp += 2.*PI;
1432  if(a2 > 0.5 * PI) tmp -= 2.*PI;
1433  }
1434  return tmp;
1435 
1436 }
1437 
1439 
1440  const DetId id = hit->detid();
1441 
1442  const uint32_t recHitFlag = hit->flags();
1443  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1444 
1445  int severityLevel = theHcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag);
1446 
1447  return severityLevel;
1448 
1449 }
1450 
1452 
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:462
MonitorElement * ZS_HB2
MonitorElement * meTE_Low_HE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
double emap_min[82][72][4][4]
MonitorElement * emean_vs_ieta_HF2
MonitorElement * occupancy_map_HF2
MonitorElement * ZS_seqHB2
std::vector< int > cdepth
MonitorElement * meSumRecHitsEnergyHB
int hcalSevLvl(const CaloRecHit *hit)
MonitorElement * meSumRecHitsEnergyHF
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * RMS_seq_HF2
MonitorElement * meSumRecHitsEnergyConeHF
std::vector< int > hcalHBSevLvlVec
MonitorElement * meEnConeEtaProfile_depth1
bool ev
MonitorElement * occupancy_map_HO
MonitorElement * occupancy_seqHO
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< double > ceta
MonitorElement * ZS_nHO
MonitorElement * occupancy_seqHF2
MonitorElement * occupancy_vs_ieta_HF1
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * emap_depth4
MonitorElement * emean_vs_ieta_HB2
MonitorElement * meEnConeEtaProfile_EH
std::vector< int > hcalHESevLvlVec
double phi12(double phi1, double en1, double phi2, double en2)
MonitorElement * emean_vs_ieta_HB1
MonitorElement * emean_seqHE1
MonitorElement * meTE_Low_HB
MonitorElement * meTEprofileHF_Low
MonitorElement * ZS_nHB2
const HcalSeverityLevelComputer * theHcalSevLvlComputer
MonitorElement * meTE_HB
MonitorElement * meSumRecHitsEnergyConeHB
MonitorElement * emap_depth1
MonitorElement * RMS_vs_ieta_HE3
void Fill(long long x)
MonitorElement * RMS_vs_ieta_HB2
MonitorElement * ZS_HF1
MonitorElement * sevLvl_HO
MonitorElement * ZS_nHE1
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
MonitorElement * occupancy_seqHF1
MonitorElement * meEcalHcalEnergyHB
MonitorElement * emean_seqHB1
MonitorElement * meEcalHcalEnergyHE
MonitorElement * ZS_HB1
MonitorElement * emean_seqHF2
MonitorElement * meSumRecHitsEnergyConeHE
MonitorElement * meTE_HO
MonitorElement * occupancy_seqHB2
MonitorElement * RMS_vs_ieta_HF2
const HcalChannelQuality * theHcalChStatus
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * meEnConeEtaProfile_E
T sqrt(T t)
Definition: SSEVec.h:18
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
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:276
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:56
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 * RecHit_StatusWordCorr_HE
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 * RecHit_StatusWordCorr_HB
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:43
MonitorElement * meSumRecHitsEnergyConeHFL
MonitorElement * meTE_HE
MonitorElement * meNumEcalRecHitsConeHB
MonitorElement * meTE_HB1
MonitorElement * meSumRecHitsEnergyHO
MonitorElement * meSumRecHitsEnergyConeHFS
MonitorElement * meTE_HFS
MonitorElement * meRecHitsEnergyHE
MonitorElement * meTE_Low_HF