23 return StatusCode::SUCCESS;
29 if ( !truthEvents.isValid() ) {
39 ATH_MSG_ERROR(
"Null pointer received for first truth event!");
47 ATH_MSG_VERBOSE(
"Null pointer received for truth particle to be copied");
54 ptruth->push_back(tp);
65 if (!truthParticles_out.put(std::move(ptruth))) {
66 ATH_MSG_ERROR(
"Unable to write new TruthParticleContainer to event store: "
69 ATH_MSG_DEBUG(
"Created new TruthParticleContainer in event store: "
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
ATLAS-specific HepMC functions.
DataVector adapter that acts like it holds const pointers.
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey
Key for output truth particles.
virtual bool classify(const xAOD::TruthParticle *tp) const =0
Classifier function(s)
CopyTruthParticles(const std::string &name)
Constructor.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Gaudi::Property< float > m_ptmin
Minimum pT for particle selection (in MeV)
virtual int execute() const
Method to be called for each event.
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Key for input truth event.
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
size_t nTruthParticles() const
Get the number of truth particles.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TruthEvent_v1 TruthEvent
Typedef to implementation.
TruthParticle_v1 TruthParticle
Typedef to implementation.