00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "TStandard_Hit.hh"
00027
00028 G4Allocator<TStandard_Hit> gHitAllocator ;
00029
00030
00031
00032
00033
00034 TStandard_Hit::TStandard_Hit ()
00035 {
00036
00037 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::TStandard_Hit() \n" ; }
00038
00039
00040
00041 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::TStandard_Hit() \n" ; }
00042
00043 }
00044
00045
00046
00047
00048
00049 TStandard_Hit::~TStandard_Hit ()
00050 {
00051
00052 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::~TStandard_Hit() \n" ; }
00053
00054
00055
00056 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::~TStandard_Hit() \n" ; }
00057
00058 }
00059
00060
00061
00062
00063
00064 TStandard_Hit::TStandard_Hit (const TStandard_Hit& aTStandard_Hit) : G4VHit()
00065 {
00066
00067 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::TStandard_Hit() [copy] \n" ; }
00068
00069 fParticleName = aTStandard_Hit.fParticleName ;
00070 fZ = aTStandard_Hit.fZ ;
00071 fA = aTStandard_Hit.fA ;
00072 fTrackID = aTStandard_Hit.fTrackID ;
00073 fParentTrackID = aTStandard_Hit.fParentTrackID ;
00074 fCreatorProcessName = aTStandard_Hit.fCreatorProcessName ;
00075 fEkin0 = aTStandard_Hit.fEkin0 ;
00076 fRx0 = aTStandard_Hit.fRx0 ;
00077 fRy0 = aTStandard_Hit.fRy0 ;
00078 fRz0 = aTStandard_Hit.fRz0 ;
00079 fTheta0 = aTStandard_Hit.fTheta0 ;
00080 fPhi0 = aTStandard_Hit.fPhi0 ;
00081 fVolumeName = aTStandard_Hit.fVolumeName ;
00082 fEkin = aTStandard_Hit.fEkin ;
00083 fEdep = aTStandard_Hit.fEdep ;
00084 fDose = aTStandard_Hit.fDose ;
00085 fRangeTot = aTStandard_Hit.fRangeTot ;
00086 fPosition = aTStandard_Hit.fPosition ;
00087 fRx = aTStandard_Hit.fRx ;
00088 fRy = aTStandard_Hit.fRy ;
00089 fRz = aTStandard_Hit.fRz ;
00090 fDirection = aTStandard_Hit.fDirection ;
00091 fTheta = aTStandard_Hit.fTheta ;
00092 fPhi = aTStandard_Hit.fPhi ;
00093 fGlobalTime = aTStandard_Hit.fGlobalTime ;
00094 fLocalTime = aTStandard_Hit.fLocalTime ;
00095 fWeight = aTStandard_Hit.fWeight ;
00096
00097 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::TStandard_Hit() [copy] \n" ; }
00098
00099 }
00100
00101
00102
00103
00104
00105 const TStandard_Hit& TStandard_Hit::operator= (const TStandard_Hit& aTStandard_Hit)
00106 {
00107
00108 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::TStandard_Hit() [=] \n" ; }
00109
00110 fParticleName = aTStandard_Hit.fParticleName ;
00111 fZ = aTStandard_Hit.fZ ;
00112 fA = aTStandard_Hit.fA ;
00113 fTrackID = aTStandard_Hit.fTrackID ;
00114 fParentTrackID = aTStandard_Hit.fParentTrackID ;
00115 fCreatorProcessName = aTStandard_Hit.fCreatorProcessName ;
00116 fEkin0 = aTStandard_Hit.fEkin0 ;
00117 fRx0 = aTStandard_Hit.fRx0 ;
00118 fRy0 = aTStandard_Hit.fRy0 ;
00119 fRz0 = aTStandard_Hit.fRz0 ;
00120 fTheta0 = aTStandard_Hit.fTheta0 ;
00121 fPhi0 = aTStandard_Hit.fPhi0 ;
00122 fVolumeName = aTStandard_Hit.fVolumeName ;
00123 fEkin = aTStandard_Hit.fEkin ;
00124 fEdep = aTStandard_Hit.fEdep ;
00125 fDose = aTStandard_Hit.fDose ;
00126 fRangeTot = aTStandard_Hit.fRangeTot ;
00127 fPosition = aTStandard_Hit.fPosition ;
00128 fRx = aTStandard_Hit.fRx ;
00129 fRy = aTStandard_Hit.fRy ;
00130 fRz = aTStandard_Hit.fRz ;
00131 fDirection = aTStandard_Hit.fDirection ;
00132 fTheta = aTStandard_Hit.fTheta ;
00133 fPhi = aTStandard_Hit.fPhi ;
00134 fGlobalTime = aTStandard_Hit.fGlobalTime ;
00135 fLocalTime = aTStandard_Hit.fLocalTime ;
00136 fWeight = aTStandard_Hit.fWeight ;
00137
00138 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::TStandard_Hit() [=] \n" ; }
00139
00140 return (*this) ;
00141
00142 }
00143
00144
00145
00146
00147
00148 G4int TStandard_Hit::operator== (const TStandard_Hit& aTStandard_Hit) const
00149 {
00150
00151 if (gMyDebug) { G4cout << "\n### In/Out of TStandard_Hit::TStandard_Hit() [==] \n" ; }
00152
00153 return ( (this == &aTStandard_Hit) ? 1 : 0 ) ;
00154
00155 }
00156
00157
00158
00159
00160
00161 void TStandard_Hit::Draw()
00162 {
00163
00164 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::Draw() \n" ; }
00165
00166 G4VVisManager* visManager = G4VVisManager::GetConcreteInstance() ;
00167 if (visManager)
00168 {
00169 G4Circle circle(fPosition) ;
00170 circle.SetScreenSize(5) ;
00171 circle.SetVisAttributes(G4VisAttributes(G4Colour(1.,1.,0.))) ;
00172 visManager->Draw(circle) ;
00173 }
00174
00175 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::Draw() \n" ; }
00176
00177 return ;
00178
00179 }
00180
00181
00182
00183
00184
00185 void TStandard_Hit::Print()
00186 {
00187
00188 if (gMyDebug) { G4cout << "\n### In TStandard_Hit::Print() \n" ; }
00189
00190 fprintf (stdout,"\n '%-13s': %8s (Z=%d,A=%d), ID=%03d, PID=%03d, weight=%05.2f, process='%s', origin=(x=%.3e,y=%.3e,z=%.3e) mum - T_0=%.3e MeV - theta_0=%.3e °, phi_0=%.3e ° / Position=(x=%.3e,y=%.3e,z=%.3e) mum - T=%.3e MeV - theta=%.3e °, phi=%.3e ° - Edep=%.3e keV - Dose=%.3e Gy - Range=%.3e mum - t_glob=%.3e ns, t_loc=%.3e ns",
00191 TString(TString(TString(fVolumeName).ReplaceAll("_phy","")).ReplaceAll("fSensor","Sensor")).Data(),
00192 fParticleName.data(), fZ, fA, fTrackID, fParentTrackID, fWeight, fCreatorProcessName.data(), fRx0/um, fRy0/um, fRz0/um, fEkin0/MeV, fTheta0/deg, fPhi0/deg, fRx/um, fRy/um, fRz/um, fEkin/MeV, fTheta/deg, fPhi/deg, fEdep/keV, fDose/gray, fRangeTot/um, fGlobalTime,fLocalTime) ;
00193
00194 if (gMyDebug) { G4cout << "\n### Out of TStandard_Hit::Print() \n" ; }
00195
00196 return ;
00197
00198 }