-
Notifications
You must be signed in to change notification settings - Fork 30
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
Enable calorimeter hit merging by functions #1668
Conversation
for more information, see https://pre-commit.ci
…con into add-merge-matrix-to-hit-merger
for more information, see https://pre-commit.ci
…con into add-merge-matrix-to-hit-merger
I think this is ready to go. I'll post some plots here showing the test case in the BHCal at work shortly... |
Capybara summary for PR 1668
|
Did this break HcalEndcapPInsertMergedHits? |
Uh oh, looks like it 😩 |
Looks like it was a typo (second field should've been "slices" not "layers") 😵 |
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
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.
Diff LGTM
Briefly, what does this PR introduce?
This PR extends the functionality of the
CalorimeterHitsMerger
algorithm. Previously, reconstructed hits could only be merged across a given field of the readout of a calorimeter. This presents a challenge for calorimeters such as the Barrel HCal whereThis PR addresses this point by utilizing the
EvaluatorSvc
in a manner similar to theadjacencyMatrix
,peakNeighbourhoodMatrix
of theCalorimeterIslandClustering
and thesampFrac
ofCalorimeterHitReco
. Now the user has the ability to specify an (almost) arbitrarily complex transformation for a specific field of the readout via thefieldTransformations
parameter, which defines both the field to transform and the function to map the indices of that field onto the desired reference indices.For example:
Here, the
HcalBarrelMergedHits
collection will merge 5 hits (i.e. scintillator tiles for the BHCal) adjacent in phi into a one with the position and cellID of the 1st of the 5, and no hits will be merged along eta.The previous behavior of the algorithm can be recovered by simply specifying the index to be mapped onto. For example:
An example script of to change a transformation (and how to update the adjacency matrix accordingly) from the command-line is provided in the snippets repo here.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.