]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliFlatTPCCluster.h
2966066d43925da660c5a4eebc7ae9f4befc5c65
[u/mrichter/AliRoot.git] / HLT / global / AliFlatTPCCluster.h
1 #ifndef ALIFLATTPCCLUSTER_H
2 #define ALIFLATTPCCLUSTER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               *
6  * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli     */
7
8 /**
9  * >> Flat structure representing a TPC cluster <<
10  */
11
12 #include "Rtypes.h"
13 #include "AliVMisc.h"
14
15 class AliFlatTPCCluster
16 {
17   public:
18
19   AliFlatTPCCluster() : fX(0.), fY(0.), fZ(0.), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0) {}
20   ~AliFlatTPCCluster() {}
21
22   void SetX(Float_t x)             {fX = x;}
23   void SetY(Float_t y)             {fY = y;}
24   void SetZ(Float_t z)             {fZ = z;}
25   void SetPadRow(Short_t padrow)   {fPadRow = padrow;}
26   void SetSigmaY2(Float_t sigmaY2) {fSigmaY2 = sigmaY2;}
27   void SetSigmaZ2(Float_t sigmaZ2) {fSigmaZ2 = sigmaZ2;}
28   void SetCharge(UShort_t charge)  {fCharge = charge;}
29   void SetQMax(UShort_t qmax)      {fQMax = qmax;}
30   
31   void Reinitialize(){} // do nothing
32
33   Float_t  GetX()       const      {return fX;}
34   Float_t  GetY()       const      {return fY;}
35   Float_t  GetZ()       const      {return fZ;}
36   UShort_t GetPadRow()  const      {return fPadRow;}
37   Float_t  GetSigmaY2() const      {return fSigmaY2;}
38   Float_t  GetSigmaZ2() const      {return fSigmaZ2;}
39   UShort_t GetCharge()  const      {return fCharge;}
40   UShort_t GetQMax()    const      {return fQMax;}
41
42
43   static Bool_t SortClusters(const AliFlatTPCCluster &first, const AliFlatTPCCluster &second){
44     // Method to sort two clusters according to pad row
45     Int_t padrowfirst  = first.GetPadRow();  
46     Int_t padrowsecond = second.GetPadRow();
47     return (padrowfirst < padrowsecond);
48   }
49   
50   private:
51
52  AliFlatTPCCluster(AliVConstructorReinitialisationFlag )
53  //  : fX(fX),fY(fY),fZ(fZ),fPadRow(fPadRow),fSigmaY2(fSigmaY2),fSigmaZ2(fSigmaZ2),fCharge(fCharge),fQMax(fQMax)
54  {}
55
56   Float_t fX;       // X coordinate in local coordinates
57   Float_t fY;       // Y coordinate in local coordinates
58   Float_t fZ;       // Z coordinate in local coordinates
59   UChar_t fPadRow;  // Pad row number
60   Float_t fSigmaY2; // error (former width) of the clusters
61   Float_t fSigmaZ2; // error (former width) of the clusters
62   UInt_t  fCharge;  // total charge of cluster
63   UInt_t  fQMax;    // QMax of cluster
64   
65 };
66
67 #endif