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