2 #ifndef REST_TRESTGEANT4PRIMARYGENERATORINFO_H
3 #define REST_TRESTGEANT4PRIMARYGENERATORINFO_H
12 namespace TRestGeant4PrimaryGeneratorTypes {
14 enum class SpatialGeneratorTypes {
23 std::string SpatialGeneratorTypesToString(
const SpatialGeneratorTypes&);
24 SpatialGeneratorTypes StringToSpatialGeneratorTypes(
const std::string&);
26 enum class SpatialGeneratorShapes {
35 std::string SpatialGeneratorShapesToString(
const SpatialGeneratorShapes&);
36 SpatialGeneratorShapes StringToSpatialGeneratorShapes(
const std::string&);
38 enum class EnergyDistributionTypes {
47 std::string EnergyDistributionTypesToString(
const EnergyDistributionTypes&);
48 EnergyDistributionTypes StringToEnergyDistributionTypes(
const std::string&);
50 enum class EnergyDistributionFormulas {
55 std::string EnergyDistributionFormulasToString(
const EnergyDistributionFormulas&);
56 EnergyDistributionFormulas StringToEnergyDistributionFormulas(
const std::string&);
57 TF1 EnergyDistributionFormulasToRootFormula(
const EnergyDistributionFormulas&);
59 enum class AngularDistributionTypes {
68 std::string AngularDistributionTypesToString(
const AngularDistributionTypes&);
69 AngularDistributionTypes StringToAngularDistributionTypes(
const std::string&);
71 enum class AngularDistributionFormulas {
76 std::string AngularDistributionFormulasToString(
const AngularDistributionFormulas&);
77 AngularDistributionFormulas StringToAngularDistributionFormulas(
const std::string&);
78 TF1 AngularDistributionFormulasToRootFormula(
const AngularDistributionFormulas&);
80 enum class EnergyAndAngularDistributionFormulas {
84 std::string EnergyAndAngularDistributionFormulasToString(
const EnergyAndAngularDistributionFormulas&);
85 EnergyAndAngularDistributionFormulas StringToEnergyAndAngularDistributionFormulas(
const std::string&);
87 TF2 EnergyAndAngularDistributionFormulasToRootFormula(
const EnergyAndAngularDistributionFormulas&);
166 return M_PI * radius * radius;
175 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...