G4XTRGammaRadModel.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 //
00028 
00029 #include <complex>
00030 
00031 #include "G4XTRGammaRadModel.hh"
00032 #include "Randomize.hh"
00033 
00034 #include "G4Gamma.hh"
00035 
00036 using namespace std;
00037 
00039 //
00040 // Constructor, destructor
00041 
00042 G4XTRGammaRadModel::G4XTRGammaRadModel(G4LogicalVolume* anEnvelope,
00043                                      G4double alphaPlate,
00044                                      G4double alphaGas,
00045                                      G4Material* foilMat,G4Material* gasMat,
00046                                      G4double a, G4double b, G4int n,
00047                                      const G4String& processName) :
00048   G4VXTRenergyLoss(anEnvelope,foilMat,gasMat,a,b,n,processName)
00049 {
00050   G4cout<<"Gammma distributed X-ray TR radiator model is called"<<G4endl ;
00051 
00052   // Build energy and angular integral spectra of X-ray TR photons from
00053   // a radiator
00054 
00055   fAlphaPlate = alphaPlate ;
00056   fAlphaGas   = alphaGas   ;
00057   G4cout<<"fAlphaPlate = "<<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl ;
00058   fExitFlux = true;
00059   //  BuildTable() ;
00060 }
00061 
00063 
00064 G4XTRGammaRadModel::~G4XTRGammaRadModel()
00065 {
00066   ;
00067 }
00068 
00069 
00070 
00072 //
00073 // Rough approximation for radiator interference factor for the case of
00074 // fully GamDistr radiator. The plate and gas gap thicknesses are distributed 
00075 // according to exponent. The mean values of the plate and gas gap thicknesses 
00076 // are supposed to be about XTR formation zones but much less than 
00077 // mean absorption length of XTR photons in coresponding material.
00078 
00079 G4double 
00080 G4XTRGammaRadModel::GetStackFactor( G4double energy, 
00081                                          G4double gamma, G4double varAngle )
00082 {
00083   G4double result, Qa, Qb, Q, Za, Zb, Ma, Mb ;
00084   
00085   Za = GetPlateFormationZone(energy,gamma,varAngle) ;
00086   Zb = GetGasFormationZone(energy,gamma,varAngle) ;
00087 
00088   Ma = GetPlateLinearPhotoAbs(energy) ;
00089   Mb = GetGasLinearPhotoAbs(energy) ;
00090 
00091   Qa = ( 1.0 + fPlateThick*Ma/fAlphaPlate ) ;
00092   Qa = std::pow(Qa,-fAlphaPlate) ;
00093   Qb = ( 1.0 + fGasThick*Mb/fAlphaGas ) ;
00094   Qb = std::pow(Qb,-fAlphaGas) ;
00095   Q  = Qa*Qb ;
00096 
00097   G4complex Ca(1.0+0.5*fPlateThick*Ma/fAlphaPlate,fPlateThick/Za/fAlphaPlate) ; 
00098   G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas) ; 
00099 
00100   G4complex Ha = std::pow(Ca,-fAlphaPlate) ;  
00101   G4complex Hb = std::pow(Cb,-fAlphaGas) ;
00102   G4complex H  = Ha*Hb ;
00103 
00104   G4complex F1 = ( 0.5*(1+Qa)*(1.0+H) - Ha - Qa*Hb )/(1.0-H) ;
00105 
00106   G4complex F2 = (1.0-Ha)*(Qa-Ha)*Hb/(1.0-H)/(Q-H) ;
00107 
00108   F2          *= std::pow(Q,G4double(fPlateNumber)) - std::pow(H,fPlateNumber) ;
00109 
00110   result      = ( 1 - std::pow(Q,G4double(fPlateNumber)) )/( 1 - Q ) ;
00111 
00112   G4complex stack  = result*F1;
00113             stack += F2;
00114             stack *= 2.0*OneInterfaceXTRdEdx(energy,gamma,varAngle);
00115 
00116             result = std::real(stack);
00117 
00118             // result     *= 2.0*std::real(F1);
00119             // result     += 2.0*std::real(F2);
00120 
00121   return      result ;
00122 }
00123 
00124 
00125 //
00126 //
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 

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