Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4UrbanMscModel93.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4UrbanMscModel93.hh 66602 2012-12-29 15:54:43Z vnivanch $
27 //
28 // -------------------------------------------------------------------
29 //
30 //
31 // GEANT4 Class header file
32 //
33 //
34 // File name: G4UrbanMscModel93
35 //
36 // Author: Laszlo Urban
37 //
38 // Creation date: 06.03.2008
39 //
40 // Modifications:
41 // 23-04-2009 L.Urban updated parameterization in UpdateCache method
42 // 28-10-2009 V.Ivanchenko moved G4UrbanMscModel2 to G4UrbanMscModel93,
43 // now it is a frozen version of the Urban model corresponding
44 // to g4 9.3
45 //
46 //
47 // Class Description:
48 //
49 // Implementation of the model of multiple scattering based on
50 // H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
51 
52 // -------------------------------------------------------------------
53 //
54 
55 #ifndef G4UrbanMscModel93_h
56 #define G4UrbanMscModel93_h 1
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59 
61 
62 #include "G4VMscModel.hh"
63 #include "G4MscStepLimitType.hh"
64 
66 class G4SafetyHelper;
67 class G4LossTableManager;
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72 {
73 
74 public:
75 
76  G4UrbanMscModel93(const G4String& nam = "UrbanMsc93");
77 
78  virtual ~G4UrbanMscModel93();
79 
80  void Initialise(const G4ParticleDefinition*, const G4DataVector&);
81 
82  void StartTracking(G4Track*);
83 
85  G4double KineticEnergy,
86  G4double AtomicNumber,
87  G4double AtomicWeight=0.,
88  G4double cut =0.,
89  G4double emax=DBL_MAX);
90 
92 
94  G4double& currentMinimalStep);
95 
96  G4double ComputeGeomPathLength(G4double truePathLength);
97 
98  G4double ComputeTrueStepLength(G4double geomStepLength);
99 
100  G4double ComputeTheta0(G4double truePathLength,
101  G4double KineticEnergy);
102 
103 private:
104 
105  G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
106 
107  G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
108 
109  G4double SampleDisplacement();
110 
111  G4double LatCorrelation();
112 
113  inline void SetParticle(const G4ParticleDefinition*);
114 
115  inline void UpdateCache();
116 
117  // hide assignment operator
118  G4UrbanMscModel93 & operator=(const G4UrbanMscModel93 &right);
120 
121  const G4ParticleDefinition* particle;
122  G4ParticleChangeForMSC* fParticleChange;
123 
124  const G4MaterialCutsCouple* couple;
125  G4LossTableManager* theManager;
126 
127  G4double mass;
128  G4double charge,ChargeSquare;
129  G4double masslimite,lambdalimit,fr;
130 
131  G4double taubig;
132  G4double tausmall;
133  G4double taulim;
134  G4double currentTau;
135  G4double tlimit;
136  G4double tlimitmin;
137  G4double tlimitminfix;
138  G4double tgeom;
139 
140  G4double geombig;
141  G4double geommin;
142  G4double geomlimit;
143  G4double skindepth;
144  G4double smallstep;
145 
146  G4double presafety;
147 
148  G4double lambda0;
149  G4double lambdaeff;
150  G4double tPathLength;
151  G4double zPathLength;
152  G4double par1,par2,par3;
153 
154  G4double stepmin;
155 
156  G4double currentKinEnergy;
157  G4double currentRange;
158  G4double rangeinit;
159  G4double currentRadLength;
160 
161  G4double numlim, xsi, ea, eaa;
162 
163  G4double theta0max,rellossmax;
164  G4double third;
165 
166  G4int currentMaterialIndex;
167 
168  G4double y;
169  G4double Zold;
170  G4double Zeff,Z2,Z23,lnZ;
171  G4double coeffth1,coeffth2;
172  G4double coeffc1,coeffc2;
173  G4double scr1ini,scr2ini,scr1,scr2;
174 
175  G4bool firstStep;
176  G4bool inside;
177  G4bool insideskin;
178 };
179 
180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182 
183 inline
184 void G4UrbanMscModel93::SetParticle(const G4ParticleDefinition* p)
185 {
186  if (p != particle) {
187  particle = p;
188  mass = p->GetPDGMass();
189  charge = p->GetPDGCharge()/CLHEP::eplus;
190  ChargeSquare = charge*charge;
191  }
192 }
193 
194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
195 
196 inline
197 void G4UrbanMscModel93::UpdateCache()
198 {
199  lnZ = std::log(Zeff);
200  //new correction in theta0 formula
201  coeffth1 = (1.-8.7780e-2/Zeff)*(0.87+0.03*lnZ);
202  coeffth2 = (4.0780e-2+1.7315e-4*Zeff)*(0.87+0.03*lnZ);
203  // tail parameters
204  G4double lnZ1 = std::log(Zeff+1.);
205  coeffc1 = 2.943-0.197*lnZ1;
206  coeffc2 = 0.0987-0.0143*lnZ1;
207  // for single scattering
208  Z2 = Zeff*Zeff;
209  Z23 = std::exp(2.*lnZ/3.);
210  scr1 = scr1ini*Z23;
211  scr2 = scr2ini*Z2*ChargeSquare;
212 
213  Zold = Zeff;
214 }
215 
216 #endif
217