|
ATLAS Offline Software
|
#include <ZdcMCTruthAlg.h>
|
| ZdcMCTruthAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~ZdcMCTruthAlg () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
|
const ZdcID * | m_zdcID |
|
Gaudi::Property< std::string > | m_auxSuffix {this, "AuxSuffix", "", "ZdcModuleAuxContainer decoration suffix"} |
|
SG::ReadHandleKey< CaloCalibrationHitContainer > | m_CaloCalibrationHitContainerKey {this, "ZDC_CaloCalibrationHitContainerName", "ZDC_CalibrationHits"} |
|
std::string | m_zdcModuleContainerName |
|
std::string | m_zdcSumContainerName |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcModuleTruthTotalEnergy {this, "ZdcModuleTruthTotalEnergy" , "", "ZDC module Total Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcModuleTruthInvisEnergy {this, "ZdcModuleTruthInvisibleEnergy", "", "ZDC module Invisible Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcModuleTruthEMEnergy {this, "ZdcModuleTruthEMEnergy" , "", "ZDC module EM Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcModuleTruthNonEMEnergy {this, "ZdcModuleTruthNonEMEnergy" , "", "ZDC module Non EM Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcModuleTruthEscEnergy {this, "ZdcModuleTruthEscapedEnergy" , "", "ZDC module Escaped Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_rpdTileXpositionRelative {this, "xposRel" , "", "RPD module tile x position relative to the center of the module"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_rpdTileYpositionRelative {this, "yposRel" , "", "RPD module tile y position relative to the center of the module"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_rpdTileRowNumber {this, "row" , "", "RPD channel row number"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_rpdTileColumnNumber {this, "col" , "", "RPD channel column number"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcSumTruthTotalEnergy {this, "ZdcSumTruthTotalEnergy" , "", "ZDC Sum Total Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcSumTruthInvisEnergy {this, "ZdcSumTruthInvisibleEnergy" , "", "ZDC Sum Invisible Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcSumTruthEMEnergy {this, "ZdcSumTruthEMEnergy" , "", "ZDC Sum EM Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcSumTruthNonEMEnergy {this, "ZdcSumTruthNonEMEnergy" , "", "ZDC Sum Non EM Truth Energy"} |
|
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > | m_zdcSumTruthEscEnergy {this, "ZdcSumTruthEscapedEnergy" , "", "ZDC Sum Escaped Truth Energy"} |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 |
|
Definition at line 19 of file ZdcMCTruthAlg.h.
◆ StoreGateSvc_t
◆ ZdcMCTruthAlg()
ZdcMCTruthAlg::ZdcMCTruthAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~ZdcMCTruthAlg()
ZdcMCTruthAlg::~ZdcMCTruthAlg |
( |
| ) |
|
|
virtual |
◆ 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]
◆ execute()
StatusCode ZdcMCTruthAlg::execute |
( |
| ) |
|
Definition at line 79 of file ZdcMCTruthAlg.cxx.
86 if (!calibHitContainer.isValid()) {
87 ATH_MSG_ERROR(
"Could not get Calibration hit container " << calibHitContainer.name() <<
" from store " << calibHitContainer.store());
88 return StatusCode::FAILURE;
106 float totalMod[2][7]={{0.0},{0.0}}, invisMod[2][7]={{0.0},{0.0}}, emMod[2][7]={{0.0},{0.0}}, nonEMMod[2][7]={{0.0},{0.0}}, escMod[2][7]={{0.0},{0.0}};
107 float totalSide[2]={0.0}, invisSide[2]={0.0}, emSide[2]={0.0}, nonEMSide[2]={0.0}, escSide[2]={0.0};
108 bool foundMod[2][7] = {{
false},{
false}};
113 for (
const auto hit : *calibHitContainer){
118 emMod[
side][
mod] += hit->energyEM();
119 nonEMMod[
side][
mod] += hit->energyNonEM();
120 invisMod[
side][
mod] += hit->energyInvisible();
121 totalMod[
side][
mod] += hit->energyTotal();
122 escMod[
side][
mod] += hit->energyEscaped();
139 for (
const auto zdcModule : *moduleContainer){
140 if(zdcModule->zdcSide() == 0)
continue;
141 int side = (zdcModule->zdcSide() > 0) ? 1 : 0;
142 int mod = zdcModule->zdcModule();
147 int lucrodId = (
side == 0) ? 4 : 2;
148 int rpdChannel = zdcModule->zdcChannel();
149 int lucrodChannel = rpdChannel%8;
154 ", lucrodChannel=" << lucrodChannel <<
155 " for RPD side " << zdcModule->zdcSide() <<
156 ", channel " << rpdChannel);
162 rpdTileXpositionRelative(*zdcModule) = xpos;
163 rpdTileYpositionRelative(*zdcModule) = ypos;
164 rpdTileRowNumber (*zdcModule) =
row;
165 rpdTileColumnNumber (*zdcModule) =
col;
169 if(
mod == 4 && zdcModule->zdcChannel() != 0)
continue;
171 zdcModuleTruthTotalEnergy(*zdcModule) = totalMod[
side][
mod];
172 zdcModuleTruthInvisEnergy(*zdcModule) = invisMod[
side][
mod];
173 zdcModuleTruthEMEnergy (*zdcModule) = emMod [
side][
mod];
174 zdcModuleTruthNonEMEnergy(*zdcModule) = nonEMMod[
side][
mod];
175 zdcModuleTruthEscEnergy (*zdcModule) = escMod [
side][
mod];
184 for(
int iside : {0,1}){
186 ATH_MSG_DEBUG(
"ZDC " << iside <<
":" <<
mod <<
" total energy = " << totalMod[iside][
mod]);
187 if(!foundMod[iside][
mod]){
194 ", invisible energy = " << invisSide[1] <<
195 ", EM energy = " << emSide[1] <<
196 ", non EM energy = " << nonEMSide[1] <<
197 ", escaped energy = " << escSide[1]);
200 ", invisible energy = " << invisSide[0] <<
201 ", EM energy = " << emSide[0] <<
202 ", non EM energy = " << nonEMSide[0] <<
203 ", escaped energy = " << escSide[0]);
215 for (
const auto zdcSum : *moduleSumContainer){
216 if (zdcSum->zdcSide() == 0)
continue;
217 int side = (zdcSum->zdcSide()==-1) ? 0 : 1;
220 zdcSumTruthTotalEnergy(*zdcSum) = totalSide[
side];
221 zdcSumTruthInvisEnergy(*zdcSum) = invisSide[
side];
222 zdcSumTruthEMEnergy (*zdcSum) = emSide [
side];
223 zdcSumTruthNonEMEnergy(*zdcSum) = nonEMSide[
side];
224 zdcSumTruthEscEnergy (*zdcSum) = escSide [
side];
227 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode ZdcMCTruthAlg::finalize |
( |
| ) |
|
◆ initialize()
StatusCode ZdcMCTruthAlg::initialize |
( |
| ) |
|
Definition at line 24 of file ZdcMCTruthAlg.cxx.
29 ATH_MSG_ERROR(
"execute: Could not retrieve ZdcID object from the detector store");
30 return StatusCode::FAILURE;
76 return StatusCode::SUCCESS;
◆ 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.
◆ 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()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_auxSuffix
Gaudi::Property<std::string> ZdcMCTruthAlg::m_auxSuffix {this, "AuxSuffix", "", "ZdcModuleAuxContainer decoration suffix"} |
|
private |
◆ m_CaloCalibrationHitContainerKey
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_rpdTileColumnNumber
◆ m_rpdTileRowNumber
◆ m_rpdTileXpositionRelative
◆ m_rpdTileYpositionRelative
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_zdcID
◆ m_zdcModuleContainerName
std::string ZdcMCTruthAlg::m_zdcModuleContainerName |
|
private |
◆ m_zdcModuleTruthEMEnergy
◆ m_zdcModuleTruthEscEnergy
◆ m_zdcModuleTruthInvisEnergy
◆ m_zdcModuleTruthNonEMEnergy
◆ m_zdcModuleTruthTotalEnergy
◆ m_zdcSumContainerName
std::string ZdcMCTruthAlg::m_zdcSumContainerName |
|
private |
◆ m_zdcSumTruthEMEnergy
◆ m_zdcSumTruthEscEnergy
◆ m_zdcSumTruthInvisEnergy
◆ m_zdcSumTruthNonEMEnergy
◆ m_zdcSumTruthTotalEnergy
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleTruthEMEnergy
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcSumTruthNonEMEnergy
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_rpdTileColumnNumber
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int module(const Identifier &id) const
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleTruthTotalEnergy
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcSumTruthInvisEnergy
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::string m_zdcModuleContainerName
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcSumTruthEMEnergy
const nlohmann::json & getLucrod(int i) const
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcSumTruthTotalEnergy
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< std::string > m_auxSuffix
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcSumTruthEscEnergy
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_rpdTileRowNumber
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.
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleTruthInvisEnergy
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleTruthEscEnergy
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
int side(const Identifier &id) const
Values of different levels (failure returns 0)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleTruthNonEMEnergy
AthAlgorithm()
Default constructor:
SG::ReadHandleKey< CaloCalibrationHitContainer > m_CaloCalibrationHitContainerKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_rpdTileYpositionRelative
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_rpdTileXpositionRelative
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::string m_zdcSumContainerName
static const ZdcLucrodMapRun3 * getInstance()