Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:25

0001 #ifndef FastSimulation_Utilities_GaussianTail_H
0002 #define FastSimulation_Utilities_GaussianTail_H
0003 
0004 // Florian Beaudette (LLR).
0005 // 11/09/06
0006 // Gaussian tail generator. Copied from the GNU Scientific library
0007 
0008 class RandomEngineAndDistribution;
0009 
0010 class GaussianTail {
0011 public:
0012   GaussianTail(double sigma = 1., double threshold = 2.);
0013   ~GaussianTail();
0014   inline void setParameters(double sigma, double threshold) {
0015     sigma_ = sigma;
0016     threshold_ = threshold;
0017     s_ = threshold_ / sigma_;
0018     ssquare_ = s_ * s_;
0019   };
0020   double shoot(RandomEngineAndDistribution const*) const;
0021 
0022 private:
0023   double sigma_;
0024   double threshold_;
0025   double s_;
0026   double ssquare_;
0027 };
0028 
0029 #endif