Hall C ROOT/C++ Analyzer (hcana)
Go to the documentation of this file.
1 #ifndef ROOT_THcDCTrack
2 #define ROOT_THcDCTrack
5 // //
6 // THcDCTrack //
7 // //
10 //#include "THaCluster.h"
11 #include "TVector3.h"
12 #include "TObject.h"
14 //class THaVDCCluster;
15 class THcDCPlane;
16 class THaTrack;
17 class THcDCHit;
19 class THcDCTrack : public TObject {
21 public:
22  THcDCTrack(Int_t nplanes);
23  virtual ~THcDCTrack() {};
25  virtual void AddSpacePoint(THcSpacePoint* sp);
27  //Get and Set Functions
28  // Int_t* GetSpacePoints() {return fspID;}
29  Int_t GetNSpacePoints() const { return fnSP;}
30  // Int_t GetSpacePointID(Int_t i) const {return fspID[i];}
31  THcSpacePoint* GetSpacePoint(Int_t i) const {return fSp[i];}
32  THcDCHit* GetHit(Int_t i) const {return fHits[i].dchit;}
33  Double_t GetHitDist(Int_t ihit) { return fHits[ihit].distCorr; };
34  Int_t GetHitLR(Int_t ihit) { return fHits[ihit].lr; };
35  Int_t GetNHits() const {return fNHits;}
36  Int_t GetNFree() const {return fNfree;}
37  Double_t GetCoord(Int_t ip) const {return fCoords[ip];}
38  Double_t GetResidual(Int_t ip) const {return fResiduals[ip];}
39  Double_t GetResidual1() const {return fResiduals[0];}
41  void GetRay(Double_t *ray) const {ray[0]=fX_fp; ray[1]=fY_fp; ray[2]=fXp_fp; ray[3]=fYp_fp;}
42  Double_t GetX() const {return fX_fp;}
43  Double_t GetY() const {return fY_fp;}
44  Double_t GetXP() const {return fXp_fp;}
45  Double_t GetYP() const {return fYp_fp;}
46  Double_t GetSp1_ID() const {return fSp1_ID;}
47  Double_t GetSp2_ID() const {return fSp2_ID;}
48  Double_t GetChisq() const {return fChi2_fp;}
49  void SetNFree(Int_t nfree) {fNfree = nfree;}
50  void SetCoord(Int_t ip, Double_t coord) {fCoords[ip] = coord;}
51  void SetResidual(Int_t ip, Double_t coord) {fResiduals[ip] = coord;}
52  void SetResidualExclPlane(Int_t ip, Double_t coord) {fResidualsExclPlane[ip] = coord;}
53  void SetDoubleResidual(Int_t ip, Double_t coord) {fDoubleResiduals[ip] = coord;}
55  Double_t xp, Double_t yp) {fX_fp = x; fY_fp=y; fZ_fp=z; fXp_fp=xp; fYp_fp=yp;}
56  void SetChisq(Double_t chi2) {fChi2_fp = chi2;}
57  void SetSp1_ID(Int_t isp1) {fSp1_ID= isp1;}
58  void SetSp2_ID(Int_t isp2) {fSp2_ID= isp2;}
59  void SetHitLR(Int_t ihit,Int_t lrtemp) { fHits[ihit].lr=lrtemp; }
61  virtual void ClearHits( );
63  // TObject functions redefined
64  virtual void Clear( Option_t* opt="" );
65  virtual void RemoveHit(Int_t RemoveHitIndex);
67 protected:
68  Int_t fnSP; /* Number of space points in this track */
69  THcSpacePoint* fSp[10]; /* List of space points in this track */
73  Int_t fNfree; /* Number of degrees of freedom */
74  struct Hit {
75  // This is the same structure as in THcSpacePoint. Can we not
76  // duplicate this?
80  };
81  std::vector<Hit> fHits; /* List of hits for this track */
82  //std::vector<THcDCHit*> fHits; /* List of hits for this track */
83  std::vector<Double_t> fCoords; /* Coordinate on each plane */
84  std::vector<Double_t> fResiduals; /* Residual on each plane */
85  std::vector<Double_t> fResidualsExclPlane; /* Residual on each plane */
86  std::vector<Double_t> fDoubleResiduals; /* Residual on each plane for single stub mode */
91  virtual void AddHit(THcDCHit * hit, Double_t dist, Int_t lr);
92 private:
93  // Hide copy ctor and op=
94  THcDCTrack( const THcDCTrack& );
95  THcDCTrack& operator=( const THcDCTrack& );
97  ClassDef(THcDCTrack,0) // Full Drift Chamber track
98 };
99 #endif
Drift chamber wire hit info.
Definition: THcDCHit.h:16
virtual void AddHit(THcDCHit *hit, Double_t dist, Int_t lr)
Definition: THcDCTrack.cxx:20
void SetResidual(Int_t ip, Double_t coord)
Definition: THcDCTrack.h:51
THcDCHit * dchit
Definition: THcDCTrack.h:77
Int_t fnSP
Definition: THcDCTrack.h:68
void SetSp2_ID(Int_t isp2)
Definition: THcDCTrack.h:58
Int_t fNfree
Definition: THcDCTrack.h:73
const char Option_t
void SetSp1_ID(Int_t isp1)
Definition: THcDCTrack.h:57
std::vector< Hit > fHits
Definition: THcDCTrack.h:81
int Int_t
virtual void RemoveHit(Int_t RemoveHitIndex)
Definition: THcDCTrack.cxx:32
THcSpacePoint * GetSpacePoint(Int_t i) const
Definition: THcDCTrack.h:31
virtual ~THcDCTrack()
Definition: THcDCTrack.h:23
Double_t GetChisq() const
Definition: THcDCTrack.h:48
Int_t fNHits
Definition: THcDCTrack.h:72
virtual void AddSpacePoint(THcSpacePoint *sp)
Definition: THcDCTrack.cxx:40
Double_t GetSp1_ID() const
Definition: THcDCTrack.h:46
void GetRay(Double_t *ray) const
Definition: THcDCTrack.h:41
#define ClassDef(name, id)
Int_t GetNFree() const
Definition: THcDCTrack.h:36
Int_t GetNHits() const
Definition: THcDCTrack.h:35
Double_t GetHitDist(Int_t ihit)
Definition: THcDCTrack.h:33
Double_t GetX() const
Definition: THcDCTrack.h:42
Double_t fChi2_fp
Definition: THcDCTrack.h:89
Double_t GetCoord(Int_t ip) const
Definition: THcDCTrack.h:37
Int_t GetHitLR(Int_t ihit)
Definition: THcDCTrack.h:34
std::vector< Double_t > fCoords
Definition: THcDCTrack.h:83
Int_t fSp2_ID
Definition: THcDCTrack.h:71
Double_t GetXP() const
Definition: THcDCTrack.h:44
Class representing a single hit DC.
Definition: THcSpacePoint.h:13
void SetChisq(Double_t chi2)
Definition: THcDCTrack.h:56
Double_t distCorr
Definition: THcDCTrack.h:78
std::vector< Double_t > fResiduals
Definition: THcDCTrack.h:84
THcSpacePoint * fSp[10]
Definition: THcDCTrack.h:69
void SetVector(Double_t x, Double_t y, Double_t z, Double_t xp, Double_t yp)
Definition: THcDCTrack.h:54
THcDCTrack(Int_t nplanes)
Definition: THcDCTrack.cxx:11
void SetDoubleResidual(Int_t ip, Double_t coord)
Definition: THcDCTrack.h:53
std::vector< Double_t > fResidualsExclPlane
Definition: THcDCTrack.h:85
Int_t fSp1_ID
Definition: THcDCTrack.h:70
Double_t GetY() const
Definition: THcDCTrack.h:43
Double_t GetResidualExclPlane(Int_t ip) const
Definition: THcDCTrack.h:40
virtual void ClearHits()
Definition: THcDCTrack.cxx:71
double Double_t
Double_t fXp_fp
Definition: THcDCTrack.h:88
Double_t GetResidual1() const
Definition: THcDCTrack.h:39
void SetCoord(Int_t ip, Double_t coord)
Definition: THcDCTrack.h:50
Double_t fZ_fp
Definition: THcDCTrack.h:87
THcDCHit * GetHit(Int_t i) const
Definition: THcDCTrack.h:32
Double_t GetYP() const
Definition: THcDCTrack.h:45
Double_t GetSp2_ID() const
Definition: THcDCTrack.h:47
Int_t GetNSpacePoints() const
Definition: THcDCTrack.h:29
Double_t fY_fp
Definition: THcDCTrack.h:87
void SetHitLR(Int_t ihit, Int_t lrtemp)
Definition: THcDCTrack.h:59
Double_t GetResidual(Int_t ip) const
Definition: THcDCTrack.h:38
Double_t fX_fp
Definition: THcDCTrack.h:87
Double_t fYp_fp
Definition: THcDCTrack.h:88
void SetResidualExclPlane(Int_t ip, Double_t coord)
Definition: THcDCTrack.h:52
void SetNFree(Int_t nfree)
Definition: THcDCTrack.h:49
virtual void Clear(Option_t *opt="")
Definition: THcDCTrack.cxx:57
THcDCTrack & operator=(const THcDCTrack &)
std::vector< Double_t > fDoubleResiduals
Definition: THcDCTrack.h:86
Class representing a track found from linking DC Space points.
Definition: THcDCTrack.h:19