4 #include "CLHEP/Random/RandGauss.h" 5 #include "CLHEP/Random/RandFlat.h" 6 #include "CLHEP/Random/RandBinomial.h" 13 int numStrips,
double theNoiseInElectrons,
double theStripThresholdInE, CLHEP::HepRandomEngine &eng,
int verbosity)
14 : numStrips_(numStrips),
15 theNoiseInElectrons(theNoiseInElectrons),
16 theStripThresholdInE(theStripThresholdInE),
26 for (simromanpot::strip_charge_map::const_iterator
i = theSignal.begin();
i != theSignal.end(); ++
i) {
28 the_strip_charge_map[
i->first] =
i->second +
noise;
30 edm::LogInfo(
"RPDigiProducer") <<
"noise added to signal strips: " <<
noise <<
"\n";
34 int strips_no_above_threshold =
37 for (
int j = 0;
j < strips_no_above_threshold;
j++) {
39 if (the_strip_charge_map[
strip] == 0) {
44 edm::LogInfo(
"RPDigiProducer") <<
"nonsignal strips noise :" <<
strip <<
" " << the_strip_charge_map[
strip]
49 return the_strip_charge_map;
double theStripThresholdInE
simromanpot::strip_charge_map addNoise(const simromanpot::strip_charge_map &theSignal)
RPGaussianTailNoiseAdder(int numStrips, double theNoiseInElectrons, double theStripThresholdInE, CLHEP::HepRandomEngine &eng, int verbosity)
double theNoiseInElectrons
double strips_above_threshold_prob_
Log< level::Info, false > LogInfo
std::map< unsigned short, double > strip_charge_map
CLHEP::HepRandomEngine & rndEngine_