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