7 #include "CLHEP/Random/RandGauss.h" 12 : numPixels(ns), noiseRMS(nrms),
threshold(th), addNoisyPixels(aNpixel), verbosi(verbosity) {}
18 std::map<int, float, std::less<int>> generatedNoise;
29 for (PileUpFP420::signal_map_type::const_iterator si = in.begin(); si != in.end(); si++) {
31 std::cout <<
" ***GaussNoiseFP420: before noise:" << std::endl;
32 std::cout <<
" for si->first= " << si->first <<
" _signal[si->first]= " << _signal[si->first]
33 <<
" si->second= " << si->second << std::endl;
39 _signal[si->first] = si->second +
noise;
42 std::cout <<
" ***GaussNoiseFP420: after noise added = " << noise << std::endl;
43 std::cout <<
"after noise added the _signal[si->first]= " << _signal[si->first] << std::endl;
50 typedef std::map<int, float, std::less<int>>::iterator MI;
51 for (MI
p = generatedNoise.begin();
p != generatedNoise.end();
p++) {
52 if (_signal[(*p).first] == 0) {
53 _signal[(*p).first] += (*p).second;
def gen(fragment, howMuch)
Production test section ####.
std::map< int, Amplitude, std::less< int > > signal_map_type
GaussNoiseFP420(int ns, float nrms, float th, bool aNpixel, int verbosity)
PileUpFP420::signal_map_type addNoise(const PileUpFP420::signal_map_type &) override
void generate(int NumberOfchannels, float threshold, float noiseRMS, std::map< int, float, std::less< int >> &theMap)