Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tank PMT Waveform Simulation #321

Closed

Conversation

atcsutton
Copy link
Contributor

@atcsutton atcsutton commented Dec 3, 2024

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

  • [✔︎] This PR implements a single change (one new/modified Tool, or a set of changes to implement one new/modified feature)
  • [✔︎] This PR alters the minimum number of files to affect this change
  • [✔︎] If this PR includes a new Tool, a README and minimal demonstration ToolChain is provided
  • [✔︎] If a new Tool/ToolChain requires model or configuration files, their paths are not hard-coded, and means of generating those files is described in the readme, with examples provided on /pnfs/annie/persistent
  • [✔︎] For every new usage, there is a reason the data must be on the heap
  • [✔︎] For every new there is a delete, 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

@atcsutton
Copy link
Contributor Author

I'm working on some mods that will incorporate BackTracker in a nice way. Seems like this will entail removing the MCWaveform class and instead expanding the ADCPulse class to have the pulse stop time.

@atcsutton atcsutton closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant