G4StrawTubeXTRadiator.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 
00030 #include "G4StrawTubeXTRadiator.hh"
00031 #include "G4PhysicalConstants.hh"
00032 #include "G4SystemOfUnits.hh"
00033 #include "Randomize.hh"
00034 #include "G4Gamma.hh"
00035 
00037 //
00038 // Constructor, destructor
00039 
00040 G4StrawTubeXTRadiator::G4StrawTubeXTRadiator(G4LogicalVolume *anEnvelope,
00041                                          G4Material* foilMat,G4Material* gasMat, 
00042                                          G4double a, G4double b, G4Material* mediumMat,
00043                                          G4bool unishut,
00044                                          const G4String& processName) :
00045   G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,1,processName)
00046 {
00047   if(verboseLevel > 0)
00048     G4cout<<"Straw tube X-ray TR  radiator EM process is called"<<G4endl;
00049 
00050   if( unishut )
00051   {
00052     fAlphaPlate = 1./3.;
00053     fAlphaGas   = 12.4;
00054     if(verboseLevel > 0)
00055       G4cout<<"straw uniform shooting: "<<"fAlphaPlate = "
00056             <<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl;
00057 
00058   }
00059   else
00060   {
00061     fAlphaPlate = 0.5;
00062     fAlphaGas   = 5.;
00063     if(verboseLevel > 0)
00064       G4cout<<"straw isotropical shooting: "<<"fAlphaPlate = "
00065             <<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl;
00066 
00067 
00068   }
00069   // index of medium material
00070 
00071   fMatIndex3 = mediumMat->GetIndex();
00072   if(verboseLevel > 0)
00073     G4cout<<"medium material = "<<mediumMat->GetName()<<G4endl;
00074 
00075   // plasma energy squared for plate material
00076 
00077   fSigma3 = fPlasmaCof*mediumMat->GetElectronDensity();
00078   if(verboseLevel > 0)
00079     G4cout<<"medium plasma energy = "<<std::sqrt(fSigma3)/eV<<" eV"<<G4endl;
00080 
00081   // Compute cofs for preparation of linear photo absorption in external medium
00082 
00083   ComputeMediumPhotoAbsCof();
00084 
00085   // Build energy and angular integral spectra of X-ray TR photons from
00086   // a radiator
00087 
00088   // BuildTable();
00089 }
00090 
00092 
00093 G4StrawTubeXTRadiator::~G4StrawTubeXTRadiator()
00094 {
00095 }
00096 
00098 //
00099 // Approximation for radiator interference factor for the case of
00100 // straw tube radiator. The plate (window, straw wall) and gas (inside straw) 
00101 // gap thicknesses are  gamma distributed.
00102 // The mean values of the plate and gas gap thicknesses 
00103 // are supposed to be about XTR formation zone.
00104 
00105 G4double 
00106 G4StrawTubeXTRadiator::GetStackFactor( G4double energy, 
00107                                          G4double gamma, G4double varAngle )
00108 {
00109 
00110 
00111   G4double result, L2, L3, M2, M3;
00112   
00113   L2 = GetPlateFormationZone(energy,gamma,varAngle);
00114   L3 = GetGasFormationZone(energy,gamma,varAngle);
00115 
00116   M2 = GetPlateLinearPhotoAbs(energy);
00117   M3 = GetGasLinearPhotoAbs(energy);
00118 
00119   G4complex C2(1.0 + 0.5*fPlateThick*M2/fAlphaPlate, fPlateThick/L2/fAlphaPlate); 
00120   G4complex C3(1.0 + 0.5*fGasThick*M3/fAlphaGas, fGasThick/L3/fAlphaGas); 
00121 
00122   G4complex H2 = std::pow(C2,-fAlphaPlate);  
00123   G4complex H3 = std::pow(C3,-fAlphaGas);
00124   G4complex H  = H2*H3;
00125 
00126   G4complex Z1 = GetMediumComplexFZ(energy,gamma,varAngle);
00127   G4complex Z2 = GetPlateComplexFZ(energy,gamma,varAngle);
00128   G4complex Z3 = GetGasComplexFZ(energy,gamma,varAngle);
00129 
00130 
00131   G4complex R  =    ( Z1 - Z2 )*( Z1 - Z2 )*( 1. - H2*H ) +
00132                     ( Z2 - Z3 )*( Z2 - Z3 )*( 1. - H3 )   + 
00133                  2.*( Z1 - Z2 )*( Z2 - Z3 )*H2*( 1. - H3 ) ;
00134 
00135   result       = 2.0*std::real(R)*(varAngle*energy/hbarc/hbarc);
00136   
00137   return      result;
00138 
00139 }
00140 
00141 
00145 //
00146 // Calculates formation zone for external medium. Omega is energy !!!
00147 
00148 G4double G4StrawTubeXTRadiator::GetMediumFormationZone( G4double omega ,
00149                                                 G4double gamma ,
00150                                                 G4double varAngle    ) 
00151 {
00152   G4double cof, lambda;
00153   lambda = 1.0/gamma/gamma + varAngle + fSigma3/omega/omega;
00154   cof = 2.0*hbarc/omega/lambda ;
00155   return cof ;
00156 }
00157 
00159 //
00160 // Calculates complex formation zone for external medium. Omega is energy !!!
00161 
00162 G4complex G4StrawTubeXTRadiator::GetMediumComplexFZ( G4double omega ,
00163                                              G4double gamma ,
00164                                              G4double varAngle    ) 
00165 {
00166   G4double cof, length,delta, real_v, image_v;
00167 
00168   length = 0.5*GetMediumFormationZone(omega,gamma,varAngle);
00169   delta  = length*GetMediumLinearPhotoAbs(omega);
00170   cof    = 1.0/(1.0 + delta*delta);
00171 
00172   real_v   = length*cof;
00173   image_v  = real_v*delta;
00174 
00175   G4complex zone(real_v,image_v); 
00176   return zone;
00177 }
00178 
00180 //
00181 // Computes matrix of Sandia photo absorption cross section coefficients for
00182 // medium material
00183 
00184 void G4StrawTubeXTRadiator::ComputeMediumPhotoAbsCof() 
00185 {
00186   const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
00187   const G4Material* mat = (*theMaterialTable)[fMatIndex3];
00188   fMediumPhotoAbsCof = mat->GetSandiaTable();
00189 }
00190 
00192 //
00193 // Returns the value of linear photo absorption coefficient (in reciprocal 
00194 // length) for medium for given energy of X-ray photon omega
00195 
00196 G4double G4StrawTubeXTRadiator::GetMediumLinearPhotoAbs(G4double omega) 
00197 {
00198   G4double omega2, omega3, omega4; 
00199 
00200   omega2 = omega*omega;
00201   omega3 = omega2*omega;
00202   omega4 = omega2*omega2;
00203 
00204   G4double* SandiaCof = fMediumPhotoAbsCof->GetSandiaCofForMaterial(omega);
00205 
00206   G4double cross = SandiaCof[0]/omega  + SandiaCof[1]/omega2 +
00207                    SandiaCof[2]/omega3 + SandiaCof[3]/omega4;
00208   return cross;
00209 }
00210 
00211 //
00212 //
00214 
00215 
00216 
00217 
00218 
00219 
00220 
00221 

Generated on Mon May 27 17:49:55 2013 for Geant4 by  doxygen 1.4.7