-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add track state at target #996
Conversation
… tracks with references to original track
…arget tracks, save tracks with relations to AtIP tracks. To turn on tracks at target, must pass target position in steering-file under KalmanPatRecDriver
if (case2){ | ||
double [] paramsRefPoint = {finalPos.x(), finalPos.y(), 0.0}; | ||
bts.setReferencePoint(paramsRefPoint); | ||
double[] newRef = {-4.3, 0.0, 0.0}; |
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.
I think you want to change -4.3 to target_z
Ah you are correct, whoops
…On Thu, Jun 8, 2023, 6:00 PM Cameron Bravo ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java
<#996 (comment)>
:
> + double dx = dz * mom.x() / mom.z();
+ Hep3Vector dPos = new BasicHep3Vector(dx, dy, dz);
+ finalPos = CoordinateTransformations.transformVectorToTracking(VecOp.add(dPos, RKresults.getFirstElement()));
+ }
+ bFieldY = fM.getField(CoordinateTransformations.transformVectorToDetector(finalPos)).y();
+ //params are calculated with respect to ref = {trackX, trackY, z=0)
+ double[] params = getParametersFromPointAndMomentum(finalPos, momTrans, (int) charge, bFieldY);
+ BaseTrackState bts = new BaseTrackState(params, bFieldY);
+ //reference point is set to track position in X Y Z
+ bts.setReferencePoint(finalPos.v());
+ //Consider shifting reference point to (trackX, 0, 0)...otherwise d0=0
+ boolean case2 = false;
+ if (case2){
+ double [] paramsRefPoint = {finalPos.x(), finalPos.y(), 0.0};
+ bts.setReferencePoint(paramsRefPoint);
+ double[] newRef = {-4.3, 0.0, 0.0};
I think you want to change -4.3 to target_z
—
Reply to this email directly, view it on GitHub
<#996 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALKJUAVYERXF6YNS4FFFX43XKJYT7ANCNFSM6AAAAAAY75AKSI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…mment out so that by default, no track state at target is created unless user specifies target position
…mspot positions from db
…ta class. Allows us to calculate track momentum using curvature later, instead of having to create a new TrackData collection to hold 3-momentum for each Track State
Instead of having magic code triggered by the addition of the targetPosition variable please add a boolean which explicitly states what is going to happen followed by the target location, such as
|
Extrap track to target and make new track state where track params ref = (trackX,trackY,0), therefore d0 = 0.
trackY position may replace d0 if using this track state in analysis.
Track reference point is set to (trackX, trackY, trackZ), so track position at target is saved.
May want to change track param reference point to ref = (trackX,0,0), so that d0 != 0.
These track states only exist if target position is set in steering-file KalmanPatRecDriver.