]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCclusterMI.h
3122672040a63840d671de5e5ccf7b567a00ef77
[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   virtual ~AliTPCclusterLMI(){}
53   Float_t  GetZ()            const {return (fCZ*0.01);}
54   Float_t  GetY()            const {return (fCY*0.01);}
55   Float_t  GetSigmaZ()       const {return (fSigmaZ*0.02);}
56   Float_t  GetSigmaY()       const {return (fSigmaY*0.02);}  
57   Int_t  GetType()           const {return fCType;}
58   Int_t  GetMax()            const {return fMax;}
59   Float_t  GetQ()            const {return fQ;}
60   Int_t    GelLabel(Int_t i) const {return fLabel[i];}
61   //
62   void     SetY(Float_t y){ fCY = (UShort_t)(TMath::Nint(y*100.));} 
63   void     SetZ(Float_t z){ fCZ = (UShort_t)(TMath::Nint(z*100.));} 
64   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = (UChar_t)(TMath::Nint(sigmaz*50.));}
65   void     SetSigmaY(Float_t sigmay) {fSigmaY = (UChar_t)(TMath::Nint(sigmay*50.));}
66   void     SetQ(Float_t q) {fQ = (UShort_t)q;}
67   void     SetMax(Float_t max) {fMax = (UShort_t)max;}
68   void     SetType(Char_t type) {fCType = type;}
69   void     SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
70
71 private:
72   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
73   Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
74   UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
75   UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
76   UShort_t fQ;        // total charge in cluster 
77   UShort_t fMax;      // charge at maximum  
78   Char_t   fCType;    // type of the cluster
79   Int_t    fLabel[3];    // track indexes 
80   ClassDef(AliTPCclusterLMI,1)  
81 };
82
83
84
85 #endif
86
87