20 #ifndef SBNDuBooNEDataDrivenNoiseService_H
21 #define SBNDuBooNEDataDrivenNoiseService_H
25 #include "art_root_io/TFileService.h"
26 #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
30 #include "nurandom/RandomUtils/NuRandomService.h"
32 #include "CLHEP/Random/JamesRandom.h"
33 #include "CLHEP/Random/RandFlat.h"
34 #include "CLHEP/Random/RandGaussQ.h"
47 class HepRandomEngine;
69 std::ostream&
print(std::ostream& out =
std::cout, std::string prefix =
"")
const override;
83 std::vector<float> gausMean, std::vector<float> gausSigma,
84 TH1* aNoiseHist)
const;
87 std::vector<float> gausMean, std::vector<float> gausSigma,
88 float cohExpNorm,
float cohExpWidth,
float cohExpOffset,
89 TH1* aNoiseHist)
const;
float fCohExpOffset
Amplitude offset of the exponential background component in coherent noise.
double GetRandomTF1(TF1 *func) const
AdcSignalVectorVector fCohNoiseZ
noise on each channel for each time for all planes
TH1 * fGausNoiseHistU
distribution of noise counts for U
bool fEnableGaussianNoise
void generateCoherentNoise(detinfo::DetectorClocksData const &clockData, AdcSignalVector &noise, std::vector< float > gausNorm, std::vector< float > gausMean, std::vector< float > gausSigma, float cohExpNorm, float cohExpWidth, float cohExpOffset, TH1 *aNoiseHist) const
int fLogLevel
Log message level: 0=quiet, 1=init only, 2+=every event.
std::vector< float > fGausMeanU
mean of the gaussian component in coherent noise
int addNoise(detinfo::DetectorClocksData const &clockData, Channel chan, AdcSignalVector &sigs) const override
float fWhiteNoiseV
Level (per freq bin) for white noise for V.
TH1 * fMicroBooNoiseHistV
distribution of noise counts for V
void generateGaussianNoise(detinfo::DetectorClocksData const &clockData, AdcSignalVector &noise, std::vector< float > gausNorm, std::vector< float > gausMean, std::vector< float > gausSigma, TH1 *aNoiseHist) const
TH1 * fMicroBooNoiseChanHist
distribution of accessed noise samples
AdcSignalVectorVector fCohNoiseU
noise on each channel for each time for all planes
void makeCoherentGroupsByOfflineChannel(unsigned int nchpergroup)
std::vector< float > fGausMeanV
mean of the gaussian component in coherent noise
SBNDuBooNEDataDrivenNoiseService(fhicl::ParameterSet const &pset)
TH1 * fCohNoiseChanHist
distribution of accessed noise samples
std::vector< float > fGausNormV
noise scale factor for the gaussian component in coherent noise
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const override
unsigned int getGroupNumberFromOfflineChannel(unsigned int offlinechan) const
float fJumperCapacitance
Capacitance of jumper cables in pF. Defaults to 0 if not included.
std::vector< int > fGroupCoherentNoiseMap
assign each group a noise
AdcSignalVectorVector fCohNoiseV
noise on each channel for each time for all planes
std::vector< unsigned int > fChannelGroupMap
assign each channel a group number
int fRandomSeed
Seed for random number service. If absent or zero, use SeedSvc.
std::vector< float > fCohGausSigma
sigma of the gaussian component in coherent noise
AdcSignalVectorVector fMicroBooNoiseV
float fENOB
Effective number of bits.
std::vector< float > fNoiseFunctionParameters
Parameters in the MicroBooNE noise model.
bool fEnableMicroBooNoise
enable MicroBooNE noise model
float fCohExpNorm
noise scale factor for the exponential component component in coherent noise
unsigned int fExpNoiseArrayPoints
number of points in randomly generated noise array
float fWhiteNoiseZ
Level (per freq bin) for white noise for Z.
std::vector< float > fGausSigmaV
sigma of the gaussian component in coherent noise
bool fEnableCoherentNoise
void generateNoise(detinfo::DetectorClocksData const &clockData) override
std::vector< AdcSignalVector > AdcSignalVectorVector
~SBNDuBooNEDataDrivenNoiseService()
float fWhiteNoiseU
Level (per freq bin) for white noise for U.
std::vector< float > fGausMeanZ
mean of the gaussian component in coherent noise
AdcSignalVectorVector fGausNoiseV
TH1 * fMicroBooNoiseHistU
distribution of noise counts for U
float fULastJumper
Wire number of last wire on U layer to include a jumper cable. Defaults to 0 if not included...
float fVFirstJumper
Wire number of first wire on V layer to include a jumper cable. Defaults to 0 if not included...
std::vector< float > fGausSigmaU
sigma of the gaussian component in coherent noise
std::vector< AdcSignal > AdcSignalVector
std::vector< float > fGausSigmaZ
sigma of the gaussian component in coherent noise
std::vector< float > fCohGausMean
mean of the gaussian component in coherent noise
AdcSignalVectorVector fGausNoiseU
void generateMicroBooNoise(float wirelength, float ENOB, AdcSignalVector &noise, TH1 *aNoiseHist) const
Contains all timing reference information for the detector.
AdcSignalVectorVector fMicroBooNoiseU
TH1 * fCohNoiseHist
distribution of noise counts
std::vector< float > fGausNormZ
noise scale factor for the gaussian component in coherent noise
unsigned int fCohNoiseArrayPoints
number of points in randomly generated noise array
float fVLastJumper
Wire number of last wire on V layer to include a jumper cable. Defaults to 0 if not included...
CLHEP::HepRandomEngine * m_pran
TH1 * fMicroBooNoiseHistZ
distribution of noise counts for Z
CLHEP::HepRandomEngine * ConstructRandomEngine(const bool haveSeed)
TH1 * fGausNoiseHistV
distribution of noise counts for V
TH1 * fGausNoiseHistZ
distribution of noise counts for Z
unsigned int fNoiseArrayPoints
number of points in randomly generated noise array
float fUFirstJumper
Wire number of first wire on U layer to include a jumper cable. Defaults to 0 if not included...
float fCohExpWidth
width of the exponential component in coherent noise
std::vector< unsigned int > fNChannelsPerCoherentGroup
bool fIncludeJumpers
Include jumper term.
std::vector< float > fCohGausNorm
noise scale factor for the gaussian component in coherent noise
AdcSignalVectorVector fMicroBooNoiseZ
unsigned int getCohNoiseChanFromGroup(unsigned int cohgroup) const
TH1 * fGausNoiseChanHist
distribution of accessed noise samples
art framework interface to geometry description
BEGIN_PROLOG could also be cout
AdcSignalVectorVector fGausNoiseZ
std::vector< float > fGausNormU
noise scale factor for the gaussian component in coherent noise