ATLAS Offline Software
CopyTruthParticles.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef COPYTRUTHPARTICLES_H
6 #define COPYTRUTHPARTICLES_H
7 
8 #include "AsgTools/AsgTool.h"
16 
17 // Do I need IAsgTool? I need AsgTool for the eventStore()
21 public:
22 
24  CopyTruthParticles(const std::string& name);
25 
27 
28  virtual int execute() const;
29 
30  virtual StatusCode initialize();
32 
33 
35  virtual bool classify(const xAOD::TruthParticle* tp) const = 0;
36 
37 
38 protected:
40  Gaudi::Property<float> m_ptmin{this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"};
41 
43  SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventKey{this, "TruthEventKey", "TruthEvents", "SG Key for input truth event container"};
44 
46  SG::WriteHandleKey<ConstDataVector<xAOD::TruthParticleContainer> > m_outTruthPartKey{this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"};
47 
48 
49 };
50 
51 
52 #endif
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
CopyTruthParticles::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: CopyTruthParticles.cxx:18
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
TruthParticleContainer.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
IJetExecuteTool
IJetExecuteTool is a dual-use tool interface for generic tools, i.e. those that behave like algorithm...
Definition: IJetExecuteTool.h:19
CopyTruthParticles::execute
virtual int execute() const
Method to be called for each event.
Definition: CopyTruthParticles.cxx:26
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CopyTruthParticles::CopyTruthParticles
CopyTruthParticles(const std::string &name)
Constructor.
Definition: CopyTruthParticles.cxx:15
CopyTruthParticles::m_outTruthPartKey
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey
Key for output truth particles.
Definition: CopyTruthParticles.h:46
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
IJetExecuteTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
CopyTruthParticles::classify
virtual bool classify(const xAOD::TruthParticle *tp) const =0
Classifier function(s)
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
CopyTruthParticles::m_truthEventKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Key for input truth event.
Definition: CopyTruthParticles.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CopyTruthParticles::m_ptmin
Gaudi::Property< float > m_ptmin
Minimum pT for particle selection (in MeV)
Definition: CopyTruthParticles.h:40
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CopyTruthParticles
Definition: CopyTruthParticles.h:18
AsgTool.h
TruthEventContainer.h