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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #ifndef G4GoudsmitSaundersonMscModel_h
00060 #define G4GoudsmitSaundersonMscModel_h 1
00061
00062 #include <CLHEP/Units/SystemOfUnits.h>
00063
00064 #include "G4VMscModel.hh"
00065 #include "G4PhysicsTable.hh"
00066 #include "globals.hh"
00067
00068 class G4DataVector;
00069 class G4ParticleChangeForMSC;
00070 class G4LossTableManager;
00071 class G4GoudsmitSaundersonTable;
00072
00073 class G4GoudsmitSaundersonMscModel : public G4VMscModel
00074 {
00075 public:
00076
00077 G4GoudsmitSaundersonMscModel(const G4String& nam = "GoudsmitSaunderson");
00078
00079 virtual ~G4GoudsmitSaundersonMscModel();
00080
00081 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00082
00083 void StartTracking(G4Track*);
00084
00085 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
00086 G4double KineticEnergy,
00087 G4double AtomicNumber, G4double,
00088 G4double, G4double);
00089
00090 virtual G4ThreeVector& SampleScattering(const G4ThreeVector&,
00091 G4double safety);
00092
00093 virtual G4double ComputeTruePathLengthLimit(const G4Track& track,
00094 G4double& currentMinimalStep);
00095
00096 virtual G4double ComputeGeomPathLength(G4double truePathLength);
00097
00098 virtual G4double ComputeTrueStepLength(G4double geomStepLength);
00099
00100 private:
00101 void SampleCosineTheta(G4double,G4double,G4double &,G4double &);
00102
00103 void CalculateIntegrals(const G4ParticleDefinition* ,G4double,G4double,
00104 G4double&,G4double&);
00105
00106 void LoadELSEPAXSections();
00107
00108 inline void SetParticle(const G4ParticleDefinition* p);
00109
00110 inline G4double GetLambda(G4double);
00111
00112
00113 G4GoudsmitSaundersonMscModel & operator=(const G4GoudsmitSaundersonMscModel &right);
00114 G4GoudsmitSaundersonMscModel(const G4GoudsmitSaundersonMscModel&);
00115
00116 G4double lowKEnergy;
00117 G4double highKEnergy;
00118 G4double currentKinEnergy;
00119 G4double currentRange;
00120
00121 G4double smallstep,tlimitminfix,skindepth;
00122 G4double fr,rangeinit,masslimite,tgeom;
00123 G4double par1,par2,par3,zPathLength,truePathLength;
00124 G4double tausmall,taulim,tlimit,tlimitmin,geommin,geombig;
00125 G4double charge,lambdalimit;
00126 G4double tPathLength,stepmin ;
00127 G4double lambda0,lambda1,lambda11;
00128 G4double mass;
00129 G4int currentMaterialIndex;
00130
00131 G4bool firstStep;
00132 G4bool inside;
00133 G4bool insideskin;
00134
00135 G4GoudsmitSaundersonTable* GSTable;
00136 G4LossTableManager* theManager;
00137 const G4ParticleDefinition* particle;
00138 G4ParticleChangeForMSC* fParticleChange;
00139 const G4MaterialCutsCouple* currentCouple;
00140
00141 static G4double ener[106];
00142 static G4double TCSE[103][106];
00143 static G4double FTCSE[103][106];
00144 static G4double TCSP[103][106];
00145 static G4double FTCSP[103][106];
00146
00147 };
00148
00149
00150 inline
00151 void G4GoudsmitSaundersonMscModel::SetParticle(const G4ParticleDefinition* p)
00152 {
00153 if (p != particle) {
00154 particle = p;
00155 mass = p->GetPDGMass();
00156 charge = p->GetPDGCharge()/CLHEP::eplus;
00157 }
00158 }
00159
00160
00161
00162 #endif
00163