X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCtracker.h;h=85a775f1ce576fda5b33188422040ed9e322fc1d;hb=12f70d37f7072bf7b165cd2bf2c2e1c83237292e;hp=01a3edf7c6db46e8518fab1480e0a7a5bbd6e46d;hpb=7f6ddf589c191e48fb1ff2621a7dfa67bfaaa367;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCtracker.h b/TPC/AliTPCtracker.h index 01a3edf7c6d..85a775f1ce5 100644 --- a/TPC/AliTPCtracker.h +++ b/TPC/AliTPCtracker.h @@ -12,29 +12,32 @@ //------------------------------------------------------- #include "AliTracker.h" #include "AliTPCtrack.h" -#include "AliTPCClustersArray.h" - #include "AliTPCreco.h" +#include "AliTPCcluster.h" class TFile; +class TTree; +class TBranch; class AliTPCParam; +class TObjArray; +class TClonesArray; +class AliESDEvent; class AliTPCtracker : public AliTracker { public: - AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) {} - AliTPCtracker(const AliTPCParam *par, Int_t eventn=0); + AliTPCtracker(); + AliTPCtracker(const AliTPCParam *par); ~AliTPCtracker(); Int_t ReadSeeds(const TFile *in); - void LoadInnerSectors(); - void UnloadInnerSectors(); - void LoadOuterSectors(); - void UnloadOuterSectors(); + Int_t LoadClusters(TTree *c); + void UnloadClusters(); AliCluster *GetCluster(Int_t index) const; - Int_t Clusters2Tracks(const TFile *in, TFile *out); - Int_t PropagateBack(const TFile *in, TFile *out); + Int_t Clusters2Tracks(AliESDEvent *event); + Int_t PropagateBack(AliESDEvent *event); + Int_t RefitInward(AliESDEvent *event); virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const; @@ -42,30 +45,40 @@ public: //**************** Internal tracker class ********************** class AliTPCRow { public: - AliTPCRow() {fN=0;} - void InsertCluster(const AliTPCcluster *c, UInt_t index); + AliTPCRow(): + fN(0), fClusters(), fSize(kMaxClusterPerRow/8), + fClusterArray(new AliTPCcluster[fSize]), fIndex(), fX(0) {} + ~AliTPCRow() {delete[] fClusterArray;} + void InsertCluster(const AliTPCcluster *c, Int_t sec, Int_t row); + void ResetClusters() {fN=0; delete[] fClusterArray; fClusterArray=0;} operator int() const {return fN;} - const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];} + const AliTPCcluster *operator[](Int_t i) const {return fClusters[i];} + const AliTPCcluster *GetUnsortedCluster(Int_t i) const { + if ((i < 0) || (i >= fN)) return NULL; + return fClusterArray+i; + } UInt_t GetIndex(Int_t i) const {return fIndex[i];} Int_t Find(Double_t y) const; void SetX(Double_t x) {fX=x;} Double_t GetX() const {return fX;} private: + AliTPCRow(const AliTPCRow& r); //dummy copy constructor + AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator Int_t fN; //number of clusters const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters + Int_t fSize; //size of array of clusters + AliTPCcluster *fClusterArray; //array of clusters UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters Double_t fX; //X-coordinate of this row - - private: - AliTPCRow(const AliTPCRow& r); //dummy copy constructor - AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator }; //**************** Internal tracker class ********************** class AliTPCSector { public: - AliTPCSector() { fN=0; fRow = 0; } + AliTPCSector(): + fN(0),fRow(0),fAlpha(0),fAlphaShift(0), + fPadPitchWidth(0),f1PadPitchLength(0),f2PadPitchLength(0){} ~AliTPCSector() { delete[] fRow; } AliTPCRow& operator[](Int_t i) const { return *(fRow+i); } Int_t GetNRows() const { return fN; } @@ -78,14 +91,26 @@ public: Double_t GetAlphaShift() const {return fAlphaShift;} Int_t GetRowNumber(Double_t x) const { //return pad row number for this x - Double_t r=fRow[fN-1].GetX(); - if (x > r) return fN; - r=fRow[0].GetX(); - if (x < r) return -1; - return Int_t((x-r)/fPadPitchLength + 0.5); + Double_t r; + if (fN < 64){ + r=fRow[fN-1].GetX(); + if (x > r) return fN; + r=fRow[0].GetX(); + if (x < r) return -1; + return Int_t((x-r)/f1PadPitchLength + 0.5);} + else{ + r=fRow[fN-1].GetX(); + if (x > r) return fN; + r=fRow[0].GetX(); + if (x < r) return -1; + Double_t r1=fRow[64].GetX(); + if(x