musrShieldHit.hh

Go to the documentation of this file.
00001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00002 
00003 #ifndef musrShieldHit_h
00004 #define musrShieldHit_h 1
00005 
00006 #include "G4VHit.hh"
00007 #include "G4THitsCollection.hh"
00008 #include "G4Allocator.hh"
00009 #include "G4ThreeVector.hh"
00010 #include "G4MagneticField.hh"
00011 #include "globals.hh"
00012 #include "G4ios.hh"
00013 
00014 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00015 
00016 class musrShieldHit : public G4VHit
00017 {
00018   public:
00019 
00020       musrShieldHit();
00021      ~musrShieldHit();
00022       musrShieldHit(const musrShieldHit&);
00023       const musrShieldHit& operator=(const musrShieldHit&);
00024       G4int operator==(const musrShieldHit&) const;
00025 
00026       inline void* operator new(size_t);
00027       inline void  operator delete(void*);
00028 
00029       void Draw();
00030       void Print();
00031 
00032   public:
00033 
00034 
00035       void SetTrackID  (G4int track)      { trackID = track; };
00036   void SetParticleName (G4String name) {particle_name = name; };
00037       void SetEdep     (G4double de)      { edep = de; };
00038       void SetPos      (G4ThreeVector xyz){ pos = xyz; };
00039       void SetPol      (G4ThreeVector ijk){pol = ijk;};
00040   void SetLogVolName   (G4String logivol) {logicalvolume = logivol;};
00041       
00042 
00043       G4int GetTrackID()    { return trackID; };
00044   G4String GetParticleName() {return particle_name; };
00045       G4double GetEdep()    { return edep; };      
00046       G4ThreeVector GetPos(){ return pos; };
00047       G4ThreeVector GetPol(){ return pol; };
00048   G4String GetLogVolName() { return logicalvolume; };
00049       G4double point[4];
00050       G4double B[6];
00051       const G4Field *mfield;
00052 
00053 
00054   private:
00055 
00056 
00057       G4int         trackID;
00058   G4String          particle_name;
00059       G4double      edep;
00060       G4ThreeVector pos;
00061       G4ThreeVector pol;
00062   G4String          logicalvolume;
00063   static G4int eventIDoldB;
00064   static G4int Nb;
00065   static G4int runIDoldB;
00066 };
00067 
00068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00069 
00070 typedef G4THitsCollection<musrShieldHit> musrShieldHitsCollection;
00071 
00072 extern G4Allocator<musrShieldHit> musrShieldHitAllocator;
00073 
00074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00075 
00076 inline void* musrShieldHit::operator new(size_t)
00077 {
00078   void *aHit;
00079   aHit = (void *) musrShieldHitAllocator.MallocSingle();
00080   return aHit;
00081 }
00082 
00083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00084 
00085 inline void musrShieldHit::operator delete(void *aHit)
00086 {
00087   musrShieldHitAllocator.FreeSingle((musrShieldHit*) aHit);
00088 }
00089 
00090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00091 
00092 #endif

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