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
00028
00029
00030
00031
00032
00033
00034 #ifndef G4UnknownDecay_h
00035 #define G4UnknownDecay_h 1
00036
00037 #include <CLHEP/Units/PhysicalConstants.h>
00038
00039 #include "G4ios.hh"
00040 #include "globals.hh"
00041 #include "G4VDiscreteProcess.hh"
00042 #include "G4ParticleChangeForDecay.hh"
00043
00044 class G4UnknownDecay : public G4VDiscreteProcess
00045 {
00046
00047
00048
00049 public:
00050
00051 G4UnknownDecay(const G4String& processName ="UnknownDecay");
00052
00053
00054 virtual ~G4UnknownDecay();
00055
00056 private:
00057
00058 G4UnknownDecay(const G4UnknownDecay &right);
00059
00060
00061 G4UnknownDecay & operator=(const G4UnknownDecay &right);
00062
00063 public:
00064
00065 virtual G4VParticleChange *PostStepDoIt(
00066 const G4Track& aTrack,
00067 const G4Step& aStep
00068 );
00069
00070 virtual void BuildPhysicsTable(const G4ParticleDefinition&);
00071
00072
00073
00074
00075
00076
00077 virtual G4bool IsApplicable(const G4ParticleDefinition&);
00078
00079
00080
00081 protected:
00082 virtual G4VParticleChange* DecayIt(
00083 const G4Track& aTrack,
00084 const G4Step& aStep
00085 );
00086
00087
00088
00089 public:
00090
00091 virtual G4double PostStepGetPhysicalInteractionLength(
00092 const G4Track& track,
00093 G4double previousStepSize,
00094 G4ForceCondition* condition
00095 );
00096
00097
00098 protected:
00099
00100 virtual G4double GetMeanFreePath(const G4Track& aTrack,
00101 G4double previousStepSize,
00102 G4ForceCondition* condition
00103 );
00104
00105 public:
00106 void SetVerboseLevel(G4int value);
00107 G4int GetVerboseLevel() const;
00108
00109 private:
00110 G4int verboseLevel;
00111
00112
00113
00114
00115
00116 private:
00117
00118 const G4double HighestValue;
00119
00120
00121 G4ParticleChangeForDecay fParticleChangeForDecay;
00122
00123 };
00124
00125 inline
00126 G4double G4UnknownDecay::PostStepGetPhysicalInteractionLength(
00127 const G4Track& track,
00128 G4double ,
00129 G4ForceCondition* condition
00130 )
00131 {
00132
00133 G4double pTime = track.GetDynamicParticle()->GetPreAssignedDecayProperTime();
00134
00135 if (pTime < 0.) pTime = DBL_MIN;
00136
00137
00138 *condition = NotForced;
00139
00140
00141 G4double remainder = pTime - track.GetProperTime();
00142 if (remainder <= 0.0) remainder = DBL_MIN;
00143
00144
00145
00146 return remainder*CLHEP::c_light;
00147
00148 }
00149
00150 inline
00151 void G4UnknownDecay::SetVerboseLevel(G4int value){ verboseLevel = value; }
00152
00153 inline
00154 G4int G4UnknownDecay::GetVerboseLevel() const { return verboseLevel; }
00155
00156 inline
00157 G4VParticleChange* G4UnknownDecay::PostStepDoIt(
00158 const G4Track& aTrack,
00159 const G4Step& aStep
00160 )
00161 {
00162 return DecayIt(aTrack, aStep);
00163 }
00164
00165 #endif
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175