Qmax for merged clusters fixed
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCSpacePointData.h
CommitLineData
6f8ece7b 1// $Id$
a6c02c85 2
3#ifndef SPACEPOINTDATA_H
4#define SPACEPOINTDATA_H
5
6#include "AliHLTTPCRootTypes.h"
297174de 7
8/**
9 * @struct AliHLTTPCSpacePointData
10 * Primitive data exchange structure for TPC clusters.
11 * Together with the AliHLTTPCClusterDataFormat this defines
12 * the output of the TPC online Cluster Finder.
13 *
2ce3159d 14 * To translate between local coordinates, global coordinates, and row-pad-time coordinates
15 * one cann use AliHLTTPCTransform.
16 *
17 * See AliHLTTPCClusterFinder::WriteClusters() for example.
18 *
297174de 19 * @ingroup alihlt_tpc_datastructs
20 */
a6c02c85 21struct AliHLTTPCSpacePointData{
2ce3159d 22 Float_t fX; // X coordinate in local coordinates
23 Float_t fY; // Y coordinate in local coordinates
24 Float_t fZ; // Z coordinate in local coordinates
25 UInt_t fID; // contains slice patch and number
26 UChar_t fPadRow; // Pad row number
27 Float_t fSigmaY2; // error (former width) of the clusters
28 Float_t fSigmaZ2; // error (former width) of the clusters
29 UInt_t fCharge; // total charge of cluster
a912b63b 30 UInt_t fQMax; // QMax of cluster
44be0fde 31 Bool_t fUsed; // only used in AliHLTTPCDisplay
738c049f 32 Int_t fTrackN; // only used in AliHLTTPCDisplay
a371a266 33
d1276761 34 void SetX(Float_t x) {fX=x;}
35 void SetY(Float_t y) {fY=y;}
36 void SetZ(Float_t z) {fZ=z;}
37 void SetID(UInt_t id) {fID=id;}
38 void SetPadRow(Short_t padrow) {fPadRow=padrow;}
39 void SetSigmaY2(Float_t sigmaY2) {fSigmaY2=sigmaY2;}
40 void SetSigmaZ2(Float_t sigmaZ2) {fSigmaZ2=sigmaZ2;}
41 void SetCharge(UShort_t charge) {fCharge=charge;}
42 void SetQMax(UShort_t qmax) {fQMax=qmax;}
43
44 Float_t GetX() const {return fX;}
45 Float_t GetY() const {return fY;}
46 Float_t GetZ() const {return fZ;}
47 UInt_t GetID() const {return fID;}
48 UShort_t GetPadRow() const {return fPadRow;}
49 Float_t GetSigmaY2() const {return fSigmaY2;}
50 Float_t GetSigmaZ2() const {return fSigmaZ2;}
51 UShort_t GetCharge() const {return fCharge;}
52 UShort_t GetQMax() const {return fQMax;}
53
a371a266 54 static UInt_t GetSlice( UInt_t Id ) { return (Id>>25)&0x3F; }
55 static UInt_t GetPatch( UInt_t Id ) { return (Id>>22)&0x7; }
56 static UInt_t GetNumber( UInt_t Id ) { return Id&0x003FFFFF; }
57 static UInt_t GetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){
58 return ((Slice&0x3F)<<25)+((Patch&0x7)<<22) + (Number&0x003FFFFF);
59 }
60
6f8ece7b 61 AliHLTTPCSpacePointData()
62 : fX(0.), fY(0.), fZ(0.), fID(0), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0), fUsed(kFALSE), fTrackN(0) {}
a371a266 63 void SetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){
64 fID = GetID(Slice, Patch,Number);
65 }
66 UInt_t GetSlice() const { return GetSlice(fID); }
67 UInt_t GetPatch() const { return GetPatch(fID); }
68 UInt_t GetNumber() const { return GetNumber(fID); }
69
6f8ece7b 70 Bool_t IsUsed() const {return fUsed;}
71 void SetUsed(Bool_t used) {fUsed=used;}
72 Int_t GetTrackNumber() const {return fTrackN;}
5981837c 73 void SetTrackNumber(Int_t trackN) {fTrackN=trackN;}
a6c02c85 74};
75typedef struct AliHLTTPCSpacePointData AliHLTTPCSpacePointData;
76
77
78#endif /* SPACEPOINTDATA_H */