Skip to content

Commit

Permalink
Fix to fill detector and layer for Cosmics trajectory bank
Browse files Browse the repository at this point in the history
  • Loading branch information
veronique committed Jun 30, 2023
1 parent 679c475 commit d04558d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void findTrajectory() {
stVec.setTrkThetaAtSurface(ThetaTrackIntersPlane);
stVec.setTrkToModuleAngle(trkToMPlnAngl);
stVec.setCalcCentroidStrip(CalcCentroidStrip);
stVec.setSurfaceDetector(DetectorType.BST.getDetectorId());
if(stateVecs.size()>0
&& stateVecs.get(stateVecs.size()-1).x()==stVec.x()
&& stateVecs.get(stateVecs.size()-1).y()==stVec.y()
Expand Down Expand Up @@ -230,7 +231,8 @@ public void findTrajectory() {
stVec.setTrkThetaAtSurface(ThetaTrackIntersSurf);
stVec.setTrkToModuleAngle(trkToMPlnAngl);
stVec.setCalcCentroidStrip(CalcCentroidStrip);
if(stateVecs.size()>0
stVec.setSurfaceDetector(DetectorType.BMT.getDetectorId());
if(stateVecs.size()>0
&& stateVecs.get(stateVecs.size()-1).x()==stVec.x()
&& stateVecs.get(stateVecs.size()-1).y()==stVec.y()
&& stateVecs.get(stateVecs.size()-1).z()==stVec.z()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public Trajectory findTrajectory(int id, Ray ray, ArrayList<Cross> candCrossList
continue;
}

stVec.setSurfaceDetector(DetectorType.BST.getDetectorId());
Cluster clsOnTrk = null;
if (l % 2 == 0) {
clsOnTrk = c.getCluster1();
Expand Down Expand Up @@ -195,6 +196,7 @@ public Trajectory findTrajectory(int id, Ray ray, ArrayList<Cross> candCrossList
continue;
}

stVec.setSurfaceDetector(DetectorType.BMT.getDetectorId());
if (c.getType()==BMTType.C) { //C-detector measuring Z
//if(traj.isFinal) { // reset the cross only for final trajectory

Expand Down Expand Up @@ -226,9 +228,8 @@ public Trajectory findTrajectory(int id, Ray ray, ArrayList<Cross> candCrossList
}

//Collections.sort(stateVecs);

stateVecs.sort(Comparator.comparing(StateVec::y));
for (int l = 0; l < stateVecs.size(); l++) {
for (int l = 0; l < stateVecs.size(); l++) {
stateVecs.get(l).setSurfaceDetector(DetectorType.CVT.getDetectorId());
stateVecs.get(l).setPlaneIdx(l);
}
Expand Down

0 comments on commit d04558d

Please sign in to comment.