ATLAS Offline Software
Loading...
Searching...
No Matches
JiveXML::LArDigitRetriever Class Reference

Retrieves all Tile Calo Cell objects. More...

#include <LArDigitRetriever.h>

Inheritance diagram for JiveXML::LArDigitRetriever:
Collaboration diagram for JiveXML::LArDigitRetriever:

Public Member Functions

virtual StatusCode retrieve (ToolHandle< IFormatTool > &FormatTool) override
 Retrieve all the data.
const DataMap getLArDigitData (const CaloCellContainer *cellContainer, const std::string &datatype, CaloCell_ID::SUBCALO calotype)
 Retrieve Tile cell location and details.
virtual std::string dataTypeName () const override
 Return the name of the data type.
virtual StatusCode initialize () override
 Default AthAlgTool methods.

Private Member Functions

void calcEMLayerSub (Identifier &)
void calcHECLayerSub (Identifier &)

Private Attributes

SG::ReadHandleKey< CaloCellContainerm_sgKey {this, "StoreGateKey", "AllCalo", "Name of the CaloCellContainer"}
SG::ReadHandleKey< LArDigitContainerm_sgKeyLArDigit_raw {this, "StoreGateKey", "FREE", "Name of the LArDigitContainer"}
SG::ReadHandleKey< LArDigitContainerm_sgKeyLArDigit_esd {this, "StoreGateKey", "LArDigitContainer_Thinned", "Name of the LArDigitContainer"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArADC2MeVm_adc2mevKey { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" }
const CaloCell_IDm_calocell_id {}
Gaudi::Property< bool > m_lar {this, "RetrieveLAr", true}
Gaudi::Property< bool > m_hec {this, "RetrieveHEC", true}
Gaudi::Property< bool > m_fcal {this, "RetrieveFCAL", true}
Gaudi::Property< bool > m_doLArDigit {this, "DoLArDigit", false}
Gaudi::Property< bool > m_doHECDigit {this, "DoHECDigit", false}
Gaudi::Property< bool > m_doFCalDigit {this, "DoFCalDigit", false}
Gaudi::Property< bool > m_cellConditionCut {this, "CellConditionCut", false}
Gaudi::Property< int > m_cellEnergyPrec {this, "CellEnergyPrec", 3}
Gaudi::Property< int > m_cellTimePrec {this, "CellTimePrec", 3}
Gaudi::Property< double > m_cellThreshold {this, "CellThreshold", 50.}
Gaudi::Property< std::vector< Identifier::value_type > > m_LArChannelsToIgnoreM5 {this, "LArChannelsToIgnoreM5", {}}
Gaudi::Property< bool > m_doMaskLArChannelsM5 {this, "DoMaskLArChannelsM5", false}
bool m_doDigit {false}
bool m_inputdpd {false}
DataVect m_sub

Detailed Description

Retrieves all Tile Calo Cell objects.

  • Properties
    • StoreGateKey: default is 'AllCalo'. Don't change.
    • CallThreshold: default is 50 MeV
    • RetrieveLAr: activate retriever, default is true
    • DoLarDigits: write LAr digits (ADC), default is false
    • RetrieveHEC: activate retriever, default is true
    • DoHECDigits: write HEC digits (ADC), default is false
    • RetrieveFCal: activate retriever, default is true
    • DoFCalDigits: write FCal digits (ADC), default is false
    • CellEnergyPrec: output precision, default is 3 digits
    • CellTimePrec: output precision, default is 3 digits
  • Retrieved Data
    • location in phi and eta
    • identifier and adc counts of each cell
    • various pmt details

Definition at line 52 of file LArDigitRetriever.h.

Member Function Documentation

◆ calcEMLayerSub()

void JiveXML::LArDigitRetriever::calcEMLayerSub ( Identifier & cellid)
private

Definition at line 451 of file LArDigitRetriever.cxx.

452 {
453 const auto posNeg = std::abs(m_calocell_id->pos_neg(cellid));
454 if (posNeg<1 or posNeg>3) return;
455 static constexpr std::array<int,3> datatypes{2,3,0};
456 m_sub.emplace_back(datatypes[posNeg-1]);
457 }
const CaloCell_ID * m_calocell_id
list datatypes
Definition calibdata.py:54

◆ calcHECLayerSub()

void JiveXML::LArDigitRetriever::calcHECLayerSub ( Identifier & cellid)
private

Definition at line 461 of file LArDigitRetriever.cxx.

462 {
463 if(m_calocell_id->pos_neg(cellid)==2)
464 m_sub.emplace_back(1);
465 else
466 m_sub.emplace_back(0);
467 }

◆ dataTypeName()

virtual std::string JiveXML::LArDigitRetriever::dataTypeName ( ) const
inlineoverridevirtual

Return the name of the data type.

Definition at line 65 of file LArDigitRetriever.h.

65{ return "LArDigit"; };

◆ getLArDigitData()

const DataMap JiveXML::LArDigitRetriever::getLArDigitData ( const CaloCellContainer * cellContainer,
const std::string & datatype,
CaloCell_ID::SUBCALO calotype )

Retrieve Tile cell location and details.

Parameters
FormatToolthe tool that will create formated output from the DataMap

Definition at line 90 of file LArDigitRetriever.cxx.

93 {
94
95 //be verbose
96 ATH_MSG_DEBUG( "getLArDigitData()" );
97 const EventContext& ctx = Gaudi::Hive::currentContext();
98
99 char rndStr[30];
101
102 DataVect phi; phi.reserve(cellContainer->size());
103 DataVect eta; eta.reserve(cellContainer->size());
104 DataVect x; x.reserve(cellContainer->size());
105 DataVect y; y.reserve(cellContainer->size());
106 DataVect dx; dx.reserve(cellContainer->size());
107 DataVect dy; dy.reserve(cellContainer->size());
108
109 DataVect energy; energy.reserve(cellContainer->size());
110 DataVect idVec; idVec.reserve(cellContainer->size());
111 DataVect channel; channel.reserve(cellContainer->size());
112 DataVect feedThrough; feedThrough.reserve(cellContainer->size());
113 DataVect slotVec; slotVec.reserve(cellContainer->size());
114
115 DataVect cellTimeVec; cellTimeVec.reserve(cellContainer->size());
116 DataVect cellGain; cellGain.reserve(cellContainer->size());
117 DataVect cellPedestal; cellPedestal.reserve(cellContainer->size());
118 DataVect adc2Mev; adc2Mev.reserve(cellContainer->size());
119
120// m_sub; m_sub.reserve(cellContainer->size());
121 m_sub.clear(); // need to clear before each event, otherwise appended
122
123 DataVect LArSampleIndexVec; LArSampleIndexVec.reserve(cellContainer->size());
124
125 std::string LArSampleIndexStr="adcCounts multiple=\"0\"";
126
127 SG::ReadHandle<LArDigitContainer> LArDigitCnt_raw_handle(m_sgKeyLArDigit_raw);
128 SG::ReadHandle<LArDigitContainer> LArDigitCnt_esd_handle(m_sgKeyLArDigit_esd);
129 const LArDigitContainer* LArDigitCnt = nullptr;
130 if (LArDigitCnt_raw_handle.isValid()) {
131 LArDigitCnt = &(*LArDigitCnt_raw_handle);
132 }
133 else if (LArDigitCnt_esd_handle.isValid()) {
134 LArDigitCnt = &(*LArDigitCnt_esd_handle);
135 m_inputdpd = true;
136 }
137 else {
138 ATH_MSG_WARNING( "Could not retrieve LArDigits" );
139 }
140
141 const ILArPedestal* larPedestal = nullptr;
142 if ( detStore()->retrieve(larPedestal).isFailure()){
143 ATH_MSG_ERROR( "in getLArDigitData(), Could not retrieve LAr Pedestal" );
144 }
145
146 const LArOnlineID* onlineId = nullptr;
147 if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) {
148 ATH_MSG_ERROR( "in getLArDigitData(),Could not get LArOnlineID!" );
149 }
150
151 SG::ReadCondHandle<LArADC2MeV> adc2mev (m_adc2mevKey, ctx);
152
153//------------------------------------------------------
154//Loop over the digits and find Cell (LAr,HEC, FCAL)
155//------------------------------------------------------
156
157 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
158 const LArOnOffIdMapping* cabling{*cablingHdl};
159 if(!cabling) {
160 ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() );
161 return DataMap;
162 }
163
164
165 if (LArDigitCnt && m_doDigit==true) {
166
167 auto pCellIndex = std::make_unique<std::array<int, 200000>>();
168 pCellIndex->fill(0);
169 int nLArSamples = 0;
170 HWIdentifier LArHardwareId;
171 Identifier LArId;
172
173 double energyGeV,cellTime;
174
175 for (const LArDigit* digit : *LArDigitCnt) {
176
177 LArHardwareId = digit->hardwareID();
178 if (!cabling->isOnlineConnected(LArHardwareId))continue;
179
180 LArId = cabling->cnvToIdentifier(LArHardwareId); //converter
181 const IdentifierHash cellhash=m_calocell_id->calo_cell_hash(LArId); //fast method to find cell
182
183 int Index = cellContainer->findIndex(cellhash); //find Cell Index
184 if (Index >= 0)
185 (*pCellIndex)[Index] = Index;
186
187 nLArSamples = digit->nsamples();
188 std::vector<short> LArSamples = digit->samples();
189 int largain = digit->gain();
190 int FT = onlineId->feedthrough(LArHardwareId);
191 int slot = onlineId->slot(LArHardwareId);
192 int larchan = onlineId->channel(LArHardwareId);
193 float pedestal=larPedestal->pedestal(LArHardwareId,largain);
194 float pedvalue=0;
195 if (pedestal >= (1.0+LArElecCalib::ERRORCODE)) pedvalue = pedestal;
196 else pedvalue = LArSamples[0];
197
198 LArVectorProxy polynom_adc2mev = adc2mev->ADC2MEV(LArId,largain);
199
200 if ( Index >= 0 ){ // can be -1
201 if ( (*cellContainer)[Index]->energy() >m_cellThreshold) {
202
203 if (((((*cellContainer)[Index]->provenance())&0xFF)!=0xA5)&&m_cellConditionCut) continue; // check full conition for LAr Cells
204
205 //ignore LAr, HEC, and/or FCAL cells that are to be masked
207 bool maskChannel = false;
208 for (size_t i = 0; i < m_LArChannelsToIgnoreM5.size(); i++){
209 if ( (*cellContainer)[Index]->ID().get_compact() == m_LArChannelsToIgnoreM5[i]){
210 maskChannel = true;
211 break; // exit loop over bad channels
212 }
213 }
214 if (maskChannel) continue; // continue loop over all channels
215 }
216
217
218 if (datatype == "LAr" && m_calocell_id->is_em(LArId)) {
219
220 calcEMLayerSub(LArId);
221
222 energyGeV = (*cellContainer)[Index]->energy() * (1./GeV);
223 energy.push_back(DataType( gcvt( energyGeV, m_cellEnergyPrec, rndStr) ));
224 idVec.push_back(DataType((*cellContainer)[Index]->ID().get_compact() ));
225 phi.push_back(DataType((*cellContainer)[Index]->phi()));
226 eta.push_back(DataType((*cellContainer)[Index]->eta()));
227
228 cellTime = (*cellContainer)[Index]->time();
229 cellTimeVec.push_back(DataType( gcvt( cellTime, m_cellTimePrec, rndStr) ) );
230 cellPedestal.push_back(DataType(pedvalue));
231 cellGain.push_back(DataType(largain));
232 channel.push_back(DataType(larchan));
233 feedThrough.push_back(DataType(FT));
234 slotVec.push_back(DataType(slot));
235 if (polynom_adc2mev.size()==0){
236 adc2Mev.push_back(DataType(-1));
237 }else{
238 adc2Mev.push_back(DataType(polynom_adc2mev[1]));
239 }
240 if ( m_doLArDigit ) {
241 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
242 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(LArSamples[i]));
243 }
244 } //match datatype LAr
245
246 else if(datatype == "HEC" && m_calocell_id->is_hec(LArId)) {
247
248 calcHECLayerSub(LArId);
249 energyGeV = (*cellContainer)[Index]->energy() * (1./GeV);
250 energy.push_back(DataType( gcvt( energyGeV, m_cellEnergyPrec, rndStr) ));
251 idVec.push_back(DataType((*cellContainer)[Index]->ID().get_compact() ));
252 phi.push_back(DataType((*cellContainer)[Index]->phi()));
253 eta.push_back(DataType((*cellContainer)[Index]->eta()));
254
255
256 cellTime = (*cellContainer)[Index]->time();
257 cellTimeVec.push_back(DataType( gcvt( cellTime, m_cellTimePrec, rndStr) ) );
258 cellPedestal.push_back(DataType(pedvalue));
259 cellGain.push_back(DataType(largain));
260 channel.push_back(DataType(larchan));
261 feedThrough.push_back(DataType(FT));
262 slotVec.push_back(DataType(slot));
263 if (polynom_adc2mev.size()==0)
264 adc2Mev.push_back(DataType(-1));
265 else
266 adc2Mev.push_back(DataType(polynom_adc2mev[1]));
267 if (m_doHECDigit){
268 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
269 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(LArSamples[i]));
270 }
271 }//match datatype HEC
272
273 else if(datatype == "FCAL" && m_calocell_id->is_fcal(LArId)) {
274
275 energyGeV = (*cellContainer)[Index]->energy() * (1./GeV);
276 energy.push_back(DataType( gcvt( energyGeV, m_cellEnergyPrec, rndStr) ));
277 idVec.push_back(DataType((*cellContainer)[Index]->ID().get_compact() ));
278 x.push_back(DataType((*cellContainer)[Index]->x() *0.1));
279 y.push_back(DataType((*cellContainer)[Index]->y() *0.1));
280
281 const CaloDetDescrElement* elt = (*cellContainer)[Index]->caloDDE();
282
283 dx.push_back(DataType(elt->dx()*0.1));
284 dy.push_back(DataType(elt->dy()*0.1));
285
286 if (m_calocell_id->pos_neg(LArId)==2) m_sub.push_back(DataType(1));
287 else m_sub.push_back(DataType(0));
288
289
290 cellTime = (*cellContainer)[Index]->time();
291 cellTimeVec.push_back(DataType( gcvt( cellTime, m_cellTimePrec, rndStr) ) );
292 cellPedestal.push_back(DataType(pedvalue));
293 cellGain.push_back(DataType(largain));
294 channel.push_back(DataType(larchan));
295 feedThrough.push_back(DataType(FT));
296 slotVec.push_back(DataType(slot));
297 if (polynom_adc2mev.size()==0)
298 adc2Mev.push_back(DataType(-1));
299 else
300 adc2Mev.push_back(DataType(polynom_adc2mev[1]));
301 if (m_doFCalDigit){
302 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
303 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(LArSamples[i]));
304 }
305 }//match datatype FCAL
306 } //if cellThreshold
307 } // if Index >0
308 } //digit
309
310
311// If the digits are retrieved from DPD, retrieve the other cells which do not have the digits available
312
313 if (m_inputdpd) {
314
315 CaloCellContainer::const_iterator it1 = cellContainer->beginConstCalo(calotype);
316 CaloCellContainer::const_iterator it2 = cellContainer->endConstCalo(calotype);
317
318
319 for (;it1!=it2;++it1) {
320 //---------------------------------------------
321
322 if ( (*it1)->energy() < m_cellThreshold ) continue;
323
324 Identifier cellid = (*it1)->ID();
325
326 const IdentifierHash cellhash=m_calocell_id->calo_cell_hash(cellid); //fast method to find cell
327 int Index = cellContainer->findIndex(cellhash); //find Cell Index
328 if (Index >= 0 && (*pCellIndex)[Index] == Index)
329 continue; //test whether this cell was already retrieved
330
331 HWIdentifier LArhwid = cabling->createSignalChannelIDFromHash((*it1)->caloDDE()->calo_hash());
332
333 if (m_calocell_id->is_tile(cellid) ) continue;
334 if (((((*it1)->provenance())&0xFF)!=0xA5)&&m_cellConditionCut) continue; // check full condition for LAr cells
335
336 //ignore LAr, HEC, and/or FCAL cells that are to be masked
338 bool maskChannel = false;
339 for (size_t i = 0; i < m_LArChannelsToIgnoreM5.size(); i++){
340 if (cellid == m_LArChannelsToIgnoreM5[i]){
341 maskChannel = true;
342 break; // exit loop over bad channels
343 }
344 }
345 if (maskChannel) continue; // continue loop over all channels
346 }
347
348 energyGeV = (*it1)->energy()*(1./GeV);
349 energy.push_back(DataType( gcvt( energyGeV, m_cellEnergyPrec, rndStr) ));
350 idVec.push_back(DataType((*it1)->ID().get_compact() ));
351 channel.push_back(DataType(onlineId->channel(LArhwid)));
352 feedThrough.push_back(DataType(onlineId->feedthrough(LArhwid)));
353 slotVec.push_back(DataType(onlineId->slot(LArhwid)));
354
355 cellTime = (*it1)->time();
356 cellTimeVec.push_back(DataType( gcvt( cellTime, m_cellTimePrec, rndStr) ) );
357 cellGain.push_back(DataType((*it1)->gain()));
358 int largain = (*it1)->gain();
359 float pedvalue=0;
360 float pedestal=larPedestal->pedestal(LArhwid,largain);
361 if (pedestal >= (1.0+LArElecCalib::ERRORCODE)) pedvalue = pedestal;
362 else pedvalue = 0;
363 cellPedestal.push_back(DataType(pedvalue));
364
365 LArVectorProxy polynom_adc2mev = adc2mev->ADC2MEV(cellid,largain);
366 if (polynom_adc2mev.size()==0){
367 adc2Mev.push_back(DataType(-1));
368 }else{
369 adc2Mev.push_back(DataType(polynom_adc2mev[1]));
370 }
371
372
373 if (datatype == "LAr") {
374 calcEMLayerSub(cellid);
375 phi.push_back(DataType((*it1)->phi()));
376 eta.push_back(DataType((*it1)->eta()));
377 if ( m_doLArDigit ) {
378 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
379 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(0)); }
380 }
381
382 else if (datatype == "HEC") {
383 calcHECLayerSub(cellid);
384 phi.push_back(DataType((*it1)->phi()));
385 eta.push_back(DataType((*it1)->eta()));
386 if (m_doHECDigit){
387 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
388 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(0)); }
389 }
390
391 else if (datatype == "FCAL") {
392
393 x.push_back(DataType( (*it1)->x()*0.1 ));
394 y.push_back(DataType( (*it1)->y()*0.1 ));
395
396 const CaloDetDescrElement* elt = (*it1)->caloDDE();
397 dx.push_back(DataType( elt->dx()*0.1 ));
398 dy.push_back(DataType( elt->dy()*0.1 ));
399
400 if (m_calocell_id->pos_neg(cellid)==2) m_sub.push_back(DataType(1));
401 else m_sub.push_back(DataType(0));
402 if (m_doFCalDigit){
403 LArSampleIndexStr="adcCounts multiple=\""+DataType(nLArSamples).toString()+"\"";
404 for(int i=0; i<nLArSamples; i++) LArSampleIndexVec.push_back(DataType(0));
405 }
406 }
407
408 }//for(;it1!=it2;it1++)
409 }// if (m_inputdpd)
410 }
411
412//----------------above lines are trying to get the LAr,HEC and FCAL tags --------------
413
414 // write values into DataMap
415 const auto nEntries = phi.size();
416 if(!(datatype=="FCAL")){
417 DataMap["phi"] = std::move(phi);
418 DataMap["eta"] = std::move(eta);
419 } else {
420 DataMap["x"] = std::move(x);
421 DataMap["y"] = std::move(y);
422 DataMap["dx"] = std::move(dx);
423 DataMap["dy"] = std::move(dy);
424 }
425
426 DataMap["energy"] = std::move(energy);
427 DataMap["id"] = std::move(idVec);
428 DataMap["channel"] = std::move(channel);
429 DataMap["feedThrough"] = std::move(feedThrough);
430 DataMap["slot"] = std::move(slotVec);
431
432 // adc counts
433 DataMap["cellTime"] = std::move(cellTimeVec);
434 DataMap["cellGain"] = std::move(cellGain);
435 DataMap["cellPedestal"] = std::move(cellPedestal);
436 DataMap["adc2Mev"] = std::move(adc2Mev);
437
438 DataMap[LArSampleIndexStr] = std::move(LArSampleIndexVec); // adcCounts
439
440 //Be verbose
441 ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << nEntries<< " entries" );
442
443 //All collections retrieved okay
444 return DataMap;
445
446 } // getTileData
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
IndexedConstituentUserInfo::Index Index
#define y
#define x
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.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
Gaudi::Property< bool > m_cellConditionCut
Gaudi::Property< bool > m_doLArDigit
Gaudi::Property< double > m_cellThreshold
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual std::string dataTypeName() const override
Return the name of the data type.
Gaudi::Property< bool > m_doHECDigit
Gaudi::Property< bool > m_doFCalDigit
Gaudi::Property< bool > m_doMaskLArChannelsM5
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool) override
Retrieve all the data.
Gaudi::Property< int > m_cellTimePrec
Gaudi::Property< std::vector< Identifier::value_type > > m_LArChannelsToIgnoreM5
Gaudi::Property< int > m_cellEnergyPrec
SG::ReadHandleKey< LArDigitContainer > m_sgKeyLArDigit_esd
SG::ReadHandleKey< LArDigitContainer > m_sgKeyLArDigit_raw
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
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
ID
//////////////////////////////////////// JetAlgorithmType::ID defines most common physics jet finding...

◆ initialize()

StatusCode JiveXML::LArDigitRetriever::initialize ( )
overridevirtual

Default AthAlgTool methods.

Initialise the Tool.

Definition at line 31 of file LArDigitRetriever.cxx.

31 {
32
33 ATH_MSG_DEBUG( "Initialising Tool" );
34 ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") );
35 ATH_CHECK( m_adc2mevKey.initialize() );
36
37 ATH_CHECK( m_sgKey.initialize() );
38 ATH_CHECK( m_sgKeyLArDigit_raw.initialize() );
39 ATH_CHECK( m_sgKeyLArDigit_esd.initialize() );
40 ATH_CHECK( m_cablingKey.initialize() );
41
42 return StatusCode::SUCCESS;
43 }
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadHandleKey< CaloCellContainer > m_sgKey

◆ retrieve()

StatusCode JiveXML::LArDigitRetriever::retrieve ( ToolHandle< IFormatTool > & FormatTool)
overridevirtual

Retrieve all the data.

Tile data retrieval from chosen collection.

Definition at line 48 of file LArDigitRetriever.cxx.

48 {
49
50 ATH_MSG_DEBUG( "in retrieve()" );
51
53 m_doDigit = true;
54 }
55
56 SG::ReadHandle<CaloCellContainer> cellContainer(m_sgKey);
57 if (!cellContainer.isValid()){
58 ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " );
59 }
60 else{
61
62 if(m_fcal){
63 DataMap data = getLArDigitData(&(*cellContainer),"FCAL",CaloCell_ID::LARFCAL);
64 ATH_CHECK( FormatTool->AddToEvent("FCAL", m_sgKey.key(), &data) );
65 ATH_MSG_DEBUG( "FCAL retrieved" );
66 }
67
68 if(m_lar){
69 DataMap data = getLArDigitData(&(*cellContainer),"LAr",CaloCell_ID::LAREM);
70 ATH_CHECK( FormatTool->AddToEvent("LAr", m_sgKey.key(), &data) );
71 ATH_MSG_DEBUG( "LAr retrieved" );
72 }
73
74 if(m_hec){
75 DataMap data = getLArDigitData(&(*cellContainer),"HEC",CaloCell_ID::LARHEC);
76 ATH_CHECK( FormatTool->AddToEvent("HEC", m_sgKey.key(), &data) );
77 ATH_MSG_DEBUG( "HEC retrieved" );
78 }
79 }
80
81 //Tile cells retrieved okay
82 return StatusCode::SUCCESS;
83 }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Gaudi::Property< bool > m_lar
Gaudi::Property< bool > m_hec
Gaudi::Property< bool > m_fcal
const DataMap getLArDigitData(const CaloCellContainer *cellContainer, const std::string &datatype, CaloCell_ID::SUBCALO calotype)
Retrieve Tile cell location and details.

Member Data Documentation

◆ m_adc2mevKey

SG::ReadCondHandleKey<LArADC2MeV> JiveXML::LArDigitRetriever::m_adc2mevKey { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" }
private

Definition at line 79 of file LArDigitRetriever.h.

80{ this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> JiveXML::LArDigitRetriever::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 77 of file LArDigitRetriever.h.

77{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_calocell_id

const CaloCell_ID* JiveXML::LArDigitRetriever::m_calocell_id {}
private

Definition at line 82 of file LArDigitRetriever.h.

82{};

◆ m_cellConditionCut

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_cellConditionCut {this, "CellConditionCut", false}
private

Definition at line 90 of file LArDigitRetriever.h.

90{this, "CellConditionCut", false};

◆ m_cellEnergyPrec

Gaudi::Property<int> JiveXML::LArDigitRetriever::m_cellEnergyPrec {this, "CellEnergyPrec", 3}
private

Definition at line 91 of file LArDigitRetriever.h.

91{this, "CellEnergyPrec", 3};

◆ m_cellThreshold

Gaudi::Property<double> JiveXML::LArDigitRetriever::m_cellThreshold {this, "CellThreshold", 50.}
private

Definition at line 93 of file LArDigitRetriever.h.

93{this, "CellThreshold", 50.};

◆ m_cellTimePrec

Gaudi::Property<int> JiveXML::LArDigitRetriever::m_cellTimePrec {this, "CellTimePrec", 3}
private

Definition at line 92 of file LArDigitRetriever.h.

92{this, "CellTimePrec", 3};

◆ m_doDigit

bool JiveXML::LArDigitRetriever::m_doDigit {false}
private

Definition at line 97 of file LArDigitRetriever.h.

97{false};

◆ m_doFCalDigit

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_doFCalDigit {this, "DoFCalDigit", false}
private

Definition at line 89 of file LArDigitRetriever.h.

89{this, "DoFCalDigit", false};

◆ m_doHECDigit

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_doHECDigit {this, "DoHECDigit", false}
private

Definition at line 88 of file LArDigitRetriever.h.

88{this, "DoHECDigit", false};

◆ m_doLArDigit

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_doLArDigit {this, "DoLArDigit", false}
private

Definition at line 87 of file LArDigitRetriever.h.

87{this, "DoLArDigit", false};

◆ m_doMaskLArChannelsM5

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_doMaskLArChannelsM5 {this, "DoMaskLArChannelsM5", false}
private

Definition at line 95 of file LArDigitRetriever.h.

95{this, "DoMaskLArChannelsM5", false};

◆ m_fcal

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_fcal {this, "RetrieveFCAL", true}
private

Definition at line 86 of file LArDigitRetriever.h.

86{this, "RetrieveFCAL", true};

◆ m_hec

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_hec {this, "RetrieveHEC", true}
private

Definition at line 85 of file LArDigitRetriever.h.

85{this, "RetrieveHEC", true};

◆ m_inputdpd

bool JiveXML::LArDigitRetriever::m_inputdpd {false}
private

Definition at line 98 of file LArDigitRetriever.h.

98{false};

◆ m_lar

Gaudi::Property<bool> JiveXML::LArDigitRetriever::m_lar {this, "RetrieveLAr", true}
private

Definition at line 84 of file LArDigitRetriever.h.

84{this, "RetrieveLAr", true};

◆ m_LArChannelsToIgnoreM5

Gaudi::Property<std::vector<Identifier::value_type> > JiveXML::LArDigitRetriever::m_LArChannelsToIgnoreM5 {this, "LArChannelsToIgnoreM5", {}}
private

Definition at line 94 of file LArDigitRetriever.h.

94{this, "LArChannelsToIgnoreM5", {}};

◆ m_sgKey

SG::ReadHandleKey<CaloCellContainer> JiveXML::LArDigitRetriever::m_sgKey {this, "StoreGateKey", "AllCalo", "Name of the CaloCellContainer"}
private

Definition at line 74 of file LArDigitRetriever.h.

74{this, "StoreGateKey", "AllCalo", "Name of the CaloCellContainer"};

◆ m_sgKeyLArDigit_esd

SG::ReadHandleKey<LArDigitContainer> JiveXML::LArDigitRetriever::m_sgKeyLArDigit_esd {this, "StoreGateKey", "LArDigitContainer_Thinned", "Name of the LArDigitContainer"}
private

Definition at line 76 of file LArDigitRetriever.h.

76{this, "StoreGateKey", "LArDigitContainer_Thinned", "Name of the LArDigitContainer"}; // used for DPD/ESD

◆ m_sgKeyLArDigit_raw

SG::ReadHandleKey<LArDigitContainer> JiveXML::LArDigitRetriever::m_sgKeyLArDigit_raw {this, "StoreGateKey", "FREE", "Name of the LArDigitContainer"}
private

Definition at line 75 of file LArDigitRetriever.h.

75{this, "StoreGateKey", "FREE", "Name of the LArDigitContainer"}; // can also be: "HIGH" (for raw data)

◆ m_sub

DataVect JiveXML::LArDigitRetriever::m_sub
private

Definition at line 99 of file LArDigitRetriever.h.


The documentation for this class was generated from the following files: