]>
Commit | Line | Data |
---|---|---|
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 | 21 | struct 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 | |
34 | static UInt_t GetSlice( UInt_t Id ) { return (Id>>25)&0x3F; } | |
35 | static UInt_t GetPatch( UInt_t Id ) { return (Id>>22)&0x7; } | |
36 | static UInt_t GetNumber( UInt_t Id ) { return Id&0x003FFFFF; } | |
37 | static UInt_t GetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){ | |
38 | return ((Slice&0x3F)<<25)+((Patch&0x7)<<22) + (Number&0x003FFFFF); | |
39 | } | |
40 | ||
6f8ece7b | 41 | AliHLTTPCSpacePointData() |
42 | : fX(0.), fY(0.), fZ(0.), fID(0), fPadRow(0), fSigmaY2(0.), fSigmaZ2(0.), fCharge(0), fQMax(0), fUsed(kFALSE), fTrackN(0) {} | |
a371a266 | 43 | void SetID( UInt_t Slice, UInt_t Patch, UInt_t Number ){ |
44 | fID = GetID(Slice, Patch,Number); | |
45 | } | |
46 | UInt_t GetSlice() const { return GetSlice(fID); } | |
47 | UInt_t GetPatch() const { return GetPatch(fID); } | |
48 | UInt_t GetNumber() const { return GetNumber(fID); } | |
49 | ||
6f8ece7b | 50 | Bool_t IsUsed() const {return fUsed;} |
51 | void SetUsed(Bool_t used) {fUsed=used;} | |
52 | Int_t GetTrackNumber() const {return fTrackN;} | |
5981837c | 53 | void SetTrackNumber(Int_t trackN) {fTrackN=trackN;} |
a6c02c85 | 54 | }; |
55 | typedef struct AliHLTTPCSpacePointData AliHLTTPCSpacePointData; | |
56 | ||
57 | ||
58 | #endif /* SPACEPOINTDATA_H */ |