Repository navigation
TC refitting - #1183
Closed
mgignac wants to merge 4 commits into
Closed
TC refitting #1183mgignac wants to merge 4 commits into
mgignac wants to merge 4 commits into
Conversation
UNCONSTRAINED and BS_CONSTRAINED vertices are refit after shifting the tracks to the first-pass vertex, because the Billior fit linearizes the trajectories about the reference point. TARGET_CONSTRAINED vertices were only fit once, linearized about (0,0,0). - HpsReconParticleDriver: add refitTargetConstrained (default false, so existing behaviour is unchanged) and include TARGET_CONSTRAINED in the refit branch of fitVertex() when it is set. - BilliorVertexer.makeRk: in target-constraint mode, add the reference position back to the vertex before comparing with the absolute target position. This is a no-op when the reference is the origin (the first pass), and is needed for the refit to pin to the right point. In 2021 prompt A' MC this removes the ~2% narrowing of the opening angle and the matching low mass bias of the target-constrained vertex.
Variant of PhysicsRun2021MCRecon_KF_WithSpacing_pass5_physics_HitSmear_HitKill_14272.lcsim: - beam position fixed at (x, y, z) = (0, 0, -1.1) mm (HPS frame) for KalmanPatRecDriver and ReconParticleDriver_Kalman, instead of being read from the conditions database, so it matches the MC beam; - refitTargetConstrained enabled.
…BeamSigmaZ beamSize[0] (tracking-frame X = detector Z) is the longitudinal width used as the target-constraint vertex covariance. Previously only sigmaX/sigmaY had setters and beamSize[0] stayed hard-wired to 1 um, over-constraining the target-constrained vertex Z and skewing post-fit track momenta. Exposes it as the <beamSigmaZ> steering knob.
bloodyyugo
reviewed
Oct 1, 2026
| rk.setElement(0, 0, _beamPosition[0] - Vx); | ||
| rk.setElement(1, 0, _beamPosition[1] - Vy); | ||
| rk.setElement(2, 0, _beamPosition[2] - Vz); | ||
| // The vertex position is relative to the reference position, so add it back |
Contributor
There was a problem hiding this comment.
I wonder if this is the whole fix? Maybe the referencePosition isn't (0,0,0), which is presumed in the previous?
Collaborator
Author
There was a problem hiding this comment.
I did try without the refit and only this change, but the bias was still there. Without the refit it wasnt to pull it to ~0.5mm ... between target generation point and (0,0,0)
BilliorTrack(Track) takes the parameters of the first track state, which are defined about that state's reference point. For Kalman tracks this is the beam spot (e.g. z = -1.1 mm), but the first-pass vertex fit assumed the origin. The vertex position was therefore relative to the beam spot, and the target constraint pulled it to twice the target z, closing the e+e- opening angle by ~2% and biasing the target-constrained mass low. - HpsReconParticleDriver: add useTrackReferencePoint (default true). In fitVertex(), set the vertexer reference position to the reference point of the first track state before the first fit, and warn if the electron and positron reference points differ. Set false to reproduce the original behaviour. With this, target-constrained vertices no longer need refitTargetConstrained. Unconstrained and beamspot-constrained vertices are refit about the first-pass vertex as before, so their output is essentially unchanged.
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.
This adds an opt-in refitTargetConstrained flag to HpsReconParticleDriver (default off, so existing behavior is unchanged), which refits target-constrained vertices after shifting the tracks to the first-pass vertex, as is already done for unconstrained and beamspot-constrained fits. BilliorVertexer.makeRk now adds the reference position back to the vertex in target-constraint mode, so the refit pins to the correct absolute target position. In 2021 prompt A′ MC, the refit removes the ~2% narrowing of the opening angle and the matching low mass bias in target-constrained vertices (about −2.4 MeV at 180 MeV). The PR also adds a steering setter for the longitudinal target-constraint width, plus a run-14272 MC steering file that fixes the beam position at (0, 0,−1.1) mm and turns the refit on.