ATLAS Offline Software
Loading...
Searching...
No Matches
TileLaserLinearityCalibTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "GaudiKernel/MsgStream.h"
8#include "GaudiKernel/Service.h"
9#include "GaudiKernel/IToolSvc.h"
10#include "GaudiKernel/TypeNameString.h"
11
12
15
20
21#include "TFile.h"
22#include "TTree.h"
23#include <cmath>
24#include <iostream>
25
26/**********************************************************/
27/* TileLaserLinearityCalibTool.cxx November 19th 2009 */
28/* */
29/* S.Viret viret@in2p3.fr */
30/* */
31/* This code is inspired from the CIS tool */
32/**********************************************************/
33
34TileLaserLinearityCalibTool::TileLaserLinearityCalibTool(const std::string& type, const std::string& name,const IInterface* pParent):
35 AthAlgTool(type, name, pParent),
36 m_tileHWID (nullptr),
37 m_cabling (nullptr),
38 m_toolRunNo(0),
40 m_las_filter(0),
42 m_hrate(0),
43 m_flow(0),
44 m_head_temp(0),
45 m_las_time(0),
52{
53 declareInterface<ITileCalibTool>( this );
54 declareProperty("toolNtuple", m_toolNtuple="h3000");
55 declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus");
56
57// creating multi-dim arrays on the heap and initialize all elements to zeros
58 m_LG_PMT = new double[NFILTERS][NPMTS]();
59 m_LG_PMT_S = new double[NFILTERS][NPMTS]();
60 m_LG_diode = new double[NFILTERS][NDIODES]();
61 m_LG_diode_S = new double[NFILTERS][NDIODES]();
62 m_HG_PMT = new double[NFILTERS][NPMTS]();
63 m_HG_PMT_S = new double[NFILTERS][NPMTS]();
64 m_HG_diode = new double[NFILTERS][NDIODES]();
65 m_HG_diode_S = new double[NFILTERS][NDIODES]();
86}
87
89{
90
91 delete[] m_LG_PMT;
92 delete[] m_LG_PMT_S;
93 delete[] m_LG_diode;
94 delete[] m_LG_diode_S;
95 delete[] m_HG_PMT;
96 delete[] m_HG_PMT_S;
97 delete[] m_HG_diode;
98 delete[] m_HG_diode_S;
99 delete[] m_mean;
100 delete[] m_mean_S;
101 delete[] m_LG_ratio;
102 delete[] m_LG_ratio_S;
103 delete[] m_LG_ratio2;
104 delete[] m_LG_ratio2_S;
105 delete[] m_HG_ratio;
106 delete[] m_HG_ratio_S;
107 delete[] m_HG_ratio2;
108 delete[] m_HG_ratio2_S;
109 delete[] m_entries;
110 delete[] m_HG_diode_signal;
111 delete[] m_HG_PMT_signal;
112 delete[] m_LG_diode_signal;
113 delete[] m_LG_PMT_signal;
114 delete[] m_signal;
115 delete[] m_LG_ratio_stat;
116 delete[] m_LG_ratio2_stat;
117 delete[] m_HG_ratio_stat;
118 delete[] m_HG_ratio2_stat;
119
120}
121
122
123//
124// Tool instantiation :
125//
126// Used to reset all the local variables,
127// and to load the necessary services
128//
129
130
132{
133
134 ATH_MSG_INFO ( "initialize()" );
135
136 // Reset local parameters
137 // For parameter definition, see the header file
138 //
139
140 m_complete_turn = false;
141
142 m_toolRunNo = 0;
143 m_ADC_problem = 0;
144 m_las_filter = 0;
145 m_las_requ_amp = 0;
146 m_hrate = 0;
147 m_flow = 0;
148 m_head_temp = 0;
149 m_las_time = 0;
150 m_PMT1_ADC_prev[0]= 0;
151 m_PMT2_ADC_prev[0]= 0;
152 m_PMT1_ADC_prev[1]= 0;
153 m_PMT2_ADC_prev[1]= 0;
154
157
158 for(int f=0; f<NFILTERS; ++f)
159 {
160 for(int d=0; d<NPMTS; ++d)
161 {
162 m_LG_PMT_signal[f][d] = new RunningStat();
163 m_HG_PMT_signal[f][d] = new RunningStat();
164 }
165 }
166
167 for(int f=0; f<NFILTERS; ++f)
168 {
169 for(int d=0; d<NPARTITIONS; ++d)
170 {
171 m_LG_diode_signal[f][d] = new RunningStat();
172 m_HG_diode_signal[f][d] = new RunningStat();
173 }
174 }
175
176 for(int f=0; f<NFILTERS; ++f) // Filter
177 {
178 for(int i=0; i<NPARTITIONS; ++i) // Partition
179 {
180 for(int j=0; j<NDRAWERS; ++j) // Module
181 {
182 for(int k=0; k<NCHANNELS; ++k) // Channel
183 {
184 for(int l=0; l<NGAINS; ++l) // Gain
185 {
186 m_signal[f][i][j][k][l] = new RunningStat();
187 m_HG_ratio_stat[f][i][j][k][l] = new RunningStat();
188 m_HG_ratio2_stat[f][i][j][k][l] = new RunningStat();
189 m_LG_ratio_stat[f][i][j][k][l] = new RunningStat();
190 m_LG_ratio2_stat[f][i][j][k][l] = new RunningStat();
191 }
192 }
193 }
194 }
195 }
196
197
198 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
199 ATH_CHECK( m_tileToolEmscale.retrieve() );
200
201 ATH_CHECK( m_rawChannelContainerKey.initialize() );
202 ATH_CHECK( m_laserContainerKey.initialize() );
203
205
206 CHECK( m_dqStatusKey.initialize() );
207
208 return StatusCode::SUCCESS;
209}
210
211StatusCode TileLaserLinearityCalibTool::initNtuple(int runNumber, int runType, TFile * rootFile)
212{
213 ATH_MSG_INFO ( "initialize(" << runNumber << "," << runType << "," << rootFile << ")" );
214 return StatusCode::SUCCESS;
215}
216
217
218//
219// Event by event operations :
220//
221// Here we get the LASER object and the RawChannel information
222// (we get channel amplitude by Eopt method) and we store it into
223// maps
224//
225// SV 25/06/08 : STILL TO DO : event selection should be made here
226// NOT DONE for the moment
227
228
230{
231 ATH_MSG_INFO ( "execute()" );
232
233 const EventContext& ctx = Gaudi::Hive::currentContext();
234 const TileDQstatus* dqStatus = SG::makeHandle (m_dqStatusKey, ctx).get();
235
236 //
237 // Here we analyze a run with filter wheel moving
238 // we just keep the information from the first turn of the wheel
239 //
240
241 if (m_complete_turn)
242 {
243 ATH_MSG_INFO ( "Filter wheel turn completed: stop here" );
244 return StatusCode::SUCCESS;
245 }
246
247 ATH_MSG_DEBUG ( "Retrieving the LASER object and RawChannel" );
248
251
252 ATH_CHECK( rawCnt.isValid() );
253 ATH_CHECK( laserObj.isValid() );
254
255 // First we got event time (From 1/1/70)
256
257 const uint32_t *cispar = dqStatus->cispar();
258
259 m_las_time = static_cast<double>(cispar[10])+static_cast<double>(cispar[11])/1000000;
260
261 //
262 // Then we could start getting the LASER informations
263 //
264
265
266 if (laserObj->getDiodeCurrOrd() == 0 || laserObj->getFiltNumber() == 0) // Sanity check
267 {
268 ATH_MSG_VERBOSE ( "Filter wheel moving: skip event !!" );
269 return StatusCode::SUCCESS; // This is expected for some events
270 }
271
272 //
273 // Filter number is different from 0
274 // But we have to check few points in order to be sure
275 // that the wheel is stabilized
276 //
277
278 m_las_filter = laserObj->getFiltNumber()-1; // Corrected filter position
279
280 if (m_last_evt_filter == m_las_filter) // If the position the same as before??
281 {
283 }
284 else
285 {
287 }
288
290
291
292 //
293 // As long as we don't have a suffecient number of consecutive events
294 // with the same filter (200), we consider that we are not stable and thus
295 // we reject the entire event
296 //
297
298 if (m_n_same_filt_evts < 200) // Sanity check
299 {
300 ATH_MSG_WARNING ( "Still in a non stable area, wait a bit !!" );
301 return StatusCode::SUCCESS; // This is expected for some events
302 }
303
304 //
305 // Then we get the diodes signals and store them
306 //
307
308 double LG_diode[10];
309 double HG_diode[10];
310
311 for(int i=0; i<10; ++i)
312 {
313 LG_diode[i] = static_cast<double>(laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0));
314 HG_diode[i] = static_cast<double>(laserObj->getDiodeADC(i,1)-laserObj->getDiodePedestal(i,1));
315 } // FOR
316
317 for(int i=0; i<10; ++i){
318 m_LG_diode_signal[m_las_filter][i]->Push(LG_diode[i]);
319 m_HG_diode_signal[m_las_filter][i]->Push(HG_diode[i]);
320 } // FOR
321
322 for(int i=0; i<2; ++i){
323 m_LG_PMT_signal[m_las_filter][i]->Push(laserObj->getPMADC(i,0)-laserObj->getPMPedestal(i,0));
324 m_HG_PMT_signal[m_las_filter][i]->Push(laserObj->getPMADC(i,1)-laserObj->getPMPedestal(i,1));
325 } // FOR
326
327 // Check that the ADC has really sent a new information
328
329 if (laserObj->getPMADC(0,0) == m_PMT1_ADC_prev[0] &&
330 laserObj->getPMADC(1,0) == m_PMT2_ADC_prev[0])
331 {
332 m_ADC_problem = 1;
333 ATH_MSG_WARNING ( "There is perhaps an ADC problem with this event" );
334 }
335 if (laserObj->getPMADC(0,1) == m_PMT1_ADC_prev[1] &&
336 laserObj->getPMADC(1,1) == m_PMT2_ADC_prev[1])
337 {
338 m_ADC_problem = 1;
339 ATH_MSG_WARNING ( "There is perhaps an ADC problem with this event" );
340 }
341
342 m_PMT1_ADC_prev[0] = laserObj->getPMADC(0,0);
343 m_PMT2_ADC_prev[0] = laserObj->getPMADC(1,0);
344 m_PMT1_ADC_prev[1] = laserObj->getPMADC(0,1);
345 m_PMT2_ADC_prev[1] = laserObj->getPMADC(1,1);
346
347 // Next parameters are constants, don't need to update them more than once
348
349 if (m_hrate == 0)
350 {
351 m_first_filter = laserObj->getFiltNumber()-1; // The first filter position
352 m_hrate = laserObj->getHumidity();
353 m_flow = laserObj->getGasFlux();
354 m_head_temp = laserObj->getPumpDiodeTemp();
355 m_las_requ_amp = laserObj->getDiodeCurrOrd();
356 }
357
358 //
359 // Are we back to the first wheel position??
360 // If so we stop here because otherwise
361 // we have systematic shifts with filter wheel position
362 //
363
365 {
366 int previous_filter = (m_first_filter+7)%8;
367 if (m_HG_PMT_signal[previous_filter][0]->NumDataValues()>400 || m_LG_PMT_signal[previous_filter][0]->NumDataValues()>400)
368 {
369 m_complete_turn=true; // Yes, stop here
370 ATH_MSG_INFO ( "Filter wheel turn completed: stop here" );
371 return StatusCode::SUCCESS;
372 }
373 }
374
375 //
376 // Then we could loop over all the channels, and get the correction factor
377 //
378
379
380 // Create iterator over RawChannelContainer
381 TileRawChannelUnit::UNIT RChUnit = rawCnt->get_unit();
382 TileRawChannelContainer::const_iterator itColl = rawCnt->begin();
383 TileRawChannelContainer::const_iterator itCollEnd = rawCnt->end();
384
385 // Go through all TileRawChannelCollections
386 for(; itColl != itCollEnd; ++itColl)
387 {
388
389 // go through all TileRawChannels in collection
390 TileRawChannelCollection::const_iterator it = (*itColl)->begin();
391 for(; it != (*itColl)->end(); ++it)
392 {
393
394 // get adcHash
395 HWIdentifier hwid=(*it)->adc_HWID();
396 int ros = m_tileHWID->ros(hwid)-1; // LBA=0 LBC=1 EBA=2 EBC=3
397 int drawer = m_tileHWID->drawer(hwid); // 0 to 63
398 int chan = m_tileHWID->channel(hwid); // 0 to 47 channel not PMT
399 int gain = m_tileHWID->adc(hwid); // low=0 high=1
400
401 // amp has to be in PicoCoulombs, here we are mixing gains
402 float amp = (*it)->amplitude();
403 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros+1,drawer);
404
405
406
407 // check if channel is connected
408 if( !chanIsConnected(ros+1,chan) ) continue;
409
410 // Don't enable negative or null energies
411 if ( amp <= 0.) continue;
412
413 float ampInPicoCoulombs = m_tileToolEmscale->channelCalib(drawerIdx, chan, gain, amp, RChUnit, TileRawChannelUnit::PicoCoulombs);
414
415 //
416 // Here we do an outlier removal when enough events have been collected
417 // (Mean and RMS are computed in the same pass
418 //)
419 // Useful when the filter wheel is moving again (the signal could become bad again)
420 //
421
422 if (m_signal[m_las_filter][ros][drawer][chan][gain]->NumDataValues()>400)
423 {
424 double current_mean = m_signal[m_las_filter][ros][drawer][chan][gain]->Mean();
425 double current_RMS = m_signal[m_las_filter][ros][drawer][chan][gain]->StandardDeviation();
426
427 if (fabs(ampInPicoCoulombs-current_mean)>5*current_RMS) // 5 sigmas away, not normal
428 {
429 ATH_MSG_VERBOSE ( "Rejecting an outlier. If there are a lot this means filter wheel will soon move again!" );
430 }
431 else
432 {
433 m_signal[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs);
434
435 if (HG_diode[0] != 0)
436 {
437 m_HG_ratio_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/HG_diode[0]);
438 m_HG_ratio2_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getPMADC(0,1)-laserObj->getPMPedestal(0,1)));
439 }
440
441 if (LG_diode[0] != 0)
442 {
443 m_LG_ratio_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/LG_diode[0]);
444 m_LG_ratio2_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getPMADC(0,0)-laserObj->getPMPedestal(0,0)));
445 }
446
447 }
448 }
449 else
450 {
451 if (ros == 2 && drawer == 0 && chan == 1)
452 ATH_MSG_VERBOSE ( m_las_filter+1 <<" / " << gain <<" / " << ampInPicoCoulombs <<" / "
453 << m_signal[m_las_filter][ros][drawer][chan][gain]->Mean()
454 << " / " << m_signal[m_las_filter][ros][drawer][chan][gain]->StandardDeviation() );
455
456 m_signal[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs);
457
458 if (HG_diode[0] != 0)
459 {
460 m_HG_ratio_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/HG_diode[0]);
461 m_HG_ratio2_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getPMADC(0,1)-laserObj->getPMPedestal(0,1)));
462 }
463
464 if (LG_diode[0] != 0)
465 {
466 m_LG_ratio_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/LG_diode[0]);
467 m_LG_ratio2_stat[m_las_filter][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getPMADC(0,0)-laserObj->getPMPedestal(0,0)));
468 }
469
470 }
471 } // End of the loop over the TileRawChannelCollection
472 } // End of the loop over the TileRawChannelContainer
473
474 return StatusCode::SUCCESS;
475}
476
477//
478// Calibration coefficient calculation :
479//
480// Event loop is finished, we could then compute the coefficient
481//
482//
483
485{
486 ATH_MSG_INFO ( "execute()" );
487
488 for(int f=0; f<NFILTERS; ++f)
489 {
490 for(int d=0; d<NPMTS; ++d)
491 {
492 m_LG_PMT[f][d] = m_LG_PMT_signal[f][d]->Mean();
493 m_LG_PMT_S[f][d] = m_LG_PMT_signal[f][d]->StandardDeviation();
494
495 m_HG_PMT[f][d] = m_HG_PMT_signal[f][d]->Mean();
496 m_HG_PMT_S[f][d] = m_HG_PMT_signal[f][d]->StandardDeviation();
497 }
498 }
499
500 for(int f=0; f<NFILTERS; ++f)
501 {
502 for(int d=0; d<NPARTITIONS; ++d)
503 {
504 m_LG_diode[f][d] = m_LG_diode_signal[f][d]->Mean();
505 m_LG_diode_S[f][d] = m_LG_diode_signal[f][d]->StandardDeviation();
506
507 m_HG_diode[f][d] = m_HG_diode_signal[f][d]->Mean();
508 m_HG_diode_S[f][d] = m_HG_diode_signal[f][d]->StandardDeviation();
509 }
510 }
511
512 for(int f=0; f<NFILTERS; ++f)
513 {
514 for(int i=0; i<NPARTITIONS; ++i)
515 {
516 for(int j=0; j<NDRAWERS; ++j)
517 {
518 for(int k=0; k<NCHANNELS; ++k)
519 {
520 for(int l=0; l<NGAINS; ++l)
521 {
522 m_mean[f][i][j][k][l] = m_signal[f][i][j][k][l]->Mean();
523 m_mean_S[f][i][j][k][l] = m_signal[f][i][j][k][l]->StandardDeviation();
524
525 m_LG_ratio[f][i][j][k][l] = m_LG_ratio_stat[f][i][j][k][l]->Mean();
526 m_LG_ratio_S[f][i][j][k][l] = m_LG_ratio_stat[f][i][j][k][l]->StandardDeviation();
527 m_LG_ratio2[f][i][j][k][l] = m_LG_ratio2_stat[f][i][j][k][l]->Mean();
528 m_LG_ratio2_S[f][i][j][k][l] = m_LG_ratio2_stat[f][i][j][k][l]->StandardDeviation();
529 m_HG_ratio[f][i][j][k][l] = m_HG_ratio_stat[f][i][j][k][l]->Mean();
530 m_HG_ratio_S[f][i][j][k][l] = m_HG_ratio_stat[f][i][j][k][l]->StandardDeviation();
531 m_HG_ratio2[f][i][j][k][l] = m_HG_ratio2_stat[f][i][j][k][l]->Mean();
532 m_HG_ratio2_S[f][i][j][k][l] = m_HG_ratio2_stat[f][i][j][k][l]->StandardDeviation();
533 m_entries[f][i][j][k][l] = m_signal[f][i][j][k][l]->NumDataValues();
534 }
535 }
536 }
537 }
538 }
539
540 // remove all RunningStat objects from memory
541
542 for(int f=0; f<NFILTERS; ++f)
543 {
544 for(int d=0; d<NPMTS; ++d)
545 {
546 delete m_LG_PMT_signal[f][d];
547 delete m_HG_PMT_signal[f][d];
548 }
549 }
550
551 for(int f=0; f<NFILTERS; ++f)
552 {
553 for(int d=0; d<NPARTITIONS; ++d)
554 {
555 delete m_LG_diode_signal[f][d];
556 delete m_HG_diode_signal[f][d];
557 }
558 }
559
560 for(int f=0; f<NFILTERS; ++f) // Filter
561 {
562 for(int i=0; i<NPARTITIONS; ++i) // Partition
563 {
564 for(int j=0; j<NDRAWERS; ++j) // Module
565 {
566 for(int k=0; k<NCHANNELS; ++k) // Channel
567 {
568 for(int l=0; l<NGAINS; ++l) // Gain
569 {
570 delete m_signal[f][i][j][k][l];
571 delete m_HG_ratio_stat[f][i][j][k][l];
572 delete m_HG_ratio2_stat[f][i][j][k][l];
573 delete m_LG_ratio_stat[f][i][j][k][l];
574 delete m_LG_ratio2_stat[f][i][j][k][l];
575 }
576 }
577 }
578 }
579 }
580
581 return StatusCode::SUCCESS;
582}
583
584//
585// Calibration coefficient storage :
586//
587// This method is called from the LaserCalibAlg
588// it fills the final ntuple, which name is decided here.
589// The name of the ROOTfile is chosen in the algorithm
590//
591
592
593StatusCode TileLaserLinearityCalibTool::writeNtuple(int runNumber, int runType, TFile * rootFile)
594{
595 ATH_MSG_INFO ( "finalize(" << runNumber << "," << runType << "," << rootFile << ")" );
596
597 // Create output tree
598
599 m_toolRunNo = runNumber;
600
601 TTree *t = new TTree(m_toolNtuple.c_str(), "TileLaserCalib-Ntuple");
602 t->Branch("RunNumber",&m_toolRunNo, "runNo/I");
603 t->Branch("ADC_status",&m_ADC_problem, "ADC/I");
604 t->Branch("RequestedAmp",&m_las_requ_amp, "requamp/D");
605 t->Branch("Humidity",&m_hrate,"humid/D");
606 t->Branch("AirFlow",&m_flow,"flow/D");
607 t->Branch("HeadTemp",&m_head_temp,"htemp/D");
608 t->Branch("Time",&m_las_time, "timeofrun/D");
609 t->Branch("LG_PMT_Signal",m_LG_PMT, "LG_PMT1[8][2]/D");
610 t->Branch("LG_PMT_Sigma_Signal",m_LG_PMT_S, "LG_PMT1_s[8][2]/D");
611 t->Branch("HG_PMT_Signal",m_HG_PMT, "HG_PMT1[8][2]/D");
612 t->Branch("HG_PMT_Sigma_Signal",m_HG_PMT_S, "HG_PMT1_s[8][2]/D");
613
614 t->Branch("LG_Diode_Signal",m_LG_diode, "LG_diode[8][10]/D");
615 t->Branch("LG_Diode_Sigma_Signal",m_LG_diode_S, "LG_diode_s[8][10]/D");
616 t->Branch("HG_Diode_Signal",m_HG_diode, "HG_diode[8][10]/D");
617 t->Branch("HG_Diode_Sigma_Signal",m_HG_diode_S, "HG_diode_s[8][10]/D");
618
619 t->Branch("Signal",*m_mean,"signal[8][4][64][48][2]/D");
620 t->Branch("Sigma_Signal",*m_mean_S,"signal_s[8][4][64][48][2]/D");
621 t->Branch("LG_Ratio",*m_LG_ratio,"LG_signal_cor[8][4][64][48][2]/D");
622 t->Branch("LG_Sigma_Ratio",*m_LG_ratio_S,"LG_signal_cor_s[8][4][64][48][2]/D");
623 t->Branch("LG_Ratio2",*m_LG_ratio2,"LG_signal_cor2[8][4][64][48][2]/D");
624 t->Branch("LG_Sigma_Ratio2",*m_LG_ratio2_S,"LG_signal_cor2_s[8][4][64][48][2]/D");
625 t->Branch("HG_Ratio",*m_HG_ratio,"HG_signal_cor[8][4][64][48][2]/D");
626 t->Branch("HG_Sigma_Ratio",*m_HG_ratio_S,"HG_signal_cor_s[8][4][64][48][2]/D");
627 t->Branch("HG_Ratio2",*m_HG_ratio2,"HG_signal_cor2[8][4][64][48][2]/D");
628 t->Branch("HG_Sigma_Ratio2",*m_HG_ratio2_S,"HG_signal_cor2_s[8][4][64][48][2]/D");
629 t->Branch("Entries",*m_entries,"n_LASER_entries[8][4][64][48][2]/I");
630
631
632 // Fill with current values (i.e. tree will have only one entry for this whole run)
633 t->Fill();
634 t->Write();
635
636 return StatusCode::SUCCESS;
637}
638
640{
641 ATH_MSG_INFO ( "finalize()" );
642 return StatusCode::SUCCESS;
643}
644
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
#define NDIODES
#define NFILTERS
#define NCHANNELS
#define NPARTITIONS
#define NDRAWERS
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
virtual bool isValid() override final
Can the handle be successfully dereferenced?
static const TileCablingService * getInstance()
get pointer to service instance
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
const uint32_t * cispar() const
CIS parameters.
SG::ReadHandleKey< TileLaserObject > m_laserContainerKey
double(* m_HG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_LG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
int(* m_entries)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode initNtuple(int runNumber, int runType, TFile *rootfile) override
RunningStat *(* m_LG_diode_signal)[NDIODES]
double(* m_LG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
RunningStat *(* m_LG_ratio_stat)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_LG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_mean_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode finalize() override
RunningStat *(* m_HG_ratio2_stat)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
RunningStat *(* m_LG_ratio2_stat)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
const TileCablingService * m_cabling
virtual StatusCode initialize() override
RunningStat *(* m_signal)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode finalizeCalculations() override
RunningStat *(* m_HG_ratio_stat)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_HG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode writeNtuple(int runNumber, int runType, TFile *rootfile) override
RunningStat *(* m_HG_diode_signal)[NDIODES]
virtual StatusCode execute() override
double(* m_LG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_HG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_mean)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
TileLaserLinearityCalibTool(const std::string &type, const std::string &name, const IInterface *pParent)
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
double(* m_HG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())