ATLAS Offline Software
Public Member Functions | List of all members
ISF::ParticleHelper Class Reference

#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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual ISFParticleupdatedParticle (const ISFParticle &origIsp, const Amg::Vector3D &updatedPos, const Amg::Vector3D &updatedMom, double deltaTime=0.) const override final
 An updated particle (e.g. More...
 
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. More...
 

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 }

◆ 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 }

◆ 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),
45  pMass,
46  pCharge,
47  pPdgId,
48  status,
49  pTime,
50  parent,
51  bc,
52  id,
53  tBinding,
54  partLink);
55 }

◆ 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 }

◆ 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 }

◆ 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:
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ISF::ISFParticle
Definition: ISFParticle.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Analysis::pMass
constexpr double pMass
Definition: JpsiPlus2Tracks.cxx:33
x
#define x
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:113
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Amg::py
@ py
Definition: GeoPrimitives.h:39
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
y
#define y
merge.status
status
Definition: merge.py:17
HepMC::status
int status(const T &p)
Definition: MagicNumbers.h:130
ISF::ParticleHelper::createParticle
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.
Definition: ParticleHelper.cxx:31