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

void clearFailFlag ()
 
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 radius (int itrack, int i) const
 
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]
 
MPlexQI m_FailFlag
 
MPlexLV m_Par [2]
 

Detailed Description

Definition at line 16 of file MkBase.h.

Constructor & Destructor Documentation

◆ MkBase()

mkfit::MkBase::MkBase ( )
inline

Definition at line 28 of file MkBase.h.

28 {}

Member Function Documentation

◆ clearFailFlag()

void mkfit::MkBase::clearFailFlag ( )
inline

◆ getPar()

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

Definition at line 21 of file MkBase.h.

References mps_fire::i, and m_Par.

Referenced by radius(), and radiusSqr().

21 { return m_Par[i].constAt(itrack, par, 0); }
MPlexLV m_Par[2]
Definition: MkBase.h:102

◆ propagateTracksToHitR()

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

Definition at line 42 of file MkBase.h.

References Matriplex::hypot(), iC, iP, m_Chg, m_Err, m_FailFlag, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToRMPlex().

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

45  {
46  MPlexQF msRad;
47 #pragma omp simd
48  for (int n = 0; n < NN; ++n) {
49  msRad.At(n, 0, 0) = std::hypot(par.constAt(n, 0, 0), par.constAt(n, 1, 0));
50  }
51 
53  m_Err[iC], m_Par[iC], m_Chg, msRad, m_Err[iP], m_Par[iP], m_FailFlag, N_proc, pf, noMatEffPtr);
54  }
MPlexQI m_Chg
Definition: MkBase.h:103
static constexpr int iC
Definition: MkBase.h:18
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:417
void propagateHelixToRMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr)
static constexpr int iP
Definition: MkBase.h:19
MPlexLV m_Par[2]
Definition: MkBase.h:102
MPlexQI m_FailFlag
Definition: MkBase.h:104
MPlexLS m_Err[2]
Definition: MkBase.h:101
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65

◆ propagateTracksToHitZ()

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

Definition at line 68 of file MkBase.h.

References iC, iP, m_Chg, m_Err, m_FailFlag, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToZMPlex().

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

71  {
72  MPlexQF msZ;
73 #pragma omp simd
74  for (int n = 0; n < NN; ++n) {
75  msZ.At(n, 0, 0) = par.constAt(n, 2, 0);
76  }
77 
79  m_Err[iC], m_Par[iC], m_Chg, msZ, m_Err[iP], m_Par[iP], m_FailFlag, N_proc, pf, noMatEffPtr);
80  }
MPlexQI m_Chg
Definition: MkBase.h:103
static constexpr int iC
Definition: MkBase.h:18
static constexpr int iP
Definition: MkBase.h:19
MPlexLV m_Par[2]
Definition: MkBase.h:102
MPlexQI m_FailFlag
Definition: MkBase.h:104
MPlexLS m_Err[2]
Definition: MkBase.h:101
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr)

◆ propagateTracksToPCAZ()

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

Definition at line 82 of file MkBase.h.

References Matriplex::hypot(), iC, iP, m_Chg, m_Err, m_FailFlag, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, mkfit::propagateHelixToZMPlex(), slope, and funct::tan().

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

82  {
83  MPlexQF msZ; // PCA z-coordinate
84 #pragma omp simd
85  for (int n = 0; n < NN; ++n) {
86  const float slope = std::tan(m_Par[iC].constAt(n, 5, 0));
87  // 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
88  msZ.At(n, 0, 0) = (slope * (slope * m_Par[iC].constAt(n, 2, 0) -
89  std::hypot(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0)))) /
90  (1 + slope * slope); // PCA to origin
91  }
92 
94  }
MPlexQI m_Chg
Definition: MkBase.h:103
static constexpr int iC
Definition: MkBase.h:18
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:417
static constexpr int iP
Definition: MkBase.h:19
static const double slope[3]
MPlexLV m_Par[2]
Definition: MkBase.h:102
MPlexQI m_FailFlag
Definition: MkBase.h:104
MPlexLS m_Err[2]
Definition: MkBase.h:101
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr)

◆ propagateTracksToR()

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

Definition at line 32 of file MkBase.h.

References iC, iP, m_Chg, m_Err, m_FailFlag, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToRMPlex().

32  {
33  MPlexQF msRad;
34 #pragma omp simd
35  for (int n = 0; n < NN; ++n) {
36  msRad.At(n, 0, 0) = r;
37  }
38 
40  }
MPlexQI m_Chg
Definition: MkBase.h:103
static constexpr int iC
Definition: MkBase.h:18
void propagateHelixToRMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr)
static constexpr int iP
Definition: MkBase.h:19
MPlexLV m_Par[2]
Definition: MkBase.h:102
MPlexQI m_FailFlag
Definition: MkBase.h:104
MPlexLS m_Err[2]
Definition: MkBase.h:101
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65

◆ propagateTracksToZ()

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

Definition at line 58 of file MkBase.h.

References iC, iP, m_Chg, m_Err, m_FailFlag, m_Par, dqmiodumpmetadata::n, mkfit::NN, packedPFCandidateRefMixer_cfi::pf, and mkfit::propagateHelixToZMPlex().

58  {
59  MPlexQF msZ;
60 #pragma omp simd
61  for (int n = 0; n < NN; ++n) {
62  msZ.At(n, 0, 0) = z;
63  }
64 
66  }
MPlexQI m_Chg
Definition: MkBase.h:103
static constexpr int iC
Definition: MkBase.h:18
static constexpr int iP
Definition: MkBase.h:19
MPlexLV m_Par[2]
Definition: MkBase.h:102
MPlexQI m_FailFlag
Definition: MkBase.h:104
float float float z
MPlexLS m_Err[2]
Definition: MkBase.h:101
constexpr Matriplex::idx_t NN
Definition: Matrix.h:43
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:65
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr)

◆ radius()

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

Definition at line 24 of file MkBase.h.

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

Referenced by mkfit::MkBuilder::find_tracks_handle_missed_layers().

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

◆ radiusSqr()

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

Definition at line 23 of file MkBase.h.

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

23 { 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:21

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_FailFlag

MPlexQI mkfit::MkBase::m_FailFlag
protected

◆ m_Par

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