source: trunk/source/processes/electromagnetic/xrays/src/G4StrawTubeXTRadiator.cc@ 1066

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

update to geant4.9.2

File size: 7.3 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//
27// $Id: G4StrawTubeXTRadiator.cc,v 1.6 2007/09/29 17:49:34 vnivanch Exp $
28// GEANT4 tag $Name: geant4-09-02 $
29//
30
31#include "G4StrawTubeXTRadiator.hh"
32#include "Randomize.hh"
33#include "G4Gamma.hh"
34
35using namespace std;
36
37////////////////////////////////////////////////////////////////////////////
38//
39// Constructor, destructor
40
41G4StrawTubeXTRadiator::G4StrawTubeXTRadiator(G4LogicalVolume *anEnvelope,
42 G4Material* foilMat,G4Material* gasMat,
43 G4double a, G4double b, G4Material* mediumMat,
44 G4bool unishut,
45 const G4String& processName) :
46 G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,1,processName)
47{
48 if(verboseLevel > 0)
49 G4cout<<"Straw tube X-ray TR radiator EM process is called"<<G4endl;
50
51 if( unishut )
52 {
53 fAlphaPlate = 1./3.;
54 fAlphaGas = 12.4;
55 if(verboseLevel > 0)
56 G4cout<<"straw uniform shooting: "<<"fAlphaPlate = "
57 <<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl;
58
59 }
60 else
61 {
62 fAlphaPlate = 0.5;
63 fAlphaGas = 5.;
64 if(verboseLevel > 0)
65 G4cout<<"straw isotropical shooting: "<<"fAlphaPlate = "
66 <<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl;
67
68
69 }
70 // index of medium material
71
72 fMatIndex3 = mediumMat->GetIndex();
73 if(verboseLevel > 0)
74 G4cout<<"medium material = "<<mediumMat->GetName()<<G4endl;
75
76 // plasma energy squared for plate material
77
78 fSigma3 = fPlasmaCof*mediumMat->GetElectronDensity();
79 if(verboseLevel > 0)
80 G4cout<<"medium plasma energy = "<<sqrt(fSigma3)/eV<<" eV"<<G4endl;
81
82 // Compute cofs for preparation of linear photo absorption in external medium
83
84 ComputeMediumPhotoAbsCof();
85
86 // Build energy and angular integral spectra of X-ray TR photons from
87 // a radiator
88
89 // BuildTable();
90}
91
92///////////////////////////////////////////////////////////////////////////
93
94G4StrawTubeXTRadiator::~G4StrawTubeXTRadiator()
95{
96}
97
98///////////////////////////////////////////////////////////////////////////
99//
100// Approximation for radiator interference factor for the case of
101// straw tube radiator. The plate (window, straw wall) and gas (inside straw)
102// gap thicknesses are gamma distributed.
103// The mean values of the plate and gas gap thicknesses
104// are supposed to be about XTR formation zone.
105
106G4double
107G4StrawTubeXTRadiator::GetStackFactor( G4double energy,
108 G4double gamma, G4double varAngle )
109{
110
111
112 G4double result, L2, L3, M2, M3;
113
114 L2 = GetPlateFormationZone(energy,gamma,varAngle);
115 L3 = GetGasFormationZone(energy,gamma,varAngle);
116
117 M2 = GetPlateLinearPhotoAbs(energy);
118 M3 = GetGasLinearPhotoAbs(energy);
119
120 G4complex C2(1.0 + 0.5*fPlateThick*M2/fAlphaPlate, fPlateThick/L2/fAlphaPlate);
121 G4complex C3(1.0 + 0.5*fGasThick*M3/fAlphaGas, fGasThick/L3/fAlphaGas);
122
123 G4complex H2 = pow(C2,-fAlphaPlate);
124 G4complex H3 = pow(C3,-fAlphaGas);
125 G4complex H = H2*H3;
126
127 G4complex Z1 = GetMediumComplexFZ(energy,gamma,varAngle);
128 G4complex Z2 = GetPlateComplexFZ(energy,gamma,varAngle);
129 G4complex Z3 = GetGasComplexFZ(energy,gamma,varAngle);
130
131
132 G4complex R = ( Z1 - Z2 )*( Z1 - Z2 )*( 1. - H2*H ) +
133 ( Z2 - Z3 )*( Z2 - Z3 )*( 1. - H3 ) +
134 2.*( Z1 - Z2 )*( Z2 - Z3 )*H2*( 1. - H3 ) ;
135
136 result = 2.0*real(R)*(varAngle*energy/hbarc/hbarc);
137
138 return result;
139
140}
141
142
143//////////////////////////////////////////////////////////////////////
144//////////////////////////////////////////////////////////////////////
145//////////////////////////////////////////////////////////////////////
146//
147// Calculates formation zone for external medium. Omega is energy !!!
148
149G4double G4StrawTubeXTRadiator::GetMediumFormationZone( G4double omega ,
150 G4double gamma ,
151 G4double varAngle )
152{
153 G4double cof, lambda;
154 lambda = 1.0/gamma/gamma + varAngle + fSigma3/omega/omega;
155 cof = 2.0*hbarc/omega/lambda ;
156 return cof ;
157}
158
159//////////////////////////////////////////////////////////////////////
160//
161// Calculates complex formation zone for external medium. Omega is energy !!!
162
163G4complex G4StrawTubeXTRadiator::GetMediumComplexFZ( G4double omega ,
164 G4double gamma ,
165 G4double varAngle )
166{
167 G4double cof, length,delta, real, image;
168
169 length = 0.5*GetMediumFormationZone(omega,gamma,varAngle);
170 delta = length*GetMediumLinearPhotoAbs(omega);
171 cof = 1.0/(1.0 + delta*delta);
172
173 real = length*cof;
174 image = real*delta;
175
176 G4complex zone(real,image);
177 return zone;
178}
179
180////////////////////////////////////////////////////////////////////////
181//
182// Computes matrix of Sandia photo absorption cross section coefficients for
183// medium material
184
185void G4StrawTubeXTRadiator::ComputeMediumPhotoAbsCof()
186{
187 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
188 const G4Material* mat = (*theMaterialTable)[fMatIndex3];
189 fMediumPhotoAbsCof = mat->GetSandiaTable();
190}
191
192//////////////////////////////////////////////////////////////////////
193//
194// Returns the value of linear photo absorption coefficient (in reciprocal
195// length) for medium for given energy of X-ray photon omega
196
197G4double G4StrawTubeXTRadiator::GetMediumLinearPhotoAbs(G4double omega)
198{
199 G4double omega2, omega3, omega4;
200
201 omega2 = omega*omega;
202 omega3 = omega2*omega;
203 omega4 = omega2*omega2;
204
205 G4double* SandiaCof = fMediumPhotoAbsCof->GetSandiaCofForMaterial(omega);
206
207 G4double cross = SandiaCof[0]/omega + SandiaCof[1]/omega2 +
208 SandiaCof[2]/omega3 + SandiaCof[3]/omega4;
209 return cross;
210}
211
212//
213//
214////////////////////////////////////////////////////////////////////////////
215
216
217
218
219
220
221
222
Note: See TracBrowser for help on using the repository browser.