]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCSpacePointData.h
coverity warning 16171 fixed
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCSpacePointData.h
1 // @(#) $Id$
2 // Original: AliHLTSpacePointData.h,v 1.4 2003/07/27 21:02:09 loizides 
3
4 #ifndef SPACEPOINTDATA_H
5 #define SPACEPOINTDATA_H
6
7 #include "AliHLTTPCRootTypes.h"
8
9 /**
10  * @struct AliHLTTPCSpacePointData
11  * Primitive data exchange structure for TPC clusters.
12  * Together with the AliHLTTPCClusterDataFormat this defines
13  * the output of the TPC online Cluster Finder.
14  *
15  * To translate between local coordinates, global coordinates, and row-pad-time coordinates 
16  * one cann use AliHLTTPCTransform. 
17  *
18  * See AliHLTTPCClusterFinder::WriteClusters() for example. 
19  *
20  * @ingroup alihlt_tpc_datastructs
21  */
22 struct AliHLTTPCSpacePointData{
23   Float_t fX;       // X coordinate in local coordinates
24   Float_t fY;       // Y coordinate in local coordinates
25   Float_t fZ;       // Z coordinate in local coordinates
26   UInt_t fID;       // contains slice patch and number
27   UChar_t fPadRow;  // Pad row number
28   Float_t fSigmaY2; // error (former width) of the clusters
29   Float_t fSigmaZ2; // error (former width) of the clusters
30   UInt_t fCharge;   // total charge of cluster
31   UInt_t fQMax;     // QMax of cluster
32   Bool_t fUsed;     // only used in AliHLTTPCDisplay 
33   Int_t fTrackN;    // only used in AliHLTTPCDisplay 
34
35   static UInt_t GetSlice( UInt_t Id )  { return (Id>>25)&0x3F; }
36   static UInt_t GetPatch( UInt_t Id )  { return (Id>>22)&0x7; }
37   static UInt_t GetNumber( UInt_t Id ) { return Id&0x003FFFFF; }
38   static UInt_t GetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){
39     return ((Slice&0x3F)<<25)+((Patch&0x7)<<22) + (Number&0x003FFFFF);
40   }
41
42   void SetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){
43     fID = GetID(Slice, Patch,Number);
44   }
45   UInt_t GetSlice() const { return GetSlice(fID); }
46   UInt_t GetPatch() const { return GetPatch(fID); }
47   UInt_t GetNumber() const { return GetNumber(fID); }
48
49 };
50 typedef struct AliHLTTPCSpacePointData AliHLTTPCSpacePointData;
51
52
53 #endif /* SPACEPOINTDATA_H */