]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCclusterMI.h
renamed CorrectionMatrix class
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
1 #ifndef ALITPCCLUSTERMI_H
2 #define ALITPCCLUSTERMI_H
3
4 //-------------------------------------------------------
5 //                    TPC Cluster Class
6 //   Parallel tracking
7 //   Origin: Marian Ivanov
8 //-------------------------------------------------------
9
10 /* $Id$ */
11
12
13 #include "AliCluster.h"
14 #include "TMath.h"
15
16 //_____________________________________________________________________________
17 class AliTPCclusterMI : public AliCluster {
18 public:
19   AliTPCclusterMI():AliCluster(){fX =0; fQ=0; fUsed=0; fDetector = 0; fRow =0;}
20   AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (UShort_t)hit[4];}
21   virtual ~AliTPCclusterMI() {}
22   virtual Bool_t IsSortable() const; 
23   virtual Int_t Compare(const TObject* obj) const;
24   inline  void Use(Int_t inc=10);
25   virtual Float_t GetX() const { return fX;}
26   virtual void  SetX(Float_t x) { fX = x;}
27   virtual Int_t GetDetector() const {return fDetector;}
28   virtual Int_t GetRow() const {return fRow;}
29   virtual void SetDetector(Int_t detector){fDetector = (UChar_t)(detector%256);}
30   virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}  
31   //
32   void SetQ(Float_t q) {fQ=(UShort_t)q;}
33   void SetType(Char_t type) {fType=type;}
34   void SetMax(UShort_t max) {fMax=max;}
35   Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
36   Float_t GetQ() const {return TMath::Abs(fQ);}
37   Float_t GetMax() const {return fMax;} 
38   Char_t  GetType()const {return fType;}
39  
40 private:
41   Float_t   fX;        //X position of cluster
42   Short_t   fQ ;       //Q of cluster (in ADC counts)  
43   Char_t    fType;     //type of the cluster 0 means golden 
44   Short_t   fMax;      //maximal amplitude in cluster
45   Char_t    fUsed;     //counter of usage  
46   UChar_t   fDetector; //detector  number
47   UChar_t   fRow;      //row number number
48   ClassDef(AliTPCclusterMI,2)  // Time Projection Chamber clusters
49 };
50
51 void AliTPCclusterMI::Use(Int_t inc) 
52
53   if (inc>0)  fUsed+=inc; 
54   else 
55     fUsed=0;
56 }
57
58 class AliTPCclusterLMI  {
59
60 public:
61   AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
62   virtual ~AliTPCclusterLMI(){}
63   Float_t  GetZ()            const {return (fCZ*0.01);}
64   Float_t  GetY()            const {return (fCY*0.01);}
65   Float_t  GetSigmaZ()       const {return (fSigmaZ*0.02);}
66   Float_t  GetSigmaY()       const {return (fSigmaY*0.02);}  
67   Int_t  GetType()           const {return fCType;}
68   Int_t  GetMax()            const {return fMax;}
69   Float_t  GetQ()            const {return fQ;}
70   Int_t    GelLabel(Int_t i) const {return fLabel[i];}
71   //
72   void     SetY(Float_t y){ fCY = (UShort_t)(TMath::Nint(y*100.));} 
73   void     SetZ(Float_t z){ fCZ = (UShort_t)(TMath::Nint(z*100.));} 
74   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = (UChar_t)(TMath::Nint(sigmaz*50.));}
75   void     SetSigmaY(Float_t sigmay) {fSigmaY = (UChar_t)(TMath::Nint(sigmay*50.));}
76   void     SetQ(Float_t q) {fQ = (UShort_t)q;}
77   void     SetMax(Float_t max) {fMax = (UShort_t)max;}
78   void     SetType(Char_t type) {fCType = type;}
79   void     SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
80
81 private:
82   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
83   Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
84   UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
85   UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
86   UShort_t fQ;        // total charge in cluster 
87   UShort_t fMax;      // charge at maximum  
88   Char_t   fCType;    // type of the cluster
89   Int_t    fLabel[3];    // track indexes 
90   ClassDef(AliTPCclusterLMI,1)  
91 };
92
93
94
95 #endif
96
97