File indexing completed on 2024-10-17 22:59:07
0001 #ifndef RecoTracker_MkFitCore_src_PropagationMPlex_h
0002 #define RecoTracker_MkFitCore_src_PropagationMPlex_h
0003
0004 #include "Matrix.h"
0005
0006 namespace mkfit {
0007
0008 class PropagationFlags;
0009
0010 inline void squashPhiMPlex(MPlexLV& par, const int N_proc) {
0011 #pragma omp simd
0012 for (int n = 0; n < NN; ++n) {
0013 if (n < N_proc) {
0014 if (par(n, 4, 0) >= Const::PI)
0015 par(n, 4, 0) -= Const::TwoPI;
0016 if (par(n, 4, 0) < -Const::PI)
0017 par(n, 4, 0) += Const::TwoPI;
0018 }
0019 }
0020 }
0021
0022 inline void squashPhiMPlexGeneral(MPlexLV& par, const int N_proc) {
0023 #pragma omp simd
0024 for (int n = 0; n < NN; ++n) {
0025 par(n, 4, 0) -= std::floor(0.5f * Const::InvPI * (par(n, 4, 0) + Const::PI)) * Const::TwoPI;
0026 }
0027 }
0028
0029
0030
0031 void propagateLineToRMPlex(const MPlexLS& psErr,
0032 const MPlexLV& psPar,
0033 const MPlexHS& msErr,
0034 const MPlexHV& msPar,
0035 MPlexLS& outErr,
0036 MPlexLV& outPar,
0037 const int N_proc);
0038
0039 void propagateHelixToRMPlex(const MPlexLS& inErr,
0040 const MPlexLV& inPar,
0041 const MPlexQI& inChg,
0042 const MPlexQF& msRad,
0043 MPlexLS& outErr,
0044 MPlexLV& outPar,
0045 MPlexQI& outFailFlag,
0046 const int N_proc,
0047 const PropagationFlags& pflags,
0048 const MPlexQI* noMatEffPtr = nullptr);
0049
0050 void helixAtRFromIterativeCCSFullJac(const MPlexLV& inPar,
0051 const MPlexQI& inChg,
0052 const MPlexQF& msRad,
0053 MPlexLV& outPar,
0054 MPlexLL& errorProp,
0055 MPlexQI& outFailFlag,
0056 const int N_proc);
0057
0058 void helixAtRFromIterativeCCS(const MPlexLV& inPar,
0059 const MPlexQI& inChg,
0060 const MPlexQF& msRad,
0061 MPlexLV& outPar,
0062 MPlexLL& errorProp,
0063 MPlexQI& outFailFlag,
0064 const int N_proc,
0065 const PropagationFlags& pflags);
0066
0067
0068
0069 void propagateHelixToZMPlex(const MPlexLS& inErr,
0070 const MPlexLV& inPar,
0071 const MPlexQI& inChg,
0072 const MPlexQF& msZ,
0073 MPlexLS& outErr,
0074 MPlexLV& outPar,
0075 MPlexQI& outFailFlag,
0076 const int N_proc,
0077 const PropagationFlags& pflags,
0078 const MPlexQI* noMatEffPtr = nullptr);
0079
0080 void helixAtZ(const MPlexLV& inPar,
0081 const MPlexQI& inChg,
0082 const MPlexQF& msZ,
0083 MPlexLV& outPar,
0084 MPlexLL& errorProp,
0085 MPlexQI& outFailFlag,
0086 const int N_proc,
0087 const PropagationFlags& pflags);
0088
0089
0090
0091 void helixAtPlane(const MPlexLV& inPar,
0092 const MPlexQI& inChg,
0093 const MPlexHV& plPnt,
0094 const MPlexHV& plNrm,
0095 MPlexQF& pathL,
0096 MPlexLV& outPar,
0097 MPlexLL& errorProp,
0098 MPlexQI& outFailFlag,
0099 const int N_proc,
0100 const PropagationFlags& pflags);
0101
0102 void propagateHelixToPlaneMPlex(const MPlexLS& inErr,
0103 const MPlexLV& inPar,
0104 const MPlexQI& inChg,
0105 const MPlexHV& plPnt,
0106 const MPlexHV& plNrm,
0107 MPlexLS& outErr,
0108 MPlexLV& outPar,
0109 MPlexQI& outFailFlag,
0110 const int N_proc,
0111 const PropagationFlags& pflags,
0112 const MPlexQI* noMatEffPtr = nullptr);
0113
0114
0115
0116 void applyMaterialEffects(const MPlexQF& hitsRl,
0117 const MPlexQF& hitsXi,
0118 const MPlexQF& propSign,
0119 const MPlexHV& plNrm,
0120 MPlexLS& outErr,
0121 MPlexLV& outPar,
0122 const int N_proc);
0123
0124 void MultHelixPropFull(const MPlexLL& A, const MPlexLS& B, MPlexLL& C);
0125 void MultHelixPropTranspFull(const MPlexLL& A, const MPlexLL& B, MPlexLS& C);
0126
0127 }
0128 #endif