Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Implementation of waveform simulation for tank PMTs. 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 hard-coded at the moment. Finally, any ADC counts above 4095 are clipped to mimic saturation.
In addition to the PMT waveform simulation, I did find a bug in PhaseIIADCCalibrator. The bug means that the baseline variance is incorrectly calculated. I should split that out into a separate PR, but I'm also making changes to PhaseIIADCHitFinder to incorporate MC waveforms, so it kinda makes sense to include the bugfix here (if you squint your brain).
8 of the 17 modified files are for the example config.
2 are the Unity and Factory updates.
3 are the tool itself (cpp, h, and readme).
1 is an update to the Waveform.h DataModel which creates a new MCWaveform class that inherits from base Waveforms.
2 are changes needed in PhaseIIADCHitFinder to incorporate MCWaveforms.
And the final change is addressing the PhaseIIADCCalibrator bug mentioned above.
Checklist before submitting your PR
new
usage, there is a reason the data must be on the heapnew
there is adelete
, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)Additional Material
See https://annie-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=5821 for some details