00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef BDSPrimaryGeneratorAction_h
00012 #define BDSPrimaryGeneratorAction_h
00013
00014 #include "G4VUserPrimaryGeneratorAction.hh"
00015 #include "globals.hh"
00016 #include <fstream>
00017 #include "BDSSynchrotronRadiation.hh"
00018
00019 #include "BDSGen5Shell.hh"
00020
00021 using std::ifstream;
00022 using std::ostream;
00023
00024 class G4ParticleGun;
00025 class G4Event;
00026 class BDSDetectorConstruction;
00027
00028
00029 class BDSPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
00030 {
00031 public:
00032 BDSPrimaryGeneratorAction(BDSDetectorConstruction*);
00033 ~BDSPrimaryGeneratorAction();
00034
00035 public:
00036 void GeneratePrimaries(G4Event*);
00037
00038 private:
00039 G4ParticleGun* particleGun;
00040 BDSDetectorConstruction* BDSDetector;
00041
00042
00043
00044 G4double beta_x,sig_z,KineticEnergy,
00045 gamma,beta_y,sig_dp,emit_x,emit_y,charge;
00046
00047 G4double sig_x,sig_xp,sig_y,sig_yp,sig_t;
00048
00049
00050 ifstream InputBunchFile;
00051 ifstream ExtractBunchFile;
00052
00053 BDSGen5Shell* itsBDSGen5Shell;
00054
00055 G4double logXfactor;
00056 G4double logYfactor;
00057
00058 G4double itsSynchCritEng;
00059 BDSSynchrotronRadiation* itsBDSSynchrotronRadiation;
00060
00061 };
00062
00063 #endif
00064
00065