#include <HadEarlyEcalCoreFracBar.h>
Inheritance diagram for FastShower::HadEarlyEcalCoreFracBar:
Private Methods | |
virtual double | value (const ParticleParameters &) const |
virtual IFnOfParticleParameters * | clone () const |
UML: IDistributionClass.unm
Definition at line 25 of file HadEarlyEcalCoreFracBar.h.
|
Implements FastShower::IFnOfParticleParameters. Definition at line 12 of file HadEarlyEcalCoreFracBar.cxx. References FastShower::ParticleParameters::energy().
00012 { 00013 00014 double energy = pp.energy(); 00015 00016 double p1 = -0.0537748*std::exp(-0.196332*energy) + 1.34224; 00017 double p2 = 0.100296*std::exp(-0.108459*energy) + 0.183062; 00018 double p3 = 3.78374*std::exp(-0.04592*energy) - 4.39248; 00019 double p4 = -0.9031114*std::exp(-0.00512578*energy) + 1.99314; 00020 double p5 = 2.7764447 + 0.0041359*energy; 00021 00022 double result; 00023 double rndm = RandFlat::shoot(); 00024 double yref = std::exp(p4*std::log(p5/(p3+std::exp((p1-0.)/p2)))); 00025 if ((rndm>=yref) && (rndm<=1.0)) { 00026 result = p1-p2*std::log(p5*std::exp(-std::log(rndm)/p4)-p3); 00027 }else if ((rndm>0.) && (rndm<yref)) { 00028 result = RandFlat::shoot()*0.02; 00029 }else{ 00030 result = RandFlat::shoot(); 00031 } 00032 result = max(result, 0.0); 00033 result = min(result, 1.0); 00034 00035 return result; 00036 } |
|
Implements FastShower::IFnOfParticleParameters. Definition at line 38 of file HadEarlyEcalCoreFracBar.cxx.
00038 { 00039 return new HadEarlyEcalCoreFracBar(*this); 00040 } |