CMS 3D CMS Logo

PropagationMPlex.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFitCore_src_PropagationMPlex_h
2 #define RecoTracker_MkFitCore_src_PropagationMPlex_h
3 
4 #include "Matrix.h"
5 
6 namespace mkfit {
7 
8  class PropagationFlags;
9 
10  inline void squashPhiMPlex(MPlexLV& par, const int N_proc) {
11 #pragma omp simd
12  for (int n = 0; n < NN; ++n) {
13  if (n < N_proc) {
14  if (par(n, 4, 0) >= Const::PI)
15  par(n, 4, 0) -= Const::TwoPI;
16  if (par(n, 4, 0) < -Const::PI)
17  par(n, 4, 0) += Const::TwoPI;
18  }
19  }
20  }
21 
22  inline void squashPhiMPlexGeneral(MPlexLV& par, const int N_proc) {
23 #pragma omp simd
24  for (int n = 0; n < NN; ++n) {
25  par(n, 4, 0) -= std::floor(0.5f * Const::InvPI * (par(n, 4, 0) + Const::PI)) * Const::TwoPI;
26  }
27  }
28 
29  // Barrel / R: PropagationMPlex.cc
30 
31  void propagateLineToRMPlex(const MPlexLS& psErr,
32  const MPlexLV& psPar,
33  const MPlexHS& msErr,
34  const MPlexHV& msPar,
35  MPlexLS& outErr,
36  MPlexLV& outPar,
37  const int N_proc);
38 
39  void propagateHelixToRMPlex(const MPlexLS& inErr,
40  const MPlexLV& inPar,
41  const MPlexQI& inChg,
42  const MPlexQF& msRad,
43  MPlexLS& outErr,
44  MPlexLV& outPar,
45  MPlexQI& outFailFlag,
46  const int N_proc,
47  const PropagationFlags& pflags,
48  const MPlexQI* noMatEffPtr = nullptr);
49 
50  void helixAtRFromIterativeCCSFullJac(const MPlexLV& inPar,
51  const MPlexQI& inChg,
52  const MPlexQF& msRad,
53  MPlexLV& outPar,
54  MPlexLL& errorProp,
55  MPlexQI& outFailFlag,
56  const int N_proc);
57 
58  void helixAtRFromIterativeCCS(const MPlexLV& inPar,
59  const MPlexQI& inChg,
60  const MPlexQF& msRad,
61  MPlexLV& outPar,
62  MPlexLL& errorProp,
63  MPlexQI& outFailFlag,
64  const int N_proc,
65  const PropagationFlags& pflags);
66 
67  // Endcap / Z: PropagationMPlexEndcap.cc
68 
69  void propagateHelixToZMPlex(const MPlexLS& inErr,
70  const MPlexLV& inPar,
71  const MPlexQI& inChg,
72  const MPlexQF& msZ,
73  MPlexLS& outErr,
74  MPlexLV& outPar,
75  MPlexQI& outFailFlag,
76  const int N_proc,
77  const PropagationFlags& pflags,
78  const MPlexQI* noMatEffPtr = nullptr);
79 
80  void helixAtZ(const MPlexLV& inPar,
81  const MPlexQI& inChg,
82  const MPlexQF& msZ,
83  MPlexLV& outPar,
84  MPlexLL& errorProp,
85  MPlexQI& outFailFlag,
86  const int N_proc,
87  const PropagationFlags& pflags);
88 
89  // Plane: PropagationMPlexPlane.cc
90 
91  void helixAtPlane(const MPlexLV& inPar,
92  const MPlexQI& inChg,
93  const MPlexHV& plPnt,
94  const MPlexHV& plNrm,
95  MPlexQF& pathL,
96  MPlexLV& outPar,
97  MPlexLL& errorProp,
98  MPlexQI& outFailFlag,
99  const int N_proc,
100  const PropagationFlags& pflags);
101 
102  void propagateHelixToPlaneMPlex(const MPlexLS& inErr,
103  const MPlexLV& inPar,
104  const MPlexQI& inChg,
105  const MPlexHV& plPnt,
106  const MPlexHV& plNrm,
107  MPlexLS& outErr,
108  MPlexLV& outPar,
109  MPlexQI& outFailFlag,
110  const int N_proc,
111  const PropagationFlags& pflags,
112  const MPlexQI* noMatEffPtr = nullptr);
113 
114  // Common functions: PropagationMPlexCommon.cc
115 
116  void applyMaterialEffects(const MPlexQF& hitsRl,
117  const MPlexQF& hitsXi,
118  const MPlexQF& propSign,
119  const MPlexHV& plNrm,
120  MPlexLS& outErr,
121  MPlexLV& outPar,
122  const int N_proc);
123 
124  void MultHelixPropFull(const MPlexLL& A, const MPlexLS& B, MPlexLL& C);
125  void MultHelixPropTranspFull(const MPlexLL& A, const MPlexLL& B, MPlexLS& C);
126 
127 } // end namespace mkfit
128 #endif
Matriplex::Matriplex< float, LL, LL, NN > MPlexLL
Definition: Matrix.h:53
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)
Definition: APVGainStruct.h:7
Matriplex::Matriplex< float, HH, 1, NN > MPlexHV
Definition: Matrix.h:58
void propagateLineToRMPlex(const MPlexLS &psErr, const MPlexLV &psPar, const MPlexHS &msErr, const MPlexHV &msPar, MPlexLS &outErr, MPlexLV &outPar, const int N_proc)
void applyMaterialEffects(const MPlexQF &hitsRl, const MPlexQF &hitsXi, const MPlexQF &propSign, const MPlexHV &plNrm, MPlexLS &outErr, MPlexLV &outPar, const int N_proc)
Matriplex::Matriplex< float, LL, 1, NN > MPlexLV
Definition: Matrix.h:54
constexpr float TwoPI
Definition: Config.h:8
void squashPhiMPlex(MPlexLV &par, const int N_proc)
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=nullptr)
constexpr float PI
Definition: Config.h:7
void helixAtZ(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLV &outPar, MPlexLL &errorProp, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags)
void propagateHelixToPlaneMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexHV &plPnt, const MPlexHV &plNrm, MPlexLS &outErr, MPlexLV &outPar, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags, const MPlexQI *noMatEffPtr=nullptr)
constexpr Matriplex::idx_t NN
Definition: Matrix.h:48
void MultHelixPropFull(const MPlexLL &A, const MPlexLS &B, MPlexLL &C)
void helixAtRFromIterativeCCSFullJac(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLV &outPar, MPlexLL &errorProp, const int N_proc)
double f[11][100]
Matriplex::Matriplex< int, 1, 1, NN > MPlexQI
Definition: Matrix.h:81
Matriplex::Matriplex< float, 1, 1, NN > MPlexQF
Definition: Matrix.h:80
void squashPhiMPlexGeneral(MPlexLV &par, const int N_proc)
void helixAtPlane(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexHV &plPnt, const MPlexHV &plNrm, MPlexQF &pathL, MPlexLV &outPar, MPlexLL &errorProp, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags)
Matriplex::MatriplexSym< float, HH, NN > MPlexHS
Definition: Matrix.h:59
void MultHelixPropTranspFull(const MPlexLL &A, const MPlexLL &B, MPlexLS &C)
Matriplex::MatriplexSym< float, LL, NN > MPlexLS
Definition: Matrix.h:55
Definition: APVGainStruct.h:7
void helixAtRFromIterativeCCS(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLV &outPar, MPlexLL &errorProp, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags &pflags)
constexpr float InvPI
Definition: Config.h:12