File indexing completed on 2024-12-05 02:48:05
0001 #ifndef RecoTracker_LSTCore_interface_alpaka_LST_h
0002 #define RecoTracker_LSTCore_interface_alpaka_LST_h
0003
0004 #include "RecoTracker/LSTCore/interface/alpaka/Common.h"
0005 #include "RecoTracker/LSTCore/interface/LSTESData.h"
0006
0007 #include <cstdlib>
0008 #include <numeric>
0009 #include <alpaka/alpaka.hpp>
0010
0011 namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
0012 class LSTEvent;
0013
0014 class LST {
0015 public:
0016 LST() = default;
0017
0018 void run(Queue& queue,
0019 bool verbose,
0020 const float ptCut,
0021 LSTESData<Device> const* deviceESData,
0022 std::vector<float> const& see_px,
0023 std::vector<float> const& see_py,
0024 std::vector<float> const& see_pz,
0025 std::vector<float> const& see_dxy,
0026 std::vector<float> const& see_dz,
0027 std::vector<float> const& see_ptErr,
0028 std::vector<float> const& see_etaErr,
0029 std::vector<float> const& see_stateTrajGlbX,
0030 std::vector<float> const& see_stateTrajGlbY,
0031 std::vector<float> const& see_stateTrajGlbZ,
0032 std::vector<float> const& see_stateTrajGlbPx,
0033 std::vector<float> const& see_stateTrajGlbPy,
0034 std::vector<float> const& see_stateTrajGlbPz,
0035 std::vector<int> const& see_q,
0036 std::vector<std::vector<int>> const& see_hitIdx,
0037 std::vector<unsigned int> const& ph2_detId,
0038 std::vector<float> const& ph2_x,
0039 std::vector<float> const& ph2_y,
0040 std::vector<float> const& ph2_z,
0041 bool no_pls_dupclean,
0042 bool tc_pls_triplets);
0043 std::vector<std::vector<unsigned int>> const& hits() const { return out_tc_hitIdxs_; }
0044 std::vector<unsigned int> const& len() const { return out_tc_len_; }
0045 std::vector<int> const& seedIdx() const { return out_tc_seedIdx_; }
0046 std::vector<short> const& trackCandidateType() const { return out_tc_trackCandidateType_; }
0047
0048 private:
0049 void prepareInput(std::vector<float> const& see_px,
0050 std::vector<float> const& see_py,
0051 std::vector<float> const& see_pz,
0052 std::vector<float> const& see_dxy,
0053 std::vector<float> const& see_dz,
0054 std::vector<float> const& see_ptErr,
0055 std::vector<float> const& see_etaErr,
0056 std::vector<float> const& see_stateTrajGlbX,
0057 std::vector<float> const& see_stateTrajGlbY,
0058 std::vector<float> const& see_stateTrajGlbZ,
0059 std::vector<float> const& see_stateTrajGlbPx,
0060 std::vector<float> const& see_stateTrajGlbPy,
0061 std::vector<float> const& see_stateTrajGlbPz,
0062 std::vector<int> const& see_q,
0063 std::vector<std::vector<int>> const& see_hitIdx,
0064 std::vector<unsigned int> const& ph2_detId,
0065 std::vector<float> const& ph2_x,
0066 std::vector<float> const& ph2_y,
0067 std::vector<float> const& ph2_z,
0068 const float ptCut);
0069
0070 void getOutput(LSTEvent& event);
0071
0072
0073 std::vector<float> in_trkX_;
0074 std::vector<float> in_trkY_;
0075 std::vector<float> in_trkZ_;
0076 std::vector<unsigned int> in_hitId_;
0077 std::vector<unsigned int> in_hitIdxs_;
0078 std::vector<unsigned int> in_hitIndices_vec0_;
0079 std::vector<unsigned int> in_hitIndices_vec1_;
0080 std::vector<unsigned int> in_hitIndices_vec2_;
0081 std::vector<unsigned int> in_hitIndices_vec3_;
0082 std::vector<float> in_deltaPhi_vec_;
0083 std::vector<float> in_ptIn_vec_;
0084 std::vector<float> in_ptErr_vec_;
0085 std::vector<float> in_px_vec_;
0086 std::vector<float> in_py_vec_;
0087 std::vector<float> in_pz_vec_;
0088 std::vector<float> in_eta_vec_;
0089 std::vector<float> in_etaErr_vec_;
0090 std::vector<float> in_phi_vec_;
0091 std::vector<int> in_charge_vec_;
0092 std::vector<unsigned int> in_seedIdx_vec_;
0093 std::vector<int> in_superbin_vec_;
0094 std::vector<PixelType> in_pixelType_vec_;
0095 std::vector<char> in_isQuad_vec_;
0096 std::vector<std::vector<unsigned int>> out_tc_hitIdxs_;
0097 std::vector<unsigned int> out_tc_len_;
0098 std::vector<int> out_tc_seedIdx_;
0099 std::vector<short> out_tc_trackCandidateType_;
0100 };
0101
0102 }
0103
0104 #endif