52     ConstantResolution(0.), NoiseResolution(0.), SamplingResolution(0.),
 
   53     AveLogAlphah(0.), AveLogTmaxh(0.), SigmaLogAlphah(0.), SigmaLogTmaxh(0.),
 
   54     Rhoh(0.), Alphah(0.), Tmaxh(0.), Betah(0.)
 
   58   else      { thePar = aPar; owning = 
false; }
 
  100   ParWC3 = thePar->
ParWC3();
 
  101   ParWC4 = thePar->
ParWC4();
 
  102   ParWC5 = thePar->
ParWC5(); 
 
  103   ParWC6 = thePar->
ParWC6();
 
  105   ParRT1 = thePar->
ParRT1();
 
  106   ParRT2 = thePar->
ParRT2();
 
  107   ParRT3 = thePar->
ParRT3();
 
  108   ParRT4 = thePar->
ParRT4(); 
 
  109   ParRT5 = thePar->
ParRT5();
 
  110   ParRT6 = thePar->
ParRT6();
 
  134   G4cout << 
"/********************************************/ " << 
G4endl;
 
  135   G4cout << 
"  - GFlashHomoShowerParameterisation::Constructor -  " << 
G4endl;  
 
  136   G4cout << 
"/********************************************/ " << 
G4endl;
 
  146   Ec      = 2.66 * std::pow((
X0 * 
Z / 
A),1.1); 
 
  154   if(owning) { 
delete thePar; }
 
  162     G4Exception(
"GFlashHomoShowerParameterisation::GenerateLongitudinalProfile()",
 
  167   ComputeLongitudinalParameters(y);  
 
  168   GenerateEnergyProfile(y);
 
  169   GenerateNSpotProfile(y);
 
  173 GFlashHomoShowerParameterisation::ComputeLongitudinalParameters(
G4double y)
 
  175   AveLogTmaxh  = std::log(ParAveT1 + std::log(y));
 
  177   AveLogAlphah = std::log(ParAveA1 + (ParAveA2+ParAveA3/
Z)*std::log(y));
 
  180   SigmaLogTmaxh  = 1.00/( ParSigLogT1 + ParSigLogT2*std::log(y)) ;
 
  182   SigmaLogAlphah = 1.00/( ParSigLogA1 + ParSigLogA2*std::log(y));
 
  184   Rhoh           = ParRho1+ParRho2*std::log(y);        
 
  187 void GFlashHomoShowerParameterisation::GenerateEnergyProfile(
G4double )
 
  189   G4double Correlation1h = std::sqrt((1+Rhoh)/2);
 
  190   G4double Correlation2h = std::sqrt((1-Rhoh)/2);
 
  192   G4double Random1 = G4RandGauss::shoot();
 
  193   G4double Random2 = G4RandGauss::shoot();
 
  197   Tmaxh  = std::exp( AveLogTmaxh  + SigmaLogTmaxh  *
 
  198            (Correlation1h*Random1 + Correlation2h*Random2) );
 
  199   Alphah = std::exp( AveLogAlphah + SigmaLogAlphah *
 
  200            (Correlation1h*Random1 - Correlation2h*Random2) );
 
  201   Betah  = (Alphah-1.00)/Tmaxh;
 
  204 void GFlashHomoShowerParameterisation::GenerateNSpotProfile(
const G4double y)
 
  206   TNSpot     = Tmaxh *  (ParSpotT1+ParSpotT2*
Z);   
 
  207   AlphaNSpot = Alphah * (ParSpotA1+ParSpotA2*
Z);   
 
  208   BetaNSpot  = (AlphaNSpot-1.00)/TNSpot;           
 
  209   NSpot      = ParSpotN1 * std::log(
Z)*std::pow((y*
Ec)/
GeV,ParSpotN2 ); 
 
  215   G4double LongitudinalStepInX0 = LongitudinalStep / 
X0;
 
  218   float x3 =  
gam(x1,x2);
 
  226   G4double LongitudinalStepInX0 = LongitudinalStep / 
X0; 
 
  227   G4float x1 = BetaNSpot*LongitudinalStepInX0;
 
  251   if(Random1  <WeightCore) 
 
  253     Radius = 
Rm * RadiusCore * std::sqrt( Random2/(1. - Random2) );
 
  257     Radius = 
Rm * RadiusTail * std::sqrt( Random2/(1. - Random2) );
 
  259   Radius =  std::min(Radius,
DBL_MAX);
 
  266   G4double tau = LongitudinalPosition / Tmaxh / 
X0      
  267   * (Alphah-1.00) /Alphah * 
 
  268   std::exp(AveLogAlphah)/(std::exp(AveLogAlphah)-1.);  
 
  275   G4double z1 = ParRC1 + ParRC2* std::log(Energy/
GeV)  ;       
 
  277   RadiusCore   =  z1 + z2 * Tau  ;                             
 
  283   WeightCore   =  p1 * std::exp( (p2-Tau)/p3 - std::exp( (p2-Tau) /p3) ); 
 
  290   RadiusTail   = k1*(std::exp(k3*(Tau-k2))  +
 
  291   std::exp(k4*(Tau-k2)) );