X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCtracker.h;h=85a775f1ce576fda5b33188422040ed9e322fc1d;hb=fe004456ecb6a26322d2abcfefb698ac6d703ce0;hp=ebe7647f2c3561a12a72ab9c1717dc882ddb1e08;hpb=e24ea4748e130606bc8bf170bee34446aa5f508b;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCtracker.h b/TPC/AliTPCtracker.h index ebe7647f2c3..85a775f1ce5 100644 --- a/TPC/AliTPCtracker.h +++ b/TPC/AliTPCtracker.h @@ -16,28 +16,28 @@ #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) { - fInnerSec=fOuterSec=0; fSeeds=0; - fParam = 0; - } + AliTPCtracker(); AliTPCtracker(const AliTPCParam *par); ~AliTPCtracker(); Int_t ReadSeeds(const TFile *in); - Int_t LoadClusters(); + 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 PropagateBack(const TFile *in, const TFile *in2, TFile *out); - Int_t RefitInward(TFile *outTracks, TFile *inTracks); + Int_t Clusters2Tracks(AliESDEvent *event); + Int_t PropagateBack(AliESDEvent *event); + Int_t RefitInward(AliESDEvent *event); virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const; @@ -45,17 +45,16 @@ public: //**************** Internal tracker class ********************** class AliTPCRow { public: - AliTPCRow() { - fN=0; - fSize=kMaxClusterPerRow/8; - fClusterArray=new AliTPCcluster[fSize]; - } + 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;} + 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 *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];} @@ -64,22 +63,22 @@ public: 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; } @@ -126,15 +125,14 @@ public: AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator }; -//**************** Internal tracker class ********************** +//**************** Internal tracker class ********************** class AliTPCseed : public AliTPCtrack { public: - AliTPCseed():AliTPCtrack(){} - AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){} - AliTPCseed(const AliKalmanTrack &t, Double_t a):AliTPCtrack(t,a){} - AliTPCseed(UInt_t index, const Double_t xx[5], - const Double_t cc[15], Double_t xr, Double_t alpha): - AliTPCtrack(index, xx, cc, xr, alpha) {} + AliTPCseed():AliTPCtrack(){Init();} + AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){Init();} + AliTPCseed(Double_t xr, Double_t alpha, const Double_t xx[5], + const Double_t cc[15], Int_t index): + AliTPCtrack(xr, alpha, xx, cc, index) {Init();} void SetSampledEdx(Float_t q, Int_t i) { Double_t s=GetSnp(), t=GetTgl(); q *= TMath::Sqrt((1-s*s)/(1+t*t)); @@ -143,9 +141,9 @@ public: void CookdEdx(Double_t low=0.05, Double_t up=0.70); private: + void Init() {for (Int_t i=0; i<200; i++) fdEdxSample[i]=0.;} Float_t fdEdxSample[200]; //array of dE/dx samples }; - private: void MakeSeeds(Int_t i1, Int_t i2); @@ -166,6 +164,8 @@ private: AliTPCParam *fParam; //! TPC parameters for outer reference plane [SR, GSI, 18.02.2003] TObjArray *fSeeds; //array of track seeds + + ClassDef(AliTPCtracker,2) // Time Projection Chamber tracker }; #endif