]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCclusterMI.h
Update of slat geometry
[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(){fQ=0; fUsed=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   void SetQ(Float_t q) {fQ=(UShort_t)q;}
26   void SetType(Char_t type) {fType=type;}
27   void SetMax(UShort_t max) {fMax=max;}
28   Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
29   Float_t GetQ() const {return TMath::Abs(fQ);}
30   Float_t GetMax() const {return fMax;} 
31   Char_t  GetType()const {return fType;}
32  
33 private:
34   Short_t   fQ ;       //Q of cluster (in ADC counts)  
35   Char_t    fType;     //type of the cluster 0 means golden 
36   Short_t   fMax;      //maximal amplitude in cluster
37   Char_t    fUsed;     //counter of usage  
38  ClassDef(AliTPCclusterMI,1)  // Time Projection Chamber clusters
39 };
40
41 void AliTPCclusterMI::Use(Int_t inc) 
42
43   if (inc>0)  fUsed+=inc; 
44   else 
45     fUsed=0;
46 }
47
48 class AliTPCclusterLMI  {
49
50 public:
51   AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
52   Float_t  GetZ()            const {return (fCZ*0.01);}
53   Float_t  GetY()            const {return (fCY*0.01);}
54   Float_t  GetSigmaZ()       const {return (fSigmaZ*0.02);}
55   Float_t  GetSigmaY()       const {return (fSigmaY*0.02);}  
56   Int_t  GetType()           const {return fCType;}
57   Int_t  GetMax()            const {return fMax;}
58   Float_t  GetQ()            const {return fQ;}
59   Int_t    GelLabel(Int_t i) const {return fLabel[i];}
60   //
61   void     SetY(Float_t y){ fCY = (UShort_t)(TMath::Nint(y*100.));} 
62   void     SetZ(Float_t z){ fCZ = (UShort_t)(TMath::Nint(z*100.));} 
63   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = (UChar_t)(TMath::Nint(sigmaz*50.));}
64   void     SetSigmaY(Float_t sigmay) {fSigmaY = (UChar_t)(TMath::Nint(sigmay*50.));}
65   void     SetQ(Float_t q) {fQ = (UShort_t)q;}
66   void     SetMax(Float_t max) {fMax = (UShort_t)max;}
67   void     SetType(Char_t type) {fCType = type;}
68   void     SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
69
70 private:
71   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
72   Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
73   UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
74   UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
75   UShort_t fQ;        // total charge in cluster 
76   UShort_t fMax;      // charge at maximum  
77   Char_t   fCType;    // type of the cluster
78   Int_t    fLabel[3];    // track indexes 
79   ClassDef(AliTPCclusterLMI,1)  
80 };
81
82
83
84 #endif
85
86