Skip to content

Commit 5686a05

Browse files
committed
clean up a bunch of commented code
1 parent 8ae66e0 commit 5686a05

1 file changed

Lines changed: 2 additions & 56 deletions

File tree

‎tracking/src/main/java/org/hps/recon/tracking/kalman/KalmanInterface.java‎

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public class KalmanInterface {
101101
private int nBigEvents;
102102
private int eventNumber;
103103
private static double target_pos = -999.9;
104-
private static boolean addTrackStateAtTarget = false;
105104
private double[] beamPosition = null;
106105

107106
private static final boolean debug = false;
@@ -653,27 +652,10 @@ public BaseTrack createTrack(KalTrack kT, boolean storeTrackStates) {
653652
ts = null;
654653
int loc = TrackState.AtOther;
655654

656-
//HpsSiSensor hssd = (HpsSiSensor) moduleMap.get(site.m).getSensor();
657-
//int lay = hssd.getMillepedeId();
658-
// System.out.printf("ssp id %d \n", hssd.getMillepedeId());
659-
660655
if (i == firstHit_idx) {
661656
loc = TrackState.AtFirstHit;
662657
} else if (i == lastHit_idx)
663-
loc = TrackState.AtLastHit;
664-
665-
/*
666-
//DO Not att the missing layer track states yet.
667-
if (storeTrackStates) {
668-
for (int k = 1; k < lay - prevID; k++) {
669-
// uses new lcsim constructor
670-
BaseTrackState dummy = new BaseTrackState(dummyCounter);
671-
newTrack.getTrackStates().add(dummy);
672-
dummyCounter--;
673-
}
674-
prevID = lay;
675-
}
676-
*/
658+
loc = TrackState.AtLastHit;
677659

678660
if (loc == TrackState.AtFirstHit || loc == TrackState.AtLastHit || storeTrackStates) {
679661
ts = createTrackState(site, loc, true, saveTrackStateAtIntercept);
@@ -694,40 +676,14 @@ public BaseTrack createTrack(KalTrack kT, boolean storeTrackStates) {
694676
double BAtEcal = BfieldAtEcal.mag();
695677
double alphaAtEcal = conFac/ BAtEcal;
696678

697-
/*
698-
699-
DMatrixRMaj ecalCov = new DMatrixRMaj(getCovarianceFromHelix(helixAtEcal));
700-
double[] ecalParams = helixAtEcal.a.v.clone();
701-
double[] ecalLCSimParams = getLCSimParams(ecalParams, alphaAtEcal);
702-
double[] ecalLCSimCov = getLCSimCov(ecalCov, alphaAtEcal).asPackedArray(true);
703-
double[] refAtEcal = localKalToHps(helixAtEcal.origin);
704-
if(debug)System.out.println(this.getClass().getName()+":: reference to TrackState @ ecal = "+
705-
+refAtEcal[0]+", "+refAtEcal[1]+","+ refAtEcal[2]);
706-
TrackState ts_ecal_helix = new BaseTrackState(ecalLCSimParams,refAtEcal, ecalLCSimCov, TrackState.AtCalorimeter, BAtEcal);
707-
if(debug)System.out.println(this.getClass().getName()+":: Uncorrected track state: curvature = "+ts_ecal_helix.getOmega()
708-
+" bField = "+ts_ecal_helix.getBLocal()+" momentum z = "+ts_ecal_helix.getMomentum()[0]);
709-
System.out.println("Helix at ECal from kT.getHelixAtPlane and by hand conversions ");
710-
System.out.println(ts_ecal_helix.toString());
711-
*/
712-
//newTrack.getTrackStates().add(ts_ecal_helix);
713-
714-
715679
// this is how createTrackState (above) goes from measurement to TrackState
716680
// from the measurements. It calls toHPShelix.
717681
// the helix state here must already be propagated
718682
// helix.toTrackState(alphaCenter, ms.m.p, loc);
719683

720684
TrackState ts_ecal=helixAtEcal.toTrackState(alphaAtEcal, ecalPlane, TrackState.AtCalorimeter, saveTrackStateAtIntercept);
721685
newTrack.getTrackStates().add(ts_ecal);
722-
//if(debug)System.out.println("Helix at ECal from helix.toTrackState");
723-
// if(debug)System.out.println(ts_toTrackState.toString());
724-
// System.out.println("Helix at ECal from helix.toTrackState");
725-
// System.out.println(ts_toTrackState.toString());
726-
727-
// Extrapolate to the ECAL and make a new trackState there.
728-
//BaseTrackState ts_ecal = new BaseTrackState();
729-
//ts_ecal = TrackUtils.getTrackExtrapAtEcalRK(newTrack, fM, runNumber);
730-
686+
731687
Vec targetFace=origin;
732688
Plane targetPlane = new Plane(targetFace, new Vec(0., 1., 0.));
733689
HelixState helixAtTarget=kT.getHelixAtPlane(targetPlane,saveTrackStateAtIntercept); // this propagates (via RK) the helix to the plane
@@ -739,16 +695,6 @@ public BaseTrack createTrack(KalTrack kT, boolean storeTrackStates) {
739695
if(debug)System.out.println("Helix at Target from helix.toTrackState");
740696
if(debug)System.out.println(ts_target.toString());
741697
newTrack.getTrackStates().add(ts_target);
742-
// Extrapolate to Target and make a new trackState there.
743-
/*
744-
BaseTrackState ts_target = new BaseTrackState();
745-
if (target_pos != -999.9 && addTrackStateAtTarget){
746-
ts_target = TrackUtils.getTrackExtrapAtTargetRK(newTrack, target_pos, beamPosition, fM, 0);
747-
if (ts_target != null){
748-
newTrack.getTrackStates().add(ts_target);
749-
}
750-
}
751-
*/
752698

753699
// other track properties
754700
newTrack.setChisq(kT.chi2);

0 commit comments

Comments
 (0)