#include <GFlashHomoShowerParameterisation.hh>
Inheritance diagram for GFlashHomoShowerParameterisation:
Public Member Functions | |
GFlashHomoShowerParameterisation (G4Material *aMat, GVFlashHomoShowerTuning *aPar=0) | |
~GFlashHomoShowerParameterisation () | |
void | ComputeRadialParameters (G4double y, G4double Tau) |
void | GenerateLongitudinalProfile (G4double Energy) |
void | ComputeZAX0EFFetc () |
G4double | IntegrateEneLongitudinal (G4double LongitudinalStep) |
G4double | IntegrateNspLongitudinal (G4double LongitudinalStep) |
G4double | ComputeTau (G4double LongitudinalPosition) |
G4double | GeneratePhi () |
G4double | GenerateRadius (G4int ispot, G4double Energy, G4double LongitudinalPosition) |
G4double | GenerateExponential (G4double Energy) |
void | SetMaterial (G4Material *mat) |
G4double | GetAveR99 () |
G4double | GetAveR90 () |
G4double | GetAveTmx () |
G4double | GetAveT99 () |
G4double | GetAveT90 () |
G4double | GetNspot () |
G4double | GetX0 () |
G4double | GetEc () |
G4double | GetRm () |
Definition at line 50 of file GFlashHomoShowerParameterisation.hh.
GFlashHomoShowerParameterisation::GFlashHomoShowerParameterisation | ( | G4Material * | aMat, | |
GVFlashHomoShowerTuning * | aPar = 0 | |||
) |
Definition at line 49 of file GFlashHomoShowerParameterisation.cc.
References G4cout, G4endl, GVFlashHomoShowerTuning::ParAveA1(), GVFlashHomoShowerTuning::ParAveA2(), GVFlashHomoShowerTuning::ParAveA3(), GVFlashHomoShowerTuning::ParAveT1(), GVFlashHomoShowerTuning::ParRC1(), GVFlashHomoShowerTuning::ParRC2(), GVFlashHomoShowerTuning::ParRC3(), GVFlashHomoShowerTuning::ParRC4(), GVFlashHomoShowerTuning::ParRho1(), GVFlashHomoShowerTuning::ParRho2(), GVFlashHomoShowerTuning::ParRT1(), GVFlashHomoShowerTuning::ParRT2(), GVFlashHomoShowerTuning::ParRT3(), GVFlashHomoShowerTuning::ParRT4(), GVFlashHomoShowerTuning::ParRT5(), GVFlashHomoShowerTuning::ParRT6(), GVFlashHomoShowerTuning::ParSigLogA1(), GVFlashHomoShowerTuning::ParSigLogA2(), GVFlashHomoShowerTuning::ParSigLogT1(), GVFlashHomoShowerTuning::ParSigLogT2(), GVFlashHomoShowerTuning::ParSpotA1(), GVFlashHomoShowerTuning::ParSpotA2(), GVFlashHomoShowerTuning::ParSpotN1(), GVFlashHomoShowerTuning::ParSpotN2(), GVFlashHomoShowerTuning::ParSpotT1(), GVFlashHomoShowerTuning::ParSpotT2(), GVFlashHomoShowerTuning::ParWC1(), GVFlashHomoShowerTuning::ParWC2(), GVFlashHomoShowerTuning::ParWC3(), GVFlashHomoShowerTuning::ParWC4(), GVFlashHomoShowerTuning::ParWC5(), GVFlashHomoShowerTuning::ParWC6(), GVFlashShowerParameterisation::PrintMaterial(), and SetMaterial().
00051 : GVFlashShowerParameterisation(), 00052 ConstantResolution(0.), NoiseResolution(0.), SamplingResolution(0.), 00053 AveLogAlphah(0.), AveLogTmaxh(0.), SigmaLogAlphah(0.), SigmaLogTmaxh(0.), 00054 Rhoh(0.), Alphah(0.), Tmaxh(0.), Betah(0.) 00055 00056 { 00057 if(!aPar) { thePar = new GVFlashHomoShowerTuning; owning = true; } 00058 else { thePar = aPar; owning = false; } 00059 00060 SetMaterial(aMat); 00061 PrintMaterial(aMat); 00062 00063 /********************************************/ 00064 /* Homo Calorimeter */ 00065 /********************************************/ 00066 // Longitudinal Coefficients for a homogenious calo 00067 // shower max 00068 // 00069 ParAveT1 = thePar->ParAveT1(); // ln (ln y -0.812) 00070 ParAveA1 = thePar->ParAveA1(); // ln a (0.81 + (0.458 + 2.26/Z)ln y) 00071 ParAveA2 = thePar->ParAveA2(); 00072 ParAveA3 = thePar->ParAveA3(); 00073 00074 // Variance of shower max 00075 ParSigLogT1 = thePar->ParSigLogT1(); // Sigma T1 (-1.4 + 1.26 ln y)**-1 00076 ParSigLogT2 = thePar->ParSigLogT2(); 00077 00078 // variance of 'alpha' 00079 // 00080 ParSigLogA1 = thePar->ParSigLogA1(); // Sigma a (-0.58 + 0.86 ln y)**-1 00081 ParSigLogA2 = thePar->ParSigLogA2(); 00082 00083 // correlation alpha%T 00084 // 00085 ParRho1 = thePar->ParRho1(); // Rho = 0.705 -0.023 ln y 00086 ParRho2 = thePar->ParRho2(); 00087 00088 // Radial Coefficients 00089 // r_C (tau)= z_1 +z_2 tau 00090 // r_t (tau)= k1 (std::exp (k3(tau -k2 ))+std::exp (k_4 (tau- k_2)))) 00091 // 00092 ParRC1 = thePar->ParRC1(); // z_1 = 0.0251 + 0.00319 ln E 00093 ParRC2 = thePar->ParRC2(); 00094 00095 ParRC3 = thePar->ParRC3(); // z_2 = 0.1162 + - 0.000381 Z 00096 ParRC4 = thePar->ParRC4(); 00097 00098 ParWC1 = thePar->ParWC1(); 00099 ParWC2 = thePar->ParWC2(); 00100 ParWC3 = thePar->ParWC3(); 00101 ParWC4 = thePar->ParWC4(); 00102 ParWC5 = thePar->ParWC5(); 00103 ParWC6 = thePar->ParWC6(); 00104 00105 ParRT1 = thePar->ParRT1(); 00106 ParRT2 = thePar->ParRT2(); 00107 ParRT3 = thePar->ParRT3(); 00108 ParRT4 = thePar->ParRT4(); 00109 ParRT5 = thePar->ParRT5(); 00110 ParRT6 = thePar->ParRT6(); 00111 00112 // Coeff for fluctueted radial profiles for a uniform media 00113 // 00114 ParSpotT1 = thePar->ParSpotT1(); // T_spot = T_hom =(0.698 + 0.00212) 00115 ParSpotT2 = thePar->ParSpotT2(); 00116 00117 ParSpotA1 = thePar->ParSpotA1(); // a_spot= a_hom (0.639 + 0.00334) 00118 ParSpotA2 = thePar->ParSpotA2(); 00119 00120 ParSpotN1 = thePar->ParSpotN1(); // N_Spot 93 * ln(Z) E ** 0.876 00121 ParSpotN2 = thePar->ParSpotN2(); 00122 00123 // Inits 00124 00125 NSpot = 0.00; 00126 AlphaNSpot = 0.00; 00127 TNSpot = 0.00; 00128 BetaNSpot = 0.00; 00129 00130 RadiusCore = 0.00; 00131 WeightCore = 0.00; 00132 RadiusTail = 0.00; 00133 00134 G4cout << "/********************************************/ " << G4endl; 00135 G4cout << " - GFlashHomoShowerParameterisation::Constructor - " << G4endl; 00136 G4cout << "/********************************************/ " << G4endl; 00137 }
GFlashHomoShowerParameterisation::~GFlashHomoShowerParameterisation | ( | ) |
void GFlashHomoShowerParameterisation::ComputeRadialParameters | ( | G4double | y, | |
G4double | Tau | |||
) | [virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 273 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::Z.
Referenced by GenerateRadius().
00274 { 00275 G4double z1 = ParRC1 + ParRC2* std::log(Energy/GeV) ; //ok 00276 G4double z2 = ParRC3+ParRC4*Z ; //ok 00277 RadiusCore = z1 + z2 * Tau ; //ok 00278 00279 G4double p1 = ParWC1+ParWC2*Z; //ok 00280 G4double p2 = ParWC3+ParWC4*Z; //ok 00281 G4double p3 = ParWC5+ParWC6*std::log(Energy/GeV); //ok 00282 00283 WeightCore = p1 * std::exp( (p2-Tau)/p3 - std::exp( (p2-Tau) /p3) ); //ok 00284 00285 G4double k1 = ParRT1+ParRT2*Z; // ok 00286 G4double k2 = ParRT3; // ok 00287 G4double k3 = ParRT4; // ok 00288 G4double k4 = ParRT5+ParRT6* std::log(Energy/GeV); // ok 00289 00290 RadiusTail = k1*(std::exp(k3*(Tau-k2)) + 00291 std::exp(k4*(Tau-k2)) ); //ok 00292 }
Implements GVFlashShowerParameterisation.
Definition at line 264 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::X0.
Referenced by GenerateRadius().
00265 { 00266 G4double tau = LongitudinalPosition / Tmaxh / X0 //<t> = T* a /(a - 1) 00267 * (Alphah-1.00) /Alphah * 00268 std::exp(AveLogAlphah)/(std::exp(AveLogAlphah)-1.); //ok 00269 return tau; 00270 }
void GFlashHomoShowerParameterisation::ComputeZAX0EFFetc | ( | ) |
Implements GVFlashShowerParameterisation.
Definition at line 295 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::X0.
00296 { 00297 G4double ParExp1 = 9./7.*X0; 00298 G4double random = -ParExp1*CLHEP::RandExponential::shoot() ; 00299 return random; 00300 }
void GFlashHomoShowerParameterisation::GenerateLongitudinalProfile | ( | G4double | Energy | ) | [virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 158 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::Ec, FatalException, and G4Exception().
00159 { 00160 if (material==0) 00161 { 00162 G4Exception("GFlashHomoShowerParameterisation::GenerateLongitudinalProfile()", 00163 "InvalidSetup", FatalException, "No material initialized!"); 00164 } 00165 00166 G4double y = Energy/Ec; 00167 ComputeLongitudinalParameters(y); 00168 GenerateEnergyProfile(y); 00169 GenerateNSpotProfile(y); 00170 }
G4double GFlashHomoShowerParameterisation::GeneratePhi | ( | ) |
Reimplemented from GVFlashShowerParameterisation.
G4double GFlashHomoShowerParameterisation::GenerateRadius | ( | G4int | ispot, | |
G4double | Energy, | |||
G4double | LongitudinalPosition | |||
) | [virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 236 of file GFlashHomoShowerParameterisation.cc.
References ComputeRadialParameters(), ComputeTau(), DBL_MAX, G4UniformRand, and GVFlashShowerParameterisation::Rm.
00237 { 00238 if(ispot < 1) 00239 { 00240 // Determine lateral parameters in the middle of the step. 00241 // They depend on energy & position along step. 00242 // 00243 G4double Tau = ComputeTau(LongitudinalPosition); 00244 ComputeRadialParameters(Energy,Tau); 00245 } 00246 00247 G4double Radius; 00248 G4double Random1 = G4UniformRand(); 00249 G4double Random2 = G4UniformRand(); 00250 00251 if(Random1 <WeightCore) //WeightCore = p < w_i 00252 { 00253 Radius = Rm * RadiusCore * std::sqrt( Random2/(1. - Random2) ); 00254 } 00255 else 00256 { 00257 Radius = Rm * RadiusTail * std::sqrt( Random2/(1. - Random2) ); 00258 } 00259 Radius = std::min(Radius,DBL_MAX); 00260 return Radius; 00261 }
G4double GFlashHomoShowerParameterisation::GetAveR90 | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 73 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::Rm.
00073 {return (1.5 * Rm);} //ok
G4double GFlashHomoShowerParameterisation::GetAveR99 | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 72 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::Rm.
00072 {return (3.5 * Rm);}
G4double GFlashHomoShowerParameterisation::GetAveT90 | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 77 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::X0.
00077 {return (2.5* X0*std::exp( AveLogTmaxh) );}
G4double GFlashHomoShowerParameterisation::GetAveT99 | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 76 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::X0.
00076 {return (X0 * AveLogTmaxh/(AveLogAlphah-1.00));}
G4double GFlashHomoShowerParameterisation::GetAveTmx | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 75 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::X0.
00075 {return (X0 * std::exp(AveLogTmaxh));}
G4double GFlashHomoShowerParameterisation::GetEc | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 81 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::Ec.
00081 {return Ec;}
G4double GFlashHomoShowerParameterisation::GetNspot | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 79 of file GFlashHomoShowerParameterisation.hh.
G4double GFlashHomoShowerParameterisation::GetRm | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 82 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::Rm.
00082 {return Rm;}
G4double GFlashHomoShowerParameterisation::GetX0 | ( | ) | [inline, virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 80 of file GFlashHomoShowerParameterisation.hh.
References GVFlashShowerParameterisation::X0.
00080 {return X0;}
G4double GFlashHomoShowerParameterisation::IntegrateEneLongitudinal | ( | G4double | LongitudinalStep | ) | [virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 213 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::gam(), and GVFlashShowerParameterisation::X0.
00214 { 00215 G4double LongitudinalStepInX0 = LongitudinalStep / X0; 00216 G4float x1= Betah*LongitudinalStepInX0; 00217 G4float x2= Alphah; 00218 float x3 = gam(x1,x2); 00219 G4double DEne=x3; 00220 return DEne; 00221 }
G4double GFlashHomoShowerParameterisation::IntegrateNspLongitudinal | ( | G4double | LongitudinalStep | ) | [virtual] |
Implements GVFlashShowerParameterisation.
Definition at line 224 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::gam(), and GVFlashShowerParameterisation::X0.
00225 { 00226 G4double LongitudinalStepInX0 = LongitudinalStep / X0; 00227 G4float x1 = BetaNSpot*LongitudinalStepInX0; 00228 G4float x2 = AlphaNSpot; 00229 G4float x3 = gam(x1,x2); 00230 G4double DNsp = x3; 00231 return DNsp; 00232 }
void GFlashHomoShowerParameterisation::SetMaterial | ( | G4Material * | mat | ) |
Definition at line 139 of file GFlashHomoShowerParameterisation.cc.
References GVFlashShowerParameterisation::A, GVFlashShowerParameterisation::density, GVFlashShowerParameterisation::Ec, G4Material::GetDensity(), GVFlashShowerParameterisation::GetEffA(), GVFlashShowerParameterisation::GetEffZ(), G4Material::GetRadlen(), GVFlashShowerParameterisation::Rm, GVFlashShowerParameterisation::X0, and GVFlashShowerParameterisation::Z.
Referenced by GFlashHomoShowerParameterisation().
00140 { 00141 material= mat; 00142 Z = GetEffZ(material); 00143 A = GetEffA(material); 00144 density = material->GetDensity()/(g/cm3); 00145 X0 = material->GetRadlen(); 00146 Ec = 2.66 * std::pow((X0 * Z / A),1.1); 00147 G4double Es = 21*MeV; 00148 Rm = X0*Es/Ec; 00149 // PrintMaterial(); 00150 }