CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/FastSimulation/Utilities/interface/GaussianTail.h

Go to the documentation of this file.
00001 #ifndef FastSimulation_Utilities_GaussianTail_H
00002 #define FastSimulation_Utilities_GaussianTail_H
00003 
00004 // Florian Beaudette (LLR).
00005 // 11/09/06 
00006 // Gaussian tail generator. Copied from the GNU Scientific library
00007 
00008 class RandomEngine;
00009 
00010 class GaussianTail
00011 {
00012  public:
00013   GaussianTail(const RandomEngine* engine, 
00014                double sigma=1., double threshold=2.);  
00015   ~GaussianTail();
00016   inline void setParameters(double sigma, double threshold) 
00017     {
00018       sigma_= sigma; 
00019       threshold_ = threshold;
00020       s_=threshold_/sigma_;
00021       ssquare_ = s_ * s_;
00022     };
00023   double shoot() const;
00024 
00025  private:
00026 
00027   const RandomEngine* random;
00028 
00029   double sigma_;
00030   double threshold_;
00031   double s_;
00032   double ssquare_;
00033 
00034 };
00035 
00036 #endif