File indexing completed on 2025-01-18 09:59:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #ifndef G4UnknownDecay_h
0034 #define G4UnknownDecay_h 1
0035
0036 #include <CLHEP/Units/PhysicalConstants.h>
0037
0038 #include "G4ios.hh"
0039 #include "globals.hh"
0040 #include "G4VDiscreteProcess.hh"
0041 #include "G4ParticleChangeForDecay.hh"
0042
0043 class G4UnknownDecay : public G4VDiscreteProcess
0044 {
0045
0046
0047
0048 public:
0049
0050 G4UnknownDecay(const G4String& processName ="UnknownDecay");
0051
0052
0053 virtual ~G4UnknownDecay();
0054
0055 private:
0056
0057 G4UnknownDecay(const G4UnknownDecay &right);
0058
0059
0060 G4UnknownDecay & operator=(const G4UnknownDecay &right);
0061
0062 public:
0063
0064 virtual G4VParticleChange *PostStepDoIt(
0065 const G4Track& aTrack,
0066 const G4Step& aStep
0067 ) override;
0068
0069 virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
0070
0071
0072
0073
0074
0075
0076 virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
0077
0078
0079
0080 virtual void ProcessDescription(std::ostream& outFile) const override;
0081
0082
0083 protected:
0084 virtual G4VParticleChange* DecayIt(
0085 const G4Track& aTrack,
0086 const G4Step& aStep
0087 ) ;
0088
0089
0090
0091 public:
0092
0093 virtual G4double PostStepGetPhysicalInteractionLength(
0094 const G4Track& track,
0095 G4double previousStepSize,
0096 G4ForceCondition* condition
0097 ) override;
0098
0099
0100 protected:
0101
0102 virtual G4double GetMeanFreePath(const G4Track& aTrack,
0103 G4double previousStepSize,
0104 G4ForceCondition* condition
0105 ) override;
0106
0107 private:
0108 G4int verboseLevel;
0109
0110
0111
0112
0113
0114 private:
0115
0116 const G4double HighestValue;
0117
0118
0119 G4ParticleChangeForDecay fParticleChangeForDecay;
0120
0121 };
0122
0123 inline
0124 G4double G4UnknownDecay::PostStepGetPhysicalInteractionLength(
0125 const G4Track& track,
0126 G4double ,
0127 G4ForceCondition* condition
0128 )
0129 {
0130
0131 G4double pTime = track.GetDynamicParticle()->GetPreAssignedDecayProperTime();
0132
0133 if (pTime < 0.) pTime = DBL_MIN;
0134
0135
0136 *condition = NotForced;
0137
0138
0139 G4double remainder = pTime - track.GetProperTime();
0140 if (remainder <= 0.0) remainder = DBL_MIN;
0141
0142
0143
0144 return remainder*CLHEP::c_light;
0145
0146 }
0147
0148 inline
0149 G4VParticleChange* G4UnknownDecay::PostStepDoIt(
0150 const G4Track& aTrack,
0151 const G4Step& aStep
0152 )
0153 {
0154 return DecayIt(aTrack, aStep);
0155 }
0156
0157 #endif
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167