]>
Commit | Line | Data |
---|---|---|
1c53abe2 | 1 | #ifndef ALITPCCLUSTERMI_H |
2 | #define ALITPCCLUSTERMI_H | |
3 | ||
4 | //------------------------------------------------------- | |
5 | // TPC Cluster Class | |
6 | // | |
7 | // Origin: Marian Ivanov | |
8 | //------------------------------------------------------- | |
9 | ||
10 | #include "AliCluster.h" | |
11 | #include "TMath.h" | |
12 | ||
13 | //_____________________________________________________________________________ | |
14 | class AliTPCclusterMI : public AliCluster { | |
15 | public: | |
7fd61510 | 16 | AliTPCclusterMI():AliCluster(){fQ=0; fUsed=0;} |
1c53abe2 | 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; | |
7fd61510 | 20 | inline void Use(Int_t inc=10); |
1c53abe2 | 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;} | |
7fd61510 | 24 | Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;} |
1c53abe2 | 25 | Float_t GetQ() const {return TMath::Abs(fQ);} |
26 | Float_t GetMax() const {return fMax;} | |
27 | Char_t GetType()const {return fType;} | |
7fd61510 | 28 | |
1c53abe2 | 29 | private: |
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 | |
7fd61510 | 33 | Char_t fUsed; //counter of usage |
34 | ClassDef(AliTPCclusterMI,1) // Time Projection Chamber clusters | |
1c53abe2 | 35 | }; |
36 | ||
7fd61510 | 37 | void AliTPCclusterMI::Use(Int_t inc) |
38 | { | |
39 | if (inc>0) fUsed+=inc; | |
40 | else | |
41 | fUsed=0; | |
42 | } | |
43 | ||
1c53abe2 | 44 | class AliTPCclusterLMI { |
45 | private: | |
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 | |
54 | public: | |
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];} | |
64 | // | |
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];} | |
73 | // | |
74 | public: | |
75 | ClassDef(AliTPCclusterLMI,1) | |
76 | }; | |
77 | ||
78 | ||
79 | ||
80 | #endif | |
81 | ||
82 |