|
ATLAS Offline Software
|
Retrieves all Tile
Calo Cell objects
.
More...
#include <LArDigitRetriever.h>
|
| LArDigitRetriever (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Constructor. More...
|
|
virtual StatusCode | retrieve (ToolHandle< IFormatTool > &FormatTool) |
| Retrieve all the data. More...
|
|
const DataMap | getLArDigitData (const CaloCellContainer *cellContainer, const std::string &datatype, CaloCell_ID::SUBCALO calotype) |
| Retrieve Tile cell location and details. More...
|
|
virtual std::string | dataTypeName () const |
| Return the name of the data type. More...
|
|
StatusCode | initialize () |
| Default AthAlgTool methods. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
SG::ReadHandleKey< CaloCellContainer > | m_sgKey {this, "StoreGateKey", "AllCalo", "Name of the CaloCellContainer"} |
|
SG::ReadHandleKey< LArDigitContainer > | m_sgKeyLArDigit_raw {this, "StoreGateKey", "FREE", "Name of the LArDigitContainer"} |
|
SG::ReadHandleKey< LArDigitContainer > | m_sgKeyLArDigit_esd {this, "StoreGateKey", "LArDigitContainer_Thinned", "Name of the LArDigitContainer"} |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< LArADC2MeV > | m_adc2mevKey { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" } |
|
const CaloCell_ID * | m_calocell_id |
|
bool | m_lar |
|
bool | m_hec |
|
bool | m_fcal |
|
bool | m_doLArDigit |
|
bool | m_doHECDigit |
|
bool | m_doFCalDigit |
|
bool | m_doDigit |
|
bool | m_cellConditionCut |
|
bool | m_inputdpd |
|
int | m_cellEnergyPrec |
|
int | m_cellTimePrec |
|
double | m_cellThreshold |
|
std::vector< Identifier::value_type > | m_LArChannelsToIgnoreM5 |
|
bool | m_doMaskLArChannelsM5 |
|
DataVect | m_sub |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
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.
◆ StoreGateSvc_t
◆ LArDigitRetriever()
JiveXML::LArDigitRetriever::LArDigitRetriever |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Constructor.
This is the standard AthAlgTool constructor.
- Parameters
-
type | AlgTool type name |
name | AlgTool instance name |
parent | AlgTools parent owning this tool |
Definition at line 33 of file LArDigitRetriever.cxx.
38 declareInterface<IDataRetriever>(
this);
◆ calcEMLayerSub()
void JiveXML::LArDigitRetriever::calcEMLayerSub |
( |
Identifier & |
cellid | ) |
|
|
private |
◆ calcHECLayerSub()
void JiveXML::LArDigitRetriever::calcHECLayerSub |
( |
Identifier & |
cellid | ) |
|
|
private |
◆ dataTypeName()
virtual std::string JiveXML::LArDigitRetriever::dataTypeName |
( |
| ) |
const |
|
inlinevirtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getLArDigitData()
Retrieve Tile cell location and details.
- Parameters
-
FormatTool | the tool that will create formated output from the DataMap |
Definition at line 123 of file LArDigitRetriever.cxx.
130 const EventContext& ctx = Gaudi::Hive::currentContext();
145 DataVect feedThrough; feedThrough.reserve(cellContainer->
size());
146 DataVect slotVec; slotVec.reserve(cellContainer->
size());
148 DataVect cellTimeVec; cellTimeVec.reserve(cellContainer->
size());
150 DataVect cellPedestal; cellPedestal.reserve(cellContainer->
size());
151 DataVect adc2Mev; adc2Mev.reserve(cellContainer->
size());
156 DataVect LArSampleIndexVec; LArSampleIndexVec.reserve(cellContainer->
size());
158 std::string LArSampleIndexStr=
"adcCounts multiple=\"0\"";
163 if (LArDigitCnt_raw_handle.isValid()) {
164 LArDigitCnt = &(*LArDigitCnt_raw_handle);
166 else if (LArDigitCnt_esd_handle.isValid()) {
167 LArDigitCnt = &(*LArDigitCnt_esd_handle);
176 ATH_MSG_ERROR(
"in getLArDigitData(), Could not retrieve LAr Pedestal" );
181 ATH_MSG_ERROR(
"in getLArDigitData(),Could not get LArOnlineID!" );
200 auto pCellIndex = std::make_unique<std::array<int, 200000>>();
206 double energyGeV,cellTime;
210 LArHardwareId =
digit->hardwareID();
211 if (!
cabling->isOnlineConnected(LArHardwareId))
continue;
213 LArId =
cabling->cnvToIdentifier(LArHardwareId);
220 nLArSamples =
digit->nsamples();
222 int largain =
digit->gain();
224 int slot = onlineId->
slot(LArHardwareId);
225 int larchan = onlineId->
channel(LArHardwareId);
226 float pedestal=larPedestal->
pedestal(LArHardwareId,largain);
240 bool maskChannel =
false;
247 if (maskChannel)
continue;
255 energyGeV = (*cellContainer)[
Index]->energy() * (1./
GeV);
257 idVec.push_back(
DataType((*cellContainer)[
Index]->
ID().get_compact() ));
261 cellTime = (*cellContainer)[
Index]->time();
263 cellPedestal.push_back(
DataType(pedvalue));
268 if (polynom_adc2mev.size()==0){
271 adc2Mev.push_back(
DataType(polynom_adc2mev[1]));
274 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
282 energyGeV = (*cellContainer)[
Index]->energy() * (1./
GeV);
284 idVec.push_back(
DataType((*cellContainer)[
Index]->
ID().get_compact() ));
289 cellTime = (*cellContainer)[
Index]->time();
291 cellPedestal.push_back(
DataType(pedvalue));
296 if (polynom_adc2mev.size()==0)
299 adc2Mev.push_back(
DataType(polynom_adc2mev[1]));
301 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
308 energyGeV = (*cellContainer)[
Index]->energy() * (1./
GeV);
310 idVec.push_back(
DataType((*cellContainer)[
Index]->
ID().get_compact() ));
323 cellTime = (*cellContainer)[
Index]->time();
325 cellPedestal.push_back(
DataType(pedvalue));
330 if (polynom_adc2mev.size()==0)
333 adc2Mev.push_back(
DataType(polynom_adc2mev[1]));
335 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
364 HWIdentifier LArhwid =
cabling->createSignalChannelIDFromHash((*it1)->caloDDE()->calo_hash());
371 bool maskChannel =
false;
378 if (maskChannel)
continue;
381 energyGeV = (*it1)->energy()*(1./
GeV);
383 idVec.push_back(
DataType((*it1)->ID().get_compact() ));
388 cellTime = (*it1)->time();
391 int largain = (*it1)->gain();
393 float pedestal=larPedestal->
pedestal(LArhwid,largain);
396 cellPedestal.push_back(
DataType(pedvalue));
398 LArVectorProxy polynom_adc2mev = adc2mev->ADC2MEV(cellid,largain);
399 if (polynom_adc2mev.size()==0){
402 adc2Mev.push_back(
DataType(polynom_adc2mev[1]));
406 if (datatype ==
"LAr") {
411 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
412 for(
int i=0;
i<nLArSamples;
i++) LArSampleIndexVec.push_back(
DataType(0)); }
415 else if (datatype ==
"HEC") {
420 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
421 for(
int i=0;
i<nLArSamples;
i++) LArSampleIndexVec.push_back(
DataType(0)); }
424 else if (datatype ==
"FCAL") {
426 x.push_back(
DataType( (*it1)->x()*0.1 ));
427 y.push_back(
DataType( (*it1)->y()*0.1 ));
436 LArSampleIndexStr=
"adcCounts multiple=\""+
DataType(nLArSamples).toString()+
"\"";
437 for(
int i=0;
i<nLArSamples;
i++) LArSampleIndexVec.push_back(
DataType(0));
449 if(!(datatype==
"FCAL")){
460 DataMap[
"id"] = std::move(idVec);
462 DataMap[
"feedThrough"] = std::move(feedThrough);
463 DataMap[
"slot"] = std::move(slotVec);
466 DataMap[
"cellTime"] = std::move(cellTimeVec);
468 DataMap[
"cellPedestal"] = std::move(cellPedestal);
469 DataMap[
"adc2Mev"] = std::move(adc2Mev);
471 DataMap[LArSampleIndexStr] = LArSampleIndexVec;
◆ initialize()
StatusCode JiveXML::LArDigitRetriever::initialize |
( |
| ) |
|
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & JiveXML::IDataRetriever::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Return the interface identifier.
Definition at line 40 of file IDataRetriever.h.
40 {
return IID_IDataRetriever; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ retrieve()
StatusCode JiveXML::LArDigitRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_adc2mevKey
◆ m_cablingKey
◆ m_calocell_id
◆ m_cellConditionCut
bool JiveXML::LArDigitRetriever::m_cellConditionCut |
|
private |
◆ m_cellEnergyPrec
int JiveXML::LArDigitRetriever::m_cellEnergyPrec |
|
private |
◆ m_cellThreshold
double JiveXML::LArDigitRetriever::m_cellThreshold |
|
private |
◆ m_cellTimePrec
int JiveXML::LArDigitRetriever::m_cellTimePrec |
|
private |
◆ m_detStore
◆ m_doDigit
bool JiveXML::LArDigitRetriever::m_doDigit |
|
private |
◆ m_doFCalDigit
bool JiveXML::LArDigitRetriever::m_doFCalDigit |
|
private |
◆ m_doHECDigit
bool JiveXML::LArDigitRetriever::m_doHECDigit |
|
private |
◆ m_doLArDigit
bool JiveXML::LArDigitRetriever::m_doLArDigit |
|
private |
◆ m_doMaskLArChannelsM5
bool JiveXML::LArDigitRetriever::m_doMaskLArChannelsM5 |
|
private |
◆ m_evtStore
◆ m_fcal
bool JiveXML::LArDigitRetriever::m_fcal |
|
private |
◆ m_hec
bool JiveXML::LArDigitRetriever::m_hec |
|
private |
◆ m_inputdpd
bool JiveXML::LArDigitRetriever::m_inputdpd |
|
private |
◆ m_lar
bool JiveXML::LArDigitRetriever::m_lar |
|
private |
◆ m_LArChannelsToIgnoreM5
◆ m_sgKey
◆ m_sgKeyLArDigit_esd
◆ m_sgKeyLArDigit_raw
◆ m_sub
DataVect JiveXML::LArDigitRetriever::m_sub |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual float pedestal(const HWIdentifier &id, int gain) const =0
char data[hepevt_bytes_allocation_ATLAS]
SG::ReadHandleKey< CaloCellContainer > m_sgKey
Const iterator class for DataVector/DataList.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Scalar phi() const
phi method
std::vector< Identifier > ID
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
const CaloCell_ID * m_calocell_id
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
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...
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
std::map< std::string, DataVect > DataMap
SG::ReadHandleKey< LArDigitContainer > m_sgKeyLArDigit_esd
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
virtual std::string dataTypeName() const
Return the name of the data type.
void calcHECLayerSub(Identifier &)
bool is_em(const Identifier id) const
test if the id belongs to LArEM
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
IndexedConstituentUserInfo::Index Index
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Liquid Argon digit base class.
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
std::vector< HWIdentifier >::iterator it1
const DataMap getLArDigitData(const CaloCellContainer *cellContainer, const std::string &datatype, CaloCell_ID::SUBCALO calotype)
Retrieve Tile cell location and details.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void calcEMLayerSub(Identifier &)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
StatusCode initialize(bool used=true)
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
bool m_doMaskLArChannelsM5
#define ATH_MSG_WARNING(x)
std::vector< Identifier::value_type > m_LArChannelsToIgnoreM5
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Container class for LArDigit.
SG::ReadHandleKey< LArDigitContainer > m_sgKeyLArDigit_raw
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Proxy for accessing a range of float values like a vector.