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

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/VertexGen_ES.hh Source File
Ratpac-two
VertexGen_ES.hh
1 #ifndef __RAT_VertexGen_ES__
2 #define __RAT_VertexGen_ES__
3 
4 #include <G4Event.hh>
5 #include <G4ThreeVector.hh>
6 #include <RAT/ESgen.hh>
7 #include <RAT/GLG4VertexGen.hh>
8 #include <globals.hh>
9 
55 
56 namespace RAT {
57 
58 class VertexGen_ES : public GLG4VertexGen {
59  public:
60  // Note that the database named is "ibd" by default in the
61  // constructor. In other words, we assume the anti-neutrino flux
62  // is the same for both inverse beta-decay (IBD) and elastic
63  // scattering (ES)... at least for now.
64 
65  VertexGen_ES(const char *arg_dbname = "solar");
66  virtual ~VertexGen_ES();
67  virtual void GeneratePrimaryVertex(G4Event *argEvent, G4ThreeVector &dx, G4double dt);
68  // generates a primary vertex with given particle type, direction, and energy.
69  virtual void SetState(G4String newValues);
70  // format: dir_x dir_y dir_z
71  // If dir_x==dir_y==dir_z==0, the directions are isotropic.
72  virtual G4String GetState();
73  // returns current state formatted as above
74 
85  void SetFlux(const G4String flux);
86 
92  G4String GetFlux() { return fFlux; };
93 
100  void SetNuFlavor(const G4String flavor);
101 
103  G4String GetNuFlavor() { return fNuFlavor; };
104 
108  ESgen *GetHelper() { return fESgen; };
109 
114  const G4String GetDBName() const { return fDBName; }
115 
120  void SetDBName(const G4String name);
121 
122  private:
124  G4ParticleDefinition *fElectron, *fNue, *fNumu;
125 
127  G4ThreeVector fNuDir;
128 
130  G4String fFlux;
131 
134  G4String fNuFlavor;
135 
141  ESgen *fESgen;
142 
143  // Electron mass
144  double fElectronMass;
145 
149  G4String fDBName;
150 
152  bool fRandomDir;
153 };
154 
155 } // namespace RAT
156 
157 #endif
Definition: GLG4VertexGen.hh:26
Implements the generation of a neutrino-electron elastic scattering event.
Definition: ESgen.hh:92
Vertex generator for neutrino-electron elastic scattering.
Definition: VertexGen_ES.hh:58
G4String GetNuFlavor()
Definition: VertexGen_ES.hh:103
const G4String GetDBName() const
Definition: VertexGen_ES.hh:114
void SetFlux(const G4String flux)
Definition: VertexGen_ES.cc:165
ESgen * GetHelper()
Definition: VertexGen_ES.hh:108
G4String GetFlux()
Definition: VertexGen_ES.hh:92
void SetDBName(const G4String name)
Definition: VertexGen_ES.cc:177
void SetNuFlavor(const G4String flavor)
Definition: VertexGen_ES.cc:171
Definition: CCCrossSecMessenger.hh:29