(Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
CommitLineData
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//_____________________________________________________________________________
17class AliTPCclusterMI : public AliCluster {
18public:
508541c7 19 AliTPCclusterMI():AliCluster(){fX =0; fQ=0; fUsed=0; fDetector = 0; fRow =0;}
6c024a0e 20 AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (UShort_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);
508541c7 25 virtual Float_t GetX() const { return fX;}
26 virtual void SetX(Float_t x) { fX = x;}
27 virtual Int_t GetDetector() const {return fDetector;}
28 virtual Int_t GetRow() const {return fRow;}
29 virtual void SetDetector(Int_t detector){fDetector = (UChar_t)(detector%256);}
30 virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}
31 //
6c024a0e 32 void SetQ(Float_t q) {fQ=(UShort_t)q;}
1c53abe2 33 void SetType(Char_t type) {fType=type;}
6c024a0e 34 void SetMax(UShort_t max) {fMax=max;}
7fd61510 35 Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
1c53abe2 36 Float_t GetQ() const {return TMath::Abs(fQ);}
37 Float_t GetMax() const {return fMax;}
38 Char_t GetType()const {return fType;}
7fd61510 39
1c53abe2 40private:
508541c7 41 Float_t fX; //X position of cluster
1c53abe2 42 Short_t fQ ; //Q of cluster (in ADC counts)
43 Char_t fType; //type of the cluster 0 means golden
44 Short_t fMax; //maximal amplitude in cluster
7fd61510 45 Char_t fUsed; //counter of usage
508541c7 46 UChar_t fDetector; //detector number
47 UChar_t fRow; //row number number
48 ClassDef(AliTPCclusterMI,2) // Time Projection Chamber clusters
1c53abe2 49};
50
7fd61510 51void AliTPCclusterMI::Use(Int_t inc)
52{
53 if (inc>0) fUsed+=inc;
54 else
55 fUsed=0;
56}
57
1c53abe2 58class AliTPCclusterLMI {
6d171107 59
60public:
1c53abe2 61 AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
f77f13c8 62 virtual ~AliTPCclusterLMI(){}
6d171107 63 Float_t GetZ() const {return (fCZ*0.01);}
64 Float_t GetY() const {return (fCY*0.01);}
65 Float_t GetSigmaZ() const {return (fSigmaZ*0.02);}
66 Float_t GetSigmaY() const {return (fSigmaY*0.02);}
67 Int_t GetType() const {return fCType;}
68 Int_t GetMax() const {return fMax;}
69 Float_t GetQ() const {return fQ;}
70 Int_t GelLabel(Int_t i) const {return fLabel[i];}
1c53abe2 71 //
6c024a0e 72 void SetY(Float_t y){ fCY = (UShort_t)(TMath::Nint(y*100.));}
73 void SetZ(Float_t z){ fCZ = (UShort_t)(TMath::Nint(z*100.));}
74 void SetSigmaZ(Float_t sigmaz) {fSigmaZ = (UChar_t)(TMath::Nint(sigmaz*50.));}
75 void SetSigmaY(Float_t sigmay) {fSigmaY = (UChar_t)(TMath::Nint(sigmay*50.));}
76 void SetQ(Float_t q) {fQ = (UShort_t)q;}
77 void SetMax(Float_t max) {fMax = (UShort_t)max;}
1c53abe2 78 void SetType(Char_t type) {fCType = type;}
79 void SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
6d171107 80
81private:
82 Short_t fCZ; // current cluster position Z in cm - 100 mum precision
83 Short_t fCY; // current cluster position Y in cm - 100 mum precision
84 UChar_t fSigmaZ; // shape Z - normalised shape - normaliziation 1 - precision 2 percent
85 UChar_t fSigmaY; // shape Y - normalised shape - normaliziation 1 - precision 2 percent
86 UShort_t fQ; // total charge in cluster
87 UShort_t fMax; // charge at maximum
88 Char_t fCType; // type of the cluster
89 Int_t fLabel[3]; // track indexes
1c53abe2 90 ClassDef(AliTPCclusterLMI,1)
91};
92
93
94
95#endif
96
97