]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCASliceOutput.h
style changes
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCASliceOutput.h
1 //-*- Mode: C++ -*-
2 // ************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project        *
4 // ALICE Experiment at CERN, All rights reserved.                         *
5 // See cxx source for full Copyright notice                               *
6 //                                                                        *
7 //*************************************************************************
8
9
10 #ifndef ALIHLTTPCCASLICEOUTPUT_H
11 #define ALIHLTTPCCASLICEOUTPUT_H
12
13 #include "AliHLTTPCCADef.h"
14
15 #include "AliHLTTPCCASliceTrack.h"
16
17 /**
18  * @class AliHLTTPCCASliceOutput
19  *
20  * AliHLTTPCCASliceOutput class is used to store the output of AliHLTTPCCATracker{Component}
21  * and transport the output to AliHLTTPCCAGBMerger{Component}
22  *
23  * The class contains all the necessary information about TPC tracks, reconstructed in one slice.
24  * This includes the reconstructed track parameters and some compressed information
25  * about the assigned clusters: clusterId, position and amplitude.
26  *
27  */
28 class AliHLTTPCCASliceOutput
29 {
30   public:
31
32     GPUhd() int NTracks()                    const { return fNTracks;              }
33     GPUhd() int NTrackClusters()             const { return fNTrackClusters;       }
34
35     GPUhd() const AliHLTTPCCASliceTrack &Track( int i ) const { return fTracks[i]; }
36     GPUhd() unsigned char   ClusterRow     ( int i )  const { return fClusterRow[i]; }
37     GPUhd()  int   ClusterId     ( int i )  const { return fClusterId[i]; }
38     GPUhd() unsigned short ClusterPackedYZ ( int i )  const { return fClusterPackedYZ[i]; }
39     GPUhd() UChar_t  ClusterPackedAmp( int i )  const { return fClusterPackedAmp[i]; }
40     GPUhd() float2   ClusterUnpackedYZ ( int i )  const { return fClusterUnpackedYZ[i]; }
41     GPUhd() float    ClusterUnpackedX  ( int i )  const { return fClusterUnpackedX[i]; }
42
43     GPUhd() static int EstimateSize( int nOfTracks, int nOfTrackClusters );
44     GPUhd() void SetPointers();
45
46     GPUhd() void SetNTracks       ( int v )  { fNTracks = v;        }
47     GPUhd() void SetNTrackClusters( int v )  { fNTrackClusters = v; }
48
49     GPUhd() void SetTrack( int i, const AliHLTTPCCASliceTrack &v ) {  fTracks[i] = v; }
50     GPUhd() void SetClusterRow( int i, unsigned char v ) {  fClusterRow[i] = v; }
51     GPUhd() void SetClusterId( int i, int v ) {  fClusterId[i] = v; }
52     GPUhd() void SetClusterPackedYZ( int i, unsigned short v ) {  fClusterPackedYZ[i] = v; }
53     GPUhd() void SetClusterPackedAmp( int i, UChar_t v ) {  fClusterPackedAmp[i] = v; }
54     GPUhd() void SetClusterUnpackedYZ( int i, float2 v ) {  fClusterUnpackedYZ[i] = v; }
55     GPUhd() void SetClusterUnpackedX( int i, float v ) {  fClusterUnpackedX[i] = v; }
56
57   private:
58
59     AliHLTTPCCASliceOutput( const AliHLTTPCCASliceOutput& )
60         : fNTracks( 0 ), fNTrackClusters( 0 ), fTracks( 0 ),  fClusterId( 0 ), fClusterRow( 0 ), fClusterPackedYZ( 0 ), fClusterUnpackedYZ( 0 ), fClusterUnpackedX( 0 ), fClusterPackedAmp( 0 ) {}
61
62     const AliHLTTPCCASliceOutput& operator=( const AliHLTTPCCASliceOutput& ) const { return *this; }
63
64     int fNTracks;                   // number of reconstructed tracks
65     int fNTrackClusters;            // total number of track clusters
66     AliHLTTPCCASliceTrack *fTracks; // pointer to reconstructed tracks
67     int   *fClusterId;              // pointer to cluster Id's ( packed slice, patch, cluster )
68     UChar_t  *fClusterRow;     // pointer to cluster row numbers
69     unsigned short *fClusterPackedYZ;     // pointer to packed cluster YZ coordinates
70     float2   *fClusterUnpackedYZ;    // pointer to cluster coordinates (temporary data, for debug proposes)
71     float    *fClusterUnpackedX;     // pointer to cluster coordinates (temporary data, for debug proposes)
72     UChar_t  *fClusterPackedAmp;     // pointer to packed cluster amplitudes
73     char fMemory[1]; // the memory where the pointers above point into
74 };
75
76 #endif