LDMX Software
|
Public Member Functions | |
NoiseGenerator (double noiseValue=0.0001, bool gauss=true) | |
Constructor. | |
~NoiseGenerator () | |
Destructor. | |
void | seedGenerator (uint64_t seed) |
Seed the generator. | |
bool | hasSeed () const |
Has been seeded? | |
std::vector< double > | generateNoiseHits (int emptyChannels) |
Generate noise hits. | |
void | setNoiseThreshold (double noiseThreshold) |
Set the noise threshold. | |
void | setNoise (double noise) |
Set the mean noise. | |
void | setPedestal (double pedestal) |
Set the pedestal. | |
Private Attributes | |
std::unique_ptr< TRandom3 > | random_ {nullptr} |
Random number generator. | |
double | noiseThreshold_ {4} |
The noise threshold. | |
double | noise_ {1} |
Mean noise. | |
double | pedestal_ {0} |
Pedestal or baseline. | |
bool | useGaussianModel_ {true} |
Gaussian flag. | |
std::unique_ptr< boost::math::poisson_distribution<> > | poisson_dist_ |
pdf for poisson errors | |
Definition at line 31 of file NoiseGenerator.h.
ldmx::NoiseGenerator::NoiseGenerator | ( | double | noiseValue = 0.0001 , |
bool | gauss = true |
||
) |
Constructor.
Definition at line 13 of file NoiseGenerator.cxx.
References noise_, poisson_dist_, and useGaussianModel_.
ldmx::NoiseGenerator::~NoiseGenerator | ( | ) |
std::vector< double > ldmx::NoiseGenerator::generateNoiseHits | ( | int | emptyChannels | ) |
Generate noise hits.
emptyChannels | The total number of channels without a hit on them. |
Definition at line 26 of file NoiseGenerator.cxx.
References noise_, noiseThreshold_, pedestal_, poisson_dist_, random_, and useGaussianModel_.
|
inline |
void ldmx::NoiseGenerator::seedGenerator | ( | uint64_t | seed | ) |
|
inline |
Set the mean noise.
Definition at line 60 of file NoiseGenerator.h.
References noise_.
|
inline |
Set the noise threshold.
Definition at line 55 of file NoiseGenerator.h.
References noiseThreshold_.
|
inline |
Set the pedestal.
Definition at line 63 of file NoiseGenerator.h.
References pedestal_.
|
private |
Mean noise.
Definition at line 73 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), NoiseGenerator(), and setNoise().
|
private |
The noise threshold.
Definition at line 70 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), and setNoiseThreshold().
|
private |
Pedestal or baseline.
Definition at line 76 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), and setPedestal().
|
private |
pdf for poisson errors
Definition at line 82 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), and NoiseGenerator().
|
private |
Random number generator.
Definition at line 67 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), hasSeed(), and seedGenerator().
|
private |
Gaussian flag.
Definition at line 79 of file NoiseGenerator.h.
Referenced by generateNoiseHits(), and NoiseGenerator().