CUDADataFormats
Track
interface
TrackSoAHeterogeneousT.h
Go to the documentation of this file.
1
#ifndef CUDADataFormats_Track_TrackHeterogeneousT_H
2
#define CUDADataFormats_Track_TrackHeterogeneousT_H
3
4
#include "
CUDADataFormats/Track/interface/TrajectoryStateSoAT.h
"
5
#include "
HeterogeneousCore/CUDAUtilities/interface/HistoContainer.h
"
6
7
#include "
CUDADataFormats/Common/interface/HeterogeneousSoA.h
"
8
9
namespace
pixelTrack
{
10
enum class
Quality
: uint8_t {
bad
= 0,
dup
,
loose
,
strict
,
tight
,
highPurity
};
11
}
12
13
template
<
int
32_t S>
14
class
TrackSoAHeterogeneousT
{
15
public
:
16
static
constexpr int32_t
stride
() {
return
S
; }
17
18
using
Quality
=
pixelTrack::Quality
;
19
using
hindex_type
= uint32_t;
20
using
HitContainer
=
cms::cuda::OneToManyAssoc<hindex_type, S, 5 * S>
;
21
22
// Always check quality is at least loose!
23
// CUDA does not support enums in __lgc ...
24
private
:
25
eigenSoA::ScalarSoA<uint8_t, S>
quality_
;
26
27
public
:
28
constexpr
Quality
quality
(int32_t
i
)
const
{
return
(
Quality
)(
quality_
(
i
)); }
29
constexpr
Quality
&
quality
(int32_t
i
) {
return
(
Quality
&)(
quality_
(
i
)); }
30
constexpr
Quality
const
*
qualityData
()
const
{
return
(
Quality
const
*)(
quality_
.
data
()); }
31
constexpr
Quality
*
qualityData
() {
return
(
Quality
*)(
quality_
.
data
()); }
32
33
// this is chi2/ndof as not necessarely all hits are used in the fit
34
eigenSoA::ScalarSoA<float, S>
chi2
;
35
36
constexpr
int
nHits
(
int
i
)
const
{
return
detIndices
.size(
i
); }
37
38
// State at the Beam spot
39
// phi,tip,1/pt,cotan(theta),zip
40
TrajectoryStateSoAT<S>
stateAtBS
;
41
eigenSoA::ScalarSoA<float, S>
eta
;
42
eigenSoA::ScalarSoA<float, S>
pt
;
43
constexpr
float
charge
(int32_t
i
)
const
{
return
std::copysign(1.
f
,
stateAtBS
.state(
i
)(2)); }
44
constexpr
float
phi
(int32_t
i
)
const
{
return
stateAtBS
.state(
i
)(0); }
45
constexpr
float
tip
(int32_t
i
)
const
{
return
stateAtBS
.state(
i
)(1); }
46
constexpr
float
zip
(int32_t
i
)
const
{
return
stateAtBS
.state(
i
)(4); }
47
48
// state at the detector of the outermost hit
49
// representation to be decided...
50
// not yet filled on GPU
51
// TrajectoryStateSoA<S> stateAtOuterDet;
52
53
HitContainer
hitIndices
;
54
HitContainer
detIndices
;
55
};
56
57
namespace
pixelTrack
{
58
59
#ifdef GPU_SMALL_EVENTS
60
// kept for testing and debugging
61
constexpr uint32_t
maxNumber
() {
return
2 * 1024; }
62
#else
63
// tested on MC events with 55-75 pileup events
64
constexpr uint32_t
maxNumber
() {
return
32 * 1024; }
65
#endif
66
67
using
TrackSoA
=
TrackSoAHeterogeneousT
<
maxNumber
()>;
68
using
TrajectoryState
=
TrajectoryStateSoAT
<
maxNumber
()>;
69
using
HitContainer
=
TrackSoA::HitContainer
;
70
71
}
// namespace pixelTrack
72
73
#endif // CUDADataFormats_Track_TrackHeterogeneousT_H
mps_fire.i
i
Definition:
mps_fire.py:428
TrackSoAHeterogeneousT::eta
eigenSoA::ScalarSoA< float, S > eta
Definition:
TrackSoAHeterogeneousT.h:41
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
eigenSoA::ScalarSoA< uint8_t, S >
pixelTrack::Quality::bad
pixelTrack::Quality::strict
TrackSoAHeterogeneousT::pt
eigenSoA::ScalarSoA< float, S > pt
Definition:
TrackSoAHeterogeneousT.h:42
pixelTrack::maxNumber
constexpr uint32_t maxNumber()
Definition:
TrackSoAHeterogeneousT.h:64
pixelTrack::Quality::dup
TrackSoAHeterogeneousT::stride
static constexpr int32_t stride()
Definition:
TrackSoAHeterogeneousT.h:16
TrackSoAHeterogeneousT::qualityData
constexpr Quality * qualityData()
Definition:
TrackSoAHeterogeneousT.h:31
TrackSoAHeterogeneousT::phi
constexpr float phi(int32_t i) const
Definition:
TrackSoAHeterogeneousT.h:44
TrackSoAHeterogeneousT::hindex_type
uint32_t hindex_type
Definition:
TrackSoAHeterogeneousT.h:19
pixelTrack::Quality
Quality
Definition:
TrackSoAHeterogeneousT.h:10
TrackSoAHeterogeneousT::quality
constexpr Quality quality(int32_t i) const
Definition:
TrackSoAHeterogeneousT.h:28
HeterogeneousSoA.h
TrackSoAHeterogeneousT::quality_
eigenSoA::ScalarSoA< uint8_t, S > quality_
Definition:
TrackSoAHeterogeneousT.h:25
TrackSoAHeterogeneousT::chi2
eigenSoA::ScalarSoA< float, S > chi2
Definition:
TrackSoAHeterogeneousT.h:34
pixelTrack::Quality::tight
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:97
TrackSoAHeterogeneousT
Definition:
TrackSoAHeterogeneousT.h:14
TrackSoAHeterogeneousT::zip
constexpr float zip(int32_t i) const
Definition:
TrackSoAHeterogeneousT.h:46
TrajectoryStateSoAT.h
TrackSoAHeterogeneousT::tip
constexpr float tip(int32_t i) const
Definition:
TrackSoAHeterogeneousT.h:45
TrackSoAHeterogeneousT::stateAtBS
TrajectoryStateSoAT< S > stateAtBS
Definition:
TrackSoAHeterogeneousT.h:40
HistoContainer.h
TrackSoAHeterogeneousT::quality
constexpr Quality & quality(int32_t i)
Definition:
TrackSoAHeterogeneousT.h:29
TrackSoAHeterogeneousT::HitContainer
cms::cuda::OneToManyAssoc< hindex_type, S, 5 *S > HitContainer
Definition:
TrackSoAHeterogeneousT.h:20
TrajectoryStateSoAT
Definition:
TrajectoryStateSoAT.h:8
pixelTrack::Quality::highPurity
TrackSoAHeterogeneousT::hitIndices
HitContainer hitIndices
Definition:
TrackSoAHeterogeneousT.h:53
eigenSoA::ScalarSoA::data
__host__ constexpr __device__ Scalar * data()
Definition:
eigenSoA.h:26
pixelTrack
Definition:
TrackSoAHeterogeneousT.h:9
TrackSoAHeterogeneousT::qualityData
constexpr const Quality * qualityData() const
Definition:
TrackSoAHeterogeneousT.h:30
TrackSoAHeterogeneousT::charge
constexpr float charge(int32_t i) const
Definition:
TrackSoAHeterogeneousT.h:43
TrackSoAHeterogeneousT::detIndices
HitContainer detIndices
Definition:
TrackSoAHeterogeneousT.h:54
cms::cuda::HistoContainer
Definition:
HistoContainer.h:152
pixelTrack::Quality::loose
TrackSoAHeterogeneousT::nHits
constexpr int nHits(int i) const
Definition:
TrackSoAHeterogeneousT.h:36
Generated for CMSSW Reference Manual by
1.8.16