From f6a4350d9e37ec4ac70cd3d825de32a1f889d8ba Mon Sep 17 00:00:00 2001 From: Andrew Sutton Date: Tue, 3 Dec 2024 13:22:06 -0500 Subject: [PATCH] Adding an informative README --- UserTools/PMTWaveformSim/README.md | 40 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/UserTools/PMTWaveformSim/README.md b/UserTools/PMTWaveformSim/README.md index 4142083da..ba457de91 100644 --- a/UserTools/PMTWaveformSim/README.md +++ b/UserTools/PMTWaveformSim/README.md @@ -1,20 +1,22 @@ -# PMTWaveformSim - -PMTWaveformSim - -## Data - -Describe any data formats PMTWaveformSim creates, destroys, changes, or analyzes. E.G. - -**RawLAPPDData** `map>>` -* Takes this data from the `ANNIEEvent` store and finds the number of peaks +# PMTWaveformSim - -## Configuration - -Describe any configuration variables for PMTWaveformSim. - -``` -param1 value1 -param2 value2 -``` +PMTWaveformSim generates PMT waveforms based on the simulated PMT hits. For each MCHit a lognorm waveform is sampled based on fit parameters extracted from SPE waveforms in data. The fit parameters are randomly sampled in a way that conserved the covariance between parameters and captures the random behavior of a PMT's response. A full extended readout window (70 us) is sampled and waveforms from overlapping hits are added. A random baseline between 300 and 350 ADC is added. Random noise is applied, where the noise sigma is sampled from a gaussian with mean 1 and std dev of 0.25. The baseline and noise envelope values are hardcoded at the moment. Finally, any ADC counts above 4095 are clipped to mimick saturation. + +## Data + +**RawADCDataMC** `std::map> >` +* The raw simulated waveforms. The key is PMT channel number, then inner vector should always have size == 1 + +**CalibratedADCData** `std::map> >` +* The "calibrated" simulated waveforms. The baseline and sigma are the true, randomly-generated values. The key is PMT channel number, then inner vector should always have size == 1 + + +## Configuration + +``` +PMTParameterFile configfiles/PMTWaveformSim/PMTWaveformLognormFit.csv # file containing the fit parameters and triangular Cholesky decomposed covariance matrix +Prewindow 10 # number of clock ticks before the MC hit time to begin sampling the fit function +ReadoutWindow 35 # number of clock ticks around the MC hit time over which waveforms are sampled +T0Offset 0 # A timing offset (in clock ticks) that can be used to align the pulse start time +MakeDebugFile 0 # Produce a root file containing all the simulated waveforms +```