1 #ifndef ALITPCCLUSTERMI_H
2 #define ALITPCCLUSTERMI_H
4 //-------------------------------------------------------
7 // Origin: Marian Ivanov
8 //-------------------------------------------------------
10 #include "AliCluster.h"
13 //_____________________________________________________________________________
14 class AliTPCclusterMI : public AliCluster {
16 AliTPCclusterMI():AliCluster(){fQ=0; fUsed=0;}
17 AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (Short_t)hit[4];}
18 virtual Bool_t IsSortable() const;
19 virtual Int_t Compare(const TObject* obj) const;
20 inline void Use(Int_t inc=10);
21 void SetQ(Float_t q) {fQ=(Short_t)q;}
22 void SetType(Char_t type) {fType=type;}
23 void SetMax(Short_t max) {fMax=max;}
24 Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
25 Float_t GetQ() const {return TMath::Abs(fQ);}
26 Float_t GetMax() const {return fMax;}
27 Char_t GetType()const {return fType;}
30 Short_t fQ ; //Q of cluster (in ADC counts)
31 Char_t fType; //type of the cluster 0 means golden
32 Short_t fMax; //maximal amplitude in cluster
33 Char_t fUsed; //counter of usage
34 ClassDef(AliTPCclusterMI,1) // Time Projection Chamber clusters
37 void AliTPCclusterMI::Use(Int_t inc)
39 if (inc>0) fUsed+=inc;
44 class AliTPCclusterLMI {
46 Short_t fCZ; // current cluster position Z in cm - 100 mum precision
47 Short_t fCY; // current cluster position Y in cm - 100 mum precision
48 UChar_t fSigmaZ; // shape Z - normalised shape - normaliziation 1 - precision 2 percent
49 UChar_t fSigmaY; // shape Y - normalised shape - normaliziation 1 - precision 2 percent
50 UShort_t fQ; // total charge in cluster
51 UShort_t fMax; // charge at maximum
52 Char_t fCType; // type of the cluster
53 Int_t fLabel[3]; // track indexes
55 AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
56 inline Float_t GetZ() {return (fCZ*0.01);}
57 inline Float_t GetY() {return (fCY*0.01);}
58 inline Float_t GetSigmaZ() {return (fSigmaZ*0.02);}
59 inline Float_t GetSigmaY() {return (fSigmaY*0.02);}
60 inline Int_t GetType() {return fCType;}
61 inline Int_t GetMax() {return fMax;}
62 inline Float_t GetQ() {return fQ;}
63 inline Int_t GelLabel(Int_t i){return fLabel[i];}
65 void SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));}
66 void SetZ(Float_t z){ fCZ = Short_t(TMath::Nint(z*100.));}
67 void SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
68 void SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
69 void SetQ(Float_t q) {fQ = UShort_t(q);}
70 void SetMax(Float_t max) {fMax = UShort_t(max);}
71 void SetType(Char_t type) {fCType = type;}
72 void SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
75 ClassDef(AliTPCclusterLMI,1)