-
Notifications
You must be signed in to change notification settings - Fork 511
Expand file tree
/
Copy pathGPUTPCGMMergedTrack.h
More file actions
126 lines (117 loc) · 3.7 KB
/
Copy pathGPUTPCGMMergedTrack.h
File metadata and controls
126 lines (117 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file GPUTPCGMMergedTrack.h
/// \author Sergey Gorbunov, David Rohr
#ifndef GPUTPCGMMERGEDTRACK_H
#define GPUTPCGMMERGEDTRACK_H
#include "GPUTPCGMTrackParam.h"
#include "GPUTPCGMMergedTrackHit.h"
namespace GPUCA_NAMESPACE
{
namespace gpu
{
/**
* @class GPUTPCGMMergedTrack
*
* The class is used to store merged tracks in GPUTPCGMMerger
*/
class GPUTPCGMMergedTrack
{
public:
GPUd() unsigned int NClusters() const { return mNClusters; }
GPUd() unsigned int NClustersFitted() const { return mNClustersFitted; }
GPUd() unsigned int FirstClusterRef() const { return mFirstClusterRef; }
GPUd() const GPUTPCGMTrackParam& GetParam() const { return mParam; }
GPUd() float GetAlpha() const { return mAlpha; }
GPUd() GPUTPCGMTrackParam& Param()
{
return mParam;
}
GPUd() float& Alpha()
{
return mAlpha;
}
GPUd() float LastX() const { return mLastX; }
GPUd() float LastY() const { return mLastY; }
GPUd() float LastZ() const { return mLastZ; }
GPUd() bool OK() const { return mFlags & 0x01; }
GPUd() bool Looper() const { return mFlags & 0x02; }
GPUd() bool CSide() const { return mFlags & 0x04; }
GPUd() bool CCE() const { return mFlags & 0x08; }
GPUd() bool MergedLooper() const { return mFlags & 0x10; }
GPUd() void SetNClusters(int v) { mNClusters = v; }
GPUd() void SetNClustersFitted(int v) { mNClustersFitted = v; }
GPUd() void SetFirstClusterRef(int v) { mFirstClusterRef = v; }
GPUd() void SetParam(const GPUTPCGMTrackParam& v) { mParam = v; }
GPUd() void SetAlpha(float v) { mAlpha = v; }
GPUd() void SetLastX(float v) { mLastX = v; }
GPUd() void SetLastY(float v) { mLastY = v; }
GPUd() void SetLastZ(float v) { mLastZ = v; }
GPUd() void SetOK(bool v)
{
if (v) {
mFlags |= 0x01;
} else {
mFlags &= 0xFE;
}
}
GPUd() void SetLooper(bool v)
{
if (v) {
mFlags |= 0x02;
} else {
mFlags &= 0xFD;
}
}
GPUd() void SetCSide(bool v)
{
if (v) {
mFlags |= 0x04;
} else {
mFlags &= 0xFB;
}
}
GPUd() void SetCCE(bool v)
{
if (v) {
mFlags |= 0x08;
} else {
mFlags &= 0xF7;
}
}
GPUd() void SetMergedLooper(bool v)
{
if (v) {
mFlags |= 0x10;
} else {
mFlags &= 0xEF;
}
}
GPUd() void SetFlags(unsigned char v) { mFlags = v; }
GPUd() void SetLegs(unsigned char v) { mLegs = v; }
GPUd() unsigned char Legs() const { return mLegs; }
GPUd() const GPUTPCGMTrackParam::GPUTPCOuterParam& OuterParam() const { return mOuterParam; }
GPUd() GPUTPCGMTrackParam::GPUTPCOuterParam& OuterParam() { return mOuterParam; }
private:
GPUTPCGMTrackParam mParam; //* fitted track parameters
GPUTPCGMTrackParam::GPUTPCOuterParam mOuterParam; //* outer param
float mAlpha; //* alpha angle
float mLastX; //* outer X
float mLastY; //* outer Y
float mLastZ; //* outer Z
unsigned int mFirstClusterRef; //* index of the first track cluster in corresponding cluster arrays
unsigned int mNClusters; //* number of track clusters
unsigned int mNClustersFitted; //* number of clusters used in fit
unsigned char mFlags;
unsigned char mLegs;
};
} // namespace gpu
} // namespace GPUCA_NAMESPACE
#endif