source: trunk/examples/novice/gemc/src/MPrimaryGeneratorAction.h@ 1190

Last change on this file since 1190 was 807, checked in by garnier, 17 years ago

update

File size: 1.7 KB
Line 
1#ifndef MPrimaryGeneratorAction_h
2#define MPrimaryGeneratorAction_h 1
3
4// %%%%%%%%%%
5// G4 headers
6// %%%%%%%%%%
7#include "G4VUserPrimaryGeneratorAction.hh"
8#include "G4ParticleGun.hh"
9#include "G4Event.hh"
10
11// %%%%%%%%%%%%%
12// gemc headers
13// %%%%%%%%%%%%%
14#include "usage.h"
15
16// %%%%%%%%%%%%%%%%
17// Class definition
18// %%%%%%%%%%%%%%%%
19class MPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
20{
21 public:
22 MPrimaryGeneratorAction(gemc_opts);
23 ~MPrimaryGeneratorAction();
24
25 public:
26 void GeneratePrimaries(G4Event* anEvent);
27 gemc_opts gemcOpt;
28 double GEN_VERBOSITY;
29
30 private:
31 string input_gen;
32 string hd_msg;
33 G4ParticleTable* particleTable;
34
35 // Primary Beam
36 G4ParticleDefinition *Particle;
37 double mom, dmom, Mom;
38 double theta, dtheta, Theta;
39 double phi, dphi, Phi;
40 double vx, vy, vz;
41 double dvx, dvy, dvz;
42 double Vx, Vy, Vz;
43 G4ThreeVector beam_dir;
44 G4ThreeVector beam_vrt;
45
46 // Generators Input Files
47 ifstream gif;
48 string gformat;
49 string gfilename;
50
51 // Luminosity Beam
52 G4ParticleDefinition *L_Particle;
53 double L_Mom;
54 double L_Theta;
55 double L_Phi;
56 double L_vx, L_vy, L_vz;
57 int NP;
58 double TWINDOW;
59 double TBUNCH;
60 G4ThreeVector L_beam_dir;
61 G4ThreeVector L_beam_vrt;
62
63 G4ParticleGun* particleGun;
64 void setBeam(gemc_opts);
65
66};
67
68#endif
69
70
Note: See TracBrowser for help on using the repository browser.