From 973412c238190df67c56384686236d505b4fcf1c Mon Sep 17 00:00:00 2001
From: hallc-online <hallconline@gmail.com>
Date: Tue, 13 Mar 2018 11:18:12 -0400
Subject: [PATCH] Modify THCDCTrack

Add methods for setting the spacepoint integer identifier
  for two spacepoints used in the track.
---
 src/THcDCTrack.cxx | 2 ++
 src/THcDCTrack.h   | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/THcDCTrack.cxx b/src/THcDCTrack.cxx
index 9c38ba5..777bed2 100644
--- a/src/THcDCTrack.cxx
+++ b/src/THcDCTrack.cxx
@@ -42,6 +42,8 @@ void THcDCTrack::Clear( const Option_t* )
 {
   // Clear the space point and hit lists
   fnSP = 0;
+  fSp1_ID=-1;
+  fSp2_ID=-1;
   ClearHits();
   // Need to set default values  (0 or -100)
   //fCoords.clear();
diff --git a/src/THcDCTrack.h b/src/THcDCTrack.h
index e55c33b..c0cb14d 100644
--- a/src/THcDCTrack.h
+++ b/src/THcDCTrack.h
@@ -42,6 +42,8 @@ public:
   Double_t GetY()                 const {return fY_fp;}
   Double_t GetXP()                 const {return fXp_fp;}
   Double_t GetYP()                 const {return fYp_fp;}
+  Double_t GetSp1_ID()                 const {return fSp1_ID;}
+  Double_t GetSp2_ID()                 const {return fSp1_ID;}
   Double_t GetChisq()              const {return fChi2_fp;}
   void SetNFree(Int_t nfree)           {fNfree = nfree;}
   void SetCoord(Int_t ip, Double_t coord) {fCoords[ip] = coord;}
@@ -50,6 +52,8 @@ public:
   void SetVector(Double_t x, Double_t y, Double_t z,
 		 Double_t xp, Double_t yp) {fX_fp = x; fY_fp=y; fZ_fp=z; fXp_fp=xp; fYp_fp=yp;}
   void SetChisq(Double_t chi2)   {fChi2_fp = chi2;}
+  void SetSp1_ID(Int_t isp1) {fSp1_ID= isp1;}
+  void SetSp2_ID(Int_t isp2) {fSp2_ID= isp2;}
 
   virtual void ClearHits( );
 
@@ -59,7 +63,8 @@ public:
 protected:
   Int_t fnSP; /* Number of space points in this track */
   THcSpacePoint* fSp[10];         /* List of space points in this track */
-
+  Int_t fSp1_ID;
+  Int_t fSp2_ID;
   Int_t fNHits;
   Int_t fNfree;		  /* Number of degrees of freedom */
   struct Hit {
-- 
GitLab