REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
source
libraries
geant4
inc
TRestGeant4ParticleSourceCosmics.h
1
2
#ifndef REST_TRESTGEANT4PARTICLESOURCECOSMICS_H
3
#define REST_TRESTGEANT4PARTICLESOURCECOSMICS_H
4
5
#include <TH2D.h>
6
#include <TRandom3.h>
7
#include <TRestGeant4ParticleSource.h>
8
9
class
TRestGeant4ParticleSourceCosmics
:
public
TRestGeant4ParticleSource
{
10
private
:
11
std::set<std::string> fParticleNames;
12
std::string fFilename;
13
std::map<std::string, double> fParticleWeights;
14
std::pair<double, double> fEnergyRange = {0, 0};
15
16
unsigned
long
long
fCounterEnergyTotal = 0;
17
unsigned
long
long
fCounterEnergyAccepted = 0;
18
19
std::map<std::string, TH2D*> fHistograms;
20
std::map<std::string, TH2D*> fHistogramsTransformed;
21
22
static
std::mutex fMutex;
23
static
std::unique_ptr<TRandom3> fRandom;
24
25
public
:
26
void
Update()
override
;
27
void
InitFromConfigFile
()
override
;
28
29
static
void
SetSeed(
unsigned
int
seed);
30
31
TRestGeant4ParticleSourceCosmics
();
32
~TRestGeant4ParticleSourceCosmics
() =
default
;
33
34
const
char
* GetName()
const override
{
return
"TRestGeant4ParticleSourceCosmics"
; }
35
36
std::map<std::string, TH2D*> GetHistogramsTransformed()
const
{
return
fHistogramsTransformed; }
37
std::set<std::string> GetParticleNames()
const
{
return
fParticleNames; }
38
39
double
GetEnergyRangeScalingFactor()
const
;
40
41
ClassDefOverride(
TRestGeant4ParticleSourceCosmics
, 3);
42
};
43
44
#endif
// REST_TRESTGEANT4PARTICLESOURCECOSMICS_H
TRestGeant4ParticleSourceCosmics
Definition:
TRestGeant4ParticleSourceCosmics.h:9
TRestGeant4ParticleSourceCosmics::InitFromConfigFile
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
Definition:
TRestGeant4ParticleSourceCosmics.cxx:28
TRestGeant4ParticleSource
Definition:
TRestGeant4ParticleSource.h:32
Generated on Tue Dec 3 2024 05:10:14 for REST-for-Physics by
1.9.4