// ------------------------------------------------------------------------- // ----- CbmStsTrack header file ----- // ----- Created 26/01/05 by V. Friese ----- // ------------------------------------------------------------------------- /** CbmStsTrack.h *@author V.Friese ** ** STS local track. Holds lists of CbmStsHits and the fitted ** track parameters. The fit parameters are of type CbmTrackParam ** and can only be accesssed and modified via this class. **/ #ifndef CBMSTSTRACK_H #define CBMSTSTRACK_H 1 #include "map.h" #include "TArrayI.h" #include "TObject.h" #include "CbmTrackParam.h" class CbmStsHit; class CbmStsTrack : public TObject { public: /** Default constructor **/ CbmStsTrack(); /** Destructor **/ virtual ~CbmStsTrack(); /** Add a StsHit to the list **/ void AddHit(Int_t hitId, CbmStsHit* hit); /** Public method Print ** Output to screen **/ void Print(); /** Public method SortHits ** Sorts the hits in downstream direction ** and writes the hit indizes into the member fHits **/ void SortHits(); /** Accessors **/ Int_t GetNHits() const { return fHits.GetSize(); } Int_t GetHitIndex(Int_t iHit) const { return fHits.At(iHit); } Int_t GetPidHypo() const { return fPidHypo; } Int_t GetFlag() const { return fFlag; } Double_t GetChi2() const { return fChi2; } Int_t GetNDF() const { return fNDF; } Double_t GetB() const { return fB; } CbmTrackParam* GetParamFirst() { return &fParamFirst; } CbmTrackParam* GetParamLast() { return &fParamLast ; } /** Modifiers **/ void SetPidHypo(Int_t pid) { fPidHypo = pid; } void SetParamFirst(CbmTrackParam& par) { fParamFirst = par; } void SetParamLast(CbmTrackParam& par) { fParamLast = par; } void SetFlag(Int_t flag) { fFlag = flag; } void SetChi2(Double_t chi2) { fChi2 = chi2; } void SetNDF(Int_t ndf) { fNDF = ndf; } void SetB(Double_t b) { fB = b; } private: /** Arrays containg the indizes of the hits attched to the track **/ TArrayI fHits; /** PID hypothesis used by the track fitter **/ Int_t fPidHypo; /** Track parameters at first and last fitted hit **/ CbmTrackParam fParamFirst; CbmTrackParam fParamLast; /** Quality flag **/ Int_t fFlag; /** Chi square and NDF of track fit **/ Double32_t fChi2; Int_t fNDF; /** Impact parameter of track at target z, in units of its error **/ Double32_t fB; /** Maps from hit z position to hit index. STL map is used because it ** is automatically sorted. Temporary only; not for storgage. ** The Hit index array will be filled by the method SortHits. **/ map fHitMap; //! ClassDef(CbmStsTrack,1); }; #endif