musrPrimaryGeneratorAction.hh

Go to the documentation of this file.
00001 
00002 #ifndef musrPrimaryGeneratorAction_h
00003 #define musrPrimaryGeneratorAction_h 1
00004 
00005 #include "G4VUserPrimaryGeneratorAction.hh"
00006 #include "globals.hh"
00007 #include "Randomize.hh"
00008 #include "musrParticleGun.hh"
00009 class G4ParticleGun;
00010 class G4Event;
00011 class musrDetectorConstruction;
00012 class musrPrimaryGeneratorMessenger;
00013 
00014 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00015 
00016 class musrPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
00017 {
00018   public:
00019     musrPrimaryGeneratorAction(musrDetectorConstruction*);    
00020    ~musrPrimaryGeneratorAction();
00021 
00022   public:
00023     void GeneratePrimaries(G4Event*);
00024     void SetRndmFlag(G4String val) { rndmFlag = val;}
00025     void Setxvertex(G4double x) ;
00026     void Setyvertex(G4double y) ;
00027     void Setzvertex(G4double z) ;
00028     void Setpxanglevertex(G4double px) ;
00029     void Setpyanglevertex(G4double py) ;
00030     void SetMomentum(G4double p);
00031     void SetBeamWidth(G4double w);
00032 
00033     static G4String GetPrimaryName() ;                
00034 
00035   private:
00036     musrParticleGun*                particleGun;        //pointer a to G4 service class
00037     musrDetectorConstruction*      musrDetector; //pointer to the geometry
00038     
00039     musrPrimaryGeneratorMessenger* gunMessenger; //messenger of this class
00040     G4String                      rndmFlag;     //flag for a random impact point       
00041 
00042     static G4String thePrimaryParticleName ;
00043 
00044     G4double xvertex,yvertex,zvertex;
00045     G4bool xyvertexdefined;
00046     G4bool zvertexdefined;
00047     G4double pxanglevertex,pyanglevertex;
00048     G4bool pvertexdefined;
00049   G4double pMomentum;
00050   G4bool pMomentumdefined;
00051   G4double TheSetWidth;
00052   G4bool Widthdefined;
00053 
00054 public: 
00055   G4double  decaytime;
00056   HepRandomEngine * theEngine;
00057 
00058 
00059 };
00060 
00061 #endif
00062 
00063 

Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6