File indexing completed on 2024-12-05 02:48:10
0001 #ifndef trkCore_h
0002 #define trkCore_h
0003
0004 #include "LSTEvent.h"
0005
0006 #include "Trktree.h"
0007 #include "TCanvas.h"
0008 #include "TSystem.h"
0009 #include "AnalysisConfig.h"
0010 #include "ModuleConnectionMap.h"
0011 #include "lst_math.h"
0012 #include <numeric>
0013 #include <filesystem>
0014
0015 using LSTEvent = ALPAKA_ACCELERATOR_NAMESPACE::lst::LSTEvent;
0016 using ::lst::PixelType;
0017
0018
0019
0020 bool goodEvent();
0021 float runMiniDoublet(LSTEvent *event, int evt);
0022 float runSegment(LSTEvent *event);
0023 float runT4(LSTEvent *event);
0024 float runT4x(LSTEvent *event);
0025 float runpT4(LSTEvent *event);
0026 float runT3(LSTEvent *event);
0027 float runTrackCandidate(LSTEvent *event, bool no_pls_dupclean, bool tc_pls_triplets);
0028 float runQuintuplet(LSTEvent *event);
0029 float runPixelQuintuplet(LSTEvent *event);
0030 float runPixelLineSegment(LSTEvent *event, bool no_pls_dupclean);
0031 float runpT3(LSTEvent *event);
0032
0033
0034
0035 std::vector<int> matchedSimTrkIdxs(std::vector<unsigned int> hitidxs,
0036 std::vector<unsigned int> hittypes,
0037 bool verbose = false,
0038 float *pmatched = nullptr);
0039 std::vector<int> matchedSimTrkIdxs(std::vector<int> hitidxs, std::vector<int> hittypes, bool verbose = false);
0040 int getDenomSimTrkType(int isimtrk);
0041 int getDenomSimTrkType(std::vector<int> simidxs);
0042
0043
0044
0045 float drfracSimHitConsistentWithHelix(int isimtrk, int isimhitidx);
0046 float drfracSimHitConsistentWithHelix(lst_math::Helix &helix, int isimhitidx);
0047 float distxySimHitConsistentWithHelix(int isimtrk, int isimhitidx);
0048 float distxySimHitConsistentWithHelix(lst_math::Helix &helix, int isimhitidx);
0049 TVector3 calculateR3FromPCA(const TVector3 &p3, const float dxy, const float dz);
0050
0051
0052
0053 void addInputsToLineSegmentTrackingPreLoad(std::vector<std::vector<float>> &out_trkX,
0054 std::vector<std::vector<float>> &out_trkY,
0055 std::vector<std::vector<float>> &out_trkZ,
0056 std::vector<std::vector<unsigned int>> &out_hitId,
0057 std::vector<std::vector<unsigned int>> &out_hitIdxs,
0058 std::vector<std::vector<unsigned int>> &out_hitIndices_vec0,
0059 std::vector<std::vector<unsigned int>> &out_hitIndices_vec1,
0060 std::vector<std::vector<unsigned int>> &out_hitIndices_vec2,
0061 std::vector<std::vector<unsigned int>> &out_hitIndices_vec3,
0062 std::vector<std::vector<float>> &out_deltaPhi_vec,
0063 std::vector<std::vector<float>> &out_ptIn_vec,
0064 std::vector<std::vector<float>> &out_ptErr_vec,
0065 std::vector<std::vector<float>> &out_px_vec,
0066 std::vector<std::vector<float>> &out_py_vec,
0067 std::vector<std::vector<float>> &out_pz_vec,
0068 std::vector<std::vector<float>> &out_eta_vec,
0069 std::vector<std::vector<float>> &out_etaErr_vec,
0070 std::vector<std::vector<float>> &out_phi_vec,
0071 std::vector<std::vector<int>> &out_charge_vec,
0072 std::vector<std::vector<unsigned int>> &out_seedIdx_vec,
0073 std::vector<std::vector<int>> &out_superbin_vec,
0074 std::vector<std::vector<PixelType>> &out_pixelType_vec,
0075 std::vector<std::vector<char>> &out_isQuad_vec);
0076
0077 float addInputsToEventPreLoad(LSTEvent *event,
0078 bool useOMP,
0079 std::vector<float> trkX,
0080 std::vector<float> trkY,
0081 std::vector<float> trkZ,
0082 std::vector<unsigned int> hitId,
0083 std::vector<unsigned int> hitIdxs,
0084 std::vector<unsigned int> hitIndices_vec0,
0085 std::vector<unsigned int> hitIndices_vec1,
0086 std::vector<unsigned int> hitIndices_vec2,
0087 std::vector<unsigned int> hitIndices_vec3,
0088 std::vector<float> deltaPhi_vec,
0089 std::vector<float> ptIn_vec,
0090 std::vector<float> ptErr_vec,
0091 std::vector<float> px_vec,
0092 std::vector<float> py_vec,
0093 std::vector<float> pz_vec,
0094 std::vector<float> eta_vec,
0095 std::vector<float> etaErr_vec,
0096 std::vector<float> phi_vec,
0097 std::vector<int> charge_vec,
0098 std::vector<unsigned int> seedIdx_vec,
0099 std::vector<int> superbin_vec,
0100 std::vector<PixelType> pixelType_vec,
0101 std::vector<char> isQuad_vec);
0102
0103 void printTimingInformation(std::vector<std::vector<float>> &timing_information, float fullTime, float fullavg);
0104
0105
0106
0107 TString get_absolute_path_after_check_file_exists(const std::string name);
0108 void writeMetaData();
0109
0110
0111
0112
0113 float addInputsToLineSegmentTrackingUsingExplicitMemory(LSTEvent &event);
0114 float addInputsToLineSegmentTracking(LSTEvent &event, bool useOMP);
0115
0116 #endif