]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h
When Pt is bad defined (ex. no field), the multiple scattering effect is calculated...
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAMerger.h
CommitLineData
63d8b79d 1//-*- Mode: C++ -*-
2// ************************************************************************
fbb9b71b 3// This file is property of and copyright by the ALICE HLT Project *
63d8b79d 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"
e1f2d1c3 14#include "AliHLTTPCCATrackParam.h"
63d8b79d 15
16#if !defined(HLTCA_GPUCODE)
17#include <iostream>
18#endif
19
63d8b79d 20class AliHLTTPCCASliceTrack;
21class AliHLTTPCCASliceOutput;
22class AliHLTTPCCAMergedTrack;
23class AliHLTTPCCAMergerOutput;
24
25/**
26 * @class AliHLTTPCCAMerger
fbb9b71b 27 *
63d8b79d 28 */
29class AliHLTTPCCAMerger
30{
31
fbb9b71b 32 public:
33
b8139972 34 class AliHLTTPCCAClusterInfo
35 {
36
37 public:
38
39 unsigned char ISlice() const { return fISlice; }
40 unsigned char IRow() const { return fIRow; }
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; }
48
49 void SetISlice ( unsigned char v ) { fISlice = v; }
50 void SetIRow ( unsigned char v ) { fIRow = 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; }
58
59 private:
60
61 unsigned char fISlice; // slice number
62 unsigned char fIRow; // row number
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
70 };
6de2bc40 71
fbb9b71b 72 AliHLTTPCCAMerger();
73 ~AliHLTTPCCAMerger();
74
75 void SetSliceParam( const AliHLTTPCCAParam &v ) { fSliceParam = v; }
76
77 void Clear();
78 void SetSliceData( int index, const AliHLTTPCCASliceOutput *SliceData );
79 void Reconstruct();
80
81 const AliHLTTPCCAMergerOutput * Output() const { return fOutput; }
82
b8139972 83 bool FitTrack( AliHLTTPCCATrackParam &T, float &Alpha,
84 AliHLTTPCCATrackParam t0, float Alpha0, int hits[], int &NHits, bool dir,
f0fb467d 85 bool final = 0,
b8139972 86 AliHLTTPCCAClusterInfo *infoArray = 0 );
6de2bc40 87
b8139972 88 const AliHLTTPCCAParam &SliceParam() const { return fSliceParam; }
6de2bc40 89
b8139972 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 );
fbb9b71b 92
93 private:
94
95 AliHLTTPCCAMerger( const AliHLTTPCCAMerger& );
96 const AliHLTTPCCAMerger &operator=( const AliHLTTPCCAMerger& ) const;
b8139972 97
fbb9b71b 98 class AliHLTTPCCASliceTrackInfo;
99 class AliHLTTPCCABorderTrack;
100
101 void MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABorderTrack B[], int &nB );
f0fb467d 102 void MergeBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1,
fbb9b71b 103 int iSlice2, AliHLTTPCCABorderTrack B2[], int N2 );
104
fbb9b71b 105
106 void UnpackSlices();
107 void Merging();
108
109
110
111 static const int fgkNSlices = 36; //* N slices
112 AliHLTTPCCAParam fSliceParam; //* slice parameters (geometry, calibr, etc.)
113 const AliHLTTPCCASliceOutput *fkSlices[fgkNSlices]; //* array of input slice tracks
114 AliHLTTPCCAMergerOutput *fOutput; //* array of output merged tracks
115 AliHLTTPCCASliceTrackInfo *fTrackInfos; //* additional information for slice tracks
116 int fMaxTrackInfos; //* booked size of fTrackInfos array
117 AliHLTTPCCAClusterInfo *fClusterInfos; //* information about track clusters
118 int fMaxClusterInfos; //* booked size of fClusterInfos array
119 int fSliceTrackInfoStart[fgkNSlices]; //* slice starting index in fTrackInfos array;
120 int fSliceNTrackInfos[fgkNSlices]; //* N of slice track infos in fTrackInfos array;
63d8b79d 121};
122
123#endif