/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/HeGen.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/HeGen.hh Source File
Ratpac-two
HeGen.hh
1 // fsutanto@umich.edu
2 // akindele1@llnl.gov
3 // Jan 6, 2020
4 
5 // To use this generator, the command is:
6 // /generator/add he ISOTOPE:POSITION[:TIME]
7 // For example:
8 // /generator/add he 9:fill
9 
10 #ifndef __RAT_HeGen__
11 #define __RAT_HeGen__
12 
13 #include <RAT/GLG4Gen.hh>
14 #include <Randomize.hh>
15 #include <globals.hh>
16 
17 class G4Event;
18 class G4ParticleDefinition;
19 class GLG4TimeGen;
20 class GLG4PosGen;
21 
22 namespace RAT {
23 
24 class HeGen : public GLG4Gen {
25  public:
26  HeGen();
27  virtual ~HeGen();
28  virtual void GenerateEvent(G4Event *event);
29  virtual void ResetTime(double offset = 0.0);
30  virtual bool IsRepeatable() const { return true; };
31 
32  virtual void SetState(G4String state);
33  virtual G4String GetState() const;
34 
35  virtual void SetTimeState(G4String state);
36  virtual G4String GetTimeState() const;
37  virtual void SetPosState(G4String state);
38  virtual G4String GetPosState() const;
39 
40  protected:
41  // Generator initialization, specified by the user.
42  G4String stateStr;
43 
44  // isotope.
45  int isotope;
46 
47  // The time and position generators specified by the user.
48  GLG4TimeGen *timeGen;
49  GLG4PosGen *posGen;
50 
51  // The He8 Source event model only generate neutrons and photons.
52  G4ParticleDefinition *neutron;
53  G4ParticleDefinition *electron;
54  G4ParticleDefinition *gamma;
55 
56  private:
57  G4RandGeneral *spectrumSampler;
58  virtual void SetUpBetaSpectrumSampler(G4double &e0);
59  virtual G4double FermiFunction(G4double &W);
60  virtual G4double ModSquared(G4double &re, G4double &im);
61 
62  G4int Z;
63  G4int A;
64  G4double alphaZ;
65  G4double Rnuc;
66  G4double V0;
67  G4double gamma0;
68  G4double sumBr;
69  G4double pdfNow;
70 };
71 
72 } // namespace RAT
73 
74 #endif // RAT_HeGen_h
Definition: GLG4Gen.hh:14
Definition: GLG4PosGen.hh:18
Definition: GLG4TimeGen.hh:6
Definition: HeGen.hh:24
Definition: CCCrossSecMessenger.hh:29