Skip to content

Commit 42ae8a7

Browse files
committed
finished plot for tracklet consistency checks
1 parent 6606190 commit 42ae8a7

File tree

6 files changed

+192
-196
lines changed

6 files changed

+192
-196
lines changed

include/SANDProcessTracklets.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,10 @@ Truth getTrueTrackletOfCluster(
4343
TVector3 start_pos, TVector3 stop_pos,
4444
TVector3 start_mom, TVector3 stop_mom,
4545
double z);
46-
47-
// double getScore(const TVectorD& tracklet, const Truth& truth);
48-
49-
// //Now it should returns both position and momentum
50-
// std::map<double, Truth> getInterpolatedZTruth(
51-
// const std::vector<EDEPTrajectoryPoint>& trj_points,
52-
// const sand_reco::kf::utils::TrackletMap& z_to_tracklets);
53-
54-
// std::vector<double> computeZDistance(
55-
// const std::vector<EDEPTrajectoryPoint>& trj_points,
56-
// const sand_reco::kf::utils::TrackletMap& z_to_tracklets);
57-
58-
// sand_reco::kf::utils::TrackletMap findBestTracklet(
59-
// const sand_reco::kf::utils::TrackletMap& z_to_tracklets,
60-
// const std::map<double, Truth>& z_to_truth);
61-
6246

47+
Truth getTrueTrackletFromTrajectoryPoint(const std::vector<EDEPTrajectoryPoint>& points, double z);
6348

49+
double getScore(const TVectorD& tracklet, const std::vector<TVector3>& true_tracklet);
6450
std::map<double, std::vector<TVector3>> getInterpolatedZ(const std::vector<EDEPTrajectoryPoint>& trj_points,
6551
const sand_reco::kf::utils::TrackletMap& z_to_tracklets);
6652

@@ -72,4 +58,3 @@ sand_reco::kf::utils::TrackletMap findBestTracklet(const sand_reco::kf::utils::T
7258

7359
// std::vector<TVector3> getTrueTrackletOfCluster(TVector3 start, TVector3 stop, double z);
7460

75-
double getScore(const TVectorD& tracklet, const std::vector<TVector3>& true_tracklet);

src/SANDProcessTracklets.cpp

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,25 @@ Truth getTrueTrackletOfCluster(TVector3 start_pos, TVector3 stop_pos,
3232
return Truth{pos, dir, mom};
3333
}
3434

35-
// std::vector<TVector3> getTrueTrackletOfCluster(TVector3 start, TVector3 stop, double z){
3635

37-
// // Interpolation of z coordinate
38-
// auto first_point = start;
39-
// auto second_point = stop;
4036

41-
// double z_diff = z - first_point.Z();
42-
// double alpha = z_diff / fabs(second_point.Z() - first_point.Z());
37+
// Truth getTrueTrackletFromTrajectoryPoint(const std::vector<EDEPTrajectoryPoint>& points double z){
38+
// const EDEPTrajectoryPoint* best_point = &points.front();
39+
// double best_z = std::abs(points.front().GetPosition().Z() - z_plane_mm);
4340

44-
// TVector3 interpolated_pos = first_point * (1 - alpha) + second_point * alpha;
45-
// TVector3 interpolated_dir = (stop - start).Unit();
46-
47-
// return { interpolated_pos, interpolated_dir };
48-
// }
41+
// for (const auto& tp : points) {
42+
// double dz = std::abs(tp.GetPosition().Z() - z);
43+
// if (dz < best_z) {
44+
// best_z = dz;
45+
// best_point = &tp;
46+
// }
47+
// }
48+
// TVector3 true_pos = best_point->GetPosition().Vect();
49+
// TVector3 true_dir = best_point->GetMomentum().Vect().Unit();
50+
// TVector3 true_mom = best_point->GetMomentum().Vect();
4951

52+
// return Truth{true_pos, true_dir, true_mom};
53+
//}
5054

5155
double getScore(const TVectorD& tracklet, const std::vector<TVector3>& true_tracklet){
5256

src/SANDTrackerUtils.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,6 @@ double SANDTrackerUtils::getDE(double z,
194194

195195

196196

197-
198-
199-
200-
201-
202-
203-
204-
205197
namespace sand_reco
206198
{
207199

@@ -410,7 +402,7 @@ Double_t makeYC(Double_t z1,Double_t y1, Double_t z2,Double_t y2, Double_t z3,Do
410402
//_____________________________________________________________________________
411403
Double_t makeTgln(Double_t z1,Double_t y1, Double_t z2,Double_t y2,Double_t x1,Double_t x2,Double_t c){
412404
//-----------------------------------------------------------------
413-
// Initial approzimation of the tangent of the track dip angle
405+
// Initial approximation of the tangent of the track dip angle
414406
//-----------------------------------------------------------------
415407
Double_t d = TMath::Sqrt((z1-z2)*(z1-z2)+(y1-y2)*(y1-y2));
416408
if (TMath::Abs(d*c*0.5)>1) return 0;

0 commit comments

Comments
 (0)