]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliComplexCluster.h
Set the branch address only once
[u/mrichter/AliRoot.git] / TPC / AliComplexCluster.h
1 #ifndef ALICOMPLEXCLUSTER_H
2 #define ALICOMPLEXCLUSTER_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 #include "TObject.h"
9 #include "TMath.h"
10 #include "AliTPCclusterMI.h"
11 //
12
13 class AliComplexCluster : public TObject {
14 public:
15   friend class AliTPC;
16   friend class AliTPCClusterFinder;
17   friend class AliClusters;
18
19   AliComplexCluster() {
20     fTracks[0]=fTracks[1]=fTracks[2]=0; 
21     fX=fY=fQ=fSigmaX2=fSigmaY2=fSigmaXY=fArea=fMax=0.;
22   }
23   virtual ~AliComplexCluster() {;}
24   Bool_t    IsSortable() const;
25   Int_t Compare(const TObject *o) const;
26 private:
27   Int_t     fTracks[3];//labels of overlapped tracks
28   Float_t   fX ;       //Y of cluster
29   Float_t   fY ;       //Z of cluster
30   Float_t   fQ ;       //Q of cluster (in ADC counts)
31   Float_t   fSigmaX2;  //Sigma Y square of cluster
32   Float_t   fSigmaY2;  //Sigma Z square of cluster
33   Float_t   fSigmaXY;  //      XY moment 
34   Float_t   fArea;     //area of cluster
35   Float_t   fMax;     //amplitude at maximum 
36
37   ClassDef(AliComplexCluster,1)
38     // Cluster manager
39 };
40
41
42
43 class AliTPCTrackerPoint  {  
44  public:
45   Char_t   fIsShared;     // indicate sharing of the point between several tracks
46
47   AliTPCTrackerPoint(){fTX=0; fTY=0; fTZ=0; fTAngleZ=0; fTAngleY=0; fIsShared = 0;}
48   Float_t  GetX() const  {return (fTX*0.01);}
49   Float_t  GetZ() const {return (fTZ*0.01);}
50   Float_t  GetY() const {return (fTY*0.01);}
51   Float_t  GetAngleZ() const  {return (Float_t(fTAngleZ)*0.02);}
52   Float_t  GetAngleY() const {return (Float_t(fTAngleY)*0.02);}
53   //
54   void     SetX(Float_t x)  { fTX = Short_t(TMath::Nint(x*100.));} 
55   void     SetY(Float_t y)  { fTY = Short_t(TMath::Nint(y*100.));} 
56   void     SetZ(Float_t z)  { fTZ = Short_t(TMath::Nint(z*100.));} 
57   void     SetAngleZ(Float_t anglez) {fTAngleZ = Char_t(TMath::Nint(anglez*50.));}
58   void     SetAngleY(Float_t angley) {fTAngleY = Char_t(TMath::Nint(angley*50.));}
59   Float_t  GetSigmaZ() const {return (fSigmaZ*0.02);}
60   Float_t  GetSigmaY() const {return (fSigmaY*0.02);}  
61   Float_t  GetErrZ()   const {return (fErrZ*0.005);}
62   Float_t  GetErrY()   const {return (fErrY*0.005);}
63   void     SetErrZ(Float_t errz) {fErrZ = UChar_t(TMath::Nint(errz*200.));}
64   void     SetErrY(Float_t erry) {fErrY = UChar_t(TMath::Nint(erry*200.));}
65
66   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
67   void     SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
68   //
69  private:
70   Short_t   fTX;        // x position of the cluster  in cm - 10 mum prec
71   Short_t   fTZ;        // current prolongation in Z  in cm - 10 mum prec.
72   Short_t   fTY;        // current prolongation in Y  in cm - 10 mum prec.
73   Char_t    fTAngleZ;    // angle 
74   Char_t    fTAngleY;    // angle 
75   UShort_t  fSigmaZ;     // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
76   UShort_t  fSigmaY;     // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
77   UShort_t  fErrZ;       // z error estimate - in  mm - 50 mum precision 
78   UShort_t  fErrY;       // y error estimate - in  mm - 50 mum precision 
79
80   ClassDef(AliTPCTrackerPoint,1)  
81 };
82
83 class AliTPCClusterPoint  {
84  public:
85   AliTPCClusterPoint(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
86   inline Float_t  GetZ() const    {return (fCZ*0.01);}
87   inline Float_t  GetY() const   {return (fCY*0.01);}
88   inline Float_t  GetSigmaZ() const {return (fSigmaZ*0.02);}
89   inline Float_t  GetSigmaY() const {return (fSigmaY*0.02);}  
90   inline Int_t  GetType() const  {return fCType;}
91   inline Int_t  GetMax()  const {return fMax;}
92   inline Float_t  GetQ()  const {return fQ;}
93
94   //
95   void     SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));} 
96   void     SetZ(Float_t z){ fCZ = Short_t(TMath::Nint(z*100.));} 
97   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
98   void     SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
99   void     SetQ(Float_t q) {fQ = UShort_t(q);}
100   void     SetMax(Float_t max) {fMax = UShort_t(max);}
101   void     SetType(Char_t type) {fCType = type;}
102  private:
103   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
104   Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
105   UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
106   UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
107   UShort_t fQ;        // total charge in cluster 
108   UShort_t fMax;      // charge at maximum  
109   Char_t   fCType;    // type of the cluster
110
111   //
112   ClassDef(AliTPCClusterPoint,1)  
113 };
114
115
116 class AliTPCExactPoint : public TObject{
117  public:
118   AliTPCExactPoint(){fEZ=fEY=fEAngleZ=fEAngleY=fEAmp=fEPrim=fTrackID=0;}
119  private:
120   Float_t fEZ;       // current "exact" position according simulation
121   Float_t fEY;       // current "exact" position according simulation
122   Float_t fEX;       // x poistion of the cluster
123   Float_t fEAngleZ;  // angle Z
124   Float_t fEAngleY;  // angle Y
125   Float_t fEAmp;     // total charge deposited in row
126   Float_t fEPrim;    // primary charge deposited in row
127   Int_t   fTrackID;  // id of the track
128   Int_t   fRow;      // row
129   Int_t   fSec;      //sector
130   friend class AliTPCtrackerMI;
131   ClassDef(AliTPCExactPoint,1)  
132 };
133
134
135 class AliTPCTrackPoint: public TObject{
136  public:
137   friend class AliTPCtrackerMI;
138   AliTPCTrackPoint(){}
139   // AliTPCClusterPoint & GetCPoint(){return fCPoint;}
140   AliTPCTrackerPoint & GetTPoint(){return fTPoint;}
141   AliTPCclusterMI & GetCPoint(){return fCPoint;}  
142  private:
143   //  AliTPCClusterPoint fCPoint; 
144   //Char_t fIsShared;
145   AliTPCTrackerPoint fTPoint;  // track point
146   AliTPCclusterMI    fCPoint;  // cluster point
147   ClassDef(AliTPCTrackPoint,1)  
148 };
149
150 class AliTPCTrackPoint2: public AliTPCTrackPoint{
151  public:
152   friend class AliTPCtrackerMI;
153   AliTPCTrackPoint2(){}
154  private: 
155   Float_t fGX;    //global poition of the point
156   Float_t fGY;    //global poition of the point
157   Float_t fGZ;    //global poition of the point
158   //
159   Float_t fDY;    //distortion of the clusters from the global helix (3 point interpolation)
160   Float_t fDZ;    //distortion of the clusters from the global helix (3 point interpolation)
161   //
162   Float_t fDYU;  //derivation in y up
163   Float_t fDYD;  //distortion of y down
164   //
165   Float_t fDZU;  //derivation in y up
166   Float_t fDZD;  //distortion of y down
167   //
168   Float_t fDDY;  //derivation in y,z up-down
169   Float_t fDDZ;  //derivation in y,z up-down
170   //
171   Int_t   fID;            //id of the corresponding track
172   Int_t   fLab;           //MC label of the track
173   ClassDef(AliTPCTrackPoint2,1)  
174 };
175
176
177
178
179 class AliTPCTrackPointRef: public AliTPCTrackPoint{
180  public:
181   friend class AliTPCtrackerMI;
182   AliTPCExactPoint & GetExactPoint(){return fEPoint;}
183   AliTPCExactPoint & GetNearestPoint(){return fNPoint;}  
184  private:
185   AliTPCExactPoint fEPoint; //exact point belonging to track
186   AliTPCExactPoint fNPoint; //nearest point  
187   ClassDef(AliTPCTrackPointRef,1)  
188 };
189
190
191 #endif //ALICOMPLEXCLUSTER_H