source: trunk/source/processes/electromagnetic/standard/include/G4GoudsmitSaundersonMscModel.hh @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

  • Property svn:executable set to *
File size: 6.5 KB
Line 
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: G4GoudsmitSaundersonMscModel.hh,v 1.4 2010/05/17 15:11:30 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
28//
29// -------------------------------------------------------------------
30//
31//
32// GEANT4 Class header file
33//
34//
35// File name:     G4GoudsmitSaundersonMscModel
36//
37// Author:        Omrane Kadri
38//
39// Creation date: 20.02.2009
40//
41// Modifications:
42// 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style
43// 12.05.2010 O.Kadri: adding Qn1 and Qn12 as private doubles
44//
45// Class description:
46//
47// Multiple scattering model using classical Goudsmit-Saunderson model
48//
49//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
50//REFERENCES:
51//Ref.1:E. Benedito et al.,"Mixed simulation ... cross-sections", NIMB 174 (2001) pp 91-110;
52//Ref.2:I. Kawrakow et al.,"On the condensed ... transport",NIMB 142 (1998) pp 253-280;
53//Ref.3:I. Kawrakow et al.,"On the representation ... calculations",NIMB 134 (1998) pp 325-336;
54//Ref.4:I. Kawrakow et al.,"The EGSnrc code ... Transport",NRCC Report PIRS-701, Sept. 21, 2006;
55//Ref.5:F. Salvat et al.,"ELSEPA--Dirac partial ...molecules", Comp. Phys. Comm. 165 (2005) pp 157-190;
56//Ref.6:G4UrbanMscModel G4_v9.1Ref09;
57//Ref.7:G4WentzelVIModel G4_v9.3.
58//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
59
60#ifndef G4GoudsmitSaundersonMscModel_h
61#define G4GoudsmitSaundersonMscModel_h 1
62
63#include "G4VMscModel.hh"
64#include "G4PhysicsTable.hh"
65#include "globals.hh"
66
67class G4DataVector;
68class G4ParticleChangeForMSC;
69class G4LossTableManager;
70class G4GoudsmitSaundersonTable;
71class G4PhysicsTable;
72
73class G4GoudsmitSaundersonMscModel : public G4VMscModel
74{
75public:
76
77  G4GoudsmitSaundersonMscModel(const G4String& nam = "GoudsmitSaunderson");
78
79  virtual ~G4GoudsmitSaundersonMscModel();
80
81  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
82
83  virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
84                                              G4double KineticEnergy,
85                                              G4double AtomicNumber, G4double, 
86                                              G4double, G4double);
87
88  virtual void SampleScattering(const G4DynamicParticle* ,
89                                G4double );
90
91  virtual G4double ComputeTruePathLengthLimit(
92                             const G4Track& track,
93                                   G4PhysicsTable* theLambdaTable,
94                                   G4double currentMinimalStep);
95
96  virtual G4double ComputeGeomPathLength(G4double truePathLength);
97
98  virtual G4double ComputeTrueStepLength(G4double geomStepLength);
99
100private: 
101  void SampleCosineTheta(G4double,G4double,G4double &,G4double &);
102
103  void CalculateIntegrals(const G4ParticleDefinition* ,G4double,G4double,
104                          G4double&,G4double&);
105
106  void LoadELSEPAXSections();
107
108  inline void SetParticle(const G4ParticleDefinition* p);
109
110  inline G4double GetLambda(G4double);
111
112  //  hide assignment operator
113  G4GoudsmitSaundersonMscModel & operator=(const  G4GoudsmitSaundersonMscModel &right);
114  G4GoudsmitSaundersonMscModel(const  G4GoudsmitSaundersonMscModel&);
115
116  G4double lowKEnergy;
117  G4double highKEnergy;
118  G4double currentKinEnergy;
119  G4double currentRange; 
120
121  G4double smallstep,tlimitminfix,skindepth;
122  G4double fr,rangeinit,masslimite,tgeom;
123  G4double par1,par2,par3,zPathLength,truePathLength;
124  G4double tausmall,taulim,tlimit,tlimitmin,geommin,geombig;
125  G4double charge,lambdalimit;
126  G4double tPathLength,stepmin ;
127  G4double lambda0,lambda1,lambda11,Qn1,Qn12;
128  G4double mass;
129  G4int    currentMaterialIndex;
130
131  G4bool   inside;
132  G4bool   insideskin;
133  G4bool   isInitialized;
134
135  G4PhysicsTable*            theLambdaTable;
136  G4GoudsmitSaundersonTable* GSTable;
137  G4LossTableManager*        theManager;
138  const G4ParticleDefinition* particle;
139  G4ParticleChangeForMSC*     fParticleChange;
140  const G4MaterialCutsCouple* currentCouple;
141
142  static G4double ener[106];
143  static G4double TCSE[103][106];
144  static G4double FTCSE[103][106];
145  static G4double TCSP[103][106];
146  static G4double FTCSP[103][106];
147
148};
149//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150
151inline
152void G4GoudsmitSaundersonMscModel::SetParticle(const G4ParticleDefinition* p)
153{
154  if (p != particle) {
155    particle = p;
156    mass = p->GetPDGMass();
157    charge = p->GetPDGCharge()/eplus;
158  }
159}
160
161//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
162
163inline G4double G4GoudsmitSaundersonMscModel::GetLambda(G4double e)
164{
165  G4double x; 
166  if(theLambdaTable) {
167    G4bool b;
168    x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
169  } else {
170    x = CrossSection(currentCouple,particle,e);
171  }
172
173  if(x > DBL_MIN) x = 1./x;
174  else            x = DBL_MAX;
175  return x;
176}
177
178//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
179
180#endif
181
Note: See TracBrowser for help on using the repository browser.