Skip to content

Commit

Permalink
Move the track extrapolation from dipole edge to z=800
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtrop committed Apr 15, 2024
1 parent 3e40b0f commit d43a25d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ private BeamlineConstants() {

public static final double DIPOLE_EDGE_ENG_RUN = 457.2 + 1080 / 2;

public static final double ECAL_TRACK_EXTRAPOLATION_START_Z = 800; // Starting point for track extrapolation to ECAL -- MWH 2024/4/15

public static final double HODO_L1_ZPOS = 1103.5; //extracted from detector element mg--7/17/2019
public static final double HODO_L2_ZPOS = 1115.5; //extracted from detector element mg--7/17/2019

Expand Down
16 changes: 8 additions & 8 deletions tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ public static BaseTrackState getTrackExtrapAtEcal(TrackState track, FieldMap fie
if (4441 < runNumber && runNumber < 8100)
zAtEcal = BeamlineConstants.ECAL_FACE_ENGINEERING_RUNS;

BaseTrackState bts = extrapolateTrackUsingFieldMap(track, BeamlineConstants.DIPOLE_EDGE_ENG_RUN, zAtEcal, 5.0, fieldMap);
BaseTrackState bts = extrapolateTrackUsingFieldMap(track, BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z, zAtEcal, 5.0, fieldMap);
bts.setLocation(TrackState.AtCalorimeter);
return bts;
}
Expand All @@ -663,9 +663,9 @@ public static BaseTrackState getTrackExtrapAtEcalRK(TrackState ts, FieldMap fM,
if (4441 < runNumber && runNumber < 8100)
zAtEcal = BeamlineConstants.ECAL_FACE_ENGINEERING_RUNS;

Hep3Vector startPos = extrapolateHelixToXPlane(ts, BeamlineConstants.DIPOLE_EDGE_ENG_RUN);
Hep3Vector startPos = extrapolateHelixToXPlane(ts, BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z);
Hep3Vector startPosTrans = CoordinateTransformations.transformVectorToDetector(startPos);
double distanceZ = zAtEcal - BeamlineConstants.DIPOLE_EDGE_ENG_RUN;
double distanceZ = zAtEcal - BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z;
double charge = -1.0 * Math.signum(getR(ts));

org.hps.util.Pair<Hep3Vector, Hep3Vector> RKresults = extrapolateTrackUsingFieldMapRK(ts, startPosTrans, distanceZ, stepSize, fM);
Expand Down Expand Up @@ -711,14 +711,14 @@ public static BaseTrackState getTrackExtrapAtHodoRK(TrackState ts, FieldMap fM,
}

public static BaseTrackState getTrackExtrapAtHodoRK(TrackState ts, FieldMap fM, double stepSize, int hodoLayer) {
Hep3Vector startPos = extrapolateHelixToXPlane(ts, BeamlineConstants.DIPOLE_EDGE_ENG_RUN);
Hep3Vector startPos = extrapolateHelixToXPlane(ts, BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z);
Hep3Vector startPosTrans = CoordinateTransformations.transformVectorToDetector(startPos);
double distZHodo = BeamlineConstants.HODO_L1_ZPOS;
int hodoTrackStateIndex = 0;
if (hodoLayer == 2) {
distZHodo = BeamlineConstants.HODO_L2_ZPOS; // hodoTrackStateIndex = 7;
}
double distanceZ = distZHodo - BeamlineConstants.DIPOLE_EDGE_ENG_RUN;
double distanceZ = distZHodo - BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z;
double charge = -1.0 * Math.signum(getR(ts));

org.hps.util.Pair<Hep3Vector, Hep3Vector> RKresults = extrapolateTrackUsingFieldMapRK(ts, startPosTrans, distanceZ, stepSize, fM);
Expand Down Expand Up @@ -851,9 +851,9 @@ public static Hep3Vector extrapolateTrack(TrackState track, double z) {

Hep3Vector trackPosition;
double dz;
if (z >= BeamlineConstants.DIPOLE_EDGE_ENG_RUN) {
trackPosition = extrapolateHelixToXPlane(track, BeamlineConstants.DIPOLE_EDGE_ENG_RUN);
dz = z - BeamlineConstants.DIPOLE_EDGE_ENG_RUN;
if (z >= BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z) {
trackPosition = extrapolateHelixToXPlane(track, BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z);
dz = z - BeamlineConstants.ECAL_TRACK_EXTRAPOLATION_START_Z;
} else if (z <= BeamlineConstants.DIPOLE_EDGELOW_TESTRUN) {
trackPosition = extrapolateHelixToXPlane(track, BeamlineConstants.DIPOLE_EDGELOW_TESTRUN);
dz = z - trackPosition.x();
Expand Down

0 comments on commit d43a25d

Please sign in to comment.