-
Notifications
You must be signed in to change notification settings - Fork 35
Per Plane Hit Tuning Parameters for GaussHitFinderSBN #626
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -79,11 +79,11 @@ namespace hit { | |||||||||
| const std::vector<int> fLongMaxHitsVec; ///<Maximum number hits on a really long pulse train | ||||||||||
| const std::vector<int> fLongPulseWidthVec; ///<Sets width of hits used to describe long pulses | ||||||||||
|
|
||||||||||
| const size_t fMaxMultiHit; ///<maximum hits for multi fit | ||||||||||
| const std::vector<size_t> fMaxMultiHit; ///<maximum hits for multi fit | ||||||||||
| const int fAreaMethod; ///<Type of area calculation | ||||||||||
| const std::vector<double> | ||||||||||
| fAreaNormsVec; ///<factors for converting area to same units as peak height | ||||||||||
| const double fChi2NDF; ///maximum Chisquared / NDF allowed for a hit to be saved | ||||||||||
| const std::vector<double> fChi2NDF; ///maximum Chisquared / NDF allowed for a hit to be saved | ||||||||||
|
||||||||||
| const std::vector<double> fChi2NDF; ///maximum Chisquared / NDF allowed for a hit to be saved | |
| const std::vector<double> fChi2NDF; ///<maximum Chisquared / NDF allowed for a hit to be saved |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MaxMultiHitPerPlane parameter is not validated to ensure its size matches the number of planes in the geometry. Other similar parameters like AreaNorms use FillOutHitParameterVector to validate size and handle cases where the input vector has 1 element or N_PLANES elements. Without this validation, if a user provides a vector with an incorrect size, the code could fail at runtime with an out-of-bounds error when accessing fMaxMultiHit.at(plane). Consider using FillOutHitParameterVector or adding similar validation to ensure the vector size matches the geometry.
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Chi2NDFPerPlane parameter is not validated to ensure its size matches the number of planes in the geometry. Other similar parameters like AreaNorms use FillOutHitParameterVector to validate size and handle cases where the input vector has 1 element or N_PLANES elements. Without this validation, if a user provides a vector with an incorrect size, the code could fail at runtime with an out-of-bounds error when accessing fChi2NDF.at(plane). Consider using FillOutHitParameterVector or adding similar validation to ensure the vector size matches the geometry.
| , fChi2NDF(pset.get<std::vector<double>>("Chi2NDFPerPlane", std::vector<double>() = {500.0, 500.0, 500.0})) | |
| , fChi2NDF(FillOutHitParameterVector( | |
| pset.get<std::vector<double>>("Chi2NDFPerPlane", | |
| std::vector<double>() = {500.0, 500.0, 500.0}))) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,17 +11,19 @@ gauss_hitfinder: | |||||
| { | ||||||
| module_type: "GaussHitFinderSBN" | ||||||
| CalDataModuleLabel: "caldata" | ||||||
| MaxMultiHit: 5 # maximum hits for multi gaussia fit attempt | ||||||
| AreaMethod: 0 # 0 = area by integral, 1 = area by gaussian area formula | ||||||
| AreaNorms: [ 1.0, 1.0, 1.0 ] # normalizations that put signal area in | ||||||
| # same scale as peak height. | ||||||
| TryNplus1Fits: false # Don't try to refit with extra peak if bad chisq | ||||||
| LongMaxHits: [ 25, 25, 25] # max number hits in long pulse trains | ||||||
| LongPulseWidth: [ 10, 10, 10] # max widths for hits in long pulse trains | ||||||
| Chi2NDF: 500. # maximum Chisquared / NDF allowed to store fit, if fail | ||||||
| # will use "long" pulse method to return hit | ||||||
| AllHitsInstanceName: "" # If non-null then this will be the instance name of all hits output to event | ||||||
| # in this case there will be two hit collections, one filtered and one containing all hits | ||||||
| MaxMultiHit: 5 # maximum hits for multi gaussian fit attempt | ||||||
|
||||||
| MaxMultiHit: 5 # maximum hits for multi gaussian fit attempt |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error in comment: "gaussia" should be "gaussian".
| MaxMultiHitPerPlane: [ 10, 10, 8 ] # maximum hits per plane for multi gaussia fit attempt | |
| MaxMultiHitPerPlane: [ 10, 10, 8 ] # maximum hits per plane for multi gaussian fit attempt |
Copilot
AI
Feb 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old scalar parameter Chi2NDF is still present in the configuration file but is no longer read by the code. The code now only reads Chi2NDFPerPlane. This parameter should be removed to avoid confusion and maintain consistency, as it no longer has any effect on the module's behavior.
| Chi2NDF: 500. # maximum Chisquared / NDF allowed to store fit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CMakeLists.txt changes add sbnanaobj StandardRecord dependencies, but these don't appear to be used by RecoUtils.cc or RecoUtils.h. Neither file includes or references StandardRecord or StandardRecordFlat. This change appears unrelated to the hit finder tuning described in the PR description. If these dependencies are needed for other purposes, that should be explained. If not, they should be removed as they add unnecessary dependencies and build-time coupling.