2#ifndef REST_TRESTGEANT4PRIMARYGENERATORINFO_H
3#define REST_TRESTGEANT4PRIMARYGENERATORINFO_H
12namespace TRestGeant4PrimaryGeneratorTypes {
14enum class SpatialGeneratorTypes {
23std::string SpatialGeneratorTypesToString(
const SpatialGeneratorTypes&);
24SpatialGeneratorTypes StringToSpatialGeneratorTypes(
const std::string&);
26enum class SpatialGeneratorShapes {
35std::string SpatialGeneratorShapesToString(
const SpatialGeneratorShapes&);
36SpatialGeneratorShapes StringToSpatialGeneratorShapes(
const std::string&);
38enum class EnergyDistributionTypes {
48std::string EnergyDistributionTypesToString(
const EnergyDistributionTypes&);
49EnergyDistributionTypes StringToEnergyDistributionTypes(
const std::string&);
51enum class EnergyDistributionFormulas {
56std::string EnergyDistributionFormulasToString(
const EnergyDistributionFormulas&);
57EnergyDistributionFormulas StringToEnergyDistributionFormulas(
const std::string&);
58TF1 EnergyDistributionFormulasToRootFormula(
const EnergyDistributionFormulas&);
60enum class AngularDistributionTypes {
70std::string AngularDistributionTypesToString(
const AngularDistributionTypes&);
71AngularDistributionTypes StringToAngularDistributionTypes(
const std::string&);
73enum class AngularDistributionFormulas {
78std::string AngularDistributionFormulasToString(
const AngularDistributionFormulas&);
79AngularDistributionFormulas StringToAngularDistributionFormulas(
const std::string&);
80TF1 AngularDistributionFormulasToRootFormula(
const AngularDistributionFormulas&);
82enum class EnergyAndAngularDistributionFormulas {
86std::string EnergyAndAngularDistributionFormulasToString(
const EnergyAndAngularDistributionFormulas&);
87EnergyAndAngularDistributionFormulas StringToEnergyAndAngularDistributionFormulas(
const std::string&);
89TF2 EnergyAndAngularDistributionFormulasToRootFormula(
const EnergyAndAngularDistributionFormulas&);
168 return M_PI * radius * radius * 0.01;
177 friend class DetectorConstruction;
TVector3 fSpatialGeneratorSize
The size of the generator. Stores up to three dimensions according to the shape box: length,...
TString GetSpatialGeneratorType() const
Returns a std::string specifying the generator type (volume, surface, point, virtualWall,...
TString fSpatialGeneratorFrom
The volume name where the events are generated, in case of volume or surface generator types.
TString fSpatialGeneratorSpatialDensityFunction
Defines density distribution of the generator shape. rho=F(x,y,z), in range 0~1.
TVector3 GetSpatialGeneratorPosition() const
Returns a 3d-std::vector with the position of the primary event generator. This value has meaning onl...
TVector3 fSpatialGeneratorWorldSize
The size of the world volume (box half lengths for x, y and z)
Double_t fSpatialGeneratorRotationValue
degrees of rotation for generator virtual shape along the axis
TVector3 fSpatialGeneratorPosition
The position of the generator for virtual, and point, generator types.
Double_t GetSpatialGeneratorRotationValue() const
Returns the degree of rotation.
Double_t GetSpatialGeneratorCosmicSurfaceTermCm2() const
Returns cosmic surface term (cm2) for simulation time computation.
TVector3 fSpatialGeneratorRotationAxis
A 3d-std::vector with the angles, measured in degrees, of a XYZ rotation applied to the virtual gener...
Double_t GetSpatialGeneratorCosmicRadius() const
Returns cosmic generator radius (mm)
TVector3 GetSpatialGeneratorSize() const
Returns the main spatial dimension of virtual generator. It is the size of a virtualBox.
TString GetSpatialGeneratorSpatialDensityFunction() const
Returns the density function of the generator.
TString GetSpatialGeneratorShape() const
Returns a std::string specifying the generator shape (point, wall, box, etc )
TVector3 GetSpatialGeneratorRotationAxis() const
Returns a 3d-std::vector, fGenRotation, with the XYZ rotation angle values in degrees....
TString fSpatialGeneratorShape
Shape of spatial generator (wall, GDML, sphere, etc)
TString fSpatialGeneratorType
Type of spatial generator (point, surface, volume, custom)
TString GetSpatialGeneratorFrom() const
Returns the name of the GDML volume where primary events are produced. This value has meaning only wh...