REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestGeant4ParticleSourceDecay0.h
1 #ifndef TRestParticleSourceDecay0_Class
2 #define TRestParticleSourceDecay0_Class
3 
4 #include <bxdecay0/decay0_generator.h>
5 #include <bxdecay0/event.h>
6 #include <bxdecay0/std_random.h>
7 
8 #include <iostream>
9 
10 #include "TObject.h"
11 #include "TRestGeant4ParticleSource.h"
12 #include "TRestMetadata.h"
13 
15  protected:
16  bxdecay0::decay0_generator* fDecay0Model;
17  bxdecay0::std_random* prng;
18  std::default_random_engine* generator;
19 
20  std::string fParentName;
21  std::string fDecayType;
22 
23  int fSeed;
24  int fDaughterLevel;
25 
26  public:
27  void Update() override;
28  void InitFromConfigFile() override;
29  inline Int_t GetNumberOfParticles() const { return fParticles.size(); }
30  void PrintMetadata() override;
31 
33  ~TRestGeant4ParticleSourceDecay0() { delete fDecay0Model; }
34  ClassDefOverride(TRestGeant4ParticleSourceDecay0, 1);
35 };
36 #endif
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.