|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef EGAMMAALGS_EGAMMATRUTHASSOCIATIONALG_H
6 #define EGAMMAALGS_EGAMMATRUTHASSOCIATIONALG_H
9 #include "GaudiKernel/EventContext.h"
10 #include "GaudiKernel/ToolHandle.h"
71 const std::string&
name);
78 const EventContext& ctx);
91 template<
class T,
class L>
108 const EventContext& ctx,
121 "CreateEgammaTruthContainer",
123 "Create egammaTruthContainer?"
130 "Match (central) electrons?" };
140 "MatchForwardElectrons",
142 "Match forward electrons?" };
153 "DoNotSet_ClusterContainerName",
155 "Do not set; configuration via the string property"
162 "ClusterContainerName",
164 "Name of the egamma cluster container"
170 "DoNotSet_ElectronContainerName",
172 "Do not set; configuration via the string property"
179 "ElectronContainerName",
181 "Name of the input electron container"
187 "DoNotSet_FwdElectronContainerName",
189 "Do not set; configuration via the string property"
196 "FwdElectronContainerName",
198 "Name of the input fwd electron container"
204 "DoNotSet_PhotonContainerName",
206 "Do not set; configuration via the string property"
213 "PhotonContainerName",
215 "Name of the input photon container"
221 "TruthEventContainerName",
223 "Name of the truth event container"
229 "TruthParticleContainerName",
231 "Name of the truth particle container"
238 "EgammaTruthContainerName",
240 "Name of the output egamma truth particle container"
248 "Minimum Pt to enter egamma truth particle container"
254 "MinPtEgammaTruthFSR",
256 "Minimum Pt for FSR to enter egamma truth particle container"
263 "EMMCTruthClassifier",
264 "Handle of MCTruthClassifier"
268 #endif // EGAMMAALGS_EGAMMATRUTHASSOCIATIONALG_H
Property holding a SG store/key/clid from which a ReadHandle is made.
MCTruthInfo_t particleTruthClassifier(const EventContext &ctx, const T *) const
return the result of MCTruthClassifier::particleTruthClassifier or do a second pass for electrons bas...
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_egammaTruthParticleContainerKey
Name of the output egamma truth container.
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::Property< bool > m_matchClusters
Match clusters?
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?
writeDecorHandles(const SG::WriteDecorHandleKeyArray< T > &keys, const EventContext &ctx)
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_electronDecKeys
The electron container decor handle key array.
bool const RAWDATA *ch2 const
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventContainerKey
Name of the truth event container.
MCTruthPartClassifier::ParticleType first
Gaudi::Property< bool > m_matchElectrons
Match electrons?
SG::WriteDecorHandle< T, int > type
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer > m_fwdElectronDecKeys
The fwd electron container decor handle key array.
An algorithm that can be simultaneously executed in multiple threads.
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.
virtual StatusCode execute(const EventContext &ctx) const override final
execute on container
virtual StatusCode initialize() override final
initialize method
virtual ~egammaTruthAssociationAlg()=default
destructor
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
Name of the truth particle container.
Property holding a SG store/key/clid from which a WriteHandle is made.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Handle class for adding a decoration to an object.
MCTruthPartClassifier::ParticleOrigin second
Handle class for adding a decoration to an object.
SG::WriteDecorHandle< T, int > origin
ToolHandle< IMCTruthClassifier > m_mcTruthClassifier
MCTruthClassifier.
egammaTruthAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
constructor
helper class to contain write decoration handles
Gaudi::Property< bool > m_doEgammaTruthContainer
Create egamma truth container?
Gaudi::Property< std::string > m_electronDecName
The electron container name property used to initialize the WriteDecorHandleKeyArray.
StatusCode initializeDecorKeys(SG::WriteDecorHandleKeyArray< T > &keys, const std::string &name)
A function that initializes the decor handles, but also checks the naming convention.
Property holding a SG store/key/clid from which a WriteHandle is made.
Gaudi::Property< bool > m_matchForwardElectrons
Match fwd electrons?
SG::WriteDecorHandle< T, ElementLink< xAOD::TruthParticleContainer > > el
Gaudi::Property< float > m_minPt
Minimum Pt to enter egamma truth particle container.
SG::WriteDecorHandleKeyArray< xAOD::PhotonContainer > m_photonDecKeys
The photon container decor handle key array.
virtual StatusCode finalize() override final
finalize method
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.
SG::ReadHandle< T > & readHandle()
const xAOD::TruthParticle * genPart
Handle class for reading from StoreGate.
Gaudi::Property< std::string > m_photonDecName
The photon container name property used to initialize the WriteDecorHandleKeyArray.