|
ATLAS Offline Software
|
#include <egammaTruthAssociationAlg.h>
|
| egammaTruthAssociationAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| constructor More...
|
|
virtual | ~egammaTruthAssociationAlg ()=default |
| destructor More...
|
|
virtual StatusCode | initialize () override final |
| initialize method More...
|
|
virtual StatusCode | finalize () override final |
| finalize method More...
|
|
virtual StatusCode | execute (const EventContext &ctx) const override final |
| execute on container More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
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 |
|
|
template<class T > |
StatusCode | initializeDecorKeys (SG::WriteDecorHandleKeyArray< T > &keys, const std::string &name) |
| A function that initializes the decor handles, but also checks the naming convention. More...
|
|
template<class T , class L > |
StatusCode | match (const EventContext &ctx, const xAOD::TruthParticleContainer &truthParticles, const SG::WriteDecorHandleKeyArray< T > &hkeys, const SG::AuxElement::Accessor< L > &linkAccess, xAOD::TruthParticleContainer *egammaTruthContainer) const |
| Loop over elements in the reco container, decorate them with truth info and decorate the truth particles with links to the reco ones (reco<typeName>Link) More...
|
|
template<class T > |
MCTruthInfo_t | particleTruthClassifier (const EventContext &ctx, const T *) const |
| return the result of MCTruthClassifier::particleTruthClassifier or do a second pass for electrons based on the cluster to find true photons More...
|
|
void | getNewTruthParticle (const EventContext &ctx, xAOD::TruthParticleContainer &egammaTruthContainer, const xAOD::TruthParticle *truth, const xAOD::TruthParticleContainer *oldContainer) const |
| Create a copy a truth particle, add it to the new getNewTruthParticle container and decorate it with a link to the original particle. More...
|
|
bool | isPromptEgammaParticle (const EventContext &ctx, const xAOD::TruthParticle *truth) const |
| Return true if the truth particle is a prompt electron or photon. More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Decorate egamma objects with truth information Creates egammaTruthParticles collection with links to reco objects
- Author
- B. Lenzi J. Mitrevski C. Anastopoulos
Definition at line 40 of file egammaTruthAssociationAlg.h.
◆ StoreGateSvc_t
◆ egammaTruthAssociationAlg()
egammaTruthAssociationAlg::egammaTruthAssociationAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~egammaTruthAssociationAlg()
virtual egammaTruthAssociationAlg::~egammaTruthAssociationAlg |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ 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);
◆ 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.
◆ 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.
◆ 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 egammaTruthAssociationAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
execute on container
Definition at line 112 of file egammaTruthAssociationAlg.cxx.
122 std::make_unique<xAOD::TruthParticleContainer>(),
123 std::make_unique<xAOD::TruthParticleAuxContainer>()));
130 if (!truthEvtContainer.isValid() || truthEvtContainer->empty()) {
133 <<
" or container empty, returning");
134 return StatusCode::SUCCESS;
137 for (
const auto& truthParticleLink :
138 truthEvtContainer->front()->truthParticleLinks()) {
139 if (!truthParticleLink.isValid())
145 *egammaTruthContainer,
147 truthParticleLink.getDataPtr());
172 egammaTruthContainer.
ptr()));
181 egammaTruthContainer.
ptr()));
190 egammaTruthContainer.
ptr()));
199 egammaTruthContainer.
ptr()));
202 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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
StatusCode egammaTruthAssociationAlg::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ getNewTruthParticle()
Create a copy a truth particle, add it to the new getNewTruthParticle container and decorate it with a link to the original particle.
Definition at line 236 of file egammaTruthAssociationAlg.cxx.
242 auto *truthParticle = egammaTruthContainer.
push_back(std::make_unique<xAOD::TruthParticle>());
243 truthParticle->setPdgId(truth->
pdgId());
245 truthParticle->setStatus(truth->
status());
246 truthParticle->setPx(truth->
px());
247 truthParticle->setPy(truth->
py());
248 truthParticle->setPz(truth->
pz());
249 truthParticle->setE(truth->
e());
250 truthParticle->setM(truth->
m());
251 truthParticle->setProdVtxLink(truth->
prodVtxLink());
261 "truthParticleLink");
270 accTruthLink(*truthParticle) =
TruthLink_t(truth, *oldContainer, ctx);
271 accTruthLink(*truthParticle).toPersistent();
275 accType(*truthParticle) =
static_cast<int>(
info.first);
276 accOrigin(*truthParticle) =
static_cast<int>(
info.second);
◆ initialize()
StatusCode egammaTruthAssociationAlg::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ initializeDecorKeys()
A function that initializes the decor handles, but also checks the naming convention.
Definition at line 282 of file egammaTruthAssociationAlg.cxx.
287 ATH_MSG_FATAL(
"The WriteDecorHandle should not be configured directly.");
288 return StatusCode::FAILURE;
291 keys.emplace_back(
name +
".truthParticleLink");
292 keys.emplace_back(
name +
".truthType");
293 keys.emplace_back(
name +
".truthOrigin");
295 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isPromptEgammaParticle()
Return true if the truth particle is a prompt electron or photon.
Definition at line 206 of file egammaTruthAssociationAlg.cxx.
211 if ((truth->
pdgId() != 22 && abs(truth->
pdgId()) != 11) ||
220 if (
type.first == MCTruthPartClassifier::IsoElectron ||
◆ match()
template<class T , class L >
Loop over elements in the reco container, decorate them with truth info and decorate the truth particles with links to the reco ones (reco<typeName>Link)
Definition at line 348 of file egammaTruthAssociationAlg.cxx.
356 writeDecorHandles<T> decoHandles(hkeys, ctx);
359 for (
auto particle : *decoHandles.readHandle()) {
367 truthParticle, truthParticles, ctx);
369 "Decorating object with link to truth, index = " << link.index());
374 decoHandles.el(*particle).toPersistent();
376 <<
" truthOrigin = " <<
info.second);
377 decoHandles.type(*
particle) =
static_cast<int>(
info.first);
378 decoHandles.origin(*
particle) =
static_cast<int>(
info.second);
382 if (!egammaTruthContainer) {
384 return StatusCode::FAILURE;
390 getEgammaTruthParticle(truth, *egammaTruthContainer);
394 bool annotateLink =
true;
395 const auto link = linkAccess(*truthEgamma);
396 if (link.isValid()) {
397 auto oldPart = *link;
398 if (oldPart && truthEgamma->
e() > 0 &&
399 std::abs(oldPart->e() / truthEgamma->
e() - 1) <
400 std::abs(
particle->e() / truthEgamma->
e() - 1)) {
403 <<
" already set to a better matched particle: "
405 annotateLink =
false;
410 L link(
particle, *decoHandles.readHandle(), ctx);
411 linkAccess(*truthEgamma) = link;
412 linkAccess(*truthEgamma).toPersistent();
418 return StatusCode::SUCCESS;
◆ 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.
◆ particleTruthClassifier()
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ 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_clusterDecKeys
Initial value:{
this,
"DoNotSet_ClusterContainerName",
{},
"Do not set; configuration via the string property"
}
The egamma cluster decor handle key array.
Definition at line 151 of file egammaTruthAssociationAlg.h.
◆ m_clusterDecName
Gaudi::Property<std::string> egammaTruthAssociationAlg::m_clusterDecName |
|
private |
Initial value:{
this,
"ClusterContainerName",
"",
"Name of the egamma cluster container"
}
The egamma cluster name property used to initialize the WriteDecorHandleKeyArray.
Definition at line 160 of file egammaTruthAssociationAlg.h.
◆ m_detStore
◆ m_doEgammaTruthContainer
Gaudi::Property<bool> egammaTruthAssociationAlg::m_doEgammaTruthContainer |
|
private |
Initial value:{
this,
"CreateEgammaTruthContainer",
true,
"Create egammaTruthContainer?"
}
Create egamma truth container?
Definition at line 119 of file egammaTruthAssociationAlg.h.
◆ m_egammaTruthParticleContainerKey
Initial value:{
this,
"EgammaTruthContainerName",
"",
"Name of the output egamma truth particle container"
}
Name of the output egamma truth container.
Definition at line 236 of file egammaTruthAssociationAlg.h.
◆ m_electronDecKeys
Initial value:{
this,
"DoNotSet_ElectronContainerName",
{},
"Do not set; configuration via the string property"
}
The electron container decor handle key array.
Definition at line 168 of file egammaTruthAssociationAlg.h.
◆ m_electronDecName
Gaudi::Property<std::string> egammaTruthAssociationAlg::m_electronDecName |
|
private |
Initial value:{
this,
"ElectronContainerName",
"",
"Name of the input electron container"
}
The electron container name property used to initialize the WriteDecorHandleKeyArray.
Definition at line 177 of file egammaTruthAssociationAlg.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_fwdElectronDecKeys
Initial value:{
this,
"DoNotSet_FwdElectronContainerName",
{},
"Do not set; configuration via the string property"
}
The fwd electron container decor handle key array.
Definition at line 185 of file egammaTruthAssociationAlg.h.
◆ m_fwdElectronDecName
Gaudi::Property<std::string> egammaTruthAssociationAlg::m_fwdElectronDecName |
|
private |
Initial value:{
this,
"FwdElectronContainerName",
"",
"Name of the input fwd electron container"
}
The fwd electron name property used to initialize the WriteDecorHandleKeyArray.
Definition at line 194 of file egammaTruthAssociationAlg.h.
◆ m_matchClusters
Gaudi::Property<bool> egammaTruthAssociationAlg::m_matchClusters |
|
private |
◆ m_matchElectrons
Gaudi::Property<bool> egammaTruthAssociationAlg::m_matchElectrons |
|
private |
Initial value:{ this,
"MatchElectrons",
true,
"Match (central) electrons?" }
Match electrons?
Definition at line 127 of file egammaTruthAssociationAlg.h.
◆ m_matchForwardElectrons
Gaudi::Property<bool> egammaTruthAssociationAlg::m_matchForwardElectrons |
|
private |
Initial value:{ this,
"MatchForwardElectrons",
true,
"Match forward electrons?" }
Match fwd electrons?
Definition at line 139 of file egammaTruthAssociationAlg.h.
◆ m_matchPhotons
Gaudi::Property<bool> egammaTruthAssociationAlg::m_matchPhotons |
|
private |
◆ m_mcTruthClassifier
◆ m_minPt
Gaudi::Property<float> egammaTruthAssociationAlg::m_minPt |
|
private |
Initial value:{
this,
"MinPtEgammaTruth",
10,
"Minimum Pt to enter egamma truth particle container"
}
Minimum Pt to enter egamma truth particle container.
Definition at line 244 of file egammaTruthAssociationAlg.h.
◆ m_minPtFSR
Gaudi::Property<float> egammaTruthAssociationAlg::m_minPtFSR |
|
private |
Initial value:{
this,
"MinPtEgammaTruthFSR",
"Minimum Pt for FSR to enter egamma truth particle container"
}
Minimum Pt for FSR to enter egamma truth particle container.
Definition at line 252 of file egammaTruthAssociationAlg.h.
◆ m_photonDecKeys
Initial value:{
this,
"DoNotSet_PhotonContainerName",
{},
"Do not set; configuration via the string property"
}
The photon container decor handle key array.
Definition at line 202 of file egammaTruthAssociationAlg.h.
◆ m_photonDecName
Gaudi::Property<std::string> egammaTruthAssociationAlg::m_photonDecName |
|
private |
Initial value:{
this,
"PhotonContainerName",
"",
"Name of the input photon container"
}
The photon container name property used to initialize the WriteDecorHandleKeyArray.
Definition at line 211 of file egammaTruthAssociationAlg.h.
◆ m_truthEventContainerKey
Initial value:{
this,
"TruthEventContainerName",
"",
"Name of the truth event container"
}
Name of the truth event container.
Definition at line 219 of file egammaTruthAssociationAlg.h.
◆ m_truthParticleContainerKey
Initial value:{
this,
"TruthParticleContainerName",
"",
"Name of the truth particle container"
}
Name of the truth particle container.
Definition at line 227 of file egammaTruthAssociationAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
MCTruthInfo_t particleTruthClassifier(const EventContext &ctx, const T *) const
return the result of MCTruthClassifier::particleTruthClassifier or do a second pass for electrons bas...
ElementLink< xAOD::ElectronContainer > ElectronLink_t
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_egammaTruthParticleContainerKey
Name of the output egamma truth container.
float pz() const
The z component of the particle's momentum.
Helper class to provide type-safe access to aux data.
void getNewTruthParticle(const EventContext &ctx, xAOD::TruthParticleContainer &egammaTruthContainer, const xAOD::TruthParticle *truth, const xAOD::TruthParticleContainer *oldContainer) const
Create a copy a truth particle, add it to the new getNewTruthParticle container and decorate it with ...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ElementLink< xAOD::PhotonContainer > PhotonLink_t
Gaudi::Property< bool > m_matchClusters
Match clusters?
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
float px() const
The x component of the particle's momentum.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
StatusCode match(const EventContext &ctx, const xAOD::TruthParticleContainer &truthParticles, const SG::WriteDecorHandleKeyArray< T > &hkeys, const SG::AuxElement::Accessor< L > &linkAccess, xAOD::TruthParticleContainer *egammaTruthContainer) const
Loop over elements in the reco container, decorate them with truth info and decorate the truth partic...
Gaudi::Property< float > m_minPtFSR
Minimum Pt for FSR to enter egamma truth particle container.
Gaudi::Property< bool > m_matchPhotons
Match photons?
float py() const
The y component of the particle's momentum.
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_electronDecKeys
The electron container decor handle key array.
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventContainerKey
Name of the truth event container.
Gaudi::Property< bool > m_matchElectrons
Match electrons?
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_fwdElectronDecKeys
The fwd electron container decor handle key array.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< std::string > m_fwdElectronDecName
The fwd electron name property used to initialize the WriteDecorHandleKeyArray.
Gaudi::Property< std::string > m_clusterDecName
The egamma cluster name property used to initialize the WriteDecorHandleKeyArray.
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
Name of the truth particle container.
AthReentrantAlgorithm()
Default constructor:
virtual double e() const override final
The total energy of the particle.
const ElementLink< TruthVertexContainer > & prodVtxLink() const
The production vertex link of this particle.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Class describing a truth particle in the MC record.
ElementLink< xAOD::CaloClusterContainer > ClusterLink_t
#define CHECK(...)
Evaluate an expression and check for errors.
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.
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
MCTruthClassifier.
const ElementLink< TruthVertexContainer > & decayVtxLink() const
The decay vertex link of this particle.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Gaudi::Property< bool > m_doEgammaTruthContainer
Create egamma truth container?
virtual void renounce()=0
Gaudi::Property< std::string > m_electronDecName
The electron container name property used to initialize the WriteDecorHandleKeyArray.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initializeDecorKeys(SG::WriteDecorHandleKeyArray< T > &keys, const std::string &name)
A function that initializes the decor handles, but also checks the naming convention.
ElementLink implementation for ROOT usage.
Gaudi::Property< bool > m_matchForwardElectrons
Match fwd electrons?
Gaudi::Property< float > m_minPt
Minimum Pt to enter egamma truth particle container.
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
SG::WriteDecorHandleKeyArray< xAOD::PhotonContainer > m_photonDecKeys
The photon container decor handle key array.
virtual StatusCode sysInitialize() override
Override sysInitialize.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::WriteDecorHandleKeyArray< xAOD::CaloClusterContainer > m_clusterDecKeys
The egamma cluster decor handle key array.
bool isPromptEgammaParticle(const EventContext &ctx, const xAOD::TruthParticle *truth) const
Return true if the truth particle is a prompt electron or photon.
int status() const
Status code.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
bool isDecayed(const T &p)
Identify if the particle decayed.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
ElementLink< xAOD::TruthParticleContainer > TruthLink_t
Gaudi::Property< std::string > m_photonDecName
The photon container name property used to initialize the WriteDecorHandleKeyArray.
int pdgId() const
PDG ID code.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double m() const override final
The mass of the particle.