00001 #include "FastShowerUtils/Samplers/PeakMeanC0EmEcalEc1.h"
00002 #include "FastShowerUtils/PolyArgs.h"
00003 #include <cmath>
00004 namespace FastShower{
00005
00006 double PeakMeanC0EmEcalEc1::value(const PolyArgs& pa) const {
00007
00008 double aDelPhi = fabs(pa.pp()->delPhi());
00009
00010 double p1 = 0.0488925;
00011 double p2 = 0.006049;
00012 double p3 = 0.974575;
00013 double p4 = 0.0325;
00014 double mean = (aDelPhi<p1) ?
00015 p3/(1. + std::exp((aDelPhi-p1)/p2)) :
00016 p3/(1. + std::exp((aDelPhi-p1)/p2)) + p4;
00017 return mean;
00018 }
00019
00020 IFn* PeakMeanC0EmEcalEc1::clone() const {return new PeakMeanC0EmEcalEc1();}
00021 }
00022
00023