Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
PrimaryGeneratorAction.hh
Go to the documentation of this file.
00001 
00011 #ifndef PrimaryGeneratorAction_h
00012 #define PrimaryGeneratorAction_h 1 //!<Inclusion guard.
00013 
00014 #include "G4VUserPrimaryGeneratorAction.hh"
00015 #include "globals.hh"
00016 #include "globals.hh"
00017 #include "G4ParticleTable.hh"
00018 #include "G4UImessenger.hh"
00019 #include "G4ParticleMessenger.hh"
00020 #include "G4IonTable.hh"
00021 #include "G4ShortLivedTable.hh"
00022 
00023 
00024 #include "G4Ions.hh"
00025 #include "G4Event.hh"
00026 #include "G4ParticleGun.hh"
00027 #include "G4ParticleTable.hh"
00028 #include "G4ParticleDefinition.hh"
00029 #include "Randomize.hh"
00030 #include "RunAction.hh"
00031 
00032 
00033 class G4ParticleGun;
00034 class G4Event;
00035 class DetectorConstruction;
00036 class PrimaryGeneratorMessenger;
00037 
00038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00039 
00042 class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
00043 {
00044 public:
00045   PrimaryGeneratorAction(DetectorConstruction* 
00046                          ,RunAction* 
00047                          ); 
00048   void SetParticle(G4int Z=6 
00049                    , G4int A=17 
00050                    , G4double E=0. 
00051                    , G4double Q=0. 
00052                    );   
00053   virtual ~PrimaryGeneratorAction(); 
00054 
00055   void GeneratePrimaries(G4Event*);     
00056   void SetRndmFlag(G4String val) { rndmFlag = val;}     
00057   G4ParticleGun* GetParticleGun(); 
00058   void PrintTargetSize(); 
00059 
00060 private:
00061   G4ParticleGun*                particleGun;      
00062   DetectorConstruction*    Detector;    
00063 
00064   RunAction * myRunAction;
00065     
00066   PrimaryGeneratorMessenger* gunMessenger;   
00067   G4String                      rndmFlag;         
00068 };
00069 
00070 
00071 #endif
00072 
00073 
 All Classes Files Functions Variables Defines

Back to the main page of the Precalibrated Ion Beam Identification Detector project

Created by Rikard Lundmark