ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTileRetriever.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CaloTileRetriever.h"
6
8
10
12#include "CaloDetDescr/CaloDetDescrElement.h"
13#include "TileEvent/TileCell.h"
22#include <vector>
23#include <cstddef>
24#include <map>
25#include <stdexcept>
26
27using Athena::Units::GeV;
28
29namespace JiveXML {
30
37 CaloTileRetriever::CaloTileRetriever(const std::string& type,const std::string& name,const IInterface* parent):
38 AthAlgTool(type,name,parent),
39 m_calocell_id(nullptr)
40 {
41 //Only declare the interface
42 declareInterface<IDataRetriever>(this);
43
44 declareProperty("CellThreshold", m_cellThreshold = 50.);
45 declareProperty("RetrieveTILE" , m_tile = true);
46 declareProperty("DoTileDigit", m_doTileDigit = false);
47 declareProperty("DoBadTile", m_doBadTile = false);
48 declareProperty("DoTileCellDetails", m_doTileCellDetails = false);
49 declareProperty("CellEnergyPrec", m_cellEnergyPrec = 3);
50 declareProperty("CellTimePrec", m_cellTimePrec = 3);
51
52 // TileDigitsContainer names: {"TileDigitsCnt","TileDigitsFlt"};
53 declareProperty("TileDigitsContainer" ,m_sgKeyTileDigits = "",
54 "Input collection to retrieve Tile digits, used when doTileDigit is True");
55
56 // TileRawChannelContainer names: {"TileRawChannelOpt2","TileRawChannelOpt","TileRawChannelFixed",
57 // "TileRawChannelFitCool","TileRawChannelFit",
58 // "TileRawChannelCnt","TileRawChannelFlt"};
59 declareProperty("TileRawChannelContainer" ,m_sgKeyTileRawChannel = "",
60 "Input collection to retrieve Tile raw channels, used when doTileCellDetails is True.");
61 }
62
66
68
69 ATH_MSG_DEBUG( "Initialising Tool" );
70 ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") );
71
72 //=== get TileCondToolTiming
73 ATH_CHECK( m_tileToolTiming.retrieve() );
74
75 //=== get TileCondToolEmscale
76 ATH_CHECK( m_tileToolEmscale.retrieve() );
77
78 //=== get TileBadChanTool
79 ATH_CHECK( m_tileBadChanTool.retrieve() );
80
81 ATH_CHECK( m_sgKey.initialize() );
82
84
86
87 return StatusCode::SUCCESS;
88 }
89
93 StatusCode CaloTileRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
94
95 ATH_MSG_DEBUG( "in retrieve()" );
96
98 if (!cellContainer.isValid()){
99 ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " );
100 }
101 else{
102 if (m_tile) {
103 DataMap data = getCaloTileData(&(*cellContainer));
104 ATH_CHECK( FormatTool->AddToEvent("TILE", m_sgKey.key(), &data) );
105 ATH_MSG_DEBUG( "Tile retrieved" );
106 }
107 }
108
109 //Tile cells retrieved okay
110 return StatusCode::SUCCESS;
111 }
112
113
119
120 ATH_MSG_DEBUG( "getTileData()" );
121 char rndStr[30];
123
124 DataVect phi; phi.reserve(cellContainer->size());
125 DataVect eta; eta.reserve(cellContainer->size());
126 DataVect idVec; idVec.reserve(cellContainer->size());
127 DataVect energyVec; energyVec.reserve(cellContainer->size());
128 DataVect adcCounts1Vec; adcCounts1Vec.reserve(cellContainer->size() * 10);
129 DataVect adcCounts2Vec; adcCounts2Vec.reserve(cellContainer->size() * 10);
130 DataVect BadCell; BadCell.reserve(cellContainer->size());
131
132 DataVect pmt1Energy; pmt1Energy.reserve(cellContainer->size());
133 DataVect pmt1Time; pmt1Time.reserve(cellContainer->size());
134 DataVect pmt1Chi2; pmt1Chi2.reserve(cellContainer->size());
135 DataVect pmt1Gain; pmt1Gain.reserve(cellContainer->size());
136 DataVect pmt2Energy; pmt2Energy.reserve(cellContainer->size());
137 DataVect pmt2Time; pmt2Time.reserve(cellContainer->size());
138 DataVect pmt2Chi2; pmt2Chi2.reserve(cellContainer->size());
139 DataVect pmt2Gain; pmt2Gain.reserve(cellContainer->size());
140
141 DataVect pmt1RawAmplitude; pmt1RawAmplitude.reserve(cellContainer->size());
142 DataVect pmt1RawTime; pmt1RawTime.reserve(cellContainer->size());
143 DataVect pmt1Pedestal; pmt1Pedestal.reserve(cellContainer->size());
144 DataVect pmt1Number; pmt1Number.reserve(cellContainer->size());
145 DataVect pmt1ADCStatus; pmt1ADCStatus.reserve(cellContainer->size());
146 DataVect pmt2RawAmplitude; pmt2RawAmplitude.reserve(cellContainer->size());
147 DataVect pmt2RawTime; pmt2RawTime.reserve(cellContainer->size());
148 DataVect pmt2Pedestal; pmt2Pedestal.reserve(cellContainer->size());
149 DataVect pmt2Number; pmt2Number.reserve(cellContainer->size());
150 DataVect pmt2ADCStatus; pmt2ADCStatus.reserve(cellContainer->size());
151
152// m_sub; m_sub.reserve(cellContainer->size());
153 m_sub.clear();
154
155 std::string adcCounts1Str = "adcCounts1 multiple=\"0\"";
156 std::string adcCounts2Str = "adcCounts2 multiple=\"0\"";
157
158 const TileID* tileID = nullptr;
159 const TileHWID* tileHWID = nullptr;
160 const TileInfo* tileInfo = nullptr;
161 const TileCablingService* cabling=nullptr;
164 double energyGeV;
165 double amplitude = 0.;
166 const int vsize = cellContainer->size(); //5184;
167 int Index,pmtInd, cellInd, nTileSamples=0;
168 std::vector<double> pmt1ped(vsize,0.0);
169 std::vector<double> pmt2ped(vsize,0.0);
170 std::vector<double> pmt1rawamp(vsize,0.0);
171 std::vector<double> pmt2rawamp(vsize,0.0);
172 std::vector<double> pmt1rawtime(vsize,0.0);
173 std::vector<double> pmt2rawtime(vsize,0.0);
174 std::vector<int> pmt1number(vsize,0);
175 std::vector<int> pmt2number(vsize,0);
176 std::vector<unsigned long int> pmt1status(vsize,0);
177 std::vector<unsigned long int> pmt2status(vsize,0);
178 std::map<int,std::vector<float> > pmt1digit;
179 std::map<int,std::vector<float> > pmt2digit;
180 bool offlineRch = false;
181
182 //===== retrieving everything which is needed for Tile
183
184 if (detStore()->retrieve(tileID).isFailure()) {
185 ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileID" );
186
187 }
188
189 if (detStore()->retrieve(tileHWID).isFailure()) {
190 ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileHWID" );
191 }
192
193 if (detStore()->retrieve(tileInfo, "TileInfo").isFailure()) {
194 ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileInfo" );
195 }
196
198 if (m_doTileDigit) {
199 tileDigits = SG::makeHandle(m_sgKeyTileDigits);
200 if (!tileDigits.isValid()){
201 ATH_MSG_WARNING( "Could not retrieve TileDigits " );
202 }
203 }
204
207 RawChannelCnt = SG::makeHandle(m_sgKeyTileRawChannel);
208 if (!RawChannelCnt.isValid()){
209 ATH_MSG_WARNING( "Could not retrieve TileRawChannel " );
210 }
211 else {
212 RChUnit = RawChannelCnt->get_unit();
213 offlineRch = (RChUnit<TileRawChannelUnit::OnlineADCcounts &&
214 RawChannelCnt->get_type() != TileFragHash::OptFilterDsp);
215 }
216 }
217
218
219 // Loop Over TileRawChannelContainer to retrieve raw information. Keep the values in vectors
220
221 if (m_doTileCellDetails && RawChannelCnt.isValid()) {
222 if (offlineRch) {
223
224 for (const auto rawChannel : *RawChannelCnt) {
225
226 for (const auto cell : *rawChannel) {
227
228 /*Identifier cell_id =*/ cell->cell_ID_index(Index,pmtInd);
229 if (Index <= -1 ) continue; //disconnect channel index is -1 and MBTS is -2. They do not have an idhash
230 IdentifierHash cell_hash = m_calocell_id->calo_cell_hash( cell->cell_ID() );
231 cellInd = cellContainer->findIndex(cell_hash); //find Cell Index
232 if (cellInd < 0) continue;
233
234 HWIdentifier hwid=cell->adc_HWID();
235 int adc = tileHWID->adc(hwid);
236 int channel = tileHWID->channel(hwid);
237 int drawer = tileHWID->drawer(hwid);
238 int ros = tileHWID->ros(hwid);
239 int PMT = abs( cabling->channel2hole(ros,channel) );
240 int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
241 uint32_t tileAdcStatus = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc));
242
243 amplitude = cell->amplitude();
244 //Change amplitude units to ADC counts
246 amplitude /= m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, 1.0, TileRawChannelUnit::ADCcounts, RChUnit);
247 } else if (RChUnit > TileRawChannelUnit::OnlineADCcounts) {
248 // Should never get here due to offlineRch test above.
249 //amplitude = m_tileToolEmscale->undoOnlCalib(drawerIdx, channel, adc, amplitude, RChUnit);
250 std::abort();
251 }
252
253 if ( pmtInd == 0 ) { // first PMT
254
255 pmt1ped[cellInd] = cell->pedestal();
256 pmt1rawamp[cellInd] = amplitude;
257 pmt1rawtime[cellInd] = cell->uncorrTime();
258 pmt1number[cellInd] = PMT;
259 pmt1status[cellInd] = tileAdcStatus;
260 }
261 else { // second PMT
262
263 pmt2ped[cellInd] = cell->pedestal();
264 pmt2rawamp[cellInd] = amplitude;
265 pmt2rawtime[cellInd] = cell->uncorrTime();
266 pmt2number[cellInd] = PMT;
267 pmt2status[cellInd] = tileAdcStatus;
268
269 }
270 }
271 }//for TileRawChannelContainer loop
272 }
273 } // end of doTileCellDetails
274
275
276 //Loop over TileDigitsContainer to retrieve digits. Keep the digits values in a map
277
278 if (m_doTileDigit && tileDigits.isValid()) {
279
280 //----- get tile digits--------------------------
281
282 // tile digits loop
283 for (const auto digitChannel : *tileDigits) {
284
285 for (const auto cell : *digitChannel) {
286
287 /*Identifier cell_id =*/ cell->cell_ID_index(Index,pmtInd);
288 if (Index <= -1 ) continue; //disconnect channel index is -1 and MBTS is -2. They do not have an idhash
289 IdentifierHash cell_hash = m_calocell_id->calo_cell_hash( cell->cell_ID() );
290 cellInd = cellContainer->findIndex(cell_hash); //find Cell Index
291 if (cellInd < 0) continue;
292 if ( (*cellContainer)[cellInd]->energy() < m_cellThreshold) continue;
293
294 nTileSamples = cell->NtimeSamples();
295 std::vector<float> tileSamples = cell->samples();
296
297 if (pmtInd == 0 ) { // first PMT
298 pmt1digit.insert(std::make_pair( cellInd, tileSamples ) );
299 }
300 else { // second PMT
301 pmt2digit.insert(std::make_pair( cellInd, tileSamples ) );
302 }
303
304 }
305 }//for TileDigitContainer loop
306 } // end if doTileDigit
307
308
309 //Loop Over CaloCellContainer to retrieve TileCell information
310
313
314 double energyAllTile = 0.;
315
316 for (;it1!=it2;++it1) {
317
318 if ((*it1)->badcell()) BadCell.push_back(1);
319 else if ((*it1)->energy()>= m_cellThreshold) BadCell.push_back(0);
320 else BadCell.push_back(-1);
321
322 Identifier cellid = (*it1)->ID();
323 IdentifierHash cell_hash = m_calocell_id->calo_cell_hash( cellid );
324 cellInd = cellContainer->findIndex(cell_hash);
325 if (cellInd < 0) continue;
326 calcTILELayerSub(cellid);
327
328 energyGeV = (*it1)->energy()*(1./GeV);
329 energyVec.push_back(DataType( gcvt( energyGeV, m_cellEnergyPrec, rndStr) ));
330 energyAllTile += energyGeV;
331
332 idVec.push_back(DataType( (Identifier::value_type)(*it1)->ID().get_compact() ));
333 phi.push_back(DataType((*it1)->phi()));
334 eta.push_back(DataType((*it1)->eta()));
335
336 if (m_doTileDigit && tileDigits.isValid()) {
337
338 if ( !pmt1digit[cellInd].empty()) {
339 for (int i=0; i<nTileSamples; i++) {
340 adcCounts1Str="adcCounts1 multiple=\""+DataType(nTileSamples).toString()+"\"";
341 adcCounts1Vec.push_back(DataType( int(pmt1digit[cellInd][i])));
342 }
343 }
344 else {
345 for (int i=0; i<nTileSamples; i++) {
346 adcCounts1Str="adcCounts1 multiple=\""+DataType(nTileSamples).toString()+"\"";
347 adcCounts1Vec.push_back(DataType(0));
348 }
349 }
350
351
352 if ( !pmt2digit[cellInd].empty()) {
353 for (int i=0; i<nTileSamples; i++) {
354 adcCounts2Str="adcCounts2 multiple=\""+DataType(nTileSamples).toString()+"\"";
355 adcCounts2Vec.push_back(DataType( int(pmt2digit[cellInd][i])));
356 }
357 }
358 else {
359 for (int i=0; i<nTileSamples; i++) {
360 adcCounts2Str= "adcCounts2 multiple=\""+DataType(nTileSamples).toString()+"\"";
361 adcCounts2Vec.push_back(DataType(0));
362 }
363 }
364 }
365
367
368 const TileCell* theTileCell = dynamic_cast<const TileCell *>(*it1);
369 if (not theTileCell) {
370 //should never happen
371 throw std::runtime_error("Could not cast pointer to TileCell in CaloTileRetriever::getCaloTileData");
372 }
373 int gain1 = theTileCell->gain1();
374 int qual1 = theTileCell->qual1();
375 bool badch1 = theTileCell->badch1();
376 bool noch1 = (gain1<0 || gain1>1);
377
378 int qual2 = theTileCell->qual2();
379 int gain2 = theTileCell->gain2();
380 bool badch2 = theTileCell->badch2();
381 bool noch2 = (gain2<0 || gain2>1);
382
383 if (badch1 != badch2 && qual1 != qual2 && qual1 < 255 && qual2 < 255) {
384 if (badch1 && !noch1) gain1 = 1 - gain1;
385 if (badch2 && !noch1) gain2 = 1 - gain2;
386 }
387 if (badch1) qual1 = -qual1;
388 if (badch2) qual2 = -qual2;
389
390 pmt1Energy.push_back(DataType(theTileCell->ene1()*(1./GeV)));
391 pmt1Time.push_back(DataType(theTileCell->time1()));
392 pmt1Chi2.push_back(DataType(qual1));
393 pmt1Gain.push_back(DataType(gain1));
394
395 pmt2Energy.push_back(DataType(theTileCell->ene2()*(1./GeV)));
396 pmt2Time.push_back(DataType(theTileCell->time2()));
397 pmt2Chi2.push_back(DataType(qual2));
398 pmt2Gain.push_back(DataType(gain2));
399
400 if (offlineRch && RawChannelCnt.isValid()
401 && (noch1 || pmt1number[cellInd]!=0) && (noch2 || pmt2number[cellInd]!=0)) {
402
403 uint32_t tileAdcStatus = pmt1status[cellInd];
404 if (badch1) tileAdcStatus += 10;
405
406 pmt1RawAmplitude.push_back(DataType(pmt1rawamp[cellInd]));
407 pmt1RawTime.push_back(DataType(pmt1rawtime[cellInd]));
408 pmt1Pedestal.push_back(DataType(pmt1ped[cellInd]));
409 pmt1Number.push_back(DataType(pmt1number[cellInd]));
410 pmt1ADCStatus.push_back(DataType(tileAdcStatus));
411
412 tileAdcStatus = pmt2status[cellInd];
413 if (badch2) tileAdcStatus += 10;
414
415 pmt2RawAmplitude.push_back(DataType(pmt2rawamp[cellInd]));
416 pmt2RawTime.push_back(DataType(pmt2rawtime[cellInd]));
417 pmt2Pedestal.push_back(DataType(pmt2ped[cellInd]));
418 pmt2Number.push_back(DataType(pmt2number[cellInd]));
419 pmt2ADCStatus.push_back(DataType(tileAdcStatus));
420 }
421 else {
422
423 float maxTime = (tileInfo->NdigitSamples()/2) * 25;
424
425 if (noch1 /* || pmt1digit[cellInd].empty() */ ) { //invalid gain - channel missing or digits not include in DPD
426 pmt1RawAmplitude.push_back(DataType(0));
427 pmt1RawTime.push_back(DataType(0));
428 pmt1ADCStatus.push_back(DataType(0));
429 pmt1Number.push_back(DataType(0));
430 pmt1Pedestal.push_back(DataType(0)); //The is no pedestal in DPD.
431 } else {
432 HWIdentifier hwid = cabling->s2h_adc_id(tileID->adc_id(cellid,0,gain1));
433
434 int adc = tileHWID->adc(hwid);
435 int channel = tileHWID->channel(hwid);
436 int drawer = tileHWID->drawer(hwid);
437 int ros = tileHWID->ros(hwid);
438 int PMT = abs( cabling->channel2hole(ros,channel) );
439 int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
440 float scale = m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, 1.0,
442 float amp = theTileCell->ene1() / scale;
443 float time = theTileCell->time1();
444
445 int qbit = (theTileCell->qbit1() & TileCell::MASK_TIME);
446 if ((qual1 != 0 || qbit != 0 || amp != 0.0) && (fabs(time) < maxTime && time != 0.0)) {
447 time += m_tileToolTiming->getSignalPhase(drawerIdx, channel, adc);
448 }
449
450 uint32_t tileAdcStatus = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc));
451 if (badch1) tileAdcStatus += 10;
452
453 pmt1RawAmplitude.push_back(DataType(amp));
454 pmt1RawTime.push_back(DataType(time));
455 pmt1Number.push_back(DataType(PMT));
456 pmt1ADCStatus.push_back(DataType( tileAdcStatus ));
457 pmt1Pedestal.push_back(DataType(0)); //The is no pedestal in DPD . This line is temporary.
458 }
459
460 if (noch2 /* || pmt2digit[cellInd].empty() */ ) { //invalid gain - channel missing
461 pmt2RawAmplitude.push_back(DataType(0));
462 pmt2RawTime.push_back(DataType(0));
463 pmt2ADCStatus.push_back(DataType(0));
464 pmt2Number.push_back(DataType(0));
465 pmt2Pedestal.push_back(DataType(0)); //The is no pedestal in DPD
466 } else {
467 HWIdentifier hwid = cabling->s2h_adc_id(tileID->adc_id(cellid,1,gain2));
468
469 int adc = tileHWID->adc(hwid);
470 int channel = tileHWID->channel(hwid);
471 int drawer = tileHWID->drawer(hwid);
472 int ros = tileHWID->ros(hwid);
473 int PMT = abs( cabling->channel2hole(ros,channel) );
474 int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
475 float scale = m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, 1.0,
477 float amp = theTileCell->ene2() / scale;
478 float time = theTileCell->time2();
479
480 int qbit = (theTileCell->qbit2() & TileCell::MASK_TIME);
481 if ((qual2 != 0 || qbit != 0 || amp != 0.0) && (fabs(time) < maxTime && time != 0.0)) {
482 time += m_tileToolTiming->getSignalPhase(drawerIdx, channel, adc);
483 }
484
485 uint32_t tileAdcStatus = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc));
486 if (badch2) tileAdcStatus += 10;
487
488 pmt2RawAmplitude.push_back(DataType(amp));
489 pmt2RawTime.push_back(DataType(time));
490 pmt2ADCStatus.push_back(DataType( tileAdcStatus ));
491 pmt2Number.push_back(DataType(PMT));
492 pmt2Pedestal.push_back(DataType(0)); //The is no pedestal in DPD .
493 }
494 } //don't have TileRawChannel
495 } //if (m_doTileCellDetails)
496 } // end cell iterator
497
498 ATH_MSG_DEBUG( " Total energy in Tile in GeV : " << energyAllTile );
499
500 if ( !pmt1digit.empty() ) pmt1digit.clear();
501 if ( !pmt2digit.empty() ) pmt2digit.clear();
502
503 // write values into DataMap
504 auto n = phi.size();
505 DataMap["phi"] = std::move(phi);
506 DataMap["eta"] = std::move(eta);
507 DataMap["sub"] = m_sub;
508 DataMap["id"] = std::move(idVec);
509 DataMap["energy"] = std::move(energyVec);
510
511
512 //BadCells
513 if (m_doBadTile==true) {
514 DataMap["BadCell"]= std::move(BadCell);
515 }
516
518 DataMap["pmt1Energy"] = std::move(pmt1Energy);
519 DataMap["pmt1Time"] = std::move(pmt1Time);
520 DataMap["pmt1Chi2"] = std::move(pmt1Chi2);
521 DataMap["pmt1Gain"] = std::move(pmt1Gain);
522
523 DataMap["pmt2Energy"] = std::move(pmt2Energy);
524 DataMap["pmt2Time"] = std::move(pmt2Time);
525 DataMap["pmt2Chi2"] = std::move(pmt2Chi2);
526 DataMap["pmt2Gain"] = std::move(pmt2Gain);
527
528 DataMap["pmt1RawAmplitude"] = std::move(pmt1RawAmplitude);
529 DataMap["pmt1RawTime"] = std::move(pmt1RawTime);
530 DataMap["pmt1ADCStatus"] = std::move(pmt1ADCStatus);
531 DataMap["pmt1Number"] = std::move(pmt1Number);
532 DataMap["pmt1Pedestal"] = std::move(pmt1Pedestal);
533
534 DataMap["pmt2RawAmplitude"] = std::move(pmt2RawAmplitude);
535 DataMap["pmt2RawTime"] = std::move(pmt2RawTime);
536 DataMap["pmt2ADCStatus"] = std::move(pmt2ADCStatus);
537 DataMap["pmt2Number"] = std::move(pmt2Number);
538 DataMap["pmt2Pedestal"] = std::move(pmt2Pedestal);
539 }
540
541 DataMap[adcCounts1Str] = std::move( adcCounts1Vec);
542 DataMap[adcCounts2Str] = std::move(adcCounts2Vec);
543
544 //Be verbose
545 ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << n << " entries" );
546
547 //All collections retrieved okay
548 return DataMap;
549
550 } // getTileData
551
552 //-----------------------------------------------------------------------------------------------------
553
555 {
556 if (m_calocell_id->is_tile_barrel(cellid))
557 {
558 if (m_calocell_id->is_tile_negative(cellid))
559 m_sub.push_back(DataType(2));
560 else
561 m_sub.push_back(DataType(3));
562 }
563 else if (m_calocell_id->is_tile_extbarrel(cellid))
564 {
565 if (m_calocell_id->is_tile_negative(cellid))
566 m_sub.push_back(DataType(0));
567 else
568 m_sub.push_back(DataType(5));
569 }
570 //else in ITC or scint
571 else
572 {
573 if (m_calocell_id->is_tile_negative(cellid))
574 m_sub.push_back(DataType(1));
575 else
576 m_sub.push_back(DataType(4));
577 }
578 }
579
580 //--------------------------------------------------------------------------
581
582} // JiveXML namespace
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
IndexedConstituentUserInfo::Index Index
Wrapper to avoid constant divisions when using units.
static const Attributes_t empty
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
Container class for CaloCell.
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
SG::ReadHandleKey< CaloCellContainer > m_sgKey
const DataMap getCaloTileData(const CaloCellContainer *cellContainer)
Retrieve Tile cell location and details.
const CaloCell_ID * m_calocell_id
void calcTILELayerSub(Identifier &)
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
SG::ReadHandleKey< TileDigitsContainer > m_sgKeyTileDigits
virtual std::string dataTypeName() const
Return the name of the data type.
ToolHandle< TileCondToolTiming > m_tileToolTiming
StatusCode initialize()
Default AthAlgTool methods.
ToolHandle< ITileBadChanTool > m_tileBadChanTool
SG::ReadHandleKey< TileRawChannelContainer > m_sgKeyTileRawChannel
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
CaloTileRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
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.
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
float time1(void) const
get time of first PMT
Definition TileCell.h:192
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition TileCell.h:209
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition TileCell.h:206
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200
float ene1(void) const
get energy of first PMT
Definition TileCell.h:187
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition TileCell.h:212
float time2(void) const
get time of second PMT
Definition TileCell.h:194
@ MASK_TIME
Definition TileCell.h:67
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition TileCell.h:203
float ene2(void) const
get energy of second PMT
Definition TileCell.h:189
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition TileHWID.h:189
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
Definition TileHWID.h:193
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition TileHWID.h:171
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition TileHWID.h:167
Helper class for TileCal offline identifiers.
Definition TileID.h:67
int NdigitSamples() const
Returns the number of sammples (digits) per event.
Definition TileInfo.h:75
Identifier adc_id(const Identifier &cell_id, int pmt, int adc) const
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< std::string, DataVect > DataMap
Definition DataType.h:59
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
Definition DataType.h:58
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())