File indexing completed on 2024-04-06 12:28:21
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 void propagateLineToRMPlex(const MPlexLS& psErr,
0030 const MPlexLV& psPar,
0031 const MPlexHS& msErr,
0032 const MPlexHV& msPar,
0033 MPlexLS& outErr,
0034 MPlexLV& outPar,
0035 const int N_proc);
0036
0037 void propagateHelixToRMPlex(const MPlexLS& inErr,
0038 const MPlexLV& inPar,
0039 const MPlexQI& inChg,
0040 const MPlexQF& msRad,
0041 MPlexLS& outErr,
0042 MPlexLV& outPar,
0043 MPlexQI& outFailFlag,
0044 const int N_proc,
0045 const PropagationFlags& pflags,
0046 const MPlexQI* noMatEffPtr = nullptr);
0047
0048 void helixAtRFromIterativeCCSFullJac(const MPlexLV& inPar,
0049 const MPlexQI& inChg,
0050 const MPlexQF& msRad,
0051 MPlexLV& outPar,
0052 MPlexLL& errorProp,
0053 MPlexQI& outFailFlag,
0054 const int N_proc);
0055
0056 void helixAtRFromIterativeCCS(const MPlexLV& inPar,
0057 const MPlexQI& inChg,
0058 const MPlexQF& msRad,
0059 MPlexLV& outPar,
0060 MPlexLL& errorProp,
0061 MPlexQI& outFailFlag,
0062 const int N_proc,
0063 const PropagationFlags& pflags);
0064
0065 void propagateHelixToZMPlex(const MPlexLS& inErr,
0066 const MPlexLV& inPar,
0067 const MPlexQI& inChg,
0068 const MPlexQF& msZ,
0069 MPlexLS& outErr,
0070 MPlexLV& outPar,
0071 MPlexQI& outFailFlag,
0072 const int N_proc,
0073 const PropagationFlags& pflags,
0074 const MPlexQI* noMatEffPtr = nullptr);
0075
0076 void helixAtZ(const MPlexLV& inPar,
0077 const MPlexQI& inChg,
0078 const MPlexQF& msZ,
0079 MPlexLV& outPar,
0080 MPlexLL& errorProp,
0081 MPlexQI& outFailFlag,
0082 const int N_proc,
0083 const PropagationFlags& pflags);
0084
0085 void helixAtPlane(const MPlexLV& inPar,
0086 const MPlexQI& inChg,
0087 const MPlexHV& plPnt,
0088 const MPlexHV& plNrm,
0089 MPlexQF& pathL,
0090 MPlexLV& outPar,
0091 MPlexLL& errorProp,
0092 MPlexQI& outFailFlag,
0093 const int N_proc,
0094 const PropagationFlags& pflags);
0095
0096 void propagateHelixToPlaneMPlex(const MPlexLS& inErr,
0097 const MPlexLV& inPar,
0098 const MPlexQI& inChg,
0099 const MPlexHV& plPnt,
0100 const MPlexHV& plNrm,
0101 MPlexLS& outErr,
0102 MPlexLV& outPar,
0103 MPlexQI& outFailFlag,
0104 const int N_proc,
0105 const PropagationFlags& pflags,
0106 const MPlexQI* noMatEffPtr = nullptr);
0107
0108 void applyMaterialEffects(const MPlexQF& hitsRl,
0109 const MPlexQF& hitsXi,
0110 const MPlexQF& propSign,
0111 const MPlexHV& plNrm,
0112 MPlexLS& outErr,
0113 MPlexLV& outPar,
0114 const int N_proc);
0115 }
0116 #endif