Geant4_10
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: G4StrawTubeXTRadiator.cc 68037 2013-03-13 14:15:08Z gcosmo $
28 //
29 
30 #include "G4StrawTubeXTRadiator.hh"
31 #include "G4PhysicalConstants.hh"
32 #include "G4SystemOfUnits.hh"
33 #include "Randomize.hh"
34 #include "G4Gamma.hh"
35 
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 
77  fSigma3 = fPlasmaCof*mediumMat->GetElectronDensity();
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 
92 
94 {
95 }
96 
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 
105 G4double
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 
120  G4complex C3(1.0 + 0.5*fGasThick*M3/fAlphaGas, fGasThick/L3/fAlphaGas);
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 
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 
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 
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 
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 
204  const G4double* SandiaCof = fMediumPhotoAbsCof->GetSandiaCofForMaterial(omega);
205 
206  G4double cross = SandiaCof[0]/omega + SandiaCof[1]/omega2 +
207  SandiaCof[2]/omega3 + SandiaCof[3]/omega4;
208  return cross;
209 }
210 
211 //
212 //
214 
215 
216 
217 
218 
219 
220 
221 
Double_t Z2
Definition: plot.C:266
G4double GetMediumFormationZone(G4double, G4double, G4double)
G4double GetGasFormationZone(G4double, G4double, G4double)
G4int verboseLevel
Definition: G4VProcess.hh:368
tuple a
Definition: test.py:11
G4SandiaTable * fMediumPhotoAbsCof
G4double GetPlateLinearPhotoAbs(G4double)
G4double GetMediumLinearPhotoAbs(G4double)
size_t GetIndex() const
Definition: G4Material.hh:260
const G4String & GetName() const
Definition: G4Material.hh:176
G4double GetGasLinearPhotoAbs(G4double)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:564
std::vector< G4Material * > G4MaterialTable
G4double G4NeutronHPJENDLHEData::G4double result
G4double GetPlateFormationZone(G4double, G4double, G4double)
#define C3
G4complex GetPlateComplexFZ(G4double, G4double, G4double)
Float_t mat
Definition: plot.C:40
G4complex GetMediumComplexFZ(G4double, G4double, G4double)
G4SandiaTable * GetSandiaTable() const
Definition: G4Material.hh:227
tuple b
Definition: test.py:12
std::complex< G4double > G4complex
Definition: G4Types.hh:81
G4GLOB_DLL std::ostream G4cout
double energy
Definition: plottest35.C:25
G4double GetElectronDensity() const
Definition: G4Material.hh:215
G4double GetSandiaCofForMaterial(G4int, G4int)
bool G4bool
Definition: G4Types.hh:79
G4StrawTubeXTRadiator(G4LogicalVolume *anEnvelope, G4Material *, G4Material *, G4double, G4double, G4Material *, G4bool unishut=false, const G4String &processName="StrawTubeXTRadiator")
G4double GetStackFactor(G4double energy, G4double gamma, G4double varAngle)
#define G4endl
Definition: G4ios.hh:61
G4complex GetGasComplexFZ(G4double, G4double, G4double)
double G4double
Definition: G4Types.hh:76
Double_t Z1
Definition: plot.C:266