]>
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" | |
15 | ||
16 | //_____________________________________________________________________________ | |
17 | class AliTPCclusterMI : public AliCluster { | |
18 | public: | |
7fd61510 | 19 | AliTPCclusterMI():AliCluster(){fQ=0; fUsed=0;} |
1c53abe2 | 20 | AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (Short_t)hit[4];} |
6d171107 | 21 | virtual ~AliTPCclusterMI() {} |
1c53abe2 | 22 | virtual Bool_t IsSortable() const; |
23 | virtual Int_t Compare(const TObject* obj) const; | |
7fd61510 | 24 | inline void Use(Int_t inc=10); |
1c53abe2 | 25 | void SetQ(Float_t q) {fQ=(Short_t)q;} |
26 | void SetType(Char_t type) {fType=type;} | |
27 | void SetMax(Short_t max) {fMax=max;} | |
7fd61510 | 28 | Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;} |
1c53abe2 | 29 | Float_t GetQ() const {return TMath::Abs(fQ);} |
30 | Float_t GetMax() const {return fMax;} | |
31 | Char_t GetType()const {return fType;} | |
7fd61510 | 32 | |
1c53abe2 | 33 | private: |
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 | |
7fd61510 | 37 | Char_t fUsed; //counter of usage |
38 | ClassDef(AliTPCclusterMI,1) // Time Projection Chamber clusters | |
1c53abe2 | 39 | }; |
40 | ||
7fd61510 | 41 | void AliTPCclusterMI::Use(Int_t inc) |
42 | { | |
43 | if (inc>0) fUsed+=inc; | |
44 | else | |
45 | fUsed=0; | |
46 | } | |
47 | ||
1c53abe2 | 48 | class AliTPCclusterLMI { |
6d171107 | 49 | |
50 | public: | |
1c53abe2 | 51 | AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;} |
6d171107 | 52 | Float_t GetZ() const {return (fCZ*0.01);} |
53 | Float_t GetY() const {return (fCY*0.01);} | |
54 | Float_t GetSigmaZ() const {return (fSigmaZ*0.02);} | |
55 | Float_t GetSigmaY() const {return (fSigmaY*0.02);} | |
56 | Int_t GetType() const {return fCType;} | |
57 | Int_t GetMax() const {return fMax;} | |
58 | Float_t GetQ() const {return fQ;} | |
59 | Int_t GelLabel(Int_t i) const {return fLabel[i];} | |
1c53abe2 | 60 | // |
61 | void SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));} | |
62 | void SetZ(Float_t z){ fCZ = Short_t(TMath::Nint(z*100.));} | |
63 | void SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));} | |
64 | void SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));} | |
65 | void SetQ(Float_t q) {fQ = UShort_t(q);} | |
66 | void SetMax(Float_t max) {fMax = UShort_t(max);} | |
67 | void SetType(Char_t type) {fCType = type;} | |
68 | void SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];} | |
6d171107 | 69 | |
70 | private: | |
71 | Short_t fCZ; // current cluster position Z in cm - 100 mum precision | |
72 | Short_t fCY; // current cluster position Y in cm - 100 mum precision | |
73 | UChar_t fSigmaZ; // shape Z - normalised shape - normaliziation 1 - precision 2 percent | |
74 | UChar_t fSigmaY; // shape Y - normalised shape - normaliziation 1 - precision 2 percent | |
75 | UShort_t fQ; // total charge in cluster | |
76 | UShort_t fMax; // charge at maximum | |
77 | Char_t fCType; // type of the cluster | |
78 | Int_t fLabel[3]; // track indexes | |
1c53abe2 | 79 | ClassDef(AliTPCclusterLMI,1) |
80 | }; | |
81 | ||
82 | ||
83 | ||
84 | #endif | |
85 | ||
86 |