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 #ifndef G4UrbanMscModel95_h
00052 #define G4UrbanMscModel95_h 1
00053
00054
00055
00056 #include <CLHEP/Units/SystemOfUnits.h>
00057
00058 #include "G4VMscModel.hh"
00059 #include "G4MscStepLimitType.hh"
00060
00061 class G4ParticleChangeForMSC;
00062 class G4SafetyHelper;
00063 class G4LossTableManager;
00064
00065
00066
00067 class G4UrbanMscModel95 : public G4VMscModel
00068 {
00069
00070 public:
00071
00072 G4UrbanMscModel95(const G4String& nam = "UrbanMsc95");
00073
00074 virtual ~G4UrbanMscModel95();
00075
00076 void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00077
00078 void StartTracking(G4Track*);
00079
00080 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
00081 G4double KineticEnergy,
00082 G4double AtomicNumber,
00083 G4double AtomicWeight=0.,
00084 G4double cut =0.,
00085 G4double emax=DBL_MAX);
00086
00087 G4ThreeVector& SampleScattering(const G4ThreeVector&, G4double safety);
00088
00089 G4double ComputeTruePathLengthLimit(const G4Track& track,
00090 G4double& currentMinimalStep);
00091
00092 G4double ComputeGeomPathLength(G4double truePathLength);
00093
00094 G4double ComputeTrueStepLength(G4double geomStepLength);
00095
00096 G4double ComputeTheta0(G4double truePathLength,
00097 G4double KineticEnergy);
00098
00099 private:
00100
00101 G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
00102
00103 G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
00104
00105 G4double SampleDisplacement();
00106
00107 G4double LatCorrelation();
00108
00109 inline void SetParticle(const G4ParticleDefinition*);
00110
00111 inline void UpdateCache();
00112
00113
00114 G4UrbanMscModel95 & operator=(const G4UrbanMscModel95 &right);
00115 G4UrbanMscModel95(const G4UrbanMscModel95&);
00116
00117 const G4ParticleDefinition* particle;
00118 G4ParticleChangeForMSC* fParticleChange;
00119
00120 const G4MaterialCutsCouple* couple;
00121 G4LossTableManager* theManager;
00122
00123 G4double mass;
00124 G4double charge,ChargeSquare;
00125 G4double masslimite,lambdalimit,fr;
00126
00127 G4double taubig;
00128 G4double tausmall;
00129 G4double taulim;
00130 G4double currentTau;
00131 G4double tlimit;
00132 G4double tlimitmin;
00133 G4double tlimitminfix;
00134 G4double tgeom;
00135
00136 G4double geombig;
00137 G4double geommin;
00138 G4double geomlimit;
00139 G4double skindepth;
00140 G4double smallstep;
00141
00142 G4double presafety;
00143
00144 G4double lambda0;
00145 G4double lambdaeff;
00146 G4double tPathLength;
00147 G4double zPathLength;
00148 G4double par1,par2,par3;
00149
00150 G4double stepmin;
00151
00152 G4double currentKinEnergy;
00153 G4double currentRange;
00154 G4double rangeinit;
00155 G4double currentRadLength;
00156
00157 G4double theta0max,rellossmax;
00158 G4double third;
00159
00160 G4int currentMaterialIndex;
00161
00162 G4double y;
00163 G4double Zold;
00164 G4double Zeff,Z2,Z23,lnZ;
00165 G4double coeffth1,coeffth2;
00166 G4double coeffc1,coeffc2,coeffc3,coeffc4;
00167 G4double scr1ini,scr2ini,scr1,scr2;
00168
00169 G4bool firstStep;
00170 G4bool inside;
00171 G4bool insideskin;
00172 };
00173
00174
00175
00176
00177 inline
00178 void G4UrbanMscModel95::SetParticle(const G4ParticleDefinition* p)
00179 {
00180 if (p != particle) {
00181 particle = p;
00182 mass = p->GetPDGMass();
00183 charge = p->GetPDGCharge()/CLHEP::eplus;
00184 ChargeSquare = charge*charge;
00185 }
00186 }
00187
00188
00189
00190 inline
00191 void G4UrbanMscModel95::UpdateCache()
00192 {
00193 lnZ = std::log(Zeff);
00194
00195 coeffth1 = (1. - 8.7780e-2/Zeff)*(0.87 + 0.03*lnZ);
00196 coeffth2 = (4.0780e-2 + 1.7315e-4*Zeff)*(0.87 + 0.03*lnZ);
00197
00198
00199 G4double Z13 = std::exp(lnZ/3.);
00200 coeffc1 = 2.3785 - Z13*(4.1981e-1 - Z13*6.3100e-2);
00201 coeffc2 = 4.7526e-1 + Z13*(1.7694 - Z13*3.3885e-1);
00202 coeffc3 = 2.3683e-1 - Z13*(1.8111 - Z13*3.2774e-1);
00203 coeffc4 = 1.7888e-2 + Z13*(1.9659e-2 - Z13*2.6664e-3);
00204
00205
00206 Z2 = Zeff*Zeff;
00207 Z23 = Z13*Z13;
00208 scr1 = scr1ini*Z23;
00209 scr2 = scr2ini*Z2*ChargeSquare;
00210
00211 Zold = Zeff;
00212 }
00213
00214 #endif
00215