ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::HepMC3Vertex Struct Reference

Helper struct to convert HepMC3 vertex into the internal format. More...

#include <acts/blob/master/Examples/Io/HepMC3/include/ACTFW/Plugins/HepMC3/HepMC3Vertex.hpp>

Public Member Functions

std::unique_ptr< SimVertexprocessVertex (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns a vertex translated into Acts.
 
bool inEvent (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns a boolean expression if a vertex is in an event translated into Acts.
 
int id (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns a vertex translated into Acts.
 
std::vector< SimParticleparticlesIn (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns the incoming particles of a vertex translated into Acts.
 
std::vector< SimParticleparticlesOut (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns the outgoing particles of a vertex translated into Acts.
 
Acts::Vector3D position (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns the position of a vertex translated into Acts.
 
double time (const std::shared_ptr< HepMC3::GenVertex > vertex)
 Returns the time of a vertex translated into Acts.
 
void addParticleIn (std::shared_ptr< HepMC3::GenVertex > vertex, std::shared_ptr< SimParticle > particle)
 Adds an incoming particle to a vertex translated into Acts.
 
void addParticleOut (std::shared_ptr< HepMC3::GenVertex > vertex, std::shared_ptr< SimParticle > particle)
 Adds an outgoing particle to a vertex translated into Acts.
 
void removeParticleIn (std::shared_ptr< HepMC3::GenVertex > vertex, std::shared_ptr< SimParticle > particle)
 Removes an incoming particle from a vertex translated into Acts.
 
void removeParticleOut (std::shared_ptr< HepMC3::GenVertex > vertex, std::shared_ptr< SimParticle > particle)
 Removes an outgoing particle from a vertex translated into Acts.
 
void position (const std::shared_ptr< HepMC3::GenVertex > vertex, Acts::Vector3D pos)
 Sets the position of a vertex translated into Acts.
 
void time (const std::shared_ptr< HepMC3::GenVertex > vertex, double time)
 Sets the time of a vertex translated into Acts.
 

Private Member Functions

std::vector< SimParticlegenParticlesToActs (const std::vector< HepMC3::GenParticlePtr > &genParticles)
 Converts HepMC3::GenParticle objects into Acts.
 
HepMC3::GenParticlePtr actsParticleToGen (std::shared_ptr< SimParticle > actsParticle)
 Converts an SimParticle into HepMC3::GenParticle.
 
HepMC3::GenParticlePtr matchParticles (const std::vector< HepMC3::GenParticlePtr > &genParticles, std::shared_ptr< SimParticle > actsParticle)
 Finds a HepMC3::GenParticle from a list that matches an SimParticle object.
 

Detailed Description

Helper struct to convert HepMC3 vertex into the internal format.

Definition at line 21 of file HepMC3Vertex.hpp.

View newest version in sPHENIX GitHub at line 21 of file HepMC3Vertex.hpp

Member Function Documentation

HepMC3::GenParticlePtr FW::HepMC3Vertex::actsParticleToGen ( std::shared_ptr< SimParticle actsParticle)
private

Converts an SimParticle into HepMC3::GenParticle.

Note
The conversion ignores HepMC status codes
Parameters
actsParticleActs particle that will be converted
Returns
converted particle

Definition at line 67 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 67 of file HepMC3Vertex.cpp

References mom.

void FW::HepMC3Vertex::addParticleIn ( std::shared_ptr< HepMC3::GenVertex >  vertex,
std::shared_ptr< SimParticle particle 
)

Adds an incoming particle to a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
particleincoming particle that will be added

Definition at line 79 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 79 of file HepMC3Vertex.cpp

void FW::HepMC3Vertex::addParticleOut ( std::shared_ptr< HepMC3::GenVertex >  vertex,
std::shared_ptr< SimParticle particle 
)

Adds an outgoing particle to a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
particleoutgoing particle that will be added

Definition at line 84 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 84 of file HepMC3Vertex.cpp

std::vector< FW::SimParticle > FW::HepMC3Vertex::genParticlesToActs ( const std::vector< HepMC3::GenParticlePtr > &  genParticles)
private

Converts HepMC3::GenParticle objects into Acts.

Parameters
genParticleslist of HepMC3::GenParticle objects
Returns
converted list

Definition at line 13 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 13 of file HepMC3Vertex.cpp

References FW::HepMC3Particle::particle().

+ Here is the call graph for this function:

int FW::HepMC3Vertex::id ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
id of the vertex

Definition at line 40 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 40 of file HepMC3Vertex.cpp

bool FW::HepMC3Vertex::inEvent ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns a boolean expression if a vertex is in an event translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
boolean expression if the vertex is in an event

Definition at line 35 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 35 of file HepMC3Vertex.cpp

HepMC3::GenParticlePtr FW::HepMC3Vertex::matchParticles ( const std::vector< HepMC3::GenParticlePtr > &  genParticles,
std::shared_ptr< SimParticle actsParticle 
)
private

Finds a HepMC3::GenParticle from a list that matches an SimParticle object.

Parameters
genParticleslist of HepMC particles
actsParticleActs particle
Returns
HepMC particle that matched with the Acts particle or nullptr if no match was found

Definition at line 89 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 89 of file HepMC3Vertex.cpp

std::vector< FW::SimParticle > FW::HepMC3Vertex::particlesIn ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns the incoming particles of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
incoming particles of the vertex

Definition at line 44 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 44 of file HepMC3Vertex.cpp

std::vector< FW::SimParticle > FW::HepMC3Vertex::particlesOut ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns the outgoing particles of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
outgoing particles of the vertex

Definition at line 49 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 49 of file HepMC3Vertex.cpp

Acts::Vector3D FW::HepMC3Vertex::position ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns the position of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
position of the vertex

Definition at line 54 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 54 of file HepMC3Vertex.cpp

void FW::HepMC3Vertex::position ( const std::shared_ptr< HepMC3::GenVertex >  vertex,
Acts::Vector3D  pos 
)

Sets the position of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
posnew position of the vertex

Definition at line 121 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 121 of file HepMC3Vertex.cpp

References pos().

+ Here is the call graph for this function:

std::unique_ptr< FW::SimVertex > FW::HepMC3Vertex::processVertex ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
corresponding Acts vertex

Definition at line 25 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 25 of file HepMC3Vertex.cpp

References FW::SimVertex::incoming.

Referenced by FW::HepMC3Particle::endVertex(), FW::HepMC3Particle::productionVertex(), and FW::HepMC3Event::vertices().

+ Here is the caller graph for this function:

void FW::HepMC3Vertex::removeParticleIn ( std::shared_ptr< HepMC3::GenVertex >  vertex,
std::shared_ptr< SimParticle particle 
)

Removes an incoming particle from a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
particleincoming particle that will be removed

Definition at line 103 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 103 of file HepMC3Vertex.cpp

References particle.

void FW::HepMC3Vertex::removeParticleOut ( std::shared_ptr< HepMC3::GenVertex >  vertex,
std::shared_ptr< SimParticle particle 
)

Removes an outgoing particle from a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
particleoutgoing particle that will be removed

Definition at line 112 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 112 of file HepMC3Vertex.cpp

References particle.

double FW::HepMC3Vertex::time ( const std::shared_ptr< HepMC3::GenVertex >  vertex)

Returns the time of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
Returns
time of the vertex

Definition at line 63 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 63 of file HepMC3Vertex.cpp

void FW::HepMC3Vertex::time ( const std::shared_ptr< HepMC3::GenVertex >  vertex,
double  time 
)

Sets the time of a vertex translated into Acts.

Parameters
vertexvertex in HepMC data type
timenew time of the vertex

Definition at line 127 of file HepMC3Vertex.cpp.

View newest version in sPHENIX GitHub at line 127 of file HepMC3Vertex.cpp

References Acts::VectorHelpers::time().

+ Here is the call graph for this function:


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