GEMC  2.2
Geant4 Monte-Carlo Framework
MPrimaryGeneratorAction.h
Go to the documentation of this file.
1 #ifndef MPrimaryGeneratorAction_h
2 #define MPrimaryGeneratorAction_h 1
3 
4 // G4 headers
5 #include "G4VUserPrimaryGeneratorAction.hh"
6 #include "G4ParticleGun.hh"
7 #include "G4Event.hh"
8 
9 // %%%%%%%%%%%%%
10 // For reading StdHep files
11 // %%%%%%%%%%%%%
12 
13 #include "lStdHep.hh"
14 using namespace UTIL;
15 
16 
17 // gemc headers
18 #include "options.h"
19 
20 // C++ headers
21 #include <fstream>
22 
23 
24 // %%%%%%%%%%%%%%%%
25 // Class definition
26 // %%%%%%%%%%%%%%%%
28 {
29  public:
32 
33  public:
34  void GeneratePrimaries(G4Event* anEvent);
36  double GEN_VERBOSITY;
37  double getBeamPol()
38  {
39  return beamPol;
40  }
41 
42  // LUND information
44  vector<double> lundUserDefined;
45 
46 
47  private:
48  string input_gen;
49  string hd_msg;
50  G4ParticleTable* particleTable;
51 
52  // Primary Beam
53  G4ParticleDefinition *Particle;
54  double mom, dmom, Mom;
55  double theta, dtheta, Theta;
56  double phi, dphi, Phi;
57  double vx, vy, vz;
58  double dvr, dvz;
59  double Vx, Vy, Vz;
60  double polDeg, polTheta, polPhi;
61  G4ThreeVector beam_dir;
62  G4ThreeVector beam_vrt;
63  G4ThreeVector beam_pol;
64  double ctheta;
65  double cphi;
66 
67 
68  // Generators Input Files
69  ifstream gif;
70  string gformat;
71  string gfilename;
72  double beamPol;
73 
74  lStdHep *stdhep_reader;
75 
77  // Luminosity Beam
78  G4ParticleDefinition *L_Particle;
79  double L_mom, L_dmom, L_Mom;
80  double L_theta, L_dtheta, L_Theta;
81  double L_phi, L_dphi, L_Phi;
82  double L_vx, L_vy, L_vz;
83  double L_dvr, L_dvz;
84  int NP;
85  double TWINDOW;
86  double TBUNCH;
87  G4ThreeVector L_beam_dir;
88  G4ThreeVector L_beam_vrt;
89 
90  // Luminosity Beam2
91  G4ParticleDefinition *L2_Particle;
92  double L2_mom, L2_dmom, L2_Mom;
93  double L2_theta, L2_dtheta, L2_Theta;
94  double L2_phi, L2_dphi, L2_Phi;
95  double L2_vx, L2_vy, L2_vz;
96  double L2_dvr, L2_dvz;
97  int NP2;
98  double TBUNCH2;
99  G4ThreeVector L2_beam_dir;
100  G4ThreeVector L2_beam_vrt;
101 
102  G4ParticleGun* particleGun;
103  void setBeam();
104 
105 };
106 
107 #endif
108 
109 
vector< double > lundUserDefined
user defined infos in the LUND header
Definition: lStdHep.cc:17