CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/SimGeneral/NoiseGenerators/interface/GaussianTailNoiseGenerator.h

Go to the documentation of this file.
00001 
00014 #ifndef GaussianTailNoiseGenerator_h
00015 #define GaussianTailNoiseGenerator_h
00016 
00017 #include <vector>
00018 #include <map>
00019 
00020 namespace CLHEP {
00021   class HepRandomEngine;
00022 }
00023 
00024 #include "CLHEP/Random/RandPoissonQ.h"
00025 #include "CLHEP/Random/RandGaussQ.h"
00026 #include "CLHEP/Random/RandFlat.h"
00027 
00028 
00029 class GaussianTailNoiseGenerator {
00030 
00031 public:
00032 
00033   GaussianTailNoiseGenerator( CLHEP::HepRandomEngine& eng);
00034 
00035   // Compiler-generated destructor, copy c'tor, and assignment are all
00036   // correct.
00037 
00038   void generate(int NumberOfchannels, 
00039                 float threshold,
00040                 float noiseRMS, 
00041                 std::map<int,float>& theMap );
00042 
00043   void generate(int NumberOfchannels, 
00044                 float threshold,
00045                 float noiseRMS, 
00046                 std::vector<std::pair<int,float> >&);
00047 /*
00048   void generateRaw(int NumberOfchannels, 
00049                    float noiseRMS, 
00050                    std::vector<std::pair<int,float> >&);
00051 */
00052   void generateRaw(float noiseRMS,
00053                    std::vector<double>&);
00054 
00055 protected:
00056 
00057   int* getRandomChannels(int, int);
00058 
00059   double generate_gaussian_tail(const double,const double);
00060 
00061 private:
00062 
00063   CLHEP::RandGaussQ        gaussDistribution_;
00064   CLHEP::RandPoissonQ      poissonDistribution_;
00065   CLHEP::RandFlat          flatDistribution_;
00066   int channel512_[512];
00067   int channel768_[768];
00068 };
00069 
00070 #endif