]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h
changes from Matthias
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAMerger.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 #ifndef ALIHLTTPCCAMERGER_H
10 #define ALIHLTTPCCAMERGER_H
11
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCAParam.h"
14 #include "AliHLTTPCCATrackParam.h"
15
16 #if !defined(HLTCA_GPUCODE)
17 #include <iostream>
18 #endif
19
20 class AliHLTTPCCASliceTrack;
21 class AliHLTTPCCASliceOutput;
22 class AliHLTTPCCAMergedTrack;
23 class AliHLTTPCCAMergerOutput;
24
25 /**
26  * @class AliHLTTPCCAMerger
27  *
28  */
29 class AliHLTTPCCAMerger
30 {
31
32   public:
33
34     AliHLTTPCCAMerger();
35     ~AliHLTTPCCAMerger();
36
37     void SetSliceParam( const AliHLTTPCCAParam &v ) { fSliceParam = v; }
38
39     void Clear();
40     void SetSliceData( int index, const AliHLTTPCCASliceOutput *SliceData );
41     void Reconstruct();
42
43     const AliHLTTPCCAMergerOutput * Output() const { return fOutput; }
44
45     bool FitTrack( AliHLTTPCCATrackParam &T, float &Alpha,
46                    AliHLTTPCCATrackParam t0, float Alpha0, int hits[], int &NHits,  bool dir = 0 );
47
48   private:
49
50     AliHLTTPCCAMerger( const AliHLTTPCCAMerger& );
51     const AliHLTTPCCAMerger &operator=( const AliHLTTPCCAMerger& ) const;
52
53     class AliHLTTPCCAClusterInfo;
54     class AliHLTTPCCASliceTrackInfo;
55     class AliHLTTPCCABorderTrack;
56
57     void MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABorderTrack B[], int &nB );
58     void SplitBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1,
59                             int iSlice2, AliHLTTPCCABorderTrack B2[], int N2 );
60
61     static float GetChi2( float x1, float y1, float a00, float a10, float a11,
62                           float x2, float y2, float b00, float b10, float b11  );
63
64     void UnpackSlices();
65     void Merging();
66
67
68
69     static const int fgkNSlices = 36;       //* N slices
70     AliHLTTPCCAParam fSliceParam;           //* slice parameters (geometry, calibr, etc.)
71     const AliHLTTPCCASliceOutput *fkSlices[fgkNSlices]; //* array of input slice tracks
72     AliHLTTPCCAMergerOutput *fOutput;       //* array of output merged tracks
73     AliHLTTPCCASliceTrackInfo *fTrackInfos; //* additional information for slice tracks
74     int fMaxTrackInfos;                   //* booked size of fTrackInfos array
75     AliHLTTPCCAClusterInfo *fClusterInfos;  //* information about track clusters
76     int fMaxClusterInfos;                 //* booked size of fClusterInfos array
77     int fSliceTrackInfoStart[fgkNSlices];   //* slice starting index in fTrackInfos array;
78     int fSliceNTrackInfos[fgkNSlices];                //* N of slice track infos in fTrackInfos array;
79 };
80
81 #endif