Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4WentzelVIRelXSection.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: G4WentzelVIRelXSection.hh 67990 2013-03-13 10:56:28Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 //
31 // GEANT4 Class header file
32 //
33 //
34 // File name: G4WentzelVIRelXSection
35 //
36 // Authors: V.Ivanchenko
37 //
38 // Creation date: 08.06.2012 from G4WentzelOKandVIxSection
39 //
40 // Modifications:
41 //
42 //
43 // Class Description:
44 //
45 // Implementation of the computation of total and transport cross sections,
46 // sample scattering angle for the single scattering case.
47 // to be used by single and multiple scattering models. References:
48 // 1) G.Wentzel, Z. Phys. 40 (1927) 590.
49 // 2) J.M. Fernandez-Varea et al., NIM B73 (1993) 447.
50 //
51 // -------------------------------------------------------------------
52 //
53 
54 #ifndef G4WentzelVIRelXSection_h
55 #define G4WentzelVIRelXSection_h 1
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
59 #include "globals.hh"
60 #include "G4Material.hh"
61 #include "G4Element.hh"
62 #include "G4ElementVector.hh"
63 #include "G4NistManager.hh"
64 #include "G4ThreeVector.hh"
65 #include "G4Pow.hh"
66 
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72 {
73 
74 public:
75 
77 
78  virtual ~G4WentzelVIRelXSection();
79 
80  void Initialise(const G4ParticleDefinition*, G4double CosThetaLim);
81 
83 
84  // return cos(ThetaMax) for msc and cos(thetaMin) for single scattering
85  // cut = DBL_MAX means no scattering off electrons
87 
89 
91  G4double CosThetaMax,
92  G4double elecRatio = 0.0);
93 
94  inline G4double ComputeNuclearCrossSection(G4double CosThetaMin,
95  G4double CosThetaMax);
96 
98  G4double CosThetaMax);
99 
100  inline G4double SetupKinematic(G4double kinEnergy, const G4Material* mat);
101 
102  inline void SetTargetMass(G4double value);
103 
104  inline G4double GetMomentumSquare() const;
105 
106  inline G4double GetCosThetaNuc() const;
107 
108  inline G4double GetCosThetaElec() const;
109 
110 private:
111 
112  void ComputeMaxElectronScattering(G4double cut);
113 
114  // hide assignment operator
117 
118  const G4ParticleDefinition* theProton;
119  const G4ParticleDefinition* theElectron;
120  const G4ParticleDefinition* thePositron;
121  const G4Material* currentMaterial;
122 
123  G4NistManager* fNistManager;
124  G4Pow* fG4pow;
125 
126  G4double numlimit;
127 
128  G4double elecXSRatio;
129 
130  // integer parameters
131  G4int nwarnings;
132  G4int nwarnlimit;
133 
134  // single scattering parameters
135  G4double coeff;
136  G4double cosTetMaxElec;
137  G4double cosTetMaxNuc;
138  G4double cosThetaMax;
139  G4double alpha2;
140 
141  // projectile
142  const G4ParticleDefinition* particle;
143 
144  G4double chargeSquare;
145  G4double charge3;
146  G4double spin;
147  G4double mass;
148  G4double tkin;
149  G4double mom2;
150  G4double momCM2;
151  G4double invbeta2;
152  G4double kinFactor;
153  G4double etag;
154  G4double ecut;
155  G4double lowEnergyLimit;
156 
157  // target
158  G4int targetZ;
159  G4double targetMass;
160  G4double screenZ;
161  G4double formfactA;
162  G4double factorA2;
163  G4double factB;
164  G4double factB1;
165  G4double factD;
166  G4double gam0pcmp;
167  G4double pcmp2;
168 
169  static G4double ScreenRSquare[100];
170  static G4double FormFactor[100];
171 };
172 
173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
174 
175 inline G4double
177 {
178  if(ekin != tkin || mat != currentMaterial) {
179  currentMaterial = mat;
180  tkin = ekin;
181  mom2 = tkin*(tkin + 2.0*mass);
182  invbeta2 = 1.0 + mass*mass/mom2;
183  factB = spin/invbeta2;
184  cosTetMaxNuc =
185  std::max(cosThetaMax,1.-factorA2*mat->GetIonisation()->GetInvA23()/mom2);
186  }
187  return cosTetMaxNuc;
188 }
189 
190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191 
193 {
194  targetMass = value;
195  factD = std::sqrt(mom2)/value;
196 }
197 
198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
199 
201 {
202  return mom2;
203 }
204 
205 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
206 
208 {
209  return cosTetMaxNuc;
210 }
211 
212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
213 
215 {
216  return cosTetMaxElec;
217 }
218 
219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
220 
221 inline G4double
223  G4double cosTMax)
224 {
225  G4double xsec = 0.0;
226  if(cosTMax < cosTMin) {
227  xsec = targetZ*kinFactor*(cosTMin - cosTMax)/
228  ((1.0 - cosTMin + screenZ)*(1.0 - cosTMax + screenZ));
229  }
230  return xsec;
231 }
232 
233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
234 
235 inline G4double
237  G4double cosTMax)
238 {
239  G4double xsec = 0.0;
240  G4double cost1 = std::max(cosTMin,cosTetMaxElec);
241  G4double cost2 = std::max(cosTMax,cosTetMaxElec);
242  if(cost1 > cost2) {
243  xsec = kinFactor*(cost1 - cost2)/((1.0 - cost1 + screenZ)*(1.0 - cost2 + screenZ));
244  }
245  return xsec;
246 }
247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
248 
249 #endif
250 
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224
G4double ComputeNuclearCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4ThreeVector SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio=0.0)
Definition: G4Pow.hh:56
G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax)
int G4int
Definition: G4Types.hh:78
G4double SetupKinematic(G4double kinEnergy, const G4Material *mat)
G4double SetupTarget(G4int Z, G4double cut=DBL_MAX)
void SetupParticle(const G4ParticleDefinition *)
G4double GetMomentumSquare() const
G4double GetInvA23() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const XML_Char int const XML_Char * value
G4double ComputeElectronCrossSection(G4double CosThetaMin, G4double CosThetaMax)
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)
double G4double
Definition: G4Types.hh:76
void SetTargetMass(G4double value)
#define DBL_MAX
Definition: templates.hh:83