From 919692ef70cd11d9028879f79b153099d6676174 Mon Sep 17 00:00:00 2001 From: Zafar Ahmed <zahmed@jlab.org> Date: Tue, 9 Dec 2014 09:09:27 -0500 Subject: [PATCH] Tracking corrections to agree with ENGINE. First, in h_pattern_recognition.f we have: https://github.com/zahmed9/engine/blob/mkj/HTRACKING/h_pattern_recognition.f#L139 (hdc_wire_center(yy)-hdc_wire_center(yyprime))**2 .lt. (hspace_point_criterion(ich)) So I changed https://github.com/zahmed9/hcana/blob/develop/src/THcDriftChamber.cxx#L292 TMath::Abs(fHits[plane_hitind]->GetPos() - fHits[planep_hitind]->GetPos()) < fSpacePointCriterion to pow((fHits[plane_hitind]->GetPos() - fHits[planep_hitind]->GetPos()),2) < fSpacePointCriterion Second, the value of MAX_SPACE_POINTS in ENGINE is 100 so in hcana I changed it from 50 to 100. --- src/THcDriftChamber.cxx | 2 +- src/THcDriftChamber.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx index 9a53958..7cce58e 100644 --- a/src/THcDriftChamber.cxx +++ b/src/THcDriftChamber.cxx @@ -289,7 +289,7 @@ Int_t THcDriftChamber::FindSpacePoints( void ) PlanePInd=XPlanePInd; } if(fPlanes[PlaneInd]->GetNHits() == 1 && fPlanes[PlanePInd]->GetNHits() == 1 - && TMath::Abs(fHits[plane_hitind]->GetPos() - fHits[planep_hitind]->GetPos()) + && pow( (fHits[plane_hitind]->GetPos() - fHits[planep_hitind]->GetPos()),2) < fSpacePointCriterion && fNhits <= 6) { // An easy case, probably one hit per plane if(fHMSStyleChambers) fEasySpacePoint = FindEasySpacePoint_HMS(plane_hitind, planep_hitind); diff --git a/src/THcDriftChamber.h b/src/THcDriftChamber.h index 28e9b6a..f20daa4 100644 --- a/src/THcDriftChamber.h +++ b/src/THcDriftChamber.h @@ -15,7 +15,7 @@ #include <map> #include <vector> -#define MAX_SPACE_POINTS 50 +#define MAX_SPACE_POINTS 100 #define MAX_HITS_PER_POINT 20 //#include "TMath.h" -- GitLab