1 #ifndef ALITPCCLUSTERMI_H
2 #define ALITPCCLUSTERMI_H
4 //-------------------------------------------------------
7 // Origin: Marian Ivanov
8 //-------------------------------------------------------
13 #include "AliCluster.h"
16 //_____________________________________________________________________________
17 class AliTPCclusterMI : public AliCluster {
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;}
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
41 void AliTPCclusterMI::Use(Int_t inc)
43 if (inc>0) fUsed+=inc;
48 class AliTPCclusterLMI {
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];}
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];}
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)