CUDADataFormats
TrackingRecHit
interface
TrackingRecHit2DReduced.h
Go to the documentation of this file.
1
#ifndef CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DReduced_h
2
#define CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DReduced_h
3
4
#include "
CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DSOAView.h
"
5
#include "
CUDADataFormats/Common/interface/HostProduct.h
"
6
7
// a reduced (in content and therefore in size) version to be used on CPU for Legacy reconstruction
8
class
TrackingRecHit2DReduced
{
9
public
:
10
using
HLPstorage
=
HostProduct<float[]>
;
11
using
HIDstorage
=
HostProduct<uint16_t[]>
;
12
13
template
<
typename
UP32,
typename
UP16>
14
TrackingRecHit2DReduced
(UP32&& istore32, UP16&& istore16,
int
nhits
)
15
:
m_store32
(
std
::
move
(istore32)),
m_store16
(
std
::
move
(istore16)),
m_nHits
(
nhits
) {
16
auto
get32 = [&](
int
i
) {
return
const_cast<float*>(
m_store32
.
get
()) +
i
*
nhits
; };
17
18
// copy all the pointers (better be in sync with the producer store)
19
20
m_view
.
m_xl
= get32(0);
21
m_view
.
m_yl
= get32(1);
22
m_view
.
m_xerr
= get32(2);
23
m_view
.
m_yerr
= get32(3);
24
m_view
.
m_chargeAndStatus
= reinterpret_cast<uint32_t*>(get32(4));
25
m_view
.
m_detInd
= const_cast<uint16_t*>(
m_store16
.
get
());
26
}
27
28
// view only!
29
TrackingRecHit2DReduced
(
TrackingRecHit2DSOAView
const
& iview,
int
nhits
) :
m_view
(iview),
m_nHits
(
nhits
) {}
30
31
TrackingRecHit2DReduced
() =
default
;
32
~TrackingRecHit2DReduced
() =
default
;
33
34
TrackingRecHit2DReduced
(
const
TrackingRecHit2DReduced
&) =
delete
;
35
TrackingRecHit2DReduced
&
operator=
(
const
TrackingRecHit2DReduced
&) =
delete
;
36
TrackingRecHit2DReduced
(
TrackingRecHit2DReduced
&&) =
default
;
37
TrackingRecHit2DReduced
&
operator=
(
TrackingRecHit2DReduced
&&) =
default
;
38
39
TrackingRecHit2DSOAView
&
view
() {
return
m_view
; }
40
TrackingRecHit2DSOAView
const
&
view
()
const
{
return
m_view
; }
41
42
auto
nHits
()
const
{
return
m_nHits
; }
43
44
private
:
45
TrackingRecHit2DSOAView
m_view
;
46
47
HLPstorage
m_store32
;
48
HIDstorage
m_store16
;
49
50
int
m_nHits
;
51
};
52
53
#endif
TrackingRecHit2DSOAView::m_xerr
float * m_xerr
Definition:
TrackingRecHit2DSOAView.h:92
mps_fire.i
i
Definition:
mps_fire.py:428
TrackingRecHit2DReduced::m_nHits
int m_nHits
Definition:
TrackingRecHit2DReduced.h:50
TrackingRecHit2DReduced::TrackingRecHit2DReduced
TrackingRecHit2DReduced(UP32 &&istore32, UP16 &&istore16, int nhits)
Definition:
TrackingRecHit2DReduced.h:14
TrackingRecHit2DReduced::~TrackingRecHit2DReduced
~TrackingRecHit2DReduced()=default
TrackingRecHit2DSOAView::m_xl
float * m_xl
Definition:
TrackingRecHit2DSOAView.h:91
HostProduct.h
TrackingRecHit2DSOAView
Definition:
TrackingRecHit2DSOAView.h:16
TrackingRecHit2DReduced::TrackingRecHit2DReduced
TrackingRecHit2DReduced(TrackingRecHit2DSOAView const &iview, int nhits)
Definition:
TrackingRecHit2DReduced.h:29
TrackingRecHit2DReduced::m_view
TrackingRecHit2DSOAView m_view
Definition:
TrackingRecHit2DReduced.h:45
TrackingRecHit2DReduced::view
TrackingRecHit2DSOAView & view()
Definition:
TrackingRecHit2DReduced.h:39
TrackingRecHit2DReduced::nHits
auto nHits() const
Definition:
TrackingRecHit2DReduced.h:42
nhits
Definition:
HIMultiTrackSelector.h:42
TrackingRecHit2DReduced::TrackingRecHit2DReduced
TrackingRecHit2DReduced()=default
HostProduct< float[]>
TrackingRecHit2DReduced::m_store16
HIDstorage m_store16
Definition:
TrackingRecHit2DReduced.h:48
TrackingRecHit2DSOAView::m_yerr
float * m_yerr
Definition:
TrackingRecHit2DSOAView.h:92
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
TrackingRecHit2DSOAView.h
TrackingRecHit2DSOAView::m_chargeAndStatus
m_chargeAndStatus[i]
Definition:
TrackingRecHit2DSOAView.h:59
TrackingRecHit2DReduced
Definition:
TrackingRecHit2DReduced.h:8
TrackingRecHit2DSOAView::m_yl
float * m_yl
Definition:
TrackingRecHit2DSOAView.h:91
TrackingRecHit2DReduced::operator=
TrackingRecHit2DReduced & operator=(const TrackingRecHit2DReduced &)=delete
TrackingRecHit2DSOAView::m_detInd
uint16_t * m_detInd
Definition:
TrackingRecHit2DSOAView.h:103
TrackingRecHit2DReduced::view
TrackingRecHit2DSOAView const & view() const
Definition:
TrackingRecHit2DReduced.h:40
HostProduct::get
auto const * get() const
Definition:
HostProduct.h:18
TrackingRecHit2DReduced::m_store32
HLPstorage m_store32
Definition:
TrackingRecHit2DReduced.h:47
Generated for CMSSW Reference Manual by
1.8.16