00001 //---------------------------------------------------------------------------// 00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00003 // // 00004 // MAJORANA Simulation // 00005 // // 00006 // This code implementation is the intellectual property of the // 00007 // MAJORANA Collaboration. It is based on Geant4, an intellectual // 00008 // property of the RD44 GEANT4 collaboration. // 00009 // // 00010 // ********************* // 00011 // // 00012 // Neither the authors of this software system, nor their employing // 00013 // institutes, nor the agencies providing financial support for this // 00014 // work make any representation or warranty, express or implied, // 00015 // regarding this software system or assume any liability for its use. // 00016 // By copying, distributing or modifying the Program (or any work based // 00017 // on on the Program) you indicate your acceptance of this statement, // 00018 // and all its terms. // 00019 // // 00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu// 00021 //---------------------------------------------------------------------------// 00032 // Begin description of class here 00036 // End class description 00037 // 00042 // 00043 // --------------------------------------------------------------------------// 00053 // --------------------------------------------------------------------------// 00054 00055 #ifndef _MAGEGEOMETRYSDHIT_HH 00056 #define _MAGEGEOMETRYSDHIT_HH 00057 00058 //---------------------------------------------------------------------------// 00059 00060 #include "G4VHit.hh" 00061 #include "G4THitsCollection.hh" 00062 #include "G4Allocator.hh" 00063 #include "G4ThreeVector.hh" 00064 #include "G4LogicalVolume.hh" 00065 #include "G4Transform3D.hh" 00066 #include "G4RotationMatrix.hh" 00067 00068 //---------------------------------------------------------------------------// 00069 00070 class MaGeGeometrySDHit : public G4VHit 00071 { 00072 public: 00073 00074 MaGeGeometrySDHit(); 00075 ~MaGeGeometrySDHit(); 00076 MaGeGeometrySDHit(const MaGeGeometrySDHit &right); 00077 const MaGeGeometrySDHit& operator=(const MaGeGeometrySDHit &right); 00078 G4int operator==(const MaGeGeometrySDHit &right) const; 00079 00080 inline void *operator new(size_t); 00081 inline void operator delete(void *aHit); 00082 00083 void Draw(); 00084 void Print(); 00085 00086 private: 00087 G4double edep; 00088 G4ThreeVector pos; 00089 G4double ekinetic; 00090 G4double steplength; 00091 G4double tracklength; 00092 G4String volumename; 00093 G4int copynumber; 00094 00095 public: 00096 00097 inline void SetEdep(G4double de) 00098 { edep = de; } 00099 inline G4double GetEdep() 00100 { return edep; } 00101 00102 inline void SetPos(G4ThreeVector xyz) 00103 { pos = xyz; } 00104 inline G4ThreeVector GetPos() 00105 { return pos; } 00106 00107 inline void SetEkinetic(G4double ke){ekinetic=ke;}; 00108 inline G4double GetEkinetic() {return ekinetic;}; 00109 00110 inline void SetSteplength(G4double l){steplength=l; }; 00111 inline G4double GetSteplength() {return steplength; }; 00112 00113 inline void SetTracklength(G4double l){tracklength=l; }; 00114 inline G4double GetTracklength() {return tracklength; }; 00115 00116 inline void SetVolumename(G4String name){volumename=name;}; 00117 inline G4String GetVolumename() {return volumename;}; 00118 00119 inline void SetCopynumber(G4int n) {copynumber=n;}; 00120 inline G4int GetCopynumber() {return copynumber;}; 00121 }; 00122 00123 typedef G4THitsCollection<MaGeGeometrySDHit> MaGeGeometrySDHitsCollection; 00124 00125 extern G4Allocator<MaGeGeometrySDHit> MaGeGeometrySDHitAllocator; 00126 00127 inline void* MaGeGeometrySDHit::operator new(size_t) 00128 { 00129 void *aHit; 00130 aHit = (void *) MaGeGeometrySDHitAllocator.MallocSingle(); 00131 return aHit; 00132 } 00133 00134 inline void MaGeGeometrySDHit::operator delete(void *aHit) 00135 { 00136 MaGeGeometrySDHitAllocator.FreeSingle((MaGeGeometrySDHit*) aHit); 00137 } 00138 00139 #endif 00140