CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Protected Attributes
mkfit::MkBase Class Reference

#include <MkBase.h>

Inheritance diagram for mkfit::MkBase:
mkfit::MkFinder mkfit::MkFitter

Public Member Functions

float getPar (int itrack, int i, int par) const
 
 MkBase ()
 
void propagateTracksToHitR (const MPlexHV &par, const int N_proc, const PropagationFlags pf, const MPlexQI *noMatEffPtr=nullptr)
 
void propagateTracksToHitZ (const MPlexHV &par, const int N_proc, const PropagationFlags pf, const MPlexQI *noMatEffPtr=nullptr)
 
void propagateTracksToPCAZ (const int N_proc, const PropagationFlags pf)
 
void propagateTracksToR (float r, const int N_proc, const PropagationFlags pf)
 
void propagateTracksToZ (float z, const int N_proc, const PropagationFlags pf)
 
float radiusSqr (int itrack, int i) const
 

Static Public Attributes

static constexpr int iC = 0
 
static constexpr int iP = 1
 

Protected Attributes

MPlexQI m_Chg
 
MPlexLS m_Err [2]
 
MPlexLV m_Par [2]
 

Detailed Description

Definition at line 14 of file MkBase.h.

Constructor & Destructor Documentation

◆ MkBase()

mkfit::MkBase::MkBase ( )
inline

Definition at line 25 of file MkBase.h.

25 {}

Member Function Documentation

◆ getPar()

float mkfit::MkBase::getPar ( int  itrack,
int  i,
int  par 
) const
inline

Definition at line 19 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::constAt(), mps_fire::i, and m_Par.

Referenced by mkfit::MkBuilder::find_tracks_handle_missed_layers(), and radiusSqr().

19 { return m_Par[i].constAt(itrack, par, 0); }
const T & constAt(idx_t n, idx_t i, idx_t j) const
Definition: Matriplex.h:52
MPlexLV m_Par[2]
Definition: MkBase.h:95

◆ propagateTracksToHitR()

void mkfit::MkBase::propagateTracksToHitR ( const MPlexHV par,
const int  N_proc,
const PropagationFlags  pf,
const MPlexQI noMatEffPtr = nullptr 
)
inline

Definition at line 39 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::At(), Matriplex::Matriplex< T, D1, D2, N >::constAt(), iC, iP, m_Chg, m_Err, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToRMPlex().

Referenced by mkfit::MkFinder::bkFitFitTracks(), mkfit::MkFinder::bkFitFitTracksBH(), and mkfit::MkFitter::fitTracksWithInterSlurp().

42  {
43  MPlexQF msRad;
44 #pragma omp simd
45  for (int n = 0; n < NN; ++n) {
46  msRad.At(n, 0, 0) = std::hypot(par.constAt(n, 0, 0), par.constAt(n, 1, 0));
47  }
48 
49  propagateHelixToRMPlex(m_Err[iC], m_Par[iC], m_Chg, msRad, m_Err[iP], m_Par[iP], N_proc, pf, noMatEffPtr);
50  }
MPlexQI m_Chg
Definition: MkBase.h:96
static constexpr int iC
Definition: MkBase.h:16
static constexpr int iP
Definition: MkBase.h:17
MPlexLV m_Par[2]
Definition: MkBase.h:95
void propagateHelixToRMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
MPlexLS m_Err[2]
Definition: MkBase.h:94
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
T & At(idx_t n, idx_t i, idx_t j)
Definition: Matriplex.h:54

◆ propagateTracksToHitZ()

void mkfit::MkBase::propagateTracksToHitZ ( const MPlexHV par,
const int  N_proc,
const PropagationFlags  pf,
const MPlexQI noMatEffPtr = nullptr 
)
inline

Definition at line 64 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::At(), Matriplex::Matriplex< T, D1, D2, N >::constAt(), iC, iP, m_Chg, m_Err, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToZMPlex().

Referenced by mkfit::MkFinder::bkFitFitTracks(), and mkfit::MkFinder::bkFitFitTracksBH().

67  {
68  MPlexQF msZ;
69 #pragma omp simd
70  for (int n = 0; n < NN; ++n) {
71  msZ.At(n, 0, 0) = par.constAt(n, 2, 0);
72  }
73 
74  propagateHelixToZMPlex(m_Err[iC], m_Par[iC], m_Chg, msZ, m_Err[iP], m_Par[iP], N_proc, pf, noMatEffPtr);
75  }
MPlexQI m_Chg
Definition: MkBase.h:96
static constexpr int iC
Definition: MkBase.h:16
static constexpr int iP
Definition: MkBase.h:17
MPlexLV m_Par[2]
Definition: MkBase.h:95
MPlexLS m_Err[2]
Definition: MkBase.h:94
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
T & At(idx_t n, idx_t i, idx_t j)
Definition: Matriplex.h:54

◆ propagateTracksToPCAZ()

void mkfit::MkBase::propagateTracksToPCAZ ( const int  N_proc,
const PropagationFlags  pf 
)
inline

Definition at line 77 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::At(), Matriplex::Matriplex< T, D1, D2, N >::constAt(), iC, iP, m_Chg, m_Err, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, mkfit::propagateHelixToZMPlex(), slope, and funct::tan().

Referenced by mkfit::MkFinder::bkFitPropTracksToPCA().

77  {
78  MPlexQF msZ; // PCA z-coordinate
79 #pragma omp simd
80  for (int n = 0; n < NN; ++n) {
81  const float slope = std::tan(m_Par[iC].constAt(n, 5, 0));
82  // msZ.At(n, 0, 0) = ( Config::beamspotz0 + slope * ( Config::beamspotr0 - std::hypot(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0))) + slope * slope * m_Par[iC].constAt(n, 2, 0) ) / ( 1+slope*slope); // PCA w.r.t. z0, r0
83  msZ.At(n, 0, 0) = (slope * (slope * m_Par[iC].constAt(n, 2, 0) -
84  std::hypot(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0)))) /
85  (1 + slope * slope); // PCA to origin
86  }
87 
88  propagateHelixToZMPlex(m_Err[iC], m_Par[iC], m_Chg, msZ, m_Err[iP], m_Par[iP], N_proc, pf);
89  }
MPlexQI m_Chg
Definition: MkBase.h:96
static constexpr int iC
Definition: MkBase.h:16
static constexpr int iP
Definition: MkBase.h:17
static const double slope[3]
const T & constAt(idx_t n, idx_t i, idx_t j) const
Definition: Matriplex.h:52
MPlexLV m_Par[2]
Definition: MkBase.h:95
MPlexLS m_Err[2]
Definition: MkBase.h:94
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65

◆ propagateTracksToR()

void mkfit::MkBase::propagateTracksToR ( float  r,
const int  N_proc,
const PropagationFlags  pf 
)
inline

Definition at line 29 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::At(), iC, iP, m_Chg, m_Err, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, mkfit::propagateHelixToRMPlex(), and alignCSCRings::r.

29  {
30  MPlexQF msRad;
31 #pragma omp simd
32  for (int n = 0; n < NN; ++n) {
33  msRad.At(n, 0, 0) = r;
34  }
35 
36  propagateHelixToRMPlex(m_Err[iC], m_Par[iC], m_Chg, msRad, m_Err[iP], m_Par[iP], N_proc, pf);
37  }
MPlexQI m_Chg
Definition: MkBase.h:96
static constexpr int iC
Definition: MkBase.h:16
static constexpr int iP
Definition: MkBase.h:17
MPlexLV m_Par[2]
Definition: MkBase.h:95
void propagateHelixToRMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
MPlexLS m_Err[2]
Definition: MkBase.h:94
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
T & At(idx_t n, idx_t i, idx_t j)
Definition: Matriplex.h:54

◆ propagateTracksToZ()

void mkfit::MkBase::propagateTracksToZ ( float  z,
const int  N_proc,
const PropagationFlags  pf 
)
inline

Definition at line 54 of file MkBase.h.

References Matriplex::Matriplex< T, D1, D2, N >::At(), iC, iP, m_Chg, m_Err, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToZMPlex().

54  {
55  MPlexQF msZ;
56 #pragma omp simd
57  for (int n = 0; n < NN; ++n) {
58  msZ.At(n, 0, 0) = z;
59  }
60 
61  propagateHelixToZMPlex(m_Err[iC], m_Par[iC], m_Chg, msZ, m_Err[iP], m_Par[iP], N_proc, pf);
62  }
MPlexQI m_Chg
Definition: MkBase.h:96
static constexpr int iC
Definition: MkBase.h:16
static constexpr int iP
Definition: MkBase.h:17
MPlexLV m_Par[2]
Definition: MkBase.h:95
MPlexLS m_Err[2]
Definition: MkBase.h:94
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
T & At(idx_t n, idx_t i, idx_t j)
Definition: Matriplex.h:54

◆ radiusSqr()

float mkfit::MkBase::radiusSqr ( int  itrack,
int  i 
) const
inline

Definition at line 21 of file MkBase.h.

References getPar(), mkfit::hipo_sqr(), and mps_fire::i.

21 { return hipo_sqr(getPar(itrack, i, 0), getPar(itrack, i, 1)); }
float hipo_sqr(float x, float y)
Definition: Matrix.h:11
float getPar(int itrack, int i, int par) const
Definition: MkBase.h:19

Member Data Documentation

◆ iC

constexpr int mkfit::MkBase::iC = 0
static

◆ iP

constexpr int mkfit::MkBase::iP = 1
static

◆ m_Chg

MPlexQI mkfit::MkBase::m_Chg
protected

◆ m_Err

MPlexLS mkfit::MkBase::m_Err[2]
protected

◆ m_Par

MPlexLV mkfit::MkBase::m_Par[2]
protected