REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestGeant4ParticleSourceCry.h
1#ifndef TRestParticleSourceCry_Class
2#define TRestParticleSourceCry_Class
3
4#include <TRandom3.h>
5
6#include <iostream>
7
8#ifdef USE_CRY
9#include <CRYGenerator.h>
10#include <CRYSetup.h>
11#endif
12
13#include <TRestGeant4ParticleSource.h>
14
16 private:
18 Int_t fReturnNeutrons = 1;
20 Int_t fReturnProtons = 1;
22 Int_t fReturnGammas = 1;
26 Int_t fReturnPions = 1;
28 Int_t fReturnKaons = 1;
30 Int_t fReturnMuons = 1;
31
33 Int_t fNParticlesMin = 1;
35 Int_t fNParticlesMax = 1000000;
36
38 Double_t fXOffset = 0;
40 Double_t fYOffset = 0;
42 Double_t fZOffset = 0;
43
45 std::string fDate = "7\1\2012";
46
48 Double_t fLatitude = 90.0;
49 ;
50
52 Double_t fAltitude = 0.0;
53 ;
54
56 Double_t fSubBoxLength = 100.0;
57 ;
58
60 Int_t fSeed = 0; //<
61
63 TRandom3* fRandom = nullptr;
64
65 protected:
66#ifdef USE_CRY
67 CRYGenerator* fCRYGenerator = nullptr;
68#endif
69
70 public:
71 void Update() override;
72 void InitFromConfigFile() override;
73 inline Int_t GetNumberOfParticles() const { return fParticles.size(); }
74 void PrintMetadata() override;
75
78 ClassDefOverride(TRestGeant4ParticleSourceCry, 1);
79};
80#endif
Int_t fReturnPions
It defines if secondary electrons will be produced by the generator.
std::string fDate
It will adjust the cosmic-ray distributions to the 11-year solar cycle.
Double_t fZOffset
This is likely the Z-coordinate where the box of generated particles is centered.
void PrintMetadata() override
It will print on screen the settings used for the CRY generator setup.
Int_t fReturnKaons
It defines if secondary pions will be produced by the generator.
Int_t fReturnNeutrons
It defines if secondary neutrons will be produced by the generator.
Double_t fXOffset
This is likely the X-coordinate where the box of generated particles is centered.
TRandom3 * fRandom
Internal process random generator.
void Update() override
It is used by restG4 PrimaryGeneratorAction to update the particle source.
void InitFromConfigFile() override
Initialization of TRestGeant4ParticleSourceCry members through a RML file.
Double_t fLatitude
The allowed range is -90 to 90. 0 defines the magnetic equator.
Double_t fYOffset
This is likely the Y-coordinate where the box of generated particles is centered.
Int_t fNParticlesMax
Showers with number of particles above this number will be truncated.
Double_t fSubBoxLength
The size of the box where the CRY generator produces particles (in m).
Int_t fReturnMuons
It defines if secondary muons will be produced by the generator.
Int_t fReturnProtons
It defines if secondary protons will be produced by the generator.
Int_t fNParticlesMin
Showers with number of particles below this number will be truncated.
Int_t fReturnElectrons
It defines if secondary gammas will be produced by the generator.
Int_t fReturnGammas
It defines if secondary photons will be produced by the generator.
Double_t fAltitude
Allowed values are 0, 2100 and 11300 m.
Int_t fSeed
Seed used in random generator.