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

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/NGen.hh Source File
Ratpac-two
NGen.hh
1 // fsutanto@umich.edu
2 // akindele1@llnl.gov
3 // March 9, 2020
4 
5 // To use this generator, the command is:
6 // /generator/add n ISOTOPE:POSITION[:TIME]
7 // For example:
8 // /generator/add n 17:fill
9 
10 #ifndef __RAT_NGen__
11 #define __RAT_NGen__
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 NGen : public GLG4Gen {
25  public:
26  NGen();
27  virtual ~NGen();
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 N17Source event model only generate neutrons and photons.
52  G4ParticleDefinition *neutron;
53  G4ParticleDefinition *electron;
54 
55  private:
56  G4RandGeneral *spectrumSampler;
57  virtual void SetUpBetaSpectrumSampler(G4double &e0);
58  virtual G4double FermiFunction(G4double &W);
59  virtual G4double ModSquared(G4double &re, G4double &im);
60 
61  G4int Z;
62  G4int A;
63  G4double alphaZ;
64  G4double Rnuc;
65  G4double V0;
66  G4double gamma0;
67  G4double sumBr;
68  G4double pdfNow;
69 };
70 
71 } // namespace RAT
72 
73 #endif // RAT_NGen_h
Definition: GLG4Gen.hh:14
Definition: GLG4PosGen.hh:18
Definition: GLG4TimeGen.hh:6
Definition: NGen.hh:24
Definition: CCCrossSecMessenger.hh:29