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