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
00027
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef G4VITRestProcess_h
00043 #define G4VITRestProcess_h 1
00044
00045 #include <CLHEP/Units/SystemOfUnits.h>
00046
00047 #include "G4VITProcess.hh"
00048
00053 class G4VITRestProcess : public G4VITProcess
00054 {
00055
00056
00057
00058 public:
00059 G4VITRestProcess(const G4String& ,
00060 G4ProcessType aType = fNotDefined );
00061 G4VITRestProcess(const G4VITRestProcess& );
00062
00063 virtual ~G4VITRestProcess();
00064
00065 public:
00066 virtual G4double AtRestGetPhysicalInteractionLength(
00067 const G4Track& track,
00068 G4ForceCondition* condition
00069 );
00070
00071 virtual G4VParticleChange* AtRestDoIt(
00072 const G4Track& ,
00073 const G4Step&
00074 );
00075
00076
00077 virtual G4double AlongStepGetPhysicalInteractionLength(
00078 const G4Track&,
00079 G4double ,
00080 G4double ,
00081 G4double& ,
00082 G4GPILSelection*
00083 ){ return -1.0; }
00084
00085 virtual G4double PostStepGetPhysicalInteractionLength(
00086 const G4Track& ,
00087 G4double ,
00088 G4ForceCondition*
00089 ) { return -1.0; }
00090
00091
00092 virtual G4VParticleChange* PostStepDoIt(
00093 const G4Track& ,
00094 const G4Step&
00095 ) {return 0;}
00096
00097 virtual G4VParticleChange* AlongStepDoIt(
00098 const G4Track& ,
00099 const G4Step&
00100 ) {return 0;}
00101
00102 protected:
00103
00104 virtual G4double GetMeanLifeTime(const G4Track& aTrack,G4ForceCondition* condition)=0;
00105
00106
00107
00108
00109
00110
00111 protected:
00112
00113 G4VITRestProcess();
00114 G4VITRestProcess & operator=(const G4VITRestProcess &right);
00115 };
00116
00117
00118
00119
00120 inline G4double G4VITRestProcess::AtRestGetPhysicalInteractionLength(
00121 const G4Track& track,
00122 G4ForceCondition* condition
00123 )
00124 {
00125
00126 ResetNumberOfInteractionLengthLeft();
00127
00128
00129 *condition = NotForced;
00130
00131
00132 fpState->currentInteractionLength = GetMeanLifeTime(track, condition);
00133
00134 #ifdef G4VERBOSE
00135 if ((fpState->currentInteractionLength <0.0) || (verboseLevel>2)){
00136 G4cout << "G4VITRestProcess::AtRestGetPhysicalInteractionLength ";
00137 G4cout << "[ " << GetProcessName() << "]" <<G4endl;
00138 track.GetDynamicParticle()->DumpInfo();
00139 G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
00140 G4cout << "MeanLifeTime = " << fpState->currentInteractionLength/CLHEP::ns << "[ns]" <<G4endl;
00141 }
00142 #endif
00143
00144 return (fpState->theNumberOfInteractionLengthLeft) * (fpState->currentInteractionLength);
00145 }
00146
00147
00148 inline G4VParticleChange* G4VITRestProcess::AtRestDoIt(
00149 const G4Track&,
00150 const G4Step&
00151 )
00152 {
00153
00154 ClearNumberOfInteractionLengthLeft();
00155
00156 return pParticleChange;
00157 }
00158
00159
00160 #endif
00161
00162
00163
00164