00001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00002 00003 #ifndef musrIBackwardHit_h 00004 #define musrIBackwardHit_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 musrIBackwardHit : public G4VHit 00017 { 00018 public: 00019 00020 musrIBackwardHit(); 00021 ~musrIBackwardHit(); 00022 musrIBackwardHit(const musrIBackwardHit&); 00023 const musrIBackwardHit& operator=(const musrIBackwardHit&); 00024 G4int operator==(const musrIBackwardHit&) 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 SetGlobTime (G4double gt) { globaltime = gt;}; 00041 void SetLogVolName (G4String logivol) {logicalvolume = logivol;}; 00042 void SetIBChamberNb(G4int IBchamb) { IBchamberNb = IBchamb; }; 00043 00044 G4int GetTrackID() { return trackID; }; 00045 G4String GetParticleName() {return particle_name; }; 00046 G4double GetEdep() { return edep; }; 00047 G4ThreeVector GetPos(){ return pos; }; 00048 G4ThreeVector GetPol(){ return pol; }; 00049 G4String GetLogVolName() { return logicalvolume; }; 00050 G4int GetIBChamberNb() { return IBchamberNb; }; 00051 G4double GetGlobalTime() { return globaltime; }; 00052 G4double point[4]; 00053 G4double B[6]; 00054 const G4Field *mfield; 00055 00056 private: 00057 00058 00059 G4int trackID; 00060 G4String particle_name; 00061 G4double edep; 00062 G4ThreeVector pos; 00063 G4ThreeVector pol; 00064 G4String logicalvolume; 00065 G4double globaltime; 00066 G4int IBchamberNb; 00067 G4int BMultihitSwitch; 00068 static G4int eventIDoldIB; 00069 static G4int NIB; 00070 static G4int runIDoldIB; 00071 static G4int IBchamberNbold; 00072 static G4int BMultihit; 00073 }; 00074 00075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00076 00077 typedef G4THitsCollection<musrIBackwardHit> musrIBackwardHitsCollection; 00078 00079 extern G4Allocator<musrIBackwardHit> musrIBackwardHitAllocator; 00080 00081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00082 00083 inline void* musrIBackwardHit::operator new(size_t) 00084 { 00085 void *aHit; 00086 aHit = (void *) musrIBackwardHitAllocator.MallocSingle(); 00087 return aHit; 00088 } 00089 00090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00091 00092 inline void musrIBackwardHit::operator delete(void *aHit) 00093 { 00094 musrIBackwardHitAllocator.FreeSingle((musrIBackwardHit*) aHit); 00095 } 00096 00097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00098 00099 #endif
1.4.6