9 #include "CLHEP/Random/RandGauss.h" 12 numPixels(ns), noiseRMS(nrms),
threshold(th), addNoisyPixels(aNpixel), verbosi(verbosity){}
21 std::map<int,float,std::less<int> > generatedNoise;
32 for (PileUpFP420::signal_map_type::const_iterator si = in.begin();
33 si != in.end() ; si++){
36 std::cout <<
" ***GaussNoiseFP420: before noise:" << std::endl;
37 std::cout <<
" for si->first= " << si->first <<
" _signal[si->first]= " << _signal[si->first] <<
" si->second= " << si->second << std::endl;
40 float noise( CLHEP::RandGauss::shoot(0.,
noiseRMS) );
43 _signal[si->first] = si->second + noise;
46 std::cout <<
" ***GaussNoiseFP420: after noise added = " << noise << std::endl;
47 std::cout <<
"after noise added the _signal[si->first]= " << _signal[si->first] << std::endl;
54 typedef std::map<int,float,std::less<int> >::iterator MI;
55 for(MI
p = generatedNoise.begin();
p != generatedNoise.end();
p++){
56 if(_signal[(*p).first] == 0) {
57 _signal[(*p).first] += (*p).second;
def gen(fragment, howMuch)
Production test section ####.
GaussNoiseFP420(int ns, float nrms, float th, bool aNpixel, int verbosity)
void generate(int NumberOfchannels, float threshold, float noiseRMS, std::map< int, float, std::less< int > > &theMap)
std::map< int, Amplitude, std::less< int > > signal_map_type
PileUpFP420::signal_map_type addNoise(const PileUpFP420::signal_map_type &) override