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 *
7 //*************************************************************************
9 #ifndef ALIHLTTPCCAMERGER_H
10 #define ALIHLTTPCCAMERGER_H
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCAParam.h"
14 #include "AliHLTTPCCATrackParam.h"
16 #if !defined(HLTCA_GPUCODE)
18 #endif //HLTCA_GPUCODE
20 class AliHLTTPCCASliceTrack;
21 class AliHLTTPCCASliceOutput;
22 class AliHLTTPCCAMergedTrack;
23 class AliHLTTPCCAMergerOutput;
26 * @class AliHLTTPCCAMerger
29 class AliHLTTPCCAMerger
34 class AliHLTTPCCAClusterInfo
39 unsigned char ISlice() const { return fISlice; }
40 unsigned char RowType() const { return fRowType; }
41 int Id() const { return fId; }
42 UChar_t PackedAmp() const { return fPackedAmp; }
43 float X() const { return fX; }
44 float Y() const { return fY; }
45 float Z() const { return fZ; }
46 float Err2Y() const { return fErr2Y; }
47 float Err2Z() const { return fErr2Z; }
49 void SetISlice ( unsigned char v ) { fISlice = v; }
50 void SetRowType ( unsigned char v ) { fRowType = v; }
51 void SetId ( int v ) { fId = v; }
52 void SetPackedAmp ( UChar_t v ) { fPackedAmp = v; }
53 void SetX ( float v ) { fX = v; }
54 void SetY ( float v ) { fY = v; }
55 void SetZ ( float v ) { fZ = v; }
56 void SetErr2Y ( float v ) { fErr2Y = v; }
57 void SetErr2Z ( float v ) { fErr2Z = v; }
61 unsigned char fISlice; // slice number
62 unsigned char fRowType; // row type
63 int fId; // cluster hlt number
64 UChar_t fPackedAmp; // packed cluster amplitude
65 float fX; // x position (slice coord.system)
66 float fY; // y position (slice coord.system)
67 float fZ; // z position (slice coord.system)
68 float fErr2Y; // Squared measurement error of y position
69 float fErr2Z; // Squared measurement error of z position
75 void SetSliceParam( const AliHLTTPCCAParam &v ) { fSliceParam = v; }
78 void SetSliceData( int index, const AliHLTTPCCASliceOutput *SliceData );
81 const AliHLTTPCCAMergerOutput * Output() const { return fOutput; }
83 bool FitTrack( AliHLTTPCCATrackParam &T, float &Alpha,
84 AliHLTTPCCATrackParam t0, float Alpha0, int hits[], int &NHits, bool dir,
86 AliHLTTPCCAClusterInfo *infoArray = 0 );
88 const AliHLTTPCCAParam &SliceParam() const { return fSliceParam; }
90 static float GetChi2( float x1, float y1, float a00, float a10, float a11,
91 float x2, float y2, float b00, float b10, float b11 );
96 AliHLTTPCCAMerger( const AliHLTTPCCAMerger& );
97 AliHLTTPCCAMerger &operator=( const AliHLTTPCCAMerger& );
99 class AliHLTTPCCASliceTrackInfo;
100 class AliHLTTPCCABorderTrack;
102 void MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABorderTrack B[], int &nB );
103 void MergeBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1,
104 int iSlice2, AliHLTTPCCABorderTrack B2[], int N2 );
112 static const int fgkNSlices = 36; //* N slices
113 AliHLTTPCCAParam fSliceParam; //* slice parameters (geometry, calibr, etc.)
114 const AliHLTTPCCASliceOutput *fkSlices[fgkNSlices]; //* array of input slice tracks
115 AliHLTTPCCAMergerOutput *fOutput; //* array of output merged tracks
116 AliHLTTPCCASliceTrackInfo *fTrackInfos; //* additional information for slice tracks
117 int fMaxTrackInfos; //* booked size of fTrackInfos array
118 AliHLTTPCCAClusterInfo *fClusterInfos; //* information about track clusters
119 int fMaxClusterInfos; //* booked size of fClusterInfos array
120 int fSliceTrackInfoStart[fgkNSlices]; //* slice starting index in fTrackInfos array;
121 int fSliceNTrackInfos[fgkNSlices]; //* N of slice track infos in fTrackInfos array;
124 #endif //ALIHLTTPCCAMERGER_H