121 #ifndef STAR_StFtpcTrack
122 #define STAR_StFtpcTrack
124 #include "TObjArray.h"
125 #include "TVector3.h"
127 #include "StPhysicalHelix.hh"
128 #include "StThreeVector.hh"
129 #include "StDetectorId.h"
131 #include "MIntArray.h"
132 #include "StFtpcPoint.hh"
133 #include "StFtpcVertex.hh"
134 #include "StFtpcTrackingParams.hh"
136 #include "phys_constants.h"
148 Int_t mRowsWithPoints;
152 Double_t mChi2Circle;
153 Double_t mChi2Length;
154 Double_t mTrackLength;
163 Double_t mAlphaFirst;
165 Bool_t mFromMainVertex;
192 void CalculateNMax();
193 Double_t CalcDca(
StFtpcVertex *vertex, Bool_t primaryFit);
194 Double_t CalcAlpha0();
195 void CalcAndSetAlpha0() { this->SetAlpha0(this->CalcAlpha0()); }
196 void CalcResiduals(Bool_t primaryFit);
197 void CalcGlobResiduals();
198 void CalcPrimResiduals();
206 Double_t chi2Rad()
const;
207 Double_t chi2Lin()
const;
210 TObjArray *GetHits()
const {
return mPoints; }
211 MIntArray *GetHitNumbers()
const {
return mPointNumbers; }
212 Int_t GetRowsWithPoints()
const {
return mRowsWithPoints; }
213 Int_t GetTrackNumber()
const {
return mTrackNumber; }
214 Int_t GetGlobalTrackId()
const {
return mGlobTrackId; }
215 Double_t GetChi2Circle()
const {
return mChi2Circle; }
216 Double_t GetChi2Length()
const {
return mChi2Length; }
217 Double_t GetTrackLength()
const {
return mTrackLength; }
218 Double_t GetRadius()
const {
return mRadius; }
219 Double_t GetCenterX()
const {
return mCenterX; }
220 Double_t GetCenterY()
const {
return mCenterY; }
221 Double_t GetAlpha0()
const {
return mAlpha0; }
222 Double_t GetPid()
const {
return mPid; }
223 Short_t GetNMax()
const {
return mNMax; }
224 Double_t GetRFirst()
const {
return mRFirst; }
225 Double_t GetRLast()
const {
return mRLast; }
226 Double_t GetMeanR()
const {
return TMath::Abs((mRFirst+mRLast)/2.); }
227 Double_t GetAlphaFirst()
const {
return mAlphaFirst; }
228 Double_t GetAlphaLast()
const {
return mAlphaLast; }
229 Double_t GetMeanAlpha();
230 Int_t GetNumberOfPoints()
const {
return mPoints->GetEntriesFast(); }
231 Bool_t ComesFromMainVertex()
const {
return mFromMainVertex; }
232 TVector3 GetMomentum()
const {
return mP; }
233 Double_t GetPx()
const {
return mP.X(); }
234 Double_t GetPy()
const {
return mP.Y(); }
235 Double_t GetPz()
const {
return mP.Z(); }
236 Double_t GetP()
const;
237 Double_t GetPt()
const;
238 Double_t GetPseudoRapidity()
const;
239 Double_t GetEta()
const;
240 Double_t GetRapidity()
const;
241 Int_t GetHemisphere()
const;
242 Int_t GetSector()
const;
243 StDetectorId GetDetectorId()
const {
return (GetHemisphere() == 1.) ? kFtpcWestId : kFtpcEastId; }
247 TVector3 GetVertex()
const {
return mV; }
248 TVector3 GetFirstPointOnTrack()
const {
return mV; }
249 TVector3 GetLastPointOnTrack()
const {
return mL; }
250 Int_t GetCharge()
const {
return mQ; }
251 Double_t
const *GetChiSq()
const {
return mChiSq; }
252 Double_t GetTheta()
const {
return mTheta; }
253 Double_t GetDca()
const {
return mDca; }
255 Double_t GetdEdx()
const {
return mdEdx; }
256 Int_t GetNumdEdxHits()
const {
return mNumdEdxHits; }
259 void SetTrackNumber(Int_t number);
260 void SetGlobalTrackId(Int_t f) { mGlobTrackId = f; }
261 void SetRowsWithPoints(Int_t f) { mRowsWithPoints = f; }
263 void SetPx(Double_t f) { mP.SetX(f); }
264 void SetPy(Double_t f) { mP.SetY(f); }
265 void SetPz(Double_t f) { mP.SetZ(f); }
267 void SetdEdx(Double_t f) { mdEdx = f; }
268 void SetNumdEdxHits(Int_t f) { mNumdEdxHits = f; }
270 void SetChi2Circle(Double_t f) { mChi2Circle = f; }
271 void SetChi2Length(Double_t f) { mChi2Length = f; }
272 void SetRadius(Double_t f) { mRadius = f; }
273 void SetCenterX(Double_t f) { mCenterX = f; }
274 void SetCenterY(Double_t f) { mCenterY = f; }
275 void SetAlpha0(Double_t f) { mAlpha0 = f; }
276 void SetCharge(Int_t f) { mQ = f; }
277 void SetPid(Int_t f) { mPid = f; }
278 void SetRLast(Double_t f) { mRLast = f; }
279 void SetRFirst(Double_t f) { mRFirst = f; }
280 void SetAlphaLast(Double_t f) { mAlphaLast = f; }
281 void SetAlphaFirst(Double_t f) { mAlphaFirst = f; }
283 void SetDca(Double_t f) { mDca = f; }
284 void SetNMax(Short_t f) { mNMax = f; }
285 void ComesFromMainVertex(Bool_t f) { mFromMainVertex = f; }
287 void SetProperties(Bool_t fUsage, Int_t mTrackNumber);
288 void SetPointDependencies();
292 Int_t CircleFit(Double_t
x[],Double_t y[], Double_t xw[], Double_t yw[], Int_t num);
293 void LineFit(Double_t *x, Double_t *y, Double_t *z, Double_t *xw, Double_t *yw, Int_t num);
298 Double_t mXCenter, mYCenter, mFitRadius, mChi2Rad;
299 Double_t mArcOffset, mArcSlope, mChi2Lin;
302 Int_t mVertexPointOffset;
double x(double s) const
coordinates of helix at point s