ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::ParticleHelper Class Reference

A helper tool for the creation or update of an ISF::ISFParticle objects. More...

#include <ParticleHelper.h>

Inheritance diagram for ISF::ParticleHelper:
Collaboration diagram for ISF::ParticleHelper:

Public Member Functions

 ParticleHelper (const std::string &t, const std::string &n, const IInterface *p)
 Constructor.
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual ISFParticlecreateParticle (double x, double y, double z, double px, double py, double pz, double pMass, double pCharge, int pPdgId, int status, double pTime, const ISFParticle &parent, int bc, int id, TruthBinding *tBinding=nullptr, const HepMcParticleLink *partLink=nullptr) const override final
 Create a new particle.
virtual ISFParticlecreateParticle (const Amg::Vector3D &x, const Amg::Vector3D &p, double pMass, double pCharge, int pPdgId, int status, double pTime, const ISFParticle &parent, int bc, int id, TruthBinding *tBinding=nullptr, const HepMcParticleLink *partLink=nullptr) const override final
 Create a new particle.
virtual ISFParticlecreateParticle (const HepGeom::Point3D< double > &x, const HepGeom::Vector3D< double > &p, double pMass, double pCharge, int pPdgId, int status, double pTime, const ISFParticle &parent, int bc, int id, TruthBinding *tBinding=nullptr, const HepMcParticleLink *partLink=nullptr) const override final
 Create a new particle.
virtual ISFParticleupdatedParticle (const ISFParticle &origIsp, const Amg::Vector3D &updatedPos, const Amg::Vector3D &updatedMom, double deltaTime=0.) const override final
 An updated particle (e.g.
virtual ISFParticleupdatedParticle (const ISFParticle &origIsp, const HepGeom::Point3D< double > &updatedPos, const HepGeom::Vector3D< double > &updatedMom, double deltaTime=0.) const override final
 An updated particle (e.g.

Detailed Description

A helper tool for the creation or update of an ISF::ISFParticle objects.

Author
Andreas.Salzburger -at- cern.ch

Definition at line 29 of file ParticleHelper.h.

Constructor & Destructor Documentation

◆ ParticleHelper()

ISF::ParticleHelper::ParticleHelper ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor.

Definition at line 15 of file ParticleHelper.cxx.

15 :
16 base_class(t,n,p)
17{
18
19}

Member Function Documentation

◆ createParticle() [1/3]

ISF::ISFParticle * ISF::ParticleHelper::createParticle ( const Amg::Vector3D & x,
const Amg::Vector3D & p,
double pMass,
double pCharge,
int pPdgId,
int status,
double pTime,
const ISFParticle & parent,
int bc,
int id,
TruthBinding * tBinding = nullptr,
const HepMcParticleLink * partLink = nullptr ) const
finaloverridevirtual

Create a new particle.

Definition at line 59 of file ParticleHelper.cxx.

70 {
71 return new ISF::ISFParticle( x,
72 p,
73 pMass,
74 pCharge,
75 pPdgId,
76 status,
77 pTime,
78 parent,
79 id,
80 bc,
81 tBinding,
82 partLink);
83}
#define x

◆ createParticle() [2/3]

ISF::ISFParticle * ISF::ParticleHelper::createParticle ( const HepGeom::Point3D< double > & x,
const HepGeom::Vector3D< double > & p,
double pMass,
double pCharge,
int pPdgId,
int status,
double pTime,
const ISFParticle & parent,
int bc,
int id,
TruthBinding * tBinding = nullptr,
const HepMcParticleLink * partLink = nullptr ) const
finaloverridevirtual

Create a new particle.

Definition at line 86 of file ParticleHelper.cxx.

97 {
98 return createParticle( pos.x(), pos.y(), pos.z(),
99 mom.x(), mom.y(), mom.z(),
100 pMass,
101 pCharge,
102 pPdgId,
103 status,
104 pTime,
105 parent,
106 id,
107 bc,
108 tBinding,
109 partLink);
110}
virtual ISFParticle * createParticle(double x, double y, double z, double px, double py, double pz, double pMass, double pCharge, int pPdgId, int status, double pTime, const ISFParticle &parent, int bc, int id, TruthBinding *tBinding=nullptr, const HepMcParticleLink *partLink=nullptr) const override final
Create a new particle.

◆ createParticle() [3/3]

ISF::ISFParticle * ISF::ParticleHelper::createParticle ( double x,
double y,
double z,
double px,
double py,
double pz,
double pMass,
double pCharge,
int pPdgId,
int status,
double pTime,
const ISFParticle & parent,
int bc,
int id,
TruthBinding * tBinding = nullptr,
const HepMcParticleLink * partLink = nullptr ) const
finaloverridevirtual

Create a new particle.

Definition at line 31 of file ParticleHelper.cxx.

42 {
43 return new ISF::ISFParticle( Amg::Vector3D(x,y,z),
44 Amg::Vector3D(px,py,pz),
45 pMass,
46 pCharge,
47 pPdgId,
48 status,
49 pTime,
50 parent,
51 bc,
52 id,
53 tBinding,
54 partLink);
55}
#define y
#define z
Eigen::Matrix< double, 3, 1 > Vector3D

◆ finalize()

StatusCode ISF::ParticleHelper::finalize ( )
overridevirtual

Definition at line 153 of file ParticleHelper.cxx.

154{
155 ATH_MSG_VERBOSE("Finalizing ...");
156 return StatusCode::SUCCESS;
157}
#define ATH_MSG_VERBOSE(x)

◆ initialize()

StatusCode ISF::ParticleHelper::initialize ( )
overridevirtual

Definition at line 23 of file ParticleHelper.cxx.

24{
25 ATH_MSG_VERBOSE("Initializing ...");
26 return StatusCode::SUCCESS;
27}

◆ updatedParticle() [1/2]

ISF::ISFParticle * ISF::ParticleHelper::updatedParticle ( const ISFParticle & origIsp,
const Amg::Vector3D & updatedPos,
const Amg::Vector3D & updatedMom,
double deltaTime = 0. ) const
finaloverridevirtual

An updated particle (e.g.

Returns the Particle Stack, should register truth.

after transport)

Definition at line 113 of file ParticleHelper.cxx.

117{
118 return new ISF::ISFParticle( updatedPos,
119 updatedMom,
120 origIsp.mass(),
121 origIsp.charge(),
122 origIsp.pdgCode(),
123 HepMC::status(origIsp),
124 origIsp.timeStamp()+deltaTime,
125 origIsp,
126 HepMC::uniqueID(origIsp),
127 HepMC::barcode(origIsp),
128 origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr,
129 origIsp.getParticleLink() ? new HepMcParticleLink(*origIsp.getParticleLink()) : nullptr);
130}
int barcode(const T *p)
Definition Barcode.h:16
int uniqueID(const T &p)
int status(const T &p)

◆ updatedParticle() [2/2]

ISF::ISFParticle * ISF::ParticleHelper::updatedParticle ( const ISFParticle & origIsp,
const HepGeom::Point3D< double > & updatedPos,
const HepGeom::Vector3D< double > & updatedMom,
double deltaTime = 0. ) const
finaloverridevirtual

An updated particle (e.g.

Returns the Particle Stack, should register truth.

after transport)

Definition at line 133 of file ParticleHelper.cxx.

137{
138 return new ISF::ISFParticle( Amg::Vector3D( updatedPos.x(), updatedPos.y(), updatedPos.z()),
139 Amg::Vector3D( updatedMom.x(), updatedPos.x(), updatedPos.z()),
140 origIsp.mass(),
141 origIsp.charge(),
142 origIsp.pdgCode(),
143 HepMC::status(origIsp),
144 origIsp.timeStamp()+deltaTime,
145 origIsp,
146 HepMC::uniqueID(origIsp),
147 HepMC::barcode(origIsp),
148 origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr,
149 origIsp.getParticleLink() ? new HepMcParticleLink(*origIsp.getParticleLink()) : nullptr);
150}

The documentation for this class was generated from the following files: