CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GaussianTailNoiseGenerator.h
Go to the documentation of this file.
1 
14 #ifndef GaussianTailNoiseGenerator_h
15 #define GaussianTailNoiseGenerator_h
16 
17 #include <vector>
18 #include <map>
19 
20 namespace CLHEP {
21  class HepRandomEngine;
22 }
23 
24 #include "CLHEP/Random/RandPoissonQ.h"
25 #include "CLHEP/Random/RandGaussQ.h"
26 #include "CLHEP/Random/RandFlat.h"
27 
28 
30 
31 public:
32 
33  GaussianTailNoiseGenerator( CLHEP::HepRandomEngine& eng);
34 
35  // Compiler-generated destructor, copy c'tor, and assignment are all
36  // correct.
37 
38  void generate(int NumberOfchannels,
39  float threshold,
40  float noiseRMS,
41  std::map<int,float>& theMap );
42 
43  void generate(int NumberOfchannels,
44  float threshold,
45  float noiseRMS,
46  std::vector<std::pair<int,float> >&);
47 /*
48  void generateRaw(int NumberOfchannels,
49  float noiseRMS,
50  std::vector<std::pair<int,float> >&);
51 */
52  void generateRaw(float noiseRMS,
53  std::vector<double>&);
54 
55 protected:
56 
57  int* getRandomChannels(int, int);
58 
59  double generate_gaussian_tail(const double,const double);
60 
61 private:
62 
63  CLHEP::RandGaussQ gaussDistribution_;
64  CLHEP::RandPoissonQ poissonDistribution_;
65  CLHEP::RandFlat flatDistribution_;
66  int channel512_[512];
67  int channel768_[768];
68 };
69 
70 #endif
float threshold
Definition: crabWrap.py:319
void generateRaw(float noiseRMS, std::vector< double > &)
double generate_gaussian_tail(const double, const double)
void generate(int NumberOfchannels, float threshold, float noiseRMS, std::map< int, float > &theMap)
GaussianTailNoiseGenerator(CLHEP::HepRandomEngine &eng)