12 #include <framework/core/FrameworkExceptions.h>
13 #include <mdst/dataobjects/MCParticleGraph.h>
14 #include <simulation/dataobjects/MCParticleTrajectory.h>
16 #include "G4VUserTrackInformation.hh"
17 #include "G4VUserPrimaryParticleInformation.hh"
26 namespace Simulation {
36 template<
class Info,
class Payload>
class UserInfo:
public Info {
100 template<
class Carrier>
static Payload
getInfo(Carrier& obj)
103 if (!userinfo)
throw(CouldNotFindUserInfo());
Class to save the full simulated trajectory of a particle.
UserInfo class which is used to attach additional information to Geant4 particles and tracks.
virtual void Print() const
Prints information, not implemented in this class.
void setFraction(double fraction)
Store optical photon propagation fraction (used for performance speed-ups)
MCParticleTrajectory * getTrajectory()
Get optional particle trajectory.
MCParticleTrajectory * m_trajectory
Particle trajectory, if any.
void setStatus(int status)
Set status of optical photon (used for performance speed-ups)
UserInfo(Payload data)
The constructor of the user info class.
double getFraction()
Get optical photon propagation fraction (used for performance speed-ups) status=0: fraction=1 status=...
static Payload getInfo(Carrier &obj)
Static function to just return UserInformation attached to the obj of type Carrier.
void setTrajectory(MCParticleTrajectory *trajectory)
Set the optional particle trajectory.
int m_status
optical photon: status
double m_fraction
optical photon: propagation fraction
Payload getData()
Returns the payloaded data.
Payload m_data
The data which is payloaded to the specified class.
int getStatus()
Get status of optical photon (used for performance speed-ups) 0 initial 1 prescaled in StackingAction...
#define BELLE2_DEFINE_EXCEPTION(ClassName, Message)
Macro that defines an exception with the given message template.
Abstract base class for different kinds of events.