00001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00002 00003 #ifndef musrIForwardHit_h 00004 #define musrIForwardHit_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 musrIForwardHit : public G4VHit 00017 { 00018 public: 00019 00020 musrIForwardHit(); 00021 ~musrIForwardHit(); 00022 musrIForwardHit(const musrIForwardHit&); 00023 const musrIForwardHit& operator=(const musrIForwardHit&); 00024 G4int operator==(const musrIForwardHit&) 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 SetIFChamberNb(G4int IFchamb) { IFchamberNb = IFchamb; }; 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 GetIFChamberNb() { return IFchamberNb; }; 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 IFchamberNb; 00067 G4int FMultihitSwitch; 00068 static G4int eventIDoldIF; 00069 static G4int NIF; 00070 static G4int FMultihit; 00071 static G4int runIDoldIF; 00072 static G4int IFchamberNbold; 00073 00074 }; 00075 00076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00077 00078 typedef G4THitsCollection<musrIForwardHit> musrIForwardHitsCollection; 00079 00080 extern G4Allocator<musrIForwardHit> musrIForwardHitAllocator; 00081 00082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00083 00084 inline void* musrIForwardHit::operator new(size_t) 00085 { 00086 void *aHit; 00087 aHit = (void *) musrIForwardHitAllocator.MallocSingle(); 00088 return aHit; 00089 } 00090 00091 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00092 00093 inline void musrIForwardHit::operator delete(void *aHit) 00094 { 00095 musrIForwardHitAllocator.FreeSingle((musrIForwardHit*) aHit); 00096 } 00097 00098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00099 00100 #endif
1.4.6