]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCclusterMI.h
Adding base class for TPC calibration components
[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 class AliTPCclusterInfo;
16 //_____________________________________________________________________________
17 class AliTPCclusterMI : public AliCluster {
18 public:
19   AliTPCclusterMI(Bool_t withInfo=kTRUE);
20   AliTPCclusterMI(const AliTPCclusterMI & cluster);
21   AliTPCclusterMI &operator = (const AliTPCclusterMI & cluster); //assignment operator
22   AliTPCclusterMI(Int_t *lab, Float_t *hit);
23   virtual ~AliTPCclusterMI();
24   virtual Bool_t IsSortable() const; 
25   virtual Int_t Compare(const TObject* obj) const;
26   inline  void Use(Int_t inc=10);
27   virtual Int_t GetDetector() const {return fDetector;}
28   virtual Int_t GetRow() const {return fRow;}
29   virtual void SetDetector(Int_t detector);
30   virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}  
31   virtual void SetTimeBin(Float_t timeBin){ fTimeBin= timeBin;}
32   virtual void SetPad(Float_t pad){ fPad = pad;}
33   //
34   void SetQ(Float_t q) {fQ=(UShort_t)q;}
35   void SetType(Char_t type) {fType=type;}
36   void SetMax(UShort_t max) {fMax=max;}
37   Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
38   Float_t GetQ() const {return TMath::Abs(fQ);}
39   Float_t GetMax() const {return fMax;} 
40   Char_t  GetType()const {return fType;}
41   Float_t GetTimeBin() const { return fTimeBin;}
42   Float_t GetPad() const { return fPad;}
43   AliTPCclusterInfo * GetInfo() const { return fInfo;}
44   void SetInfo(AliTPCclusterInfo * info);
45
46 private:
47   AliTPCclusterInfo * fInfo;  // pointer to the cluster debug info
48   Float_t   fTimeBin;  //time bin coordinate
49   Float_t   fPad;  //pad coordinate
50   Short_t   fQ ;       //Q of cluster (in ADC counts)  
51   Short_t   fMax;      //maximal amplitude in cluster
52   Char_t    fType;     //type of the cluster 0 means golden 
53   Char_t    fUsed;     //counter of usage  
54   UChar_t   fDetector; //detector  number
55   UChar_t   fRow;      //row number number
56   ClassDef(AliTPCclusterMI,5)  // Time Projection Chamber clusters
57 };
58
59 void AliTPCclusterMI::Use(Int_t inc) 
60
61   if (inc>0)  fUsed+=inc; 
62   else 
63     fUsed=0;
64 }
65
66
67
68 #endif
69
70