]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliFlatTPCCluster.h
split of VVtrack and Vtrack interfaces, update of AliFlat classes (only partially...
[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 "AliVVcluster.h"
14 #include "AliFlatESDMisc.h"
15
16 class AliFlatTPCCluster: public AliVVcluster
17 {
18   public:
19
20   AliFlatTPCCluster() : fX(0.), fY(0.), fZ(0.), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0) {}
21   ~AliFlatTPCCluster() {}
22
23   void SetX(Float_t x)             {fX = x;}
24   void SetY(Float_t y)             {fY = y;}
25   void SetZ(Float_t z)             {fZ = z;}
26   void SetPadRow(Short_t padrow)   {fPadRow = padrow;}
27   void SetSigmaY2(Float_t sigmaY2) {fSigmaY2 = sigmaY2;}
28   void SetSigmaZ2(Float_t sigmaZ2) {fSigmaZ2 = sigmaZ2;}
29   void SetCharge(UShort_t charge)  {fCharge = charge;}
30   void SetQMax(UShort_t qmax)      {fQMax = qmax;}
31   
32   void Reinitialize(){
33     new (this) AliFlatTPCCluster(AliFlatESDReinitialize);
34   }
35
36   Float_t  GetX()       const      {return fX;}
37   Float_t  GetY()       const      {return fY;}
38   Float_t  GetZ()       const      {return fZ;}
39   UShort_t GetPadRow()  const      {return fPadRow;}
40   Float_t  GetSigmaY2() const      {return fSigmaY2;}
41   Float_t  GetSigmaZ2() const      {return fSigmaZ2;}
42   UShort_t GetCharge()  const      {return fCharge;}
43   UShort_t GetQMax()    const      {return fQMax;}
44
45
46   static Bool_t SortClusters(const AliFlatTPCCluster &first, const AliFlatTPCCluster &second){
47     // Method to sort two clusters according to pad row
48     Int_t padrowfirst  = first.GetPadRow();  
49     Int_t padrowsecond = second.GetPadRow();
50     return (padrowfirst < padrowsecond);
51   }
52   
53   private:
54
55  AliFlatTPCCluster(AliFlatESDSpecialConstructorFlag f): AliVVcluster(f),fX(fX),fY(fY),fZ(fZ),fPadRow(fPadRow),fSigmaY2(fSigmaY2),fSigmaZ2(fSigmaZ2),fCharge(fCharge),fQMax(fQMax){}
56
57   Float_t fX;       // X coordinate in local coordinates
58   Float_t fY;       // Y coordinate in local coordinates
59   Float_t fZ;       // Z coordinate in local coordinates
60   UChar_t fPadRow;  // Pad row number
61   Float_t fSigmaY2; // error (former width) of the clusters
62   Float_t fSigmaZ2; // error (former width) of the clusters
63   UInt_t  fCharge;  // total charge of cluster
64   UInt_t  fQMax;    // QMax of cluster
65   
66 };
67
68 #endif