00001 #include "FastShowerUtils/Samplers/TailFracSNEmEcalEc1.h"
00002 #include "FastShowerUtils/PolyArgs.h"
00003
00004 #include <cmath>
00005 namespace FastShower{
00006
00007 double TailFracSNEmEcalEc1::value(const PolyArgs& pa) const {
00008
00009 double energy = pa.pp()->energy();
00010 double cell0 = pa.cs()->cell0();
00011
00012 double limit;
00013 if (energy<15.0) {limit = 0.45;}
00014 else if (energy<25.0) {limit = 0.40;}
00015 else {limit = 0.0;}
00016
00017 if (energy<10.0) {
00018 return (cell0<limit)? 0.60 : 0.20;
00019 }
00020 else if (energy<30.0) {
00021 return ((cell0<limit)||(energy<15.0))? 0.55 + 0.005*energy : 0.20;
00022 }
00023 else {
00024 return 0.0;
00025 }
00026 }
00027
00028 IFn* TailFracSNEmEcalEc1::clone() const {
00029 return new TailFracSNEmEcalEc1();
00030 }
00031 }
00032
00033