3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 //-------------------------------------------------------
11 // Class needed for TPC parallel tracking
14 //-------------------------------------------------------
19 #include <TVectorFfwd.h>
20 #include "AliTPCtrack.h"
21 #include "AliComplexCluster.h"
27 class AliTPCclusterMI;
28 class AliTPCTrackerPoint;
33 class AliTPCseed : public AliTPCtrack {
36 virtual ~AliTPCseed();
37 virtual TObject* Clone(const char* newname = "") const;
38 AliTPCseed(const AliTPCtrack &t);
39 AliTPCseed(const AliTPCseed &s, Bool_t clusterOwner = kFALSE);
40 //AliTPCseed(const AliTPCseed &t, Double_t a);
41 AliTPCseed(Double_t xr, Double_t alpha, const Double_t xx[5],
42 const Double_t cc[15], Int_t i);
43 AliTPCseed &operator = (const AliTPCseed & param);
44 void Clear(Option_t* = "");
45 static Int_t RefitTrack(AliTPCseed* seed, AliExternalTrackParam * in, AliExternalTrackParam * out);
46 Bool_t RefitTrack(AliTPCseed* seed, Bool_t out);
47 Int_t Compare(const TObject *o) const;
48 void Reset(Bool_t all = kTRUE);
49 Int_t GetProlongation(Double_t xr, Double_t &y, Double_t & z) const;
50 virtual Double_t GetPredictedChi2(const AliCluster *cluster2) const;
51 virtual Bool_t Update(const AliCluster* c2, Double_t chi2, Int_t i);
52 AliTPCTrackerPoint * GetTrackPoint(Int_t i);
53 AliTPCclusterMI * GetClusterFast(Int_t irow){ return fClusterPointer[irow];}
54 AliTPCclusterMI * GetClusterFast(Int_t irow) const { return fClusterPointer[irow];}
55 void SetClusterPointer(Int_t irow, AliTPCclusterMI* cl) {fClusterPointer[irow]=cl;}
56 Double_t GetDensityFirst(Int_t n);
57 Double_t GetSigma2C() const {
58 Double_t cnv=GetBz()*kB2C;
59 return GetSigma1Pt2()*cnv*cnv;
61 void GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable, Int_t &shared, Bool_t plus2);
63 void Modify(Double_t factor);
64 void SetClusterIndex2(Int_t row, Int_t index) {
67 Int_t GetClusterIndex2(Int_t row) const {
70 Int_t GetClusterSector(Int_t row) const {
72 if (fIndex[row]>=0) pica = ((fIndex[row]&0xff000000)>>24);
76 Double_t GetYat(Double_t x) const;
78 void SetErrorY2(Float_t sy2){fErrorY2=sy2;}
79 void SetErrorZ2(Float_t sz2){fErrorZ2=sz2;}
80 Float_t CookdEdx(Double_t low=0.05, Double_t up=0.70, Int_t i1=0, Int_t i2=159, Bool_t onlyused = kFALSE);
81 Float_t CookShape(Int_t type);
82 // Float_t CookShape2(Int_t type,Bool_t withQ);
84 Bool_t IsActive() const { return !(fRemoval);}
85 void Desactivate(Int_t reason){ fRemoval = reason;}
86 AliTPCclusterMI* GetClusterPointer(Int_t i) const {return fClusterPointer[i];}
87 Int_t GetSector() const {return fSector;}
88 Float_t GetCurrentSigmaY2() const {return fCurrentSigmaY2;}
89 Float_t GetCurrentSigmaZ2() const {return fCurrentSigmaZ2;}
90 Int_t GetRelativeSector() const {return fRelativeSector;}
91 Char_t GetCircular() const {return fCircular;}
93 void SetCurrentSigmaY2(Float_t s) {fCurrentSigmaY2=s;}
94 void SetCurrentSigmaZ2(Float_t s) {fCurrentSigmaZ2=s;}
95 void SetRelativeSector(Int_t r) {fRelativeSector=r;}
96 void SetCircular(Char_t c) {fCircular=c;}
97 void SetIsSeeding(Bool_t s) {fIsSeeding=s;}
98 void SetSeedType(Int_t s) {fSeedType=s;}
99 void SetSeed1(Int_t s) {fSeed1=s;}
100 void SetSeed2(Int_t s) {fSeed2=s;}
101 void SetESD(AliESDtrack* esd) {fEsd=esd;}
102 void SetBSigned(Bool_t s) {fBSigned=s;}
103 void SetSort(Int_t s) {fSort=s;}
104 void SetOverlapLabel(Int_t i, Int_t l) {fOverlapLabels[i]=l;}
105 void SetCurrentCluster(AliTPCclusterMI* cl) {fCurrentCluster=cl;}
106 void SetNoCluster(Int_t n) {fNoCluster=n;}
107 void SetRow(Int_t n) {fRow=n;}
108 void SetSector(Int_t n) {fSector=n;}
109 void SetCurrentClusterIndex1(Int_t n) {fCurrentClusterIndex1=n;}
110 void SetInDead(Bool_t s) {fInDead=s;}
112 Double_t TPCrPID(Int_t i) const {return fTPCr[i];}
113 Double_t* TPCrPIDs() {return fTPCr;}
114 Bool_t GetIsSeeding() const {return fIsSeeding;}
115 Int_t GetSeedType() const {return fSeedType;}
116 Int_t GetSeed1() const {return fSeed1;}
117 Int_t GetSeed2() const {return fSeed2;}
118 AliESDtrack* GetESD() {return fEsd;}
119 Float_t GetSDEDX(Int_t i) const {return fSDEDX[i];}
120 Float_t GetDEDXregion(Int_t i) const {return fDEDX[i];}
121 Int_t GetNCDEDX(Int_t i) const {return fNCDEDX[i];}
122 Int_t GetNCDEDXInclThres(Int_t i) const {return fNCDEDXInclThres[i];}
123 Bool_t GetBSigned() const {return fBSigned;}
124 Int_t GetSort() const {return fSort;}
125 Int_t GetOverlapLabel(Int_t i) const {return fOverlapLabels[i];}
126 AliTPCclusterMI* GetCurrentCluster() const {return fCurrentCluster;}
127 Int_t GetNoCluster() const {return fNoCluster;}
128 Int_t GetRow() const {return fRow;}
129 Int_t GetCurrentClusterIndex1() const {return fCurrentClusterIndex1;}
130 Bool_t GetInDead() const {return fInDead;}
131 Float_t GetErrorY2() const {return fErrorY2;}
132 Float_t GetErrorZ2() const {return fErrorZ2;}
133 Float_t GetCMeanSigmaY2p30() const {return fCMeanSigmaY2p30;}
134 Float_t GetCMeanSigmaZ2p30() const {return fCMeanSigmaZ2p30;}
135 Float_t GetCMeanSigmaY2p30R() const {return fCMeanSigmaY2p30R;}
136 Float_t GetCMeanSigmaZ2p30R() const {return fCMeanSigmaZ2p30R;}
140 Float_t CookdEdxNorm(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=159, Bool_t shapeNorm=kTRUE, Int_t posNorm=0, Int_t padNorm=0,Int_t returnVal=0);
142 Float_t CookdEdxAnalytical(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=159, Int_t returnVal=0, Int_t rowThres = 2, Int_t mode=0, TVectorT<float> *returnVec = NULL);
144 static void GetError(AliTPCclusterMI* cluster, AliExternalTrackParam * param,
145 Double_t& erry, Double_t &errz);
146 static void GetShape(AliTPCclusterMI* cluster, AliExternalTrackParam * param,
147 Double_t& rmsy, Double_t &rmsz);
148 static Double_t GetQCorrGeom(Float_t ty, Float_t tz);
149 static Double_t GetQCorrShape(Int_t ipad, Int_t type,Float_t z, Float_t ty, Float_t tz, Float_t q, Float_t thr);
151 // Float_t GetTPCClustInfo(Int_t nNeighbours, Int_t type, Int_t row0, Int_t row1, TVectorT<float> *returnVec);
152 void SetPoolID(Int_t id) {fPoolID = id;}
153 Int_t GetPoolID() const {return fPoolID;}
154 Int_t GetNumberOfClustersIndices(); // Should be in AliTPCtrack
156 // AliTPCseed & operator = (const AliTPCseed &)
157 // {::Fatal("= operator","Not Implemented\n");return *this;}
158 AliESDtrack * fEsd; //!
159 AliTPCclusterMI* fClusterPointer[160]; // array of cluster pointers -
160 Bool_t fClusterOwner; // indicates the track is owner of cluster
162 Int_t fRow; // current row number
163 Int_t fSector; // current sector number
164 Int_t fRelativeSector; // index of current relative sector
165 Float_t fCurrentSigmaY2; //!expected current cluster sigma Y
166 Float_t fCurrentSigmaZ2; //!expected current cluster sigma Z
167 Float_t fCMeanSigmaY2p30; //! current mean sigma Y2 - mean30%
168 Float_t fCMeanSigmaZ2p30; //! current mean sigma Z2 - mean30%
169 Float_t fCMeanSigmaY2p30R; //! current relative mean sigma Y2 - mean30%
170 Float_t fCMeanSigmaZ2p30R; //! current relative mean sigma Z2 - mean30%
171 Float_t fErrorY2; //!sigma of current cluster
172 Float_t fErrorZ2; //!sigma of current cluster
173 AliTPCclusterMI * fCurrentCluster; //!pointer to the current cluster for prolongation
174 Int_t fCurrentClusterIndex1; //! index of the current cluster
175 Bool_t fInDead; //! indicate if the track is in dead zone
176 Bool_t fIsSeeding; //!indicates if it is proces of seeading
177 Int_t fNoCluster; //!indicates number of rows without clusters
178 Int_t fSort; //!indicate criteria for sorting
179 Bool_t fBSigned; //indicates that clusters of this trackes are signed to be used
182 Float_t fDEDX[9]; // dedx according padrows
183 Float_t fSDEDX[4]; // sdedx according padrows
184 Int_t fNCDEDX[4]; // number of clusters for dedx measurment
185 Int_t fNCDEDXInclThres[4]; // number of clusters for dedx measurment including sub-threshold clusters
186 Double_t fTPCr[AliPID::kSPECIES]; // rough PID according TPC
188 Int_t fSeedType; //seeding type
189 Int_t fSeed1; //first row for seeding
190 Int_t fSeed2; //last row for seeding
191 Int_t fOverlapLabels[12]; //track labels and the length of the overlap
192 Float_t fMAngular; // mean angular factor
193 Char_t fCircular; // indicates curlin track
194 AliTPCTrackerPoint fTrackPoints[160]; //track points - array track points
195 Int_t fPoolID; //! id in the pool
196 ClassDef(AliTPCseed,7)