]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCseed.h
Adding possibility to use custom Gain map for dEdx calculation (Marian)
[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      AliTPCseed(const AliTPCtrack &t);
37      AliTPCseed(const AliTPCseed &s, Bool_t clusterOwner = kFALSE);
38      //AliTPCseed(const AliTPCseed &t, Double_t a);
39      AliTPCseed(Double_t xr, Double_t alpha, const Double_t xx[5], 
40                 const Double_t cc[15], Int_t i);   
41      AliTPCseed &operator = (const AliTPCseed & param);  
42      Int_t Compare(const TObject *o) const;
43      void Reset(Bool_t all = kTRUE);
44      Int_t GetProlongation(Double_t xr, Double_t &y, Double_t & z) const;
45      virtual Double_t GetPredictedChi2(const AliCluster *cluster2) const;
46      virtual Bool_t Update(const AliCluster* c2, Double_t chi2, Int_t i);
47      AliTPCTrackerPoint * GetTrackPoint(Int_t i);
48      AliTPCclusterMI * GetClusterFast(Int_t irow){ return fClusterPointer[irow];}
49      void SetClusterPointer(Int_t irow, AliTPCclusterMI* cl) {fClusterPointer[irow]=cl;}
50      Double_t GetDensityFirst(Int_t n);
51      Double_t GetSigma2C() const {
52        Double_t cnv=GetBz()*kB2C;
53        return GetSigma1Pt2()*cnv*cnv;
54      }
55      void GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable, Int_t &shared, Bool_t plus2);
56      
57      void Modify(Double_t factor);
58      void SetClusterIndex2(Int_t row, Int_t index) {
59        fIndex[row] = index;
60      }
61      Int_t  GetClusterIndex2(Int_t row) const {
62        return fIndex[row];
63      }
64      Int_t GetClusterSector(Int_t row) const {
65        Int_t pica = -1;
66        if (fIndex[row]>=0) pica =  ((fIndex[row]&0xff000000)>>24);
67        return pica;
68      }
69     
70      Double_t GetYat(Double_t x) const;
71
72      void SetErrorY2(Float_t sy2){fErrorY2=sy2;}
73      void SetErrorZ2(Float_t sz2){fErrorZ2=sz2;}
74      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);
75      Float_t  CookShape(Int_t type);
76      void CookPID();
77      Double_t Bethe(Double_t bg);     // return bethe-bloch
78      Double_t BetheMass(Double_t mass=0.1057);     // return bethe-bloch
79      //     void CookdEdx2(Double_t low=0.05, Double_t up=0.70);
80      Bool_t IsActive() const { return !(fRemoval);}
81      void Desactivate(Int_t reason){ fRemoval = reason;} 
82      AliTPCclusterMI* GetClusterPointer(Int_t i) const {return fClusterPointer[i];}
83      Int_t GetSector() const {return fSector;}
84      Float_t GetCurrentSigmaY2() const {return fCurrentSigmaY2;}
85      Float_t GetCurrentSigmaZ2() const {return fCurrentSigmaZ2;}
86      Int_t GetRelativeSector() const {return fRelativeSector;}
87      Char_t GetCircular() const {return fCircular;}
88
89      void SetCurrentSigmaY2(Float_t s) {fCurrentSigmaY2=s;}
90      void SetCurrentSigmaZ2(Float_t s) {fCurrentSigmaZ2=s;}
91      void SetRelativeSector(Int_t r) {fRelativeSector=r;}
92      void SetCircular(Char_t c) {fCircular=c;}
93      void SetIsSeeding(Bool_t s) {fIsSeeding=s;}
94      void SetSeedType(Int_t s) {fSeedType=s;}
95      void SetSeed1(Int_t s) {fSeed1=s;}
96      void SetSeed2(Int_t s) {fSeed2=s;}
97      void SetESD(AliESDtrack* esd) {fEsd=esd;}
98      void SetBSigned(Bool_t s) {fBSigned=s;}
99      void SetSort(Int_t s) {fSort=s;}
100      void SetOverlapLabel(Int_t i, Int_t l) {fOverlapLabels[i]=l;}
101      void SetCurrentCluster(AliTPCclusterMI* cl) {fCurrentCluster=cl;}
102      void SetNoCluster(Int_t n) {fNoCluster=n;}
103      void SetRow(Int_t n) {fRow=n;}
104      void SetSector(Int_t n) {fSector=n;}
105      void SetCurrentClusterIndex1(Int_t n) {fCurrentClusterIndex1=n;}
106      void SetInDead(Bool_t s) {fInDead=s;}
107
108      Double_t TPCrPID(Int_t i) const {return fTPCr[i];}
109      Double_t* TPCrPIDs() {return fTPCr;}
110      Bool_t GetIsSeeding() const {return fIsSeeding;}
111      Int_t GetSeedType() const {return fSeedType;}
112      Int_t GetSeed1() const {return fSeed1;}
113      Int_t GetSeed2() const {return fSeed2;}
114      AliESDtrack* GetESD() {return fEsd;}
115      Float_t GetSDEDX(Int_t i) const {return fSDEDX[i];}
116      Int_t GetNCDEDX(Int_t i) const {return fNCDEDX[i];}
117      Bool_t GetBSigned() const {return fBSigned;}
118      Int_t GetSort() const {return fSort;}
119      Int_t GetOverlapLabel(Int_t i) const {return fOverlapLabels[i];}
120      AliTPCclusterMI* GetCurrentCluster() const {return fCurrentCluster;}
121      Int_t GetNoCluster() const {return fNoCluster;}
122      Int_t GetRow() const {return fRow;}
123      Int_t GetCurrentClusterIndex1() const {return fCurrentClusterIndex1;}
124      Bool_t GetInDead() const {return fInDead;}
125      Float_t GetErrorY2() const {return fErrorY2;}
126      Float_t GetErrorZ2() const {return fErrorZ2;}
127   Float_t GetCMeanSigmaY2p30() const {return fCMeanSigmaY2p30;}
128   Float_t GetCMeanSigmaZ2p30() const {return fCMeanSigmaZ2p30;}
129   Float_t GetCMeanSigmaY2p30R() const {return fCMeanSigmaY2p30R;}
130   Float_t GetCMeanSigmaZ2p30R() const {return fCMeanSigmaZ2p30R;}
131      //
132      //
133      void SetClusterMapBit(int ibit, Bool_t state);
134      Bool_t GetClusterMapBit(int ibit);
135      void SetSharedMapBit(int ibit, Bool_t state);
136      Bool_t GetSharedMapBit(int ibit);
137      const TBits& GetClusterMap() const { return fClusterMap; };
138      const TBits& GetSharedMap() const { return fSharedMap; };
139
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, AliTPCCalPad * gainMap = 0);
141
142  private:
143      //     AliTPCseed & operator = (const AliTPCseed &)
144      //  {::Fatal("= operator","Not Implemented\n");return *this;}
145      AliESDtrack * fEsd; //!
146      AliTPCclusterMI*   fClusterPointer[160];  // array of cluster pointers  - 
147      Bool_t             fClusterOwner;         // indicates the track is owner of cluster
148      //---CURRENT VALUES
149      Int_t fRow;                 // current row number  
150      Int_t fSector;              // current sector number
151      Int_t fRelativeSector;      // index of current relative sector
152      Float_t fCurrentSigmaY2;    //!expected current cluster sigma Y
153      Float_t fCurrentSigmaZ2;    //!expected current cluster sigma Z
154      Float_t fCMeanSigmaY2p30;   //! current mean sigma Y2 - mean30%
155      Float_t fCMeanSigmaZ2p30;   //! current mean sigma Z2 - mean30%
156      Float_t fCMeanSigmaY2p30R;   //! current relative mean sigma Y2 - mean30%
157      Float_t fCMeanSigmaZ2p30R;   //! current relative mean sigma Z2 - mean30%
158      Float_t fErrorY2;           //!sigma of current cluster 
159      Float_t fErrorZ2;           //!sigma of current cluster    
160      AliTPCclusterMI * fCurrentCluster; //!pointer to the current cluster for prolongation
161      Int_t   fCurrentClusterIndex1; //! index of the current cluster
162      Bool_t  fInDead;            //! indicate if the track is in dead zone
163      Bool_t  fIsSeeding;         //!indicates if it is proces of seeading
164      Int_t   fNoCluster;         //!indicates number of rows without clusters
165      Int_t   fSort;              //!indicate criteria for sorting
166      Bool_t  fBSigned;        //indicates that clusters of this trackes are signed to be used
167      //
168      //
169      Float_t fDEDX[4];         // dedx according padrows
170      Float_t fSDEDX[4];        // sdedx according padrows
171      Int_t   fNCDEDX[4];       // number of clusters for dedx measurment
172      Double_t fTPCr[AliPID::kSPECIES];   // rough PID according TPC   
173      //
174      Int_t   fSeedType;         //seeding type
175      Int_t   fSeed1;            //first row for seeding
176      Int_t   fSeed2;            //last row for seeding
177      Int_t   fOverlapLabels[12];  //track labels and the length of the  overlap     
178      Float_t fMAngular;           // mean angular factor
179      Char_t   fCircular;           // indicates curlin track
180      AliTPCTrackerPoint  fTrackPoints[160];  //track points - array track points
181      TBits   fClusterMap;       // bit is 1 if track has a hit on padrow
182      TBits   fSharedMap;        // bit is 1 if track shares a hit on padrow
183      ClassDef(AliTPCseed,3)  
184 };
185
186
187
188
189
190 #endif
191
192