#include <HadLateHcalCoreFracEc.h>
Inheritance diagram for FastShower::HadLateHcalCoreFracEc:
Private Methods | |
virtual double | value (const ParticleParameters &) const |
virtual IFnOfParticleParameters * | clone () const |
UML: IDistributionClass.unm
Definition at line 25 of file HadLateHcalCoreFracEc.h.
|
Implements FastShower::IFnOfParticleParameters. Definition at line 13 of file HadLateHcalCoreFracEc.cxx. References FastShower::ParticleParameters::energy().
00013 { 00014 00015 double energy = pp.energy(); 00016 00017 double p1 = 469.7*std::exp(-0.9373*energy) + 0.8919; 00018 double p2 = 0.1815*std::exp(-0.1159*energy) + 0.03937; 00019 double p3 = 3.256*std::exp(-0.1970*energy) + 1.085; 00020 double p4 = -0.00003843*std::exp(0.1076*energy) + 0.003032; 00021 00022 double rndm = RandFlat::shoot(); 00023 00024 double denominator = ( (rndm - p4) > FLT_EPSILON )? (rndm - p4) : FLT_EPSILON; 00025 double result = p1 - p2*std::log(p3/denominator - 1.0); 00026 00027 result = max(result, 0.01*energy); 00028 00029 return min(result, 1.0); 00030 } |
|
Implements FastShower::IFnOfParticleParameters. Definition at line 32 of file HadLateHcalCoreFracEc.cxx.
00032 { 00033 return new HadLateHcalCoreFracEc(*this); 00034 } |