k4SimGeant4
Loading...
Searching...
No Matches
ParticleInformation.h
Go to the documentation of this file.
1#ifndef SIMG4COMMON_PARTICLEINFORMATION_H
2#define SIMG4COMMON_PARTICLEINFORMATION_H
3
4// datamodel
5#include "edm4hep/MCParticle.h"
6
7// Geant4
8#include "G4VUserPrimaryParticleInformation.hh"
9
10// CLHEP
11#include "CLHEP/Vector/ThreeVector.h"
12
25namespace sim {
26class ParticleInformation : public G4VUserPrimaryParticleInformation {
27public:
31 explicit ParticleInformation(const edm4hep::MCParticle& aMCpart);
33 virtual ~ParticleInformation();
35 virtual void Print() const final;
39 edm4hep::MCParticle& mcParticle();
43 void setEndMomentum(const CLHEP::Hep3Vector& aMom);
47 const CLHEP::Hep3Vector& endMomentum() const;
51 void setVertexPosition(const CLHEP::Hep3Vector& aPos);
55 const CLHEP::Hep3Vector& vertexPosition() const;
59 void setEndStatus(int aStat);
63 int endStatus() const;
67 void setSmeared(bool aFlag);
71 bool smeared() const;
72
73private:
75 edm4hep::MCParticle m_mcParticle;
77 CLHEP::Hep3Vector m_endMomentum;
79 CLHEP::Hep3Vector m_vertexPosition;
84};
85}
86
87#endif /* SIMG4COMMON_PARTICLEINFORMATION_H */
Definition ParticleInformation.h:26
edm4hep::MCParticle & mcParticle()
Getter of the MCParticle.
Definition ParticleInformation.cpp:10
bool m_smeared
Flag indicating if particle was smeared in the tracker (filled for fast-sim)
Definition ParticleInformation.h:83
virtual ~ParticleInformation()
A destructor.
Definition ParticleInformation.cpp:6
CLHEP::Hep3Vector m_vertexPosition
Particle vertex position saved at the end of tracking (filled for fast-sim)
Definition ParticleInformation.h:79
const CLHEP::Hep3Vector & vertexPosition() const
Getter of the vertex positon (used for fast simulation).
Definition ParticleInformation.cpp:14
void setEndMomentum(const CLHEP::Hep3Vector &aMom)
Setter of the end-of-tracking momentum (used for fast simulation).
Definition ParticleInformation.cpp:11
CLHEP::Hep3Vector m_endMomentum
Particle momentum at the end of tracking (filled for fast-sim)
Definition ParticleInformation.h:77
void setVertexPosition(const CLHEP::Hep3Vector &aPos)
Setter of the vertex positon (used for fast simulation).
Definition ParticleInformation.cpp:13
virtual void Print() const final
A printing method.
Definition ParticleInformation.cpp:8
int endStatus() const
Getter of the end-of-tracking particle status (used for fast simulation).
Definition ParticleInformation.cpp:16
const CLHEP::Hep3Vector & endMomentum() const
Getter of the vertex posiiton taken at the end-of-tracking (used for fast simulation).
Definition ParticleInformation.cpp:12
edm4hep::MCParticle m_mcParticle
EDM MC particle.
Definition ParticleInformation.h:75
void setEndStatus(int aStat)
Setter of the end-of-tracking particle status (used for fast simulation).
Definition ParticleInformation.cpp:15
int m_endStatus
Particle status at the end of tracking (filled for fast-sim)
Definition ParticleInformation.h:81
ParticleInformation(const edm4hep::MCParticle &aMCpart)
A constructor.
Definition ParticleInformation.cpp:4
bool smeared() const
Getter of the flag indicating if particle was smeared in the tracker (used for fast simulation).
Definition ParticleInformation.cpp:18
void setSmeared(bool aFlag)
Setter of the flag indicating if particle was smeared in the tracker (used for fast simulation).
Definition ParticleInformation.cpp:17
Conversion between units.
Definition ConstantField.h:14