source: trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel.hh@ 1036

Last change on this file since 1036 was 1007, checked in by garnier, 17 years ago

update to geant4.9.2

File size: 7.7 KB
RevLine 
[819]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//
[961]26// $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $
[1007]27// GEANT4 tag $Name: geant4-09-02 $
[819]28//
29// -------------------------------------------------------------------
30//
31//
32// GEANT4 Class header file
33//
34//
35// File name: G4UrbanMscModel
36//
37// Author: Laszlo Urban
38//
39// Creation date: 01.03.2001
40//
41// Modifications:
42//
43// 27-03-03 Move model part from G4MultipleScattering (V.Ivanchenko)
44// 27-03-03 Rename (V.Ivanchenko)
45//
46// 05-08-03 angle distribution has been modified (L.Urban)
47// 26-11-03 new data member currentRange (L.Urban)
48// 01-03-04 changes in data members + signature changed in SampleCosineTheta
49// 11-03-04 changes in data members (L.Urban)
50// 23-04-04 changes in data members and in signature of SampleCosineTheta
51// (L.Urban)
52// 17-08-04 name of data member facxsi changed to factail (L.Urban)
53// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
54// 15-04-05 optimize internal interface - add SampleSecondaries method (V.Ivanchenko)
55// 11-08-05 computation of lateral correlation added (L.Urban)
56// 02-10-05 nuclear size correction computation removed, the correction
57// included in the (theoretical) tabulated values (L.Urban)
58// 16-02-06 data members b and xsi have been removed (L.Urban)
59// 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko)
60// 07-03-06 Create G4UrbanMscModel and move there step limit calculation (V.Ivanchenko)
61// 10-05-06 SetMscStepLimitation at initialisation (V.Ivantchenko)
62// 11-05-06 name of data member safety changed to presafety, some new data
63// members added (frscaling1,frscaling2,tlimitminfix,nstepmax)
64// (L.Urban)
65// 13-10-06 data member factail removed, data member tkinlimit changed
66// to lambdalimit,
67// new data members tgeom,tnow,skin,skindepth,Zeff,geomlimit
68// G4double GeomLimit(const G4Track& track) changed to
69// void GeomLimit(const G4Track& track) (L.Urban)
70// 20-10-06 parameter theta0 now computed in the (public)
71// function ComputeTheta0,
72// single scattering modified allowing not small
73// angles as well (L.Urban)
74// 31-01-07 code cleaning (L.Urban)
75// 06-02-07 Move SetMscStepLimitation method into the source (VI)
76// 15-02-07 new data member : smallstep (L.Urban)
77// 10-04-07 remove navigator, smallstep, tnow (V.Ivanchenko)
78//
79//
80// Class Description:
81//
82// Implementation of the model of multiple scattering based on
83// H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
84
85// -------------------------------------------------------------------
86//
87
88#ifndef G4UrbanMscModel_h
89#define G4UrbanMscModel_h 1
90
91//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
[961]93#include "G4VMscModel.hh"
[819]94#include "G4PhysicsTable.hh"
95#include "G4MscStepLimitType.hh"
96
97class G4ParticleChangeForMSC;
98class G4SafetyHelper;
99class G4LossTableManager;
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
[961]103class G4UrbanMscModel : public G4VMscModel
[819]104{
105
106public:
107
[961]108 G4UrbanMscModel(const G4String& nam = "UrbanMscUni");
[819]109
110 virtual ~G4UrbanMscModel();
111
[961]112 void Initialise(const G4ParticleDefinition*, const G4DataVector&);
113
[819]114 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
115 G4double KineticEnergy,
116 G4double AtomicNumber,
117 G4double AtomicWeight=0.,
118 G4double cut =0.,
119 G4double emax=DBL_MAX);
120
121 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
122 const G4MaterialCutsCouple*,
123 const G4DynamicParticle*,
124 G4double,
125 G4double);
126
127 void SampleScattering(const G4DynamicParticle*,
128 G4double safety);
129
130 G4double ComputeTruePathLengthLimit(const G4Track& track,
131 G4PhysicsTable* theLambdaTable,
132 G4double currentMinimalStep);
133
134 G4double ComputeGeomPathLength(G4double truePathLength);
135
136 G4double ComputeTrueStepLength(G4double geomStepLength);
137
138 G4double ComputeTheta0(G4double truePathLength,
139 G4double KineticEnergy);
140
141private:
142
143 G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
144
145 G4double SampleDisplacement();
146
147 G4double LatCorrelation();
148
149 void GeomLimit(const G4Track& track);
150
[961]151 inline G4double GetLambda(G4double kinEnergy);
[819]152
[961]153 inline void SetParticle(const G4ParticleDefinition*);
154
[819]155 // hide assignment operator
156 G4UrbanMscModel & operator=(const G4UrbanMscModel &right);
157 G4UrbanMscModel(const G4UrbanMscModel&);
158
159 const G4ParticleDefinition* particle;
160 G4ParticleChangeForMSC* fParticleChange;
161
162 G4SafetyHelper* safetyHelper;
163 G4PhysicsTable* theLambdaTable;
164 const G4MaterialCutsCouple* couple;
165 G4LossTableManager* theManager;
166
167 G4double mass;
168 G4double charge;
169
170 G4double masslimite,masslimitmu;
171
172 G4double taubig;
173 G4double tausmall;
174 G4double taulim;
175 G4double currentTau;
176 G4double frscaling1,frscaling2;
177 G4double tlimit;
178 G4double tlimitmin;
179 G4double tlimitminfix;
180
181 G4double nstepmax;
182 G4double geombig;
183 G4double geommin;
184 G4double geomlimit;
185 G4double skindepth;
186 G4double smallstep;
187
188 G4double presafety;
189
190 G4double lambda0;
191 G4double lambdaeff;
192 G4double tPathLength;
193 G4double zPathLength;
[961]194 G4double par1,par2,par3;
[819]195
[961]196 G4double stepmin;
[819]197
198 G4double currentKinEnergy;
199 G4double currentRange;
200 G4double currentRadLength;
201
202 G4double Zeff;
203
204 G4int currentMaterialIndex;
205
206 G4bool isInitialized;
207 G4bool inside;
208 G4bool insideskin;
209
210};
211
212//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
213
214inline
215G4double G4UrbanMscModel::GetLambda(G4double e)
216{
217 G4double x;
218 if(theLambdaTable) {
219 G4bool b;
220 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
221 } else {
222 x = CrossSection(couple,particle,e);
223 }
224 if(x > DBL_MIN) x = 1./x;
225 else x = DBL_MAX;
226 return x;
227}
228
229//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
230
231inline
232void G4UrbanMscModel::SetParticle(const G4ParticleDefinition* p)
233{
234 if (p != particle) {
235 particle = p;
236 mass = p->GetPDGMass();
237 charge = p->GetPDGCharge()/eplus;
238 }
239}
240
241//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
242
243#endif
244
Note: See TracBrowser for help on using the repository browser.