Add SBND SCE point-cloud correction support#472
Open
abhatfnal wants to merge 3 commits into
Open
Conversation
Adds SCECorrection and T0SCECorrection to the clustering point-cloud transform path. T0SCECorrection applies the existing T0 correction followed by the SBND SCE backward displacement map. Extends corrected-point scope handling so configurations can select T0Correction, SCECorrection, or T0SCECorrection and write the corresponding corrected coordinate arrays. The SBND SCE maps are defined in cm while WCT point-cloud coordinates are in mm, so coordinates are converted to cm before interpolation and returned displacements are converted back to mm.
Avoids throwing when the auxiliary point cloud is empty, allowing downstream point-cloud writing paths to continue when no auxiliary fields are present.
In SBND, points in the +X drift TPC (apa1) arrive at PCTransforms::cal_offset in a local frame where pin[0] is offset from the global X coordinate. The SCE map is in global X, so the previous code (which simply did pin[0]/10) was looking up the wrong region of the map (xx > 200 cm, outside the bin-center grid). All apa1 points received zero SCE shifts. Two fixes in cal_offset: 1. Detect local-frame points by comparing pin[0] against the apa's inner_bounds() X range. If outside, reflect pin[0] around the anode to recover the global X before SCE map lookup. 2. After lookup, if the input was reflected, negate the returned dx so that the caller's 'pos_out[0] = pin[0] + dx' applies the correction in the original (local) frame direction. apa0 (East TPC) behavior is unchanged. apa1 (West TPC) now produces SCE shifts of correct magnitude and direction, consistent with Lane Kashur's data-driven SCE calibration showing W/E asymmetry of ~1.5x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds SBND Space Charge Effect correction support to the WireCell clustering point-cloud transform path.
Main changes:
SCECorrectionandT0SCECorrection.T0Correction,SCECorrection, orT0SCECorrection.x_t0scecor,y_t0scecor, andz_t0scecor.Validation