Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcDCTrack.h
Go to the documentation of this file.
1#ifndef ROOT_THcDCTrack
2#define ROOT_THcDCTrack
3
5// //
6// THcDCTrack //
7// //
9
10//#include "THaCluster.h"
11#include "TVector3.h"
12#include "TObject.h"
13
14//class THaVDCCluster;
15class THcDCPlane;
16class THaTrack;
17class THcDCHit;
18
19class THcDCTrack : public TObject {
20
21public:
22 THcDCTrack(Int_t nplanes);
23 virtual ~THcDCTrack() {};
24
25 virtual void AddSpacePoint(THcSpacePoint* sp);
26
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;}
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; }
60
61 virtual void ClearHits( );
62
63 // TObject functions redefined
64 virtual void Clear( Option_t* opt="" );
65 virtual void RemoveHit(Int_t RemoveHitIndex);
66
67protected:
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 */
90
91 virtual void AddHit(THcDCHit * hit, Double_t dist, Int_t lr);
92private:
93 // Hide copy ctor and op=
96
97 ClassDef(THcDCTrack,0) // Full Drift Chamber track
98};
99#endif
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Drift chamber wire hit info.
Definition THcDCHit.h:16
Class representing a track found from linking DC Space points.
Definition THcDCTrack.h:19
virtual void AddHit(THcDCHit *hit, Double_t dist, Int_t lr)
Double_t GetXP() const
Definition THcDCTrack.h:44
Double_t fZ_fp
Definition THcDCTrack.h:87
THcDCTrack(const THcDCTrack &)
Int_t GetNFree() const
Definition THcDCTrack.h:36
void SetResidual(Int_t ip, Double_t coord)
Definition THcDCTrack.h:51
Double_t GetResidual1() const
Definition THcDCTrack.h:39
Double_t GetYP() const
Definition THcDCTrack.h:45
Double_t GetResidualExclPlane(Int_t ip) const
Definition THcDCTrack.h:40
Double_t GetSp2_ID() const
Definition THcDCTrack.h:47
Int_t fSp1_ID
Definition THcDCTrack.h:70
void SetChisq(Double_t chi2)
Definition THcDCTrack.h:56
std::vector< Double_t > fResiduals
Definition THcDCTrack.h:84
void SetSp2_ID(Int_t isp2)
Definition THcDCTrack.h:58
virtual ~THcDCTrack()
Definition THcDCTrack.h:23
std::vector< Double_t > fResidualsExclPlane
Definition THcDCTrack.h:85
Int_t fNfree
Definition THcDCTrack.h:73
virtual void RemoveHit(Int_t RemoveHitIndex)
Int_t fNHits
Definition THcDCTrack.h:72
virtual void AddSpacePoint(THcSpacePoint *sp)
THcDCHit * GetHit(Int_t i) const
Definition THcDCTrack.h:32
Double_t GetX() const
Definition THcDCTrack.h:42
Double_t fYp_fp
Definition THcDCTrack.h:88
Double_t GetHitDist(Int_t ihit)
Definition THcDCTrack.h:33
void GetRay(Double_t *ray) const
Definition THcDCTrack.h:41
Int_t GetNSpacePoints() const
Definition THcDCTrack.h:29
std::vector< Hit > fHits
Definition THcDCTrack.h:81
void SetNFree(Int_t nfree)
Definition THcDCTrack.h:49
THcSpacePoint * fSp[10]
Definition THcDCTrack.h:69
Int_t GetHitLR(Int_t ihit)
Definition THcDCTrack.h:34
void SetCoord(Int_t ip, Double_t coord)
Definition THcDCTrack.h:50
Double_t GetCoord(Int_t ip) const
Definition THcDCTrack.h:37
void SetSp1_ID(Int_t isp1)
Definition THcDCTrack.h:57
THcDCTrack & operator=(const THcDCTrack &)
Double_t fX_fp
Definition THcDCTrack.h:87
void SetResidualExclPlane(Int_t ip, Double_t coord)
Definition THcDCTrack.h:52
std::vector< Double_t > fDoubleResiduals
Definition THcDCTrack.h:86
Int_t fnSP
Definition THcDCTrack.h:68
Int_t GetNHits() const
Definition THcDCTrack.h:35
Double_t fXp_fp
Definition THcDCTrack.h:88
Double_t fY_fp
Definition THcDCTrack.h:87
virtual void ClearHits()
void SetVector(Double_t x, Double_t y, Double_t z, Double_t xp, Double_t yp)
Definition THcDCTrack.h:54
Double_t GetChisq() const
Definition THcDCTrack.h:48
void SetDoubleResidual(Int_t ip, Double_t coord)
Definition THcDCTrack.h:53
Int_t fSp2_ID
Definition THcDCTrack.h:71
Double_t GetSp1_ID() const
Definition THcDCTrack.h:46
virtual void Clear(Option_t *opt="")
THcSpacePoint * GetSpacePoint(Int_t i) const
Definition THcDCTrack.h:31
Double_t GetResidual(Int_t ip) const
Definition THcDCTrack.h:38
std::vector< Double_t > fCoords
Definition THcDCTrack.h:83
void SetHitLR(Int_t ihit, Int_t lrtemp)
Definition THcDCTrack.h:59
Double_t fChi2_fp
Definition THcDCTrack.h:89
Double_t GetY() const
Definition THcDCTrack.h:43
Class representing a single hit DC.
Double_t y[n]
Double_t x[n]
THcDCHit * dchit
Definition THcDCTrack.h:77
Double_t distCorr
Definition THcDCTrack.h:78