51 ConstantResolution(0.), NoiseResolution(0.), SamplingResolution(0.),
52 AveLogAlphah(0.), AveLogTmaxh(0.), SigmaLogAlphah(0.), SigmaLogTmaxh(0.),
53 Rhoh(0.), Alphah(0.), Tmaxh(0.), Betah(0.)
100 ParWC1 = thePar->
ParWC1();
101 ParWC2 = thePar->
ParWC2();
102 ParWC3 = thePar->
ParWC3();
103 ParWC4 = thePar->
ParWC4();
104 ParWC5 = thePar->
ParWC5();
105 ParWC6 = thePar->
ParWC6();
107 ParRT1 = thePar->
ParRT1();
108 ParRT2 = thePar->
ParRT2();
109 ParRT3 = thePar->
ParRT3();
110 ParRT4 = thePar->
ParRT4();
111 ParRT5 = thePar->
ParRT5();
112 ParRT6 = thePar->
ParRT6();
136 G4cout <<
"/********************************************/ " <<
G4endl;
137 G4cout <<
" - GFlashHomoShowerParameterisation::Constructor - " <<
G4endl;
138 G4cout <<
"/********************************************/ " <<
G4endl;
148 Ec = 2.66 * std::pow((
X0 *
Z /
A),1.1);
164 G4Exception(
"GFlashHomoShowerParameterisation::GenerateLongitudinalProfile()",
169 ComputeLongitudinalParameters(y);
170 GenerateEnergyProfile(y);
171 GenerateNSpotProfile(y);
175GFlashHomoShowerParameterisation::ComputeLongitudinalParameters(
G4double y)
177 AveLogTmaxh = std::log(ParAveT1 + std::log(y));
179 AveLogAlphah = std::log(ParAveA1 + (ParAveA2+ParAveA3/
Z)*std::log(y));
182 SigmaLogTmaxh = 1.00/( ParSigLogT1 + ParSigLogT2*std::log(y)) ;
184 SigmaLogAlphah = 1.00/( ParSigLogA1 + ParSigLogA2*std::log(y));
186 Rhoh = ParRho1+ParRho2*std::log(y);
189void GFlashHomoShowerParameterisation::GenerateEnergyProfile(
G4double )
191 G4double Correlation1h = std::sqrt((1+Rhoh)/2);
192 G4double Correlation2h = std::sqrt((1-Rhoh)/2);
194 G4double Random1 = G4RandGauss::shoot();
195 G4double Random2 = G4RandGauss::shoot();
199 Tmaxh = std::exp( AveLogTmaxh + SigmaLogTmaxh *
200 (Correlation1h*Random1 + Correlation2h*Random2) );
201 Alphah = std::exp( AveLogAlphah + SigmaLogAlphah *
202 (Correlation1h*Random1 - Correlation2h*Random2) );
203 Betah = (Alphah-1.00)/Tmaxh;
206void GFlashHomoShowerParameterisation::GenerateNSpotProfile(
const G4double y)
208 TNSpot = Tmaxh * (ParSpotT1+ParSpotT2*
Z);
209 AlphaNSpot = Alphah * (ParSpotA1+ParSpotA2*
Z);
210 BetaNSpot = (AlphaNSpot-1.00)/TNSpot;
211 NSpot = ParSpotN1 * std::log(
Z)*std::pow((y*
Ec)/GeV,ParSpotN2 );
217 G4double LongitudinalStepInX0 = LongitudinalStep /
X0;
218 G4float x1= Betah*LongitudinalStepInX0;
220 float x3 =
gam(x1,x2);
228 G4double LongitudinalStepInX0 = LongitudinalStep /
X0;
229 G4float x1 = BetaNSpot*LongitudinalStepInX0;
253 if(Random1 <WeightCore)
255 Radius =
Rm * RadiusCore * std::sqrt( Random2/(1. - Random2) );
259 Radius =
Rm * RadiusTail * std::sqrt( Random2/(1. - Random2) );
261 Radius = std::min(Radius,
DBL_MAX);
268 G4double tau = LongitudinalPosition / Tmaxh /
X0
269 * (Alphah-1.00) /Alphah *
270 std::exp(AveLogAlphah)/(std::exp(AveLogAlphah)-1.);
277 G4double z1 = ParRC1 + ParRC2* std::log(Energy/GeV) ;
279 RadiusCore = z1 + z2 * Tau ;
283 G4double p3 = ParWC5+ParWC6*std::log(Energy/GeV);
285 WeightCore = p1 * std::exp( (p2-Tau)/p3 - std::exp( (p2-Tau) /p3) );
290 G4double k4 = ParRT5+ParRT6* std::log(Energy/GeV);
292 RadiusTail = k1*(std::exp(k3*(Tau-k2)) +
293 std::exp(k4*(Tau-k2)) );
300 G4double random = -ParExp1*G4RandExponential::shoot() ;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
G4double GetDensity() const
G4double GetRadlen() const
void GenerateLongitudinalProfile(G4double Energy)
G4double GenerateExponential(G4double Energy)
void SetMaterial(G4Material *mat)
G4double ComputeTau(G4double LongitudinalPosition)
~GFlashHomoShowerParameterisation()
G4double IntegrateEneLongitudinal(G4double LongitudinalStep)
GFlashHomoShowerParameterisation(G4Material *aMat, GVFlashHomoShowerTuning *aPar=0)
G4double GenerateRadius(G4int ispot, G4double Energy, G4double LongitudinalPosition)
G4double IntegrateNspLongitudinal(G4double LongitudinalStep)
void ComputeRadialParameters(G4double y, G4double Tau)
virtual G4double ParSigLogT1()
virtual G4double ParRT1()
virtual G4double ParRT4()
virtual G4double ParAveA1()
virtual G4double ParSigLogA2()
virtual G4double ParRC2()
virtual G4double ParWC1()
virtual G4double ParRC4()
virtual G4double ParAveT1()
virtual G4double ParSpotN2()
virtual G4double ParWC4()
virtual G4double ParRho2()
virtual G4double ParWC6()
virtual G4double ParWC3()
virtual G4double ParSpotA1()
virtual G4double ParSpotA2()
virtual G4double ParSpotT2()
virtual G4double ParRT2()
virtual G4double ParRT6()
virtual G4double ParRC3()
virtual G4double ParAveA3()
virtual G4double ParSpotT1()
virtual G4double ParSigLogT2()
virtual G4double ParWC2()
virtual G4double ParSigLogA1()
virtual G4double ParRT5()
virtual G4double ParAveA2()
virtual G4double ParSpotN1()
virtual G4double ParWC5()
virtual G4double ParRC1()
virtual G4double ParRho1()
virtual G4double ParRT3()
G4double GetEffZ(const G4Material *material)
G4double GetEffA(const G4Material *material)
G4double gam(G4double x, G4double a) const
void PrintMaterial(const G4Material *mat)