]>
Commit | Line | Data |
---|---|---|
1c53abe2 | 1 | #ifndef ALITPCCLUSTERMI_H |
2 | #define ALITPCCLUSTERMI_H | |
3 | ||
4 | //------------------------------------------------------- | |
5 | // TPC Cluster Class | |
6d171107 | 6 | // Parallel tracking |
1c53abe2 | 7 | // Origin: Marian Ivanov |
8 | //------------------------------------------------------- | |
9 | ||
6d171107 | 10 | /* $Id$ */ |
11 | ||
12 | ||
1c53abe2 | 13 | #include "AliCluster.h" |
14 | #include "TMath.h" | |
f5b043b1 | 15 | #include "AliTPCclusterInfo.h" |
05da1b4e | 16 | #include <AliTrackPointArray.h> |
5a10f09e | 17 | |
1c53abe2 | 18 | //_____________________________________________________________________________ |
19 | class AliTPCclusterMI : public AliCluster { | |
eea44233 | 20 | enum Status{ kDisabled = 0x7F}; |
1c53abe2 | 21 | public: |
d101caf3 | 22 | AliTPCclusterMI(); |
03fe1804 | 23 | AliTPCclusterMI(const AliTPCclusterMI & cluster); |
24 | AliTPCclusterMI &operator = (const AliTPCclusterMI & cluster); //assignment operator | |
2f32844a | 25 | AliTPCclusterMI(Int_t *lab, Float_t *hit); |
03fe1804 | 26 | virtual ~AliTPCclusterMI(); |
f5b043b1 | 27 | virtual void Clear(const Option_t*) { delete fInfo; fInfo=0;} |
1c53abe2 | 28 | virtual Bool_t IsSortable() const; |
29 | virtual Int_t Compare(const TObject* obj) const; | |
7fd61510 | 30 | inline void Use(Int_t inc=10); |
eea44233 | 31 | inline void Disable(){fUsed=kDisabled;} |
3e1f1ce7 | 32 | inline Bool_t IsDisabled() const {return (fUsed==kDisabled);} |
eea44233 | 33 | |
508541c7 | 34 | virtual Int_t GetDetector() const {return fDetector;} |
35 | virtual Int_t GetRow() const {return fRow;} | |
1ac29fc4 | 36 | virtual void SetDetector(Int_t detector); |
508541c7 | 37 | virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);} |
03fe1804 | 38 | virtual void SetTimeBin(Float_t timeBin){ fTimeBin= timeBin;} |
39 | virtual void SetPad(Float_t pad){ fPad = pad;} | |
508541c7 | 40 | // |
6c024a0e | 41 | void SetQ(Float_t q) {fQ=(UShort_t)q;} |
1c53abe2 | 42 | void SetType(Char_t type) {fType=type;} |
6c024a0e | 43 | void SetMax(UShort_t max) {fMax=max;} |
7fd61510 | 44 | Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;} |
1c53abe2 | 45 | Float_t GetQ() const {return TMath::Abs(fQ);} |
46 | Float_t GetMax() const {return fMax;} | |
47 | Char_t GetType()const {return fType;} | |
03fe1804 | 48 | Float_t GetTimeBin() const { return fTimeBin;} |
49 | Float_t GetPad() const { return fPad;} | |
50 | AliTPCclusterInfo * GetInfo() const { return fInfo;} | |
b127a65f | 51 | void SetInfo(AliTPCclusterInfo * info); |
5a10f09e | 52 | // |
53 | AliTPCclusterMI* MakeCluster(AliTrackPoint* point); | |
32438f4e | 54 | AliTrackPoint* MakePoint(); |
e83fd282 | 55 | static void SetGlobalTrackPoint(const AliCluster &cl, AliTrackPoint &point); |
56 | ||
1c53abe2 | 57 | private: |
e32b09f8 | 58 | AliTPCclusterInfo * fInfo; // pointer to the cluster debug info |
59 | Float_t fTimeBin; //time bin coordinate | |
60 | Float_t fPad; //pad coordinate | |
1c53abe2 | 61 | Short_t fQ ; //Q of cluster (in ADC counts) |
1c53abe2 | 62 | Short_t fMax; //maximal amplitude in cluster |
e32b09f8 | 63 | Char_t fType; //type of the cluster 0 means golden |
7fd61510 | 64 | Char_t fUsed; //counter of usage |
508541c7 | 65 | UChar_t fDetector; //detector number |
66 | UChar_t fRow; //row number number | |
76dc9fe0 | 67 | ClassDef(AliTPCclusterMI,5) // Time Projection Chamber clusters |
1c53abe2 | 68 | }; |
69 | ||
7fd61510 | 70 | void AliTPCclusterMI::Use(Int_t inc) |
71 | { | |
72 | if (inc>0) fUsed+=inc; | |
73 | else | |
74 | fUsed=0; | |
75 | } | |
76 | ||
1c53abe2 | 77 | |
78 | ||
79 | #endif | |
80 | ||
81 |