|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
21 #include <CLHEP/Units/SystemOfUnits.h>
76 print(
"Shoot [%d] [%.3f , %.3f] GeV %s pos:(%.3f %.3f %.3f)[mm] dir:(%6.3f %6.3f %6.3f)",
int m_multiplicity
Property: Desired multiplicity of the particles to be shot.
bool m_standalone
Property: Standalone mode: includes interaction merging and primary generation.
bool m_needsControl
Default property: Flag to create control instance.
int m_mask
Property: User mask passed to all particles in the generated interaction.
int mergeInteractions(const Geant4Action *caller, const Geant4Context *context)
Merge all interactions present in the context.
int generationInitialization(const Geant4Action *caller, const Geant4Context *context)
Initialize the generation of one event.
double m_momentumMin
Property: Minimal momentum value.
static void increment(T *)
Increment count according to type information.
bool m_isotrop
Property: Isotrope particles?
double m_energy
Property: Fixed momentum value, overwrites momentumMin and momentumMax if set.
int generatePrimaries(const Geant4Action *caller, const Geant4Context *context, G4Event *event)
Generate all primary vertices corresponding to the merged interaction.
ROOT::Math::XYZVector m_direction
Property: Shooting direction of the gun.
Geant4ParticleGun(Geant4Context *context, const std::string &name)
Standard constructor.
virtual void operator()(G4Event *event) override
Callback to generate primary particles.
ROOT::Math::XYZVector m_position
Property: Position of the gun in space.
double m_momentumMax
Property: Maximal momentum value.
Geant4Action & declareProperty(const std::string &nam, T &val)
Declare property.
static void decrement(T *)
Decrement count according to type information.
virtual void operator()(G4Event *event)
Callback to generate primary particles.
bool m_print
Property: Enable printout.
void print(const char *fmt,...) const
Support for messages with variable output level using output level.
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
virtual ~Geant4ParticleGun()
Default destructor.
std::string m_particleName
Property: Particle name.
virtual void getParticleDirection(int, ROOT::Math::XYZVector &direction, double &momentum) const
Particle modification. Caller presets defaults to: ( direction = m_direction, momentum = [m_momentumM...
virtual void getParticleDirection(int num, ROOT::Math::XYZVector &direction, double &momentum) const override
Particle modification. Caller presets defaults to: ( direction = m_direction, momentum = [m_momentumM...
virtual void getParticleDirection(int num, ROOT::Math::XYZVector &direction, double &momentum) const
Particle modification. Caller presets defaults to: ( direction = m_direction, momentum = m_energy)
virtual void printInteraction(int mask) const
Print single particle interaction identified by its mask.
int m_shotNo
Shot number in sequence.
Generic context to extend user, run and event information.
Generate particles isotrop in space around origine (0,0,0)
Geant4Context * context() const
Access the context.