Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SmearHardPhoton.cxx

Go to the documentation of this file.
00001 #include "FastShowerUtils/Normalisers/SmearHardPhoton.h"
00002 
00003 #include "FastShowerUtils/ParticleParameters.h"
00004 
00005 #include "FastShowerUtils/ProcessedNormal.h"
00006 #include "CLHEP/Random/RandFlat.h"
00007 
00008 #include <float.h>
00009 #include <cmath>
00010 
00011 namespace FastShower{
00012 
00013   double SmearHardPhoton::value(const ParticleParameters& pp) const{
00014   
00015     double energy = pp.rawEnergy();
00016     double aEta = fabs(pp.eta());
00017 
00018     energy = max((float)energy,FLT_EPSILON);
00019 
00020     double pt = energy*std::sin(2*std::atan(std::exp(aEta)));
00021     double sigmaSquared = 0.01/energy;
00022     if (aEta<1.4){
00023       sigmaSquared = sigmaSquared + 0.060025/pt/pt;
00024     }else{
00025       sigmaSquared = sigmaSquared 
00026                     +  std::pow((0.306*((2.4-aEta)+0.228)/energy),2);
00027     }
00028     sigmaSquared = sigmaSquared + 0.000049;
00029     
00030     double sigma;
00031     ProcessedNormal normal;
00032     do {sigma = normal.sample()*std::sqrt(sigmaSquared);}
00033      while (sigma<-1.0);
00034     
00035     return  1.0 + sigma;
00036   }
00037   //
00038   IFnOfParticleParameters* SmearHardPhoton::clone() const {
00039     return new SmearHardPhoton(*this);
00040   }
00041 }//namespace
00042 
00043 
00044 

Generated on Tue Mar 18 11:50:05 2003 for FastShowerUtils by doxygen1.3-rc1