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