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