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

Fitter interface #226

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Fitter interface #226

merged 3 commits into from
Jan 24, 2025

Conversation

JamesJieranShen
Copy link
Contributor

@JamesJieranShen JamesJieranShen commented Jan 16, 2025

Add a new class -- FitterInputHandler, which returns charge and timing information of the event to fitters. This removes the need for fitters to deal with multiple types of PMT information, from DigitPMT/PMT/Waveformanalyzers.

Example of how to use this is provided for the centroid fitter. Running the processor as-is uses DS::PMT information, as this is the default for most standard RAT experiments. To switch to Lognormal waveform analysis, use the following example snippet:

/rat/db/set FIT_COMMON mode 2 # 0 is DS::PMT, 1 is DigitPMT, 2 is waveformAna
/rat/db/set FIT_COMMON waveform_analyzer "Lognormal" # analyzer name

Should solve some structural issues with #220 #177

@tannerbk tannerbk self-assigned this Jan 16, 2025
@tannerbk
Copy link
Contributor

Looks like a nice idea, I will review soon.

@tannerbk tannerbk mentioned this pull request Jan 16, 2025
*
* @param id PMT ID.
*/
unsigned int GetNhits(Int_t id) {
Copy link
Contributor

@tannerbk tannerbk Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusingly named. "Nhits" refers to the number of PMT hits in an event, not the number of "hits" on a PMT. This could be more aptly named "GetNPEs".

Additionally, you could add a method for nhits that returns the length of the appropriate hit PMT list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both implemented -- the old GetNHits is now called GetNPEs. There's now a new GetNHits method.

@tannerbk
Copy link
Contributor

LGTM

@tannerbk tannerbk merged commit 820cb3c into rat-pac:main Jan 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants