CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
TrajectoryStateSoAT< S > Struct Template Reference

#include <TrajectoryStateSoAT.h>

Public Types

using Matrix5d = Eigen::Matrix< double, 5, 5 >
 
using Vector15f = Eigen::Matrix< float, 15, 1 >
 
using Vector5d = Eigen::Matrix< double, 5, 1 >
 
using Vector5f = Eigen::Matrix< float, 5, 1 >
 

Public Member Functions

template<typename V3 , typename M3 , typename V2 , typename M2 >
__host__ __device__ void copyFromCircle (V3 const &cp, M3 const &ccov, V2 const &lp, M2 const &lcov, float b, int32_t i)
 
template<typename V5 , typename M5 >
__host__ __device__ void copyFromDense (V5 const &v, M5 const &cov, int32_t i)
 
template<typename V5 , typename M5 >
__host__ __device__ void copyToDense (V5 &v, M5 &cov, int32_t i) const
 

Static Public Member Functions

static constexpr int32_t stride ()
 

Public Attributes

eigenSoA::MatrixSoA< Vector15f, Scovariance
 
eigenSoA::MatrixSoA< Vector5f, Sstate
 

Detailed Description

template<int32_t S>
struct TrajectoryStateSoAT< S >

Definition at line 8 of file TrajectoryStateSoAT.h.

Member Typedef Documentation

template<int32_t S>
using TrajectoryStateSoAT< S >::Matrix5d = Eigen::Matrix<double, 5, 5>

Definition at line 13 of file TrajectoryStateSoAT.h.

template<int32_t S>
using TrajectoryStateSoAT< S >::Vector15f = Eigen::Matrix<float, 15, 1>

Definition at line 10 of file TrajectoryStateSoAT.h.

template<int32_t S>
using TrajectoryStateSoAT< S >::Vector5d = Eigen::Matrix<double, 5, 1>

Definition at line 12 of file TrajectoryStateSoAT.h.

template<int32_t S>
using TrajectoryStateSoAT< S >::Vector5f = Eigen::Matrix<float, 5, 1>

Definition at line 9 of file TrajectoryStateSoAT.h.

Member Function Documentation

template<int32_t S>
template<typename V3 , typename M3 , typename V2 , typename M2 >
__host__ __device__ void TrajectoryStateSoAT< S >::copyFromCircle ( V3 const &  cp,
M3 const &  ccov,
V2 const &  lp,
M2 const &  lcov,
float  b,
int32_t  i 
)
inline

Definition at line 21 of file TrajectoryStateSoAT.h.

References TrajectoryStateSoAT< S >::covariance, and TrajectoryStateSoAT< S >::state.

22  {
23  state(i) << cp.template cast<float>(), lp.template cast<float>();
24  state(i)(2) *= b;
25  auto cov = covariance(i);
26  cov(0) = ccov(0, 0);
27  cov(1) = ccov(0, 1);
28  cov(2) = b * float(ccov(0, 2));
29  cov(4) = cov(3) = 0;
30  cov(5) = ccov(1, 1);
31  cov(6) = b * float(ccov(1, 2));
32  cov(8) = cov(7) = 0;
33  cov(9) = b * b * float(ccov(2, 2));
34  cov(11) = cov(10) = 0;
35  cov(12) = lcov(0, 0);
36  cov(13) = lcov(0, 1);
37  cov(14) = lcov(1, 1);
38  }
eigenSoA::MatrixSoA< Vector15f, S > covariance
eigenSoA::MatrixSoA< Vector5f, S > state
double b
Definition: hdecay.h:118
template<int32_t S>
template<typename V5 , typename M5 >
__host__ __device__ void TrajectoryStateSoAT< S >::copyFromDense ( V5 const &  v,
M5 const &  cov,
int32_t  i 
)
inline

Definition at line 41 of file TrajectoryStateSoAT.h.

References TrajectoryStateSoAT< S >::covariance, dqmiolumiharvest::j, isotrackApplyRegressor::k, and TrajectoryStateSoAT< S >::state.

41  {
42  state(i) = v.template cast<float>();
43  for (int j = 0, ind = 0; j < 5; ++j)
44  for (auto k = j; k < 5; ++k)
45  covariance(i)(ind++) = cov(j, k);
46  }
eigenSoA::MatrixSoA< Vector15f, S > covariance
eigenSoA::MatrixSoA< Vector5f, S > state
template<int32_t S>
template<typename V5 , typename M5 >
__host__ __device__ void TrajectoryStateSoAT< S >::copyToDense ( V5 &  v,
M5 &  cov,
int32_t  i 
) const
inline

Definition at line 49 of file TrajectoryStateSoAT.h.

References TrajectoryStateSoAT< S >::covariance, dqmiolumiharvest::j, isotrackApplyRegressor::k, and TrajectoryStateSoAT< S >::state.

49  {
50  v = state(i).template cast<typename V5::Scalar>();
51  for (int j = 0, ind = 0; j < 5; ++j) {
52  cov(j, j) = covariance(i)(ind++);
53  for (auto k = j + 1; k < 5; ++k)
54  cov(k, j) = cov(j, k) = covariance(i)(ind++);
55  }
56  }
eigenSoA::MatrixSoA< Vector15f, S > covariance
eigenSoA::MatrixSoA< Vector5f, S > state
template<int32_t S>
static constexpr int32_t TrajectoryStateSoAT< S >::stride ( )
inlinestatic

Definition at line 15 of file TrajectoryStateSoAT.h.

15 { return S; }

Member Data Documentation

template<int32_t S>
eigenSoA::MatrixSoA<Vector15f, S> TrajectoryStateSoAT< S >::covariance
template<int32_t S>
eigenSoA::MatrixSoA<Vector5f, S> TrajectoryStateSoAT< S >::state