Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

FastShower::HadEarlyHcalCoreFracBar Class Reference

core fraction in HCAL for hadronic Early showers (barrel). More...

#include <HadEarlyHcalCoreFracBar.h>

Inheritance diagram for FastShower::HadEarlyHcalCoreFracBar:

Inheritance graph
[legend]
Collaboration diagram for FastShower::HadEarlyHcalCoreFracBar:

Collaboration graph
[legend]
List of all members.

Private Methods

virtual double value (const ParticleParameters &) const
virtual IFnOfParticleParametersclone () const

Detailed Description

core fraction in HCAL for hadronic Early showers (barrel).

UML: IDistributionClass.unm

Definition at line 25 of file HadEarlyHcalCoreFracBar.h.


Member Function Documentation

double FastShower::HadEarlyHcalCoreFracBar::value const ParticleParameters   const [private, virtual]
 

Implements FastShower::IFnOfParticleParameters.

Definition at line 13 of file HadEarlyHcalCoreFracBar.cxx.

References FastShower::ParticleParameters::energy().

00013                                                                          {
00014   
00015     double energy = pp.energy();
00016 
00017     double p1  =  0.6066*std::exp(-0.0433*energy) + 0.09131;
00018     double p2  =  0.2930*std::exp(-0.1202*energy) + 0.00100;
00019     double p3  = -2.505*std::exp(-0.01723*energy) + 2.8010;
00020     double p4  = -0.9982*std::exp(-0.037595*energy) + 1.3277;
00021     double p5  =  0.7788*std::exp(-0.1131*energy) + 0.01989;
00022     double p6  = -7.2420*std::exp(-0.01934*energy) + 8.045;
00023     double p7  = -0.002219*energy + 1.248;
00024     double p8  =  0.3260*std::exp(-0.02749*energy) + 0.9911;
00025     double p9  =  0.3969*std::exp(-0.03985*energy) + 0.1169;
00026 
00027     double x1o3 = 0.4;
00028     double x2 = 0.8;
00029 
00030     double yref = RandFlat::shoot();
00031 
00032     double yref1 = p4*std::pow(x1o3,p6) + p5;
00033     double yref3 = p1*std::pow(x1o3,p3) + p2;
00034     double yref2 = p4*std::pow(x2,p6) + p5;
00035 
00036     double result;
00037     if (yref>yref2) {
00038       result = p8 - p9*std::sqrt(fabs(-2.*std::log(yref/p7)));
00039       if ((yref >= 1.) && (result < 1.)) {
00040         result += RandFlat::shoot()*(1.-result);
00041       }
00042     }else if (yref>yref1) {
00043       if (yref<yref3) {
00044         if (RandFlat::shoot()<0.5) {
00045           result = std::pow(max((yref-p2),DBL_EPSILON)/p1,1/p3);
00046         }else{
00047           result = std::pow(max((yref-p5),DBL_EPSILON)/p4,1/p6);
00048         }
00049       }else{
00050         result = std::pow(max((yref-p5),DBL_EPSILON)/p4,1/p6);
00051       }
00052     }else{
00053       result = std::pow(max((yref-p2),DBL_EPSILON)/p1,1/p3);
00054     }
00055 
00056     result = max(result, 0.0);
00057     result = min(result, 1.0);
00058     
00059     return result;
00060   }

IFnOfParticleParameters * FastShower::HadEarlyHcalCoreFracBar::clone   const [private, virtual]
 

Implements FastShower::IFnOfParticleParameters.

Definition at line 62 of file HadEarlyHcalCoreFracBar.cxx.

00062                                                                 {
00063     return new HadEarlyHcalCoreFracBar(*this);
00064   }

The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:56:36 2003 for FastShowerUtils by doxygen1.3-rc1