CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalZDCMonitor.cc
Go to the documentation of this file.
2 
4 }
6 }
8 }
9 
11  HcalBaseMonitor::setup(ps, ib);
12 
13  baseFolder_ = rootFolder_ + "ZDCMonitor_Hcal";
14 
15  if (showTiming) {
16  cpu_timer.reset();
17  cpu_timer.start();
18  }
19 
20  if (fVerbosity > 0)
21  std::cout << "<HcalZDCMonitor::setup> Setting up histograms" << std::endl;
22 
23  if (fVerbosity > 1)
24  std::cout << "<HcalZDCMonitor::setup> Getting variable values from cfg files" << std::endl;
25 
26  // Set initial event # to 0
27  ievt_ = 0;
28 
29 //Histograms
30  if (fVerbosity > 1)
31  std::cout << "<HcalZDCMonitor::setup> Setting up Histograms" << std::endl;
32 
34  meEVT_ = ib.bookInt("ZDC Event Number");
35  meEVT_->Fill(ievt_);
36  char name[128];
37  char title[128];
38 
39  h_2D_charge = ib.book2D("2D_DigiCharge", "Digi Charge (fC)", 2, 0, 2, 9, 0, 9);
40  h_2D_charge->setBinLabel(1,"ZDC+",1);
41  h_2D_charge->setBinLabel(2,"ZDC-",1);
42  h_2D_charge->setBinLabel(1,"EM1",2);
43  h_2D_charge->setBinLabel(2,"EM2",2);
44  h_2D_charge->setBinLabel(3,"EM3",2);
45  h_2D_charge->setBinLabel(4,"EM4",2);
46  h_2D_charge->setBinLabel(5,"EM5",2);
47  h_2D_charge->setBinLabel(6,"HAD1",2);
48  h_2D_charge->setBinLabel(7,"HAD2",2);
49  h_2D_charge->setBinLabel(8,"HAD3",2);
50  h_2D_charge->setBinLabel(9,"HAD4",2);
51 
52  h_2D_TSMean = ib.book2D("2D_DigiTiming", "Digi Timing", 2, 0, 2, 9, 0, 9);
53  h_2D_TSMean->setBinLabel(1,"ZDC+",1);
54  h_2D_TSMean->setBinLabel(2,"ZDC-",1);
55  h_2D_TSMean->setBinLabel(1,"EM1",2);
56  h_2D_TSMean->setBinLabel(2,"EM2",2);
57  h_2D_TSMean->setBinLabel(3,"EM3",2);
58  h_2D_TSMean->setBinLabel(4,"EM4",2);
59  h_2D_TSMean->setBinLabel(5,"EM5",2);
60  h_2D_TSMean->setBinLabel(6,"HAD1",2);
61  h_2D_TSMean->setBinLabel(7,"HAD2",2);
62  h_2D_TSMean->setBinLabel(8,"HAD3",2);
63  h_2D_TSMean->setBinLabel(9,"HAD4",2);
64 
65  h_2D_RecHitEnergy = ib.book2D("2D_RecHitEnergy", "Rechit Energy", 2, 0, 2, 9, 0, 9);
66  h_2D_RecHitEnergy->setBinLabel(1,"ZDC+",1);
67  h_2D_RecHitEnergy->setBinLabel(2,"ZDC-",1);
68  h_2D_RecHitEnergy->setBinLabel(1,"EM1",2);
69  h_2D_RecHitEnergy->setBinLabel(2,"EM2",2);
70  h_2D_RecHitEnergy->setBinLabel(3,"EM3",2);
71  h_2D_RecHitEnergy->setBinLabel(4,"EM4",2);
72  h_2D_RecHitEnergy->setBinLabel(5,"EM5",2);
73  h_2D_RecHitEnergy->setBinLabel(6,"HAD1",2);
74  h_2D_RecHitEnergy->setBinLabel(7,"HAD2",2);
75  h_2D_RecHitEnergy->setBinLabel(8,"HAD3",2);
76  h_2D_RecHitEnergy->setBinLabel(9,"HAD4",2);
77 
78  h_2D_RecHitTime = ib.book2D("2D_RecHitTime", "Rechit Timing", 2, 0, 2, 9, 0, 9);
79  h_2D_RecHitTime->setBinLabel(1,"ZDC+",1);
80  h_2D_RecHitTime->setBinLabel(2,"ZDC-",1);
81  h_2D_RecHitTime->setBinLabel(1,"EM1",2);
82  h_2D_RecHitTime->setBinLabel(2,"EM2",2);
83  h_2D_RecHitTime->setBinLabel(3,"EM3",2);
84  h_2D_RecHitTime->setBinLabel(4,"EM4",2);
85  h_2D_RecHitTime->setBinLabel(5,"EM5",2);
86  h_2D_RecHitTime->setBinLabel(6,"HAD1",2);
87  h_2D_RecHitTime->setBinLabel(7,"HAD2",2);
88  h_2D_RecHitTime->setBinLabel(8,"HAD3",2);
89  h_2D_RecHitTime->setBinLabel(9,"HAD4",2);
90 
91  h_2D_saturation = ib.book2D("h_2D_QIE", "Saturation Check", 2, 0, 2, 9, 0, 9);
92  h_2D_saturation->setBinLabel(1,"ZDC+",1);
93  h_2D_saturation->setBinLabel(2,"ZDC-",1);
94  h_2D_saturation->setBinLabel(1,"EM1",2);
95  h_2D_saturation->setBinLabel(2,"EM2",2);
96  h_2D_saturation->setBinLabel(3,"EM3",2);
97  h_2D_saturation->setBinLabel(4,"EM4",2);
98  h_2D_saturation->setBinLabel(5,"EM5",2);
99  h_2D_saturation->setBinLabel(6,"HAD1",2);
100  h_2D_saturation->setBinLabel(7,"HAD2",2);
101  h_2D_saturation->setBinLabel(8,"HAD3",2);
102  h_2D_saturation->setBinLabel(9,"HAD4",2);
103 
104  ib.setCurrentFolder(baseFolder_ + "/Digis");
105 
106  for (int i = 0; i < 5; ++i) {
107  // pulse Plus Side
108  sprintf(title, "h_ZDCP_EMChan_%i_Pulse", i + 1);
109  sprintf(name, "ZDC Plus EM Section Pulse for channel %i", i + 1);
110  h_ZDCP_EM_Pulse[i] = ib.book1D(title, name, 10, -0.5, 9.5);
111  h_ZDCP_EM_Pulse[i]->setAxisTitle("Time Slice id",1);
112  h_ZDCP_EM_Pulse[i]->setAxisTitle("Pulse Height",2);
113  // pulse Minus Side
114  sprintf(title, "h_ZDCM_EMChan_%i_Pulse", i + 1);
115  sprintf(name, "ZDC Minus EM Section Pulse for channel %i", i + 1);
116  h_ZDCM_EM_Pulse[i] = ib.book1D(title, name, 10, -0.5, 9.5);
117  h_ZDCM_EM_Pulse[i]->setAxisTitle("Time Slice id",1);
118  h_ZDCM_EM_Pulse[i]->setAxisTitle("Pulse Height",2);
119  // integrated charge over 10 time samples
120  sprintf(title, "h_ZDCP_EMChan_%i_Charge", i + 1);
121  sprintf(name, "ZDC Plus EM Section Charge for channel %i", i + 1);
122  h_ZDCP_EM_Charge[i] = ib.book1D(title, name, 1000, 0., 30000.);
123  h_ZDCP_EM_Charge[i]->setAxisTitle("Charge (fC)",1);
124  h_ZDCP_EM_Charge[i]->setAxisTitle("Events",2);
125  // integrated charge over 10 time samples
126  sprintf(title, "h_ZDCM_EMChan_%i_Charge", i + 1);
127  sprintf(name, "ZDC Minus EM Section Charge for channel %i", i + 1);
128  h_ZDCM_EM_Charge[i] = ib.book1D(title, name, 1000, 0., 30000.);
129  h_ZDCM_EM_Charge[i]->setAxisTitle("Charge (fC)",1);
130  h_ZDCM_EM_Charge[i]->setAxisTitle("Events",2);
131  // charge weighted time slice
132  sprintf(title, "h_ZDCP_EMChan_%i_TSMean", i + 1);
133  sprintf(name, "ZDC Plus EM Section TSMean for channel %i", i + 1);
134  h_ZDCP_EM_TSMean[i] = ib.book1D(title, name, 100, -0.5, 9.5);
135  h_ZDCP_EM_TSMean[i]->setAxisTitle("Timing",1);
136  h_ZDCP_EM_TSMean[i]->setAxisTitle("Events",2);
137  // charge weighted time slice
138  sprintf(title, "h_ZDCM_EMChan_%i_TSMean", i + 1);
139  sprintf(name, "ZDC Minus EM Section TSMean for channel %i", i + 1);
140  h_ZDCM_EM_TSMean[i] = ib.book1D(title, name, 100, -0.5, 9.5);
141  h_ZDCM_EM_TSMean[i]->setAxisTitle("Timing",1);
142  h_ZDCM_EM_TSMean[i]->setAxisTitle("Events",2);
143  }
144 
145  for (int i = 0; i < 4; ++i) {
146  // pulse Plus Side
147  sprintf(title, "h_ZDCP_HADChan_%i_Pulse", i + 1);
148  sprintf(name, "ZDC Plus HAD Section Pulse for channel %i", i + 1);
149  h_ZDCP_HAD_Pulse[i] = ib.book1D(title, name, 10, -0.5, 9.5);
150  h_ZDCP_HAD_Pulse[i]->setAxisTitle("Time Slice id",1);
151  h_ZDCP_HAD_Pulse[i]->setAxisTitle("Pulse Height",2);
152  // pulse Minus Side
153  sprintf(title, "h_ZDCM_HADChan_%i_Pulse", i + 1);
154  sprintf(name, "ZDC Minus HAD Section Pulse for channel %i", i + 1);
155  h_ZDCM_HAD_Pulse[i] = ib.book1D(title, name, 10, -0.5, 9.5);
156  h_ZDCP_HAD_Pulse[i]->setAxisTitle("Time Slice id",1);
157  h_ZDCP_HAD_Pulse[i]->setAxisTitle("Pulse Height",2);
158  // integrated charge over 10 time samples
159  sprintf(title, "h_ZDCP_HADChan_%i_Charge", i + 1);
160  sprintf(name, "ZDC Plus HAD Section Charge for channel %i", i + 1);
161  h_ZDCP_HAD_Charge[i] = ib.book1D(title, name, 1000, 0., 30000.);
162  h_ZDCP_HAD_Charge[i]->setAxisTitle("Charge (fC)",1);
163  h_ZDCP_HAD_Charge[i]->setAxisTitle("Events",2);
164  // integrated charge over 10 time samples
165  sprintf(title, "h_ZDCM_HADChan_%i_Charge", i + 1);
166  sprintf(name, "ZDC Minus HAD Section Charge for channel %i", i + 1);
167  h_ZDCM_HAD_Charge[i] = ib.book1D(title, name, 1000, 0., 30000.);
168  h_ZDCM_HAD_Charge[i]->setAxisTitle("Charge (fC)",1);
169  h_ZDCM_HAD_Charge[i]->setAxisTitle("Events",2);
170  // charge weighted time slice
171  sprintf(title, "h_ZDCP_HADChan_%i_TSMean", i + 1);
172  sprintf(name, "ZDC Plus HAD Section TSMean for channel %i", i + 1);
173  h_ZDCP_HAD_TSMean[i] = ib.book1D(title, name, 100, -0.5, 9.5);
174  h_ZDCP_HAD_TSMean[i]->setAxisTitle("Timing",1);
175  h_ZDCP_HAD_TSMean[i]->setAxisTitle("Events",2);
176  // charge weighted time slice
177  sprintf(title, "h_ZDCM_HADChan_%i_TSMean", i + 1);
178  sprintf(name, "ZDC Minus HAD Section TSMean for channel %i", i + 1);
179  h_ZDCM_HAD_TSMean[i] = ib.book1D(title, name, 100, -0.5, 9.5);
180  h_ZDCM_HAD_TSMean[i]->setAxisTitle("Timing",1);
181  h_ZDCM_HAD_TSMean[i]->setAxisTitle("Events",2);
182  }
183 
184  ib.setCurrentFolder(baseFolder_ + "/RecHits");
185 
186  for (int i = 0; i < 5; ++i) {
187  //RecHitEnergy Plus Side
188  sprintf(title,"h_ZDCP_EMChan_%i_RecHit_Energy",i+1);
189  sprintf(name,"ZDC EM Section Rechit Energy for channel %i",i+1);
190  h_ZDCP_EM_RecHitEnergy[i] = ib.book1D(title, name, 1010, -100., 10000.);
191  h_ZDCP_EM_RecHitEnergy[i]->setAxisTitle("Energy (GeV)",1);
192  h_ZDCP_EM_RecHitEnergy[i]->setAxisTitle("Events",2);
193  //RecHitEnergy Minus Side
194  sprintf(title,"h_ZDCM_EMChan_%i_RecHit_Energy",i+1);
195  sprintf(name,"ZDC EM Section Rechit Energy for channel %i",i+1);
196  h_ZDCM_EM_RecHitEnergy[i] = ib.book1D(title, name, 1010, -100., 10000.);
197  h_ZDCM_EM_RecHitEnergy[i]->setAxisTitle("Energy (GeV)",1);
198  h_ZDCM_EM_RecHitEnergy[i]->setAxisTitle("Events",2);
199  //RecHit Timing Plus Side
200  sprintf(title,"h_ZDCP_EMChan_%i_RecHit_Timing",i+1);
201  sprintf(name,"ZDC EM Section Rechit Timing for channel %i",i+1);
202  h_ZDCP_EM_RecHitTiming[i] = ib.book1D(title, name, 100, -100., 100.);
203  h_ZDCP_EM_RecHitTiming[i]->setAxisTitle("RecHit Time",1);
204  h_ZDCP_EM_RecHitTiming[i]->setAxisTitle("Events",2);
205  //RecHit Timing Minus Side
206  sprintf(title,"h_ZDCM_EMChan_%i_RecHit_Timing",i+1);
207  sprintf(name,"ZDC EM Section Rechit Timing for channel %i",i+1);
208  h_ZDCM_EM_RecHitTiming[i] = ib.book1D(title, name, 100, -100., 100.);
209  h_ZDCM_EM_RecHitTiming[i]->setAxisTitle("RecHit Time",1);
210  h_ZDCM_EM_RecHitTiming[i]->setAxisTitle("Events",2);
211  }
212 
213  for (int i = 0; i < 4; ++i) {
214  //RecHitEnergy Plus Side
215  sprintf(title,"h_ZDCP_HADChan_%i_RecHit_Energy",i+1);
216  sprintf(name,"ZDC HAD Section Rechit Energy for channel %i",i+1);
217  h_ZDCP_HAD_RecHitEnergy[i] = ib.book1D(title, name, 1010, -100., 10000.);
218  h_ZDCP_HAD_RecHitEnergy[i]->setAxisTitle("Energy (GeV)",1);
219  h_ZDCP_HAD_RecHitEnergy[i]->setAxisTitle("Events",2);
220  //RecHitEnergy Minus Side
221  sprintf(title,"h_ZDCM_HADChan_%i_RecHit_Energy",i+1);
222  sprintf(name,"ZDC HAD Section Rechit Energy for channel %i",i+1);
223  h_ZDCM_HAD_RecHitEnergy[i] = ib.book1D(title, name, 1010, -100., 10000.);
224  h_ZDCM_HAD_RecHitEnergy[i]->setAxisTitle("Energy (GeV)",1);
225  h_ZDCM_HAD_RecHitEnergy[i]->setAxisTitle("Events",2);
226  //RecHit Timing Plus Side
227  sprintf(title,"h_ZDCP_HADChan_%i_RecHit_Timing",i+1);
228  sprintf(name,"ZDC HAD Section Rechit Timing for channel %i",i+1);
229  h_ZDCP_HAD_RecHitTiming[i] = ib.book1D(title, name, 100, -100., 100.);
230  h_ZDCP_HAD_RecHitTiming[i]->setAxisTitle("RecHit Time",1);
231  h_ZDCP_HAD_RecHitTiming[i]->setAxisTitle("Events",2);
232  //RecHit Timing Minus Side
233  sprintf(title,"h_ZDCM_HADChan_%i_RecHit_Timing",i+1);
234  sprintf(name,"ZDC HAD Section Rechit Timing for channel %i",i+1);
235  h_ZDCM_HAD_RecHitTiming[i] = ib.book1D(title, name, 100, -100., 100.);
236  h_ZDCM_HAD_RecHitTiming[i]->setAxisTitle("RecHit Time",1);
237  h_ZDCM_HAD_RecHitTiming[i]->setAxisTitle("Events",2);
238  }
239 
240  return;
241 }
242 
244  if (fVerbosity > 0)
245  std::cout << "<HcalZDCMonitor::processEvent> Processing Event..." << std::endl;
246  if (showTiming)
247  {
248  cpu_timer.reset();
249  cpu_timer.start();
250  }
251  ++ievt_;
252  meEVT_->Fill(ievt_);
253 
254  //--------------------------------------
255  // ZDC Digi part
256  //--------------------------------------
257  double fSum = 0.;
258  std::vector<double> fData;
259  double digiThresh = 99.5; //corresponds to 40 ADC counts
260  //int digiThreshADC = 40;
261  int digiSaturation = 127;
262  //double ZDCQIEConst = 2.6;
263 
264  for (ZDCDigiCollection::const_iterator digi_iter = digi.begin();
265  digi_iter != digi.end(); ++digi_iter)
266  {
267  const ZDCDataFrame digi = (const ZDCDataFrame) (*digi_iter);
268  //HcalZDCDetId id(digi_iter->id());
269  int iSide = digi_iter->id().zside();
270  int iSection = digi_iter->id().section();
271  int iChannel = digi_iter->id().channel();
272 
273  unsigned int fTS = digi_iter->size();
274  while (fData.size()<fTS)
275  fData.push_back(-999);
276  while (fData.size()>fTS)
277  fData.pop_back(); // delete last elements
278 
279  fSum = 0.;
280  bool saturated = false;
281  for (unsigned int i = 0; i < fTS; ++i)
282  {
283  //fData[i]=digi[i].nominal_fC() * ZDCQIEConst;
284  fData[i]=digi[i].nominal_fC();
285  if (digi[i].adc()==digiSaturation){
286  saturated=true;
287  }
288  }
289 
290  double fTSMean = 0;
291  if (fData.size()>6)
292  fTSMean = getTime(fData, 4, 6, fSum); // tsmin = 4, tsmax = 6.
293  //std::cout << "Side= " << iSide << " Section= " << iSection << " Channel= " << iChannel << "\tCharge\t" << fSum <<std::endl;
294  if (saturated==true){
295  h_2D_saturation->Fill(iSide==1?0:1,iSection==1?iChannel-1:iChannel+4,1);
296  }
297 
298  if (iSection == 1)
299  { // EM
300  if (iSide == 1) { // Plus
301  for (unsigned int i = 0; i < fTS; ++i) {
302  if (fData[i] > digiThresh) h_ZDCP_EM_Pulse[iChannel - 1]->Fill(i, fData[i]);
303  }
304  if (fSum > digiThresh) {
305  h_ZDCP_EM_Charge[iChannel - 1]->Fill(fSum);
306  h_ZDCP_EM_TSMean[iChannel - 1]->Fill(fTSMean);
307  //std::cout<< "fSum " << fSum << " fTSMean " << fTSMean <<std::endl;
308  }
309  } // Plus
310  if (iSide == -1) { // Minus
311  for (unsigned int i = 0; i < fTS; ++i) {
312  if (fData[i] > digiThresh) h_ZDCM_EM_Pulse[iChannel - 1]->Fill(i, fData[i]);
313  }
314  if (fSum > digiThresh) {
315  h_ZDCM_EM_Charge[iChannel - 1]->Fill(fSum);
316  h_ZDCM_EM_TSMean[iChannel - 1]->Fill(fTSMean);
317  }
318  } // Minus
319  }// EM
320 
321  else if (iSection == 2)
322  { // HAD
323  if (iSide == 1) { // Plus
324  for (unsigned int i = 0; i < fTS; ++i) {
325  if (fData[i] > digiThresh) h_ZDCP_HAD_Pulse[iChannel - 1]->Fill(i, fData[i]);
326  }
327  if (fSum > digiThresh) {
328  h_ZDCP_HAD_Charge[iChannel - 1]->Fill(fSum);
329  h_ZDCP_HAD_TSMean[iChannel - 1]->Fill(fTSMean);
330  }
331  } // Plus
332  if (iSide == -1) { // Minus
333  for (unsigned int i = 0; i < fTS; ++i) {
334  if (fData[i] > digiThresh) h_ZDCM_HAD_Pulse[iChannel - 1]->Fill(i, fData[i]);
335  }
336  if (fSum > digiThresh) {
337  h_ZDCM_HAD_Charge[iChannel - 1]->Fill(fSum);
338  h_ZDCM_HAD_TSMean[iChannel - 1]->Fill(fTSMean);
339  }
340  }// Minus
341  } // HAD
342  } // loop on zdc digi collection
343 
344 
345  //--------------------------------------
346  // ZDC RecHit part
347  //--------------------------------------
348  for (ZDCRecHitCollection::const_iterator rechit_iter = rechit.begin();
349  rechit_iter != rechit.end(); ++rechit_iter)
350  {
351  int Side = (rechit_iter->id()).zside();
352  int Section = (rechit_iter->id()).section();
353  int Channel = (rechit_iter->id()).channel();
354  //std::cout << "RecHitEnergy " << zhit->energy() << " RecHitTime " << zhit->time() << std::endl;
355 
356  if(Section==1)
357  { //EM
358  if (Side ==1 ){ // Plus
359  h_ZDCP_EM_RecHitEnergy[Channel-1]->Fill(rechit_iter->energy());
360  h_ZDCP_EM_RecHitTiming[Channel-1]->Fill(rechit_iter->time());
361  }
362  if (Side == -1 ){ //Minus
363  h_ZDCM_EM_RecHitEnergy[Channel-1]->Fill(rechit_iter->energy());
364  h_ZDCM_EM_RecHitTiming[Channel-1]->Fill(rechit_iter->time());
365  }
366  } //EM
367  else if(Section==2)
368  { //HAD
369  if (Side ==1 ){ //Plus
370  h_ZDCP_HAD_RecHitEnergy[Channel-1]->Fill(rechit_iter->energy());
371  h_ZDCP_HAD_RecHitTiming[Channel-1]->Fill(rechit_iter->time());
372  }
373  if (Side == -1 ){ //Minus
374  h_ZDCM_HAD_RecHitEnergy[Channel-1]->Fill(rechit_iter->energy());
375  h_ZDCM_HAD_RecHitTiming[Channel-1]->Fill(rechit_iter->time());
376  }
377  } // HAD
378  } // loop on rechits
379 
380 } // end of event processing
381 /*
382 ------------------------------------------------------------------------------------
383 // This is what we did to find the good signal. After we've started to use only time slice 4,5,6.
384 bool HcalZDCMonitor::isGood(std::vector<double>fData, double fCut, double fPercentage) {
385  bool dec = false;
386  int ts_max = -1;
387 
388  ts_max = getTSMax(fData);
389  if (ts_max == 0 || ts_max == (int)(fData.size() - 1))
390  return false;
391  float sum = fData[ts_max - 1] + fData[ts_max + 1];
392 
393  // cout << "tsMax " << ts_max << " data[tsmax] " << mData[ts_max] << " sum " << sum << endl;
394  if (fData[ts_max] > fCut && sum > (fData[ts_max] * fPercentage))
395  dec = true;
396  return dec;
397 } // bool HcalZDCMonitor::isGood
398 
399 int HcalZDCMonitor::getTSMax(std::vector<double>fData)
400 {
401  int ts_max = -100;
402  double max = -999.;
403 
404  for (unsigned int j = 0; j < fData.size(); ++j) {
405  if (max < fData[j]) {
406  max = fData[j];
407  ts_max = j;
408  }
409  }
410  return ts_max;
411 } // int HcalZDCMonitor::getTSMax()
412 ------------------------------------------------------------------------------------
413 */
414 double HcalZDCMonitor::getTime(const std::vector<double>& fData, unsigned int ts_min, unsigned int ts_max, double &fSum) {
415  double weightedTime = 0.;
416  double SumT = 0.;
417  double Time = -999.;
418  double digiThreshf = 99.5;
419 
420  for (unsigned int ts=ts_min; ts<=ts_max; ++ts) {
421  if (fData[ts] > digiThreshf){
422  weightedTime += ts * fData[ts];
423  SumT += fData[ts];
424  }
425  }
426 
427  if (SumT > 0.) {
428  Time = weightedTime / SumT;
429  }
430 
431  fSum = SumT;
432 
433  return Time;
434 
435 } //double HcalZDCMonitor::getTime()
436 
437 
439 {
440 
441  for (int i = 0; i < 5; ++i) { // EM Channels
442  // ZDC Plus
443  h_2D_charge->setBinContent(1, i + 1, h_ZDCP_EM_Charge[i]->getMean());
444  h_2D_TSMean->setBinContent(1, i + 1, h_ZDCP_EM_TSMean[i]->getMean());
447  // ZDC Minus
448  h_2D_charge->setBinContent(2, i + 1, h_ZDCM_EM_Charge[i]->getMean());
449  h_2D_TSMean->setBinContent(2, i + 1, h_ZDCM_EM_TSMean[i]->getMean());
452  }
453 
454  for (int i = 0; i < 4; ++i) { // HAD channels
455  // ZDC Plus
456  h_2D_charge->setBinContent(1, i + 6, h_ZDCP_HAD_Charge[i]->getMean());
457  h_2D_TSMean->setBinContent(1, i + 6, h_ZDCP_HAD_TSMean[i]->getMean());
460  // ZDC Minus
461  //h_ZDCM_HAD_Pulse[i]->Scale(10. / h_ZDCM_HAD_Pulse[i]->getEntries());
462  h_2D_charge->setBinContent(2, i + 6, h_ZDCM_HAD_Charge[i]->getMean());
463  h_2D_TSMean->setBinContent(2, i + 6, h_ZDCM_HAD_TSMean[i]->getMean());
466  }
467 } // void HcalZDCMonitor::endLuminosityBlock()
468 
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * h_ZDCP_HAD_TSMean[4]
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * h_ZDCP_HAD_RecHitTiming[4]
MonitorElement * h_ZDCM_EM_Pulse[5]
MonitorElement * h_ZDCM_HAD_TSMean[4]
int ib
Definition: cuy.py:660
void start()
Definition: CPUTimer.cc:74
MonitorElement * h_ZDCM_EM_TSMean[5]
MonitorElement * h_ZDCM_EM_RecHitTiming[5]
MonitorElement * h_2D_TSMean
MonitorElement * h_ZDCM_HAD_RecHitTiming[4]
virtual void setup(const edm::ParameterSet &ps, DQMStore::IBooker &ib)
MonitorElement * h_ZDCP_EM_RecHitEnergy[5]
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:103
std::vector< ZDCDataFrame >::const_iterator const_iterator
MonitorElement * h_ZDCP_EM_Pulse[5]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void reset()
Definition: CPUTimer.cc:107
MonitorElement * h_ZDCP_EM_TSMean[5]
int zside(DetId const &)
MonitorElement * h_ZDCM_EM_Charge[5]
void setup(const edm::ParameterSet &ps, DQMStore::IBooker &ib)
void Fill(long long x)
MonitorElement * h_ZDCP_HAD_Charge[4]
std::string rootFolder_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * h_2D_saturation
MonitorElement * h_2D_charge
edm::CPUTimer cpu_timer
MonitorElement * h_2D_RecHitTime
MonitorElement * h_ZDCM_HAD_Charge[4]
std::string baseFolder_
MonitorElement * h_ZDCM_HAD_RecHitEnergy[4]
const_iterator end() const
void endLuminosityBlock(void)
double getTime(const std::vector< double > &fData, unsigned int ts_min, unsigned int ts_max, double &fSum)
MonitorElement * h_2D_RecHitEnergy
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * h_ZDCP_HAD_Pulse[4]
MonitorElement * meEVT_
MonitorElement * h_ZDCM_EM_RecHitEnergy[5]
size_type size() const
MonitorElement * h_ZDCP_HAD_RecHitEnergy[4]
tuple cout
Definition: gather_cfg.py:121
DQMChannel Channel
MonitorElement * h_ZDCP_EM_Charge[5]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const_iterator begin() const
MonitorElement * h_ZDCP_EM_RecHitTiming[5]
MonitorElement * h_ZDCM_HAD_Pulse[4]