]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCtracker.h
Some function moved to AliZDC
[u/mrichter/AliRoot.git] / TPC / AliTPCtracker.h
CommitLineData
73042f01 1#ifndef ALITPCTRACKER_H
2#define ALITPCTRACKER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------
9// TPC tracker
10//
11// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
12//-------------------------------------------------------
b9de75e1 13#include "AliTracker.h"
73042f01 14#include "AliTPCtrack.h"
b9de75e1 15#include "AliTPCClustersArray.h"
73042f01 16
b9de75e1 17#include "AliTPCreco.h"
73042f01 18
19class TFile;
b9de75e1 20class AliTPCParam;
73042f01 21
b9de75e1 22class AliTPCtracker : public AliTracker {
73042f01 23public:
b9de75e1 24 AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) {}
afc42102 25 AliTPCtracker(const AliTPCParam *par, Int_t eventn);
26 AliTPCtracker(const AliTPCParam *par);
b9de75e1 27 ~AliTPCtracker();
28
29 Int_t ReadSeeds(const TFile *in);
30
31 void LoadInnerSectors();
32 void UnloadInnerSectors();
33 void LoadOuterSectors();
34 void UnloadOuterSectors();
73042f01 35
b9de75e1 36 AliCluster *GetCluster(Int_t index) const;
37 Int_t Clusters2Tracks(const TFile *in, TFile *out);
38 Int_t PropagateBack(const TFile *in, TFile *out);
39
40 virtual void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
41
42public:
73042f01 43//**************** Internal tracker class **********************
44 class AliTPCRow {
45 public:
46 AliTPCRow() {fN=0;}
47 void InsertCluster(const AliTPCcluster *c, UInt_t index);
48 operator int() const {return fN;}
49 const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];}
50 UInt_t GetIndex(Int_t i) const {return fIndex[i];}
51 Int_t Find(Double_t y) const;
b9de75e1 52 void SetX(Double_t x) {fX=x;}
53 Double_t GetX() const {return fX;}
73042f01 54
55 private:
b9de75e1 56 Int_t fN; //number of clusters
57 const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters
58 UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
59 Double_t fX; //X-coordinate of this row
73042f01 60
61 private:
62 AliTPCRow(const AliTPCRow& r); //dummy copy constructor
63 AliTPCRow &operator=(const AliTPCRow& r); //dummy assignment operator
64 };
65
66//**************** Internal tracker class **********************
67 class AliTPCSector {
68 public:
69 AliTPCSector() { fN=0; fRow = 0; }
b9de75e1 70 ~AliTPCSector() { delete[] fRow; }
73042f01 71 AliTPCRow& operator[](Int_t i) const { return *(fRow+i); }
72 Int_t GetNRows() const { return fN; }
b9de75e1 73 void Setup(const AliTPCParam *par, Int_t flag);
74 Double_t GetX(Int_t l) const {return fRow[l].GetX();}
75 Double_t GetMaxY(Int_t l) const {
76 return GetX(l)*TMath::Tan(0.5*GetAlpha());
77 }
78 Double_t GetAlpha() const {return fAlpha;}
79 Double_t GetAlphaShift() const {return fAlphaShift;}
80 Int_t GetRowNumber(Double_t x) const {
81 //return pad row number for this x
82 Double_t r=fRow[fN-1].GetX();
83 if (x > r) return fN;
84 r=fRow[0].GetX();
85 if (x < r) return -1;
86 return Int_t((x-r)/fPadPitchLength + 0.5);
87 }
88 Double_t GetPadPitchWidth() const {return fPadPitchWidth;}
89 Double_t GetPadPitchLength() const {return fPadPitchLength;}
90
91 private:
92 Int_t fN; //number of pad rows
73042f01 93 AliTPCRow *fRow; //array of pad rows
b9de75e1 94 Double_t fAlpha; //opening angle
95 Double_t fAlphaShift; //shift angle;
96 Double_t fPadPitchWidth; //pad pitch width
afc42102 97 Double_t fPadPitchLength; //pad pitch length
73042f01 98 private:
99 AliTPCSector(const AliTPCSector &s); //dummy copy contructor
100 AliTPCSector& operator=(const AliTPCSector &s);//dummy assignment operator
101 };
102
73042f01 103//**************** Internal tracker class **********************
104 class AliTPCseed : public AliTPCtrack {
105 public:
106 AliTPCseed():AliTPCtrack(){}
b9de75e1 107 AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){}
108 AliTPCseed(const AliKalmanTrack &t, Double_t a):AliTPCtrack(t,a){}
73042f01 109 AliTPCseed(UInt_t index, const Double_t xx[5],
110 const Double_t cc[15], Double_t xr, Double_t alpha):
111 AliTPCtrack(index, xx, cc, xr, alpha) {}
112 void SetSampledEdx(Float_t q, Int_t i) {
be9c5115 113 Double_t s=GetSnp(), t=GetTgl();
114 q *= TMath::Sqrt((1-s*s)/(1+t*t));
d4cf1daa 115 fdEdxSample[i]=q;
73042f01 116 }
73042f01 117 void CookdEdx(Double_t low=0.05, Double_t up=0.70);
118
119 private:
d4cf1daa 120 Float_t fdEdxSample[200]; //array of dE/dx samples
73042f01 121 };
122
123private:
b9de75e1 124 void MakeSeeds(Int_t i1, Int_t i2);
125 Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0);
126 Int_t FollowBackProlongation(AliTPCseed &s, const AliTPCtrack &t);
127
128 AliTPCtracker(const AliTPCtracker& r); //dummy copy constructor
129 AliTPCtracker &operator=(const AliTPCtracker& r);//dummy assignment operator
130
131 const Int_t fkNIS; //number of inner sectors
132 AliTPCSector *fInnerSec; //array of inner sectors;
133 const Int_t fkNOS; //number of outer sectors
134 AliTPCSector *fOuterSec; //array of outer sectors;
73042f01 135
b9de75e1 136 Int_t fN; //number of loaded sectors
137 AliTPCSector *fSectors; //pointer to loaded sectors;
138
afc42102 139 Int_t fEventN; //event number
b9de75e1 140 AliTPCClustersArray fClustersArray; //array of TPC clusters
141 TObjArray *fSeeds; //array of track seeds
142};
73042f01 143
144#endif
145
146