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