00001 #include "FastShowerUtils/Normalisers/HadEcalHcalSharesEc.h" 00002 00003 #include "FastShowerUtils/ParticleParameters.h" 00004 //#include "FastShowerUtils/IDoubleShowererSelectorConfig.h" 00005 #include "FastShowerUtils/ITripleShowererSelectorConfig.h" 00006 00007 #include <cmath> 00008 #include <iostream> 00009 namespace FastShower{ 00010 //HadEcalHcalSharesEc::HadEcalHcalSharesEc(const IDoubleShowererSelectorConfig* c, 00011 // const std::string& s): 00012 HadEcalHcalSharesEc::HadEcalHcalSharesEc(const ITripleShowererSelectorConfig* c, 00013 const std::string& s): 00014 IFnOfParticleParameters2(),HadEcalHcalSharesBase(c,s){} 00015 // 00016 double 00017 HadEcalHcalSharesEc::mean(double energy) const{ 00018 double a[2]={1.0, 0.820}; 00019 double b[2]={-21.04, 0.420}; 00020 double c[2]={-10.24, 0.048}; 00021 00022 return (energy > 1.0)? a[0]+b[0]/std::pow((energy-c[0]),2) : 00023 a[1]*(1.-(1./(1.+std::exp((energy-b[1])/c[1])))) ; 00024 } 00025 // 00026 double 00027 HadEcalHcalSharesEc::sigma(double energy) const{ 00028 double alpha=0.49; 00029 double beta=0.08; 00030 00031 return std::sqrt( std::pow(alpha,2)/energy + std::pow(beta,2) ); 00032 } 00033 // 00034 IFnOfParticleParameters2* HadEcalHcalSharesEc::clone() const { 00035 return new HadEcalHcalSharesEc(*this); 00036 } 00037 }//namespace 00038 00039