]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h
TPC CA Global Merger component added
[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  private:
46
47   AliHLTTPCCAMerger(const AliHLTTPCCAMerger&);
48   const AliHLTTPCCAMerger &operator=(const AliHLTTPCCAMerger&) const;
49   
50   class AliHLTTPCCAClusterInfo;
51   class AliHLTTPCCASliceTrackInfo;
52   class AliHLTTPCCABorderTrack;
53
54   void MakeBorderTracks( Int_t iSlice, Int_t iBorder, AliHLTTPCCABorderTrack B[], Int_t &nB);
55   void SplitBorderTracks( Int_t iSlice1, AliHLTTPCCABorderTrack B1[], Int_t N1,
56                           Int_t iSlice2, AliHLTTPCCABorderTrack B2[], Int_t N2 );
57
58   static Float_t GetChi2( Float_t x1, Float_t y1, Float_t a00, Float_t a10, Float_t a11, 
59                           Float_t x2, Float_t y2, Float_t b00, Float_t b10, Float_t b11  );
60
61   void UnpackSlices();
62   void Merging();
63    
64   Bool_t FitTrack( AliHLTTPCCATrackParam &T, Float_t &Alpha, 
65                    AliHLTTPCCATrackParam t0, Float_t Alpha0, Int_t hits[], Int_t &NHits,  Bool_t dir=0 );
66   
67   static const Int_t fgkNSlices = 36;       //* N slices 
68   AliHLTTPCCAParam fSliceParam;           //* slice parameters (geometry, calibr, etc.)
69   const AliHLTTPCCASliceOutput *fkSlices[fgkNSlices]; //* array of input slice tracks
70   AliHLTTPCCAMergerOutput *fOutput;       //* array of output merged tracks  
71   AliHLTTPCCASliceTrackInfo *fTrackInfos; //* additional information for slice tracks
72   Int_t fMaxTrackInfos;                   //* booked size of fTrackInfos array
73   AliHLTTPCCAClusterInfo *fClusterInfos;  //* information about track clusters
74   Int_t fMaxClusterInfos;                 //* booked size of fClusterInfos array
75   Int_t fSliceTrackInfoStart[fgkNSlices];   //* slice starting index in fTrackInfos array;
76   Int_t fSliceNTrackInfos[fgkNSlices];                //* N of slice track infos in fTrackInfos array;
77 };
78
79 #endif