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