00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
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
00053
00054
00055 fAlphaPlate = alphaPlate ;
00056 fAlphaGas = alphaGas ;
00057 G4cout<<"fAlphaPlate = "<<fAlphaPlate<<" ; fAlphaGas = "<<fAlphaGas<<G4endl ;
00058 fExitFlux = true;
00059
00060 }
00061
00063
00064 G4XTRGammaRadModel::~G4XTRGammaRadModel()
00065 {
00066 ;
00067 }
00068
00069
00070
00072
00073
00074
00075
00076
00077
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
00119
00120
00121 return result ;
00122 }
00123
00124
00125
00126
00128
00129
00130
00131
00132
00133
00134
00135