00001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00002 00003 #ifndef musrTrackerHit_h 00004 #define musrTrackerHit_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 musrTrackerHit : public G4VHit 00017 { 00018 public: 00019 00020 musrTrackerHit(); 00021 ~musrTrackerHit(); 00022 musrTrackerHit(const musrTrackerHit&); 00023 const musrTrackerHit& operator=(const musrTrackerHit&); 00024 G4int operator==(const musrTrackerHit&) 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 void SetParticleName (G4String name) {particle_name = name; }; 00035 void SetTrackID (G4int track) { trackID = track; }; 00036 void SetEdep (G4double de) { edep = de; }; 00037 void SetPos (G4ThreeVector xyz){ pos = xyz; }; 00038 void SetPol (G4ThreeVector ijk){pol = ijk;}; 00039 00040 G4String GetParticleName() {return particle_name; }; 00041 G4int GetTrackID() { return trackID; }; 00042 G4double GetEdep() { return edep; }; 00043 G4ThreeVector GetPos(){ return pos; }; 00044 G4ThreeVector GetPol(){ return pol; }; 00045 G4double point[4]; 00046 G4double B[6]; 00047 const G4Field *mfield; 00048 00049 private: 00050 00051 G4String particle_name; 00052 G4int trackID; 00053 G4double edep; 00054 G4ThreeVector pos; 00055 G4ThreeVector pol; 00056 }; 00057 00058 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00059 00060 typedef G4THitsCollection<musrTrackerHit> musrTrackerHitsCollection; 00061 00062 extern G4Allocator<musrTrackerHit> musrTrackerHitAllocator; 00063 00064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00065 00066 inline void* musrTrackerHit::operator new(size_t) 00067 { 00068 void *aHit; 00069 aHit = (void *) musrTrackerHitAllocator.MallocSingle(); 00070 return aHit; 00071 } 00072 00073 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00074 00075 inline void musrTrackerHit::operator delete(void *aHit) 00076 { 00077 musrTrackerHitAllocator.FreeSingle((musrTrackerHit*) aHit); 00078 } 00079 00080 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00081 00082 #endif
1.4.6