From 5d0ef1ea6041adeba4bf782d5228f25e067fcb81 Mon Sep 17 00:00:00 2001 From: Manos Vourliotis Date: Fri, 19 Jul 2024 09:44:07 -0700 Subject: [PATCH] Namespace renaming SDL->lst and inclusion of the T5DNN->t5dnn namespace under it --- .../plugins/alpaka/LSTModulesDevESProducer.cc | 4 +- RecoTracker/LST/plugins/alpaka/LSTProducer.cc | 4 +- RecoTracker/LST/src/ES_ModulesDev.cc | 2 +- RecoTracker/LST/src/alpaka/ES_ModulesDev.cc | 2 +- RecoTracker/LSTCore/interface/Constants.h | 4 +- .../LSTCore/interface/EndcapGeometry.h | 4 +- .../LSTCore/interface/EndcapGeometryBuffer.h | 4 +- RecoTracker/LSTCore/interface/LST.h | 7 +- RecoTracker/LSTCore/interface/LSTESData.h | 16 +- RecoTracker/LSTCore/interface/Module.h | 4 +- .../LSTCore/interface/ModuleConnectionMap.h | 4 +- RecoTracker/LSTCore/interface/PixelMap.h | 4 +- .../LSTCore/interface/TiltedGeometry.h | 4 +- .../LSTCore/interface/alpaka/Constants.h | 43 +- RecoTracker/LSTCore/src/EndcapGeometry.cc | 8 +- RecoTracker/LSTCore/src/LSTESData.cc | 20 +- .../LSTCore/src/ModuleConnectionMap.cc | 16 +- RecoTracker/LSTCore/src/ModuleMethods.h | 22 +- RecoTracker/LSTCore/src/TiltedGeometry.cc | 8 +- RecoTracker/LSTCore/src/alpaka/Event.dev.cc | 241 +++---- RecoTracker/LSTCore/src/alpaka/Event.h | 4 +- RecoTracker/LSTCore/src/alpaka/Hit.h | 14 +- RecoTracker/LSTCore/src/alpaka/Kernels.h | 42 +- RecoTracker/LSTCore/src/alpaka/LST.dev.cc | 14 +- RecoTracker/LSTCore/src/alpaka/MiniDoublet.h | 114 ++-- .../LSTCore/src/alpaka/NeuralNetwork.h | 281 ++++---- .../LSTCore/src/alpaka/NeuralNetworkWeights.h | 614 +++++++++--------- RecoTracker/LSTCore/src/alpaka/PixelTriplet.h | 416 ++++++------ RecoTracker/LSTCore/src/alpaka/Quintuplet.h | 464 ++++++------- RecoTracker/LSTCore/src/alpaka/Segment.h | 114 ++-- .../LSTCore/src/alpaka/TrackCandidate.h | 86 +-- RecoTracker/LSTCore/src/alpaka/Triplet.h | 168 ++--- RecoTracker/LSTCore/standalone/bin/sdl.cc | 10 +- .../standalone/code/core/AccessHelper.cc | 146 ++--- .../standalone/code/core/AccessHelper.h | 98 +-- .../standalone/code/core/AnalysisConfig.h | 2 +- .../code/core/{SDLMath.h => lstMath.h} | 8 +- .../LSTCore/standalone/code/core/trkCore.cc | 30 +- .../LSTCore/standalone/code/core/trkCore.h | 36 +- .../standalone/code/core/write_sdl_ntuple.cc | 188 +++--- .../standalone/code/core/write_sdl_ntuple.h | 54 +- .../standalone/efficiency/bin/sdl_timing | 2 +- 42 files changed, 1670 insertions(+), 1656 deletions(-) rename RecoTracker/LSTCore/standalone/code/core/{SDLMath.h => lstMath.h} (98%) diff --git a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc index e4c4e7d01d629..908eb796e581b 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc @@ -22,8 +22,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { descriptions.addWithDefaultLabel(desc); } - std::unique_ptr> produce(TrackerRecoGeometryRecord const& iRecord) { - return SDL::loadAndFillESHost(); + std::unique_ptr> produce(TrackerRecoGeometryRecord const& iRecord) { + return lst::loadAndFillESHost(); } }; diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc index 1b34b949c64e5..18bd7c25a9aec 100644 --- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc +++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc @@ -87,11 +87,11 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { private: edm::EDGetTokenT lstPixelSeedInputToken_; edm::EDGetTokenT lstPhase2OTHitsInputToken_; - device::ESGetToken, TrackerRecoGeometryRecord> lstESToken_; + device::ESGetToken, TrackerRecoGeometryRecord> lstESToken_; const bool verbose_, nopLSDupClean_, tcpLSTriplets_; edm::EDPutTokenT lstOutputToken_; - SDL::LST lst_; + lst::LST lst_; }; } // namespace ALPAKA_ACCELERATOR_NAMESPACE diff --git a/RecoTracker/LST/src/ES_ModulesDev.cc b/RecoTracker/LST/src/ES_ModulesDev.cc index 1c341f798246e..06a357860a7d5 100644 --- a/RecoTracker/LST/src/ES_ModulesDev.cc +++ b/RecoTracker/LST/src/ES_ModulesDev.cc @@ -2,4 +2,4 @@ #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "FWCore/Utilities/interface/typelookup.h" -TYPELOOKUP_DATA_REG(SDL::LSTESData); +TYPELOOKUP_DATA_REG(lst::LSTESData); diff --git a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc index a6736c698103b..54ded5e7a7c98 100644 --- a/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc +++ b/RecoTracker/LST/src/alpaka/ES_ModulesDev.cc @@ -1,4 +1,4 @@ #include "RecoTracker/LSTCore/interface/LSTESData.h" #include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h" -TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(SDL::LSTESData); +TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(lst::LSTESData); diff --git a/RecoTracker/LSTCore/interface/Constants.h b/RecoTracker/LSTCore/interface/Constants.h index 8a26c3a2a6471..f2c99e960956d 100644 --- a/RecoTracker/LSTCore/interface/Constants.h +++ b/RecoTracker/LSTCore/interface/Constants.h @@ -7,7 +7,7 @@ #include "HeterogeneousCore/AlpakaInterface/interface/CachedBufAlloc.h" #endif -namespace SDL { +namespace lst { // Buffer type for allocations where auto type can't be used. template @@ -75,6 +75,6 @@ namespace SDL { static constexpr int kLayers = 7, kHits = 14; }; -} //namespace SDL +} //namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/EndcapGeometry.h b/RecoTracker/LSTCore/interface/EndcapGeometry.h index 25d5315a61e7c..09bab83238754 100644 --- a/RecoTracker/LSTCore/interface/EndcapGeometry.h +++ b/RecoTracker/LSTCore/interface/EndcapGeometry.h @@ -9,7 +9,7 @@ #include #include -namespace SDL { +namespace lst { class EndcapGeometry { private: std::map dxdy_slope_; // dx/dy slope @@ -29,6 +29,6 @@ namespace SDL { void fillGeoMapArraysExplicit(); float getdxdy_slope(unsigned int detid) const; }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h b/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h index afacfc4ba6d25..1f1333d89f002 100644 --- a/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h +++ b/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h @@ -11,7 +11,7 @@ #include "RecoTracker/LSTCore/interface/Constants.h" -namespace SDL { +namespace lst { struct EndcapGeometryDev { const unsigned int* geoMapDetId; @@ -51,6 +51,6 @@ namespace SDL { inline EndcapGeometryDev const* data() const { return &data_; } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/LST.h b/RecoTracker/LSTCore/interface/LST.h index 7b44d07e0bb6c..cb5d8c912166c 100644 --- a/RecoTracker/LSTCore/interface/LST.h +++ b/RecoTracker/LSTCore/interface/LST.h @@ -6,10 +6,9 @@ #include #include -#include #include -namespace SDL { +namespace lst { template class Event; @@ -72,7 +71,7 @@ namespace SDL { const std::vector ph2_y, const std::vector ph2_z); - void getOutput(SDL::Event& event); + void getOutput(lst::Event& event); std::vector getHitIdxs(const short trackCandidateType, const unsigned int TCIdx, const unsigned int* TCHitIndices, @@ -108,6 +107,6 @@ namespace SDL { std::vector out_tc_trackCandidateType_; }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/LSTESData.h b/RecoTracker/LSTCore/interface/LSTESData.h index 72ad204af1b43..770c36126d82b 100644 --- a/RecoTracker/LSTCore/interface/LSTESData.h +++ b/RecoTracker/LSTCore/interface/LSTESData.h @@ -11,7 +11,7 @@ #include #include -namespace SDL { +namespace lst { template struct LSTESData { @@ -41,22 +41,22 @@ namespace SDL { std::unique_ptr> loadAndFillESHost(); -} // namespace SDL +} // namespace lst namespace cms::alpakatools { template <> - struct CopyToDevice> { + struct CopyToDevice> { template - static SDL::LSTESData> copyAsync(TQueue& queue, - SDL::LSTESData const& srcData) { - auto deviceModulesBuffers = std::make_shared>>( + static lst::LSTESData> copyAsync(TQueue& queue, + lst::LSTESData const& srcData) { + auto deviceModulesBuffers = std::make_shared>>( alpaka::getDev(queue), srcData.nModules, srcData.nPixels); deviceModulesBuffers->copyFromSrc(queue, *srcData.modulesBuffers); auto deviceEndcapGeometryBuffers = - std::make_shared>>(alpaka::getDev(queue), srcData.nEndCapMap); + std::make_shared>>(alpaka::getDev(queue), srcData.nEndCapMap); deviceEndcapGeometryBuffers->copyFromSrc(queue, *srcData.endcapGeometryBuffers); - return SDL::LSTESData>(srcData.nModules, + return lst::LSTESData>(srcData.nModules, srcData.nLowerModules, srcData.nPixels, srcData.nEndCapMap, diff --git a/RecoTracker/LSTCore/interface/Module.h b/RecoTracker/LSTCore/interface/Module.h index 3b94508c529e0..3fcd9ed92785c 100644 --- a/RecoTracker/LSTCore/interface/Module.h +++ b/RecoTracker/LSTCore/interface/Module.h @@ -3,7 +3,7 @@ #include "RecoTracker/LSTCore/interface/Constants.h" -namespace SDL { +namespace lst { enum SubDet { InnerPixel = 0, Barrel = 5, Endcap = 4 }; enum Side { NegZ = 1, PosZ = 2, Center = 3 }; @@ -224,5 +224,5 @@ namespace SDL { inline Modules const* data() const { return &data_; } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/ModuleConnectionMap.h b/RecoTracker/LSTCore/interface/ModuleConnectionMap.h index 3798690016c99..99600faeece13 100644 --- a/RecoTracker/LSTCore/interface/ModuleConnectionMap.h +++ b/RecoTracker/LSTCore/interface/ModuleConnectionMap.h @@ -8,7 +8,7 @@ #include #include -namespace SDL { +namespace lst { class ModuleConnectionMap { private: std::map> moduleConnections_; @@ -27,6 +27,6 @@ namespace SDL { }; using MapPLStoLayer = std::array, 3>; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/PixelMap.h b/RecoTracker/LSTCore/interface/PixelMap.h index 40d5bbbdfab84..d6962ce976ebf 100644 --- a/RecoTracker/LSTCore/interface/PixelMap.h +++ b/RecoTracker/LSTCore/interface/PixelMap.h @@ -6,7 +6,7 @@ #include "RecoTracker/LSTCore/interface/Constants.h" -namespace SDL { +namespace lst { struct pixelMap { uint16_t pixelModuleIndex; @@ -28,6 +28,6 @@ namespace SDL { connectedPixelsIndexNeg(sizef), connectedPixelsSizesNeg(sizef) {} }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/TiltedGeometry.h b/RecoTracker/LSTCore/interface/TiltedGeometry.h index 5d565fe789af5..6a8c6bab902b8 100644 --- a/RecoTracker/LSTCore/interface/TiltedGeometry.h +++ b/RecoTracker/LSTCore/interface/TiltedGeometry.h @@ -9,7 +9,7 @@ #include #include -namespace SDL { +namespace lst { class TiltedGeometry { private: std::map drdzs_; // dr/dz slope @@ -26,6 +26,6 @@ namespace SDL { float getDxDy(unsigned int detid) const; }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/interface/alpaka/Constants.h b/RecoTracker/LSTCore/interface/alpaka/Constants.h index 7c8aaff322aab..f80b500fd6a4e 100644 --- a/RecoTracker/LSTCore/interface/alpaka/Constants.h +++ b/RecoTracker/LSTCore/interface/alpaka/Constants.h @@ -7,7 +7,7 @@ #include #endif -namespace SDL { +namespace lst { using namespace ALPAKA_ACCELERATOR_NAMESPACE; @@ -83,23 +83,26 @@ namespace SDL { ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float widthPS = 0.01; ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float pt_betaMax = 7.0; ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float magnetic_field = 3.8112; - // Since C++ can't represent infinity, SDL_INF = 123456789 was used to represent infinity in the data table - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float SDL_INF = 123456789.0; -} //namespace SDL - -namespace T5DNN { - // Working points matching LST fake rate (43.9%) or signal acceptance (82.0%) - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP1 = 0.3418833f; // 94.0% TPR, 43.9% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP2 = 0.6177366f; // 82.0% TPR, 20.0% FPR - // Other working points - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP70 = 0.7776195f; // 70.0% TPR, 10.0% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP75 = 0.7181118f; // 75.0% TPR, 13.5% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP80 = 0.6492643f; // 80.0% TPR, 17.9% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP85 = 0.5655319f; // 85.0% TPR, 23.8% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP90 = 0.4592205f; // 90.0% TPR, 32.6% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP95 = 0.3073708f; // 95.0% TPR, 47.7% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP97p5 = 0.2001348f; // 97.5% TPR, 61.2% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99 = 0.1120605f; // 99.0% TPR, 75.9% FPR - ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99p9 = 0.0218196f; // 99.9% TPR, 95.4% FPR -} // namespace T5DNN + // Since C++ can't represent infinity, lst_INF = 123456789 was used to represent infinity in the data table + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float lst_INF = 123456789.0; + + namespace t5dnn { + // + // Working points matching LST fake rate (43.9%) or signal acceptance (82.0%) + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP1 = 0.3418833f; // 94.0% TPR, 43.9% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float LSTWP2 = 0.6177366f; // 82.0% TPR, 20.0% FPR + // Other working points + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP70 = 0.7776195f; // 70.0% TPR, 10.0% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP75 = 0.7181118f; // 75.0% TPR, 13.5% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP80 = 0.6492643f; // 80.0% TPR, 17.9% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP85 = 0.5655319f; // 85.0% TPR, 23.8% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP90 = 0.4592205f; // 90.0% TPR, 32.6% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP95 = 0.3073708f; // 95.0% TPR, 47.7% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP97p5 = 0.2001348f; // 97.5% TPR, 61.2% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99 = 0.1120605f; // 99.0% TPR, 75.9% FPR + ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float WP99p9 = 0.0218196f; // 99.9% TPR, 95.4% FPR + + } // namespace t5dnn + +} //namespace lst #endif diff --git a/RecoTracker/LSTCore/src/EndcapGeometry.cc b/RecoTracker/LSTCore/src/EndcapGeometry.cc index db31121267703..cf659f38246b8 100644 --- a/RecoTracker/LSTCore/src/EndcapGeometry.cc +++ b/RecoTracker/LSTCore/src/EndcapGeometry.cc @@ -1,8 +1,8 @@ #include "RecoTracker/LSTCore/interface/EndcapGeometry.h" -SDL::EndcapGeometry::EndcapGeometry(std::string filename) { load(filename); } +lst::EndcapGeometry::EndcapGeometry(std::string filename) { load(filename); } -void SDL::EndcapGeometry::load(std::string filename) { +void lst::EndcapGeometry::load(std::string filename) { dxdy_slope_.clear(); centroid_phis_.clear(); @@ -34,7 +34,7 @@ void SDL::EndcapGeometry::load(std::string filename) { fillGeoMapArraysExplicit(); } -void SDL::EndcapGeometry::fillGeoMapArraysExplicit() { +void lst::EndcapGeometry::fillGeoMapArraysExplicit() { nEndCapMap = centroid_phis_.size(); geoMapDetId_buf.reserve(nEndCapMap); @@ -48,7 +48,7 @@ void SDL::EndcapGeometry::fillGeoMapArraysExplicit() { } } -float SDL::EndcapGeometry::getdxdy_slope(unsigned int detid) const { +float lst::EndcapGeometry::getdxdy_slope(unsigned int detid) const { if (dxdy_slope_.find(detid) != dxdy_slope_.end()) { return dxdy_slope_.at(detid); } else { diff --git a/RecoTracker/LSTCore/src/LSTESData.cc b/RecoTracker/LSTCore/src/LSTESData.cc index d91019852165e..f7c9c865da0cf 100644 --- a/RecoTracker/LSTCore/src/LSTESData.cc +++ b/RecoTracker/LSTCore/src/LSTESData.cc @@ -39,10 +39,10 @@ namespace { return fullpath.string(); } - void loadMapsHost(SDL::MapPLStoLayer& pLStoLayer, - std::shared_ptr endcapGeometry, - std::shared_ptr tiltedGeometry, - std::shared_ptr moduleConnectionMap) { + void loadMapsHost(lst::MapPLStoLayer& pLStoLayer, + std::shared_ptr endcapGeometry, + std::shared_ptr tiltedGeometry, + std::shared_ptr moduleConnectionMap) { // Module orientation information (DrDz or phi angles) auto endcap_geom = get_absolute_path_after_check_file_exists(trackLooperDir() + "/data/OT800_IT615_pt0.8/endcap_orientation.bin"); @@ -66,22 +66,22 @@ namespace { auto connectData = connects[i].data(); path = pLSMapDir + connectData + ".bin"; - pLStoLayer[0][i] = SDL::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); + pLStoLayer[0][i] = lst::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); path = pLSMapDir + "_pos" + connectData + ".bin"; - pLStoLayer[1][i] = SDL::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); + pLStoLayer[1][i] = lst::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); path = pLSMapDir + "_neg" + connectData + ".bin"; - pLStoLayer[2][i] = SDL::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); + pLStoLayer[2][i] = lst::ModuleConnectionMap(get_absolute_path_after_check_file_exists(path)); } } } // namespace -std::unique_ptr> SDL::loadAndFillESHost() { +std::unique_ptr> lst::loadAndFillESHost() { uint16_t nModules; uint16_t nLowerModules; unsigned int nPixels; - std::shared_ptr> modulesBuffers = nullptr; + std::shared_ptr> modulesBuffers = nullptr; auto pLStoLayer = std::make_shared(); auto endcapGeometry = std::make_shared(); auto tiltedGeometry = std::make_shared(); @@ -99,7 +99,7 @@ std::unique_ptr> SDL::loadAndFillESHost() auto path = get_absolute_path_after_check_file_exists(trackLooperDir() + "/data/OT800_IT615_pt0.8/sensor_centroids.bin"); - SDL::loadModulesFromFile(pLStoLayer.get(), + lst::loadModulesFromFile(pLStoLayer.get(), path.c_str(), nModules, nLowerModules, diff --git a/RecoTracker/LSTCore/src/ModuleConnectionMap.cc b/RecoTracker/LSTCore/src/ModuleConnectionMap.cc index eddd87fcaa657..3049399b92386 100644 --- a/RecoTracker/LSTCore/src/ModuleConnectionMap.cc +++ b/RecoTracker/LSTCore/src/ModuleConnectionMap.cc @@ -1,12 +1,12 @@ #include "RecoTracker/LSTCore/interface/ModuleConnectionMap.h" -SDL::ModuleConnectionMap::ModuleConnectionMap() {} +lst::ModuleConnectionMap::ModuleConnectionMap() {} -SDL::ModuleConnectionMap::ModuleConnectionMap(std::string filename) { load(filename); } +lst::ModuleConnectionMap::ModuleConnectionMap(std::string filename) { load(filename); } -SDL::ModuleConnectionMap::~ModuleConnectionMap() {} +lst::ModuleConnectionMap::~ModuleConnectionMap() {} -void SDL::ModuleConnectionMap::load(std::string filename) { +void lst::ModuleConnectionMap::load(std::string filename) { moduleConnections_.clear(); std::ifstream ifile(filename, std::ios::binary); @@ -49,7 +49,7 @@ void SDL::ModuleConnectionMap::load(std::string filename) { } } -void SDL::ModuleConnectionMap::add(std::string filename) { +void lst::ModuleConnectionMap::add(std::string filename) { std::ifstream ifile; ifile.open(filename.c_str()); std::string line; @@ -81,7 +81,7 @@ void SDL::ModuleConnectionMap::add(std::string filename) { } } -void SDL::ModuleConnectionMap::print() { +void lst::ModuleConnectionMap::print() { std::cout << "Printing ModuleConnectionMap" << std::endl; for (auto& pair : moduleConnections_) { unsigned int detid = pair.first; @@ -93,9 +93,9 @@ void SDL::ModuleConnectionMap::print() { } } -const std::vector& SDL::ModuleConnectionMap::getConnectedModuleDetIds(unsigned int detid) const { +const std::vector& lst::ModuleConnectionMap::getConnectedModuleDetIds(unsigned int detid) const { static const std::vector dummy; auto const mList = moduleConnections_.find(detid); return mList != moduleConnections_.end() ? mList->second : dummy; } -int SDL::ModuleConnectionMap::size() const { return moduleConnections_.size(); } +int lst::ModuleConnectionMap::size() const { return moduleConnections_.size(); } diff --git a/RecoTracker/LSTCore/src/ModuleMethods.h b/RecoTracker/LSTCore/src/ModuleMethods.h index a5649ab9bf85b..046afbdb6a764 100644 --- a/RecoTracker/LSTCore/src/ModuleMethods.h +++ b/RecoTracker/LSTCore/src/ModuleMethods.h @@ -13,7 +13,7 @@ #include "HeterogeneousCore/AlpakaInterface/interface/host.h" -namespace SDL { +namespace lst { struct ModuleMetaData { std::map detIdToIndex; std::map module_x; @@ -302,8 +302,8 @@ namespace SDL { r = 0; } else { setDerivedQuantities(detId, layer, ring, rod, module, subdet, side, m_x, m_y, m_z, eta, r); - isInverted = SDL::Modules::parseIsInverted(subdet, side, module, layer); - isLower = SDL::Modules::parseIsLower(isInverted, detId); + isInverted = lst::Modules::parseIsInverted(subdet, side, module, layer); + isLower = lst::Modules::parseIsLower(isInverted, detId); } if (isLower) { index = lowerModuleCounter; @@ -331,17 +331,17 @@ namespace SDL { //assigning other variables! if (detId == 1) { host_moduleType[index] = PixelModule; - host_moduleLayerType[index] = SDL::InnerPixelLayer; + host_moduleLayerType[index] = lst::InnerPixelLayer; host_dxdys[index] = 0; host_drdzs[index] = 0; host_isAnchor[index] = false; } else { - host_moduleType[index] = (m_t == 25 ? SDL::TwoS : SDL::PS); - host_moduleLayerType[index] = (m_t == 23 ? SDL::Pixel : SDL::Strip); + host_moduleType[index] = (m_t == 25 ? lst::TwoS : lst::PS); + host_moduleLayerType[index] = (m_t == 23 ? lst::Pixel : lst::Strip); - if (host_moduleType[index] == SDL::PS and host_moduleLayerType[index] == SDL::Pixel) { + if (host_moduleType[index] == lst::PS and host_moduleLayerType[index] == lst::Pixel) { host_isAnchor[index] = true; - } else if (host_moduleType[index] == SDL::TwoS and host_isLower[index]) { + } else if (host_moduleType[index] == lst::TwoS and host_isLower[index]) { host_isAnchor[index] = true; } else { host_isAnchor[index] = false; @@ -352,7 +352,7 @@ namespace SDL { } host_sdlLayers[index] = - layer + 6 * (subdet == SDL::Endcap) + 5 * (subdet == SDL::Endcap and host_moduleType[index] == SDL::TwoS); + layer + 6 * (subdet == lst::Endcap) + 5 * (subdet == lst::Endcap and host_moduleType[index] == lst::TwoS); } //partner module stuff, and slopes and drdz move around @@ -361,7 +361,7 @@ namespace SDL { auto& index = it->second; if (detId != 1) { host_partnerModuleIndices[index] = - mmd.detIdToIndex[SDL::Modules::parsePartnerModuleId(detId, host_isLower[index], host_isInverted[index])]; + mmd.detIdToIndex[lst::Modules::parsePartnerModuleId(detId, host_isLower[index], host_isInverted[index])]; //add drdz and slope importing stuff here! if (host_drdzs[index] == 0) { host_drdzs[index] = host_drdzs[host_partnerModuleIndices[index]]; @@ -408,5 +408,5 @@ namespace SDL { fillConnectedModuleArrayExplicit(modulesBuf.get(), nModules, queue, mmd, moduleConnectionMap); fillMapArraysExplicit(modulesBuf.get(), nModules, queue, mmd); }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/TiltedGeometry.cc b/RecoTracker/LSTCore/src/TiltedGeometry.cc index 564f1c8befeda..a68a9e223f45b 100644 --- a/RecoTracker/LSTCore/src/TiltedGeometry.cc +++ b/RecoTracker/LSTCore/src/TiltedGeometry.cc @@ -1,8 +1,8 @@ #include "RecoTracker/LSTCore/interface/TiltedGeometry.h" -SDL::TiltedGeometry::TiltedGeometry(std::string filename) { load(filename); } +lst::TiltedGeometry::TiltedGeometry(std::string filename) { load(filename); } -void SDL::TiltedGeometry::load(std::string filename) { +void lst::TiltedGeometry::load(std::string filename) { drdzs_.clear(); dxdys_.clear(); @@ -32,7 +32,7 @@ void SDL::TiltedGeometry::load(std::string filename) { } } -float SDL::TiltedGeometry::getDrDz(unsigned int detid) const { +float lst::TiltedGeometry::getDrDz(unsigned int detid) const { if (drdzs_.find(detid) != drdzs_.end()) { return drdzs_.at(detid); } else { @@ -40,7 +40,7 @@ float SDL::TiltedGeometry::getDrDz(unsigned int detid) const { } } -float SDL::TiltedGeometry::getDxDy(unsigned int detid) const { +float lst::TiltedGeometry::getDxDy(unsigned int detid) const { if (dxdys_.find(detid) != dxdys_.end()) { return dxdys_.at(detid); } else { diff --git a/RecoTracker/LSTCore/src/alpaka/Event.dev.cc b/RecoTracker/LSTCore/src/alpaka/Event.dev.cc index fa524d859af67..86e1f3f196bc0 100644 --- a/RecoTracker/LSTCore/src/alpaka/Event.dev.cc +++ b/RecoTracker/LSTCore/src/alpaka/Event.dev.cc @@ -2,7 +2,7 @@ using namespace ALPAKA_ACCELERATOR_NAMESPACE; -void SDL::Event::init(bool verbose) { +void lst::Event::init(bool verbose) { addObjects = verbose; hitsInGPU = nullptr; mdsInGPU = nullptr; @@ -44,7 +44,7 @@ void SDL::Event::init(bool verbose) { } } -void SDL::Event::resetEvent() { +void lst::Event::resetEvent() { //reset the arrays for (int i = 0; i < 6; i++) { n_hits_by_layer_barrel_[i] = 0; @@ -150,7 +150,7 @@ void SDL::Event::resetEvent() { } } -void SDL::Event::addHitToEvent(std::vector x, +void lst::Event::addHitToEvent(std::vector x, std::vector y, std::vector z, std::vector detId, @@ -160,14 +160,14 @@ void SDL::Event::addHitToEvent(std::vector x, // Initialize space on device/host for next event. if (hitsInGPU == nullptr) { - hitsInGPU = new SDL::Hits(); - hitsBuffers = new SDL::HitsBuffer(nModules_, nHits, devAcc, queue); + hitsInGPU = new lst::Hits(); + hitsBuffers = new lst::HitsBuffer(nModules_, nHits, devAcc, queue); hitsInGPU->setData(*hitsBuffers); } if (rangesInGPU == nullptr) { - rangesInGPU = new SDL::ObjectRanges(); - rangesBuffers = new SDL::ObjectRangesBuffer(nModules_, nLowerModules_, devAcc, queue); + rangesInGPU = new lst::ObjectRanges(); + rangesBuffers = new lst::ObjectRangesBuffer(nModules_, nLowerModules_, devAcc, queue); rangesInGPU->setData(*rangesBuffers); } @@ -217,7 +217,7 @@ void SDL::Event::addHitToEvent(std::vector x, alpaka::enqueue(queue, module_ranges_task); } -void SDL::Event::addPixelSegmentToEvent(std::vector hitIndices0, +void lst::Event::addPixelSegmentToEvent(std::vector hitIndices0, std::vector hitIndices1, std::vector hitIndices2, std::vector hitIndices3, @@ -266,7 +266,7 @@ void SDL::Event::addPixelSegmentToEvent(std::vector hitIndi WorkDiv3D const createMDArrayRangesGPU_workDiv = createWorkDiv(blocksPerGridCreateMD, threadsPerBlockCreateMD, elementsPerThread); - SDL::createMDArrayRangesGPU createMDArrayRangesGPU_kernel; + lst::createMDArrayRangesGPU createMDArrayRangesGPU_kernel; auto const createMDArrayRangesGPUTask(alpaka::createTaskKernel( createMDArrayRangesGPU_workDiv, createMDArrayRangesGPU_kernel, *modulesBuffers_->data(), *rangesInGPU)); @@ -281,8 +281,8 @@ void SDL::Event::addPixelSegmentToEvent(std::vector hitIndi nTotalMDs += N_MAX_PIXEL_MD_PER_MODULES; - mdsInGPU = new SDL::MiniDoublets(); - miniDoubletsBuffers = new SDL::MiniDoubletsBuffer(nTotalMDs, nLowerModules_, devAcc, queue); + mdsInGPU = new lst::MiniDoublets(); + miniDoubletsBuffers = new lst::MiniDoubletsBuffer(nTotalMDs, nLowerModules_, devAcc, queue); mdsInGPU->setData(*miniDoubletsBuffers); alpaka::memcpy(queue, miniDoubletsBuffers->nMemoryLocations_buf, nTotalMDs_view); @@ -297,7 +297,7 @@ void SDL::Event::addPixelSegmentToEvent(std::vector hitIndi WorkDiv3D const createSegmentArrayRanges_workDiv = createWorkDiv(blocksPerGridCreateSeg, threadsPerBlockCreateSeg, elementsPerThread); - SDL::createSegmentArrayRanges createSegmentArrayRanges_kernel; + lst::createSegmentArrayRanges createSegmentArrayRanges_kernel; auto const createSegmentArrayRangesTask(alpaka::createTaskKernel(createSegmentArrayRanges_workDiv, createSegmentArrayRanges_kernel, *modulesBuffers_->data(), @@ -314,9 +314,9 @@ void SDL::Event::addPixelSegmentToEvent(std::vector hitIndi nTotalSegments += N_MAX_PIXEL_SEGMENTS_PER_MODULE; - segmentsInGPU = new SDL::Segments(); + segmentsInGPU = new lst::Segments(); segmentsBuffers = - new SDL::SegmentsBuffer(nTotalSegments, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devAcc, queue); + new lst::SegmentsBuffer(nTotalSegments, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devAcc, queue); segmentsInGPU->setData(*segmentsBuffers); alpaka::memcpy(queue, segmentsBuffers->nMemoryLocations_buf, nTotalSegments_view); @@ -393,7 +393,7 @@ void SDL::Event::addPixelSegmentToEvent(std::vector hitIndi alpaka::wait(queue); } -void SDL::Event::createMiniDoublets() { +void lst::Event::createMiniDoublets() { // Create a view for the element nLowerModules_ inside rangesBuffers->miniDoubletModuleOccupancy auto dst_view_miniDoubletModuleOccupancy = alpaka::createSubView(rangesBuffers->miniDoubletModuleOccupancy_buf, (Idx)1u, (Idx)nLowerModules_); @@ -410,7 +410,7 @@ void SDL::Event::createMiniDoublets() { WorkDiv3D const createMDArrayRangesGPU_workDiv = createWorkDiv(blocksPerGridCreateMD, threadsPerBlockCreateMD, elementsPerThread); - SDL::createMDArrayRangesGPU createMDArrayRangesGPU_kernel; + lst::createMDArrayRangesGPU createMDArrayRangesGPU_kernel; auto const createMDArrayRangesGPUTask(alpaka::createTaskKernel( createMDArrayRangesGPU_workDiv, createMDArrayRangesGPU_kernel, *modulesBuffers_->data(), *rangesInGPU)); @@ -427,8 +427,8 @@ void SDL::Event::createMiniDoublets() { nTotalMDs += N_MAX_PIXEL_MD_PER_MODULES; if (mdsInGPU == nullptr) { - mdsInGPU = new SDL::MiniDoublets(); - miniDoubletsBuffers = new SDL::MiniDoubletsBuffer(nTotalMDs, nLowerModules_, devAcc, queue); + mdsInGPU = new lst::MiniDoublets(); + miniDoubletsBuffers = new lst::MiniDoubletsBuffer(nTotalMDs, nLowerModules_, devAcc, queue); mdsInGPU->setData(*miniDoubletsBuffers); } @@ -437,7 +437,7 @@ void SDL::Event::createMiniDoublets() { WorkDiv3D const createMiniDoubletsInGPUv2_workDiv = createWorkDiv(blocksPerGridCreateMDInGPU, threadsPerBlockCreateMDInGPU, elementsPerThread); - SDL::createMiniDoubletsInGPUv2 createMiniDoubletsInGPUv2_kernel; + lst::createMiniDoubletsInGPUv2 createMiniDoubletsInGPUv2_kernel; auto const createMiniDoubletsInGPUv2Task(alpaka::createTaskKernel(createMiniDoubletsInGPUv2_workDiv, createMiniDoubletsInGPUv2_kernel, *modulesBuffers_->data(), @@ -452,7 +452,7 @@ void SDL::Event::createMiniDoublets() { WorkDiv3D const addMiniDoubletRangesToEventExplicit_workDiv = createWorkDiv(blocksPerGridAddMD, threadsPerBlockAddMD, elementsPerThread); - SDL::addMiniDoubletRangesToEventExplicit addMiniDoubletRangesToEventExplicit_kernel; + lst::addMiniDoubletRangesToEventExplicit addMiniDoubletRangesToEventExplicit_kernel; auto const addMiniDoubletRangesToEventExplicitTask( alpaka::createTaskKernel(addMiniDoubletRangesToEventExplicit_workDiv, addMiniDoubletRangesToEventExplicit_kernel, @@ -469,11 +469,11 @@ void SDL::Event::createMiniDoublets() { } } -void SDL::Event::createSegmentsWithModuleMap() { +void lst::Event::createSegmentsWithModuleMap() { if (segmentsInGPU == nullptr) { - segmentsInGPU = new SDL::Segments(); + segmentsInGPU = new lst::Segments(); segmentsBuffers = - new SDL::SegmentsBuffer(nTotalSegments, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devAcc, queue); + new lst::SegmentsBuffer(nTotalSegments, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devAcc, queue); segmentsInGPU->setData(*segmentsBuffers); } @@ -482,7 +482,7 @@ void SDL::Event::createSegmentsWithModuleMap() { WorkDiv3D const createSegmentsInGPUv2_workDiv = createWorkDiv(blocksPerGridCreateSeg, threadsPerBlockCreateSeg, elementsPerThread); - SDL::createSegmentsInGPUv2 createSegmentsInGPUv2_kernel; + lst::createSegmentsInGPUv2 createSegmentsInGPUv2_kernel; auto const createSegmentsInGPUv2Task(alpaka::createTaskKernel(createSegmentsInGPUv2_workDiv, createSegmentsInGPUv2_kernel, *modulesBuffers_->data(), @@ -497,7 +497,7 @@ void SDL::Event::createSegmentsWithModuleMap() { WorkDiv3D const addSegmentRangesToEventExplicit_workDiv = createWorkDiv(blocksPerGridAddSeg, threadsPerBlockAddSeg, elementsPerThread); - SDL::addSegmentRangesToEventExplicit addSegmentRangesToEventExplicit_kernel; + lst::addSegmentRangesToEventExplicit addSegmentRangesToEventExplicit_kernel; auto const addSegmentRangesToEventExplicitTask( alpaka::createTaskKernel(addSegmentRangesToEventExplicit_workDiv, addSegmentRangesToEventExplicit_kernel, @@ -513,14 +513,14 @@ void SDL::Event::createSegmentsWithModuleMap() { } } -void SDL::Event::createTriplets() { +void lst::Event::createTriplets() { if (tripletsInGPU == nullptr) { Vec3D const threadsPerBlockCreateTrip = createVec(1, 1, 1024); Vec3D const blocksPerGridCreateTrip = createVec(1, 1, 1); WorkDiv3D const createTripletArrayRanges_workDiv = createWorkDiv(blocksPerGridCreateTrip, threadsPerBlockCreateTrip, elementsPerThread); - SDL::createTripletArrayRanges createTripletArrayRanges_kernel; + lst::createTripletArrayRanges createTripletArrayRanges_kernel; auto const createTripletArrayRangesTask(alpaka::createTaskKernel(createTripletArrayRanges_workDiv, createTripletArrayRanges_kernel, *modulesBuffers_->data(), @@ -536,9 +536,9 @@ void SDL::Event::createTriplets() { alpaka::memcpy(queue, maxTriplets_buf, rangesBuffers->device_nTotalTrips_buf); alpaka::wait(queue); - tripletsInGPU = new SDL::Triplets(); + tripletsInGPU = new lst::Triplets(); tripletsBuffers = - new SDL::TripletsBuffer(*alpaka::getPtrNative(maxTriplets_buf), nLowerModules_, devAcc, queue); + new lst::TripletsBuffer(*alpaka::getPtrNative(maxTriplets_buf), nLowerModules_, devAcc, queue); tripletsInGPU->setData(*tripletsBuffers); alpaka::memcpy(queue, tripletsBuffers->nMemoryLocations_buf, maxTriplets_buf); @@ -588,7 +588,7 @@ void SDL::Event::createTriplets() { WorkDiv3D const createTripletsInGPUv2_workDiv = createWorkDiv(blocksPerGridCreateTrip, threadsPerBlockCreateTrip, elementsPerThread); - SDL::createTripletsInGPUv2 createTripletsInGPUv2_kernel; + lst::createTripletsInGPUv2 createTripletsInGPUv2_kernel; auto const createTripletsInGPUv2Task(alpaka::createTaskKernel(createTripletsInGPUv2_workDiv, createTripletsInGPUv2_kernel, *modulesBuffers_->data(), @@ -606,7 +606,7 @@ void SDL::Event::createTriplets() { WorkDiv3D const addTripletRangesToEventExplicit_workDiv = createWorkDiv(blocksPerGridAddTrip, threadsPerBlockAddTrip, elementsPerThread); - SDL::addTripletRangesToEventExplicit addTripletRangesToEventExplicit_kernel; + lst::addTripletRangesToEventExplicit addTripletRangesToEventExplicit_kernel; auto const addTripletRangesToEventExplicitTask( alpaka::createTaskKernel(addTripletRangesToEventExplicit_workDiv, addTripletRangesToEventExplicit_kernel, @@ -622,10 +622,10 @@ void SDL::Event::createTriplets() { } } -void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_triplets) { +void lst::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_triplets) { if (trackCandidatesInGPU == nullptr) { - trackCandidatesInGPU = new SDL::TrackCandidates(); - trackCandidatesBuffers = new SDL::TrackCandidatesBuffer( + trackCandidatesInGPU = new lst::TrackCandidates(); + trackCandidatesBuffers = new lst::TrackCandidatesBuffer( N_MAX_NONPIXEL_TRACK_CANDIDATES + N_MAX_PIXEL_TRACK_CANDIDATES, devAcc, queue); trackCandidatesInGPU->setData(*trackCandidatesBuffers); } @@ -641,7 +641,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const crossCleanpT3_workDiv = createWorkDiv(blocksPerGrid_crossCleanpT3, threadsPerBlock_crossCleanpT3, elementsPerThread); - SDL::crossCleanpT3 crossCleanpT3_kernel; + lst::crossCleanpT3 crossCleanpT3_kernel; auto const crossCleanpT3Task(alpaka::createTaskKernel(crossCleanpT3_workDiv, crossCleanpT3_kernel, *modulesBuffers_->data(), @@ -657,7 +657,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const addpT3asTrackCandidatesInGPU_workDiv = createWorkDiv( blocksPerGrid_addpT3asTrackCandidatesInGPU, threadsPerBlock_addpT3asTrackCandidatesInGPU, elementsPerThread); - SDL::addpT3asTrackCandidatesInGPU addpT3asTrackCandidatesInGPU_kernel; + lst::addpT3asTrackCandidatesInGPU addpT3asTrackCandidatesInGPU_kernel; auto const addpT3asTrackCandidatesInGPUTask(alpaka::createTaskKernel(addpT3asTrackCandidatesInGPU_workDiv, addpT3asTrackCandidatesInGPU_kernel, nLowerModules_, @@ -674,7 +674,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const removeDupQuintupletsInGPUBeforeTC_workDiv = createWorkDiv(blocksPerGridRemoveDupQuints, threadsPerBlockRemoveDupQuints, elementsPerThread); - SDL::removeDupQuintupletsInGPUBeforeTC removeDupQuintupletsInGPUBeforeTC_kernel; + lst::removeDupQuintupletsInGPUBeforeTC removeDupQuintupletsInGPUBeforeTC_kernel; auto const removeDupQuintupletsInGPUBeforeTCTask( alpaka::createTaskKernel(removeDupQuintupletsInGPUBeforeTC_workDiv, removeDupQuintupletsInGPUBeforeTC_kernel, @@ -688,7 +688,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const crossCleanT5_workDiv = createWorkDiv(blocksPerGrid_crossCleanT5, threadsPerBlock_crossCleanT5, elementsPerThread); - SDL::crossCleanT5 crossCleanT5_kernel; + lst::crossCleanT5 crossCleanT5_kernel; auto const crossCleanT5Task(alpaka::createTaskKernel(crossCleanT5_workDiv, crossCleanT5_kernel, *modulesBuffers_->data(), @@ -704,7 +704,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const addT5asTrackCandidateInGPU_workDiv = createWorkDiv( blocksPerGrid_addT5asTrackCandidateInGPU, threadsPerBlock_addT5asTrackCandidateInGPU, elementsPerThread); - SDL::addT5asTrackCandidateInGPU addT5asTrackCandidateInGPU_kernel; + lst::addT5asTrackCandidateInGPU addT5asTrackCandidateInGPU_kernel; auto const addT5asTrackCandidateInGPUTask(alpaka::createTaskKernel(addT5asTrackCandidateInGPU_workDiv, addT5asTrackCandidateInGPU_kernel, nLowerModules_, @@ -720,7 +720,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const checkHitspLS_workDiv = createWorkDiv(blocksPerGridCheckHitspLS, threadsPerBlockCheckHitspLS, elementsPerThread); - SDL::checkHitspLS checkHitspLS_kernel; + lst::checkHitspLS checkHitspLS_kernel; auto const checkHitspLSTask(alpaka::createTaskKernel( checkHitspLS_workDiv, checkHitspLS_kernel, *modulesBuffers_->data(), *segmentsInGPU, true)); @@ -732,7 +732,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const crossCleanpLS_workDiv = createWorkDiv(blocksPerGrid_crossCleanpLS, threadsPerBlock_crossCleanpLS, elementsPerThread); - SDL::crossCleanpLS crossCleanpLS_kernel; + lst::crossCleanpLS crossCleanpLS_kernel; auto const crossCleanpLSTask(alpaka::createTaskKernel(crossCleanpLS_workDiv, crossCleanpLS_kernel, *modulesBuffers_->data(), @@ -751,7 +751,7 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ WorkDiv3D const addpLSasTrackCandidateInGPU_workDiv = createWorkDiv( blocksPerGrid_addpLSasTrackCandidateInGPU, threadsPerBlock_addpLSasTrackCandidateInGPU, elementsPerThread); - SDL::addpLSasTrackCandidateInGPU addpLSasTrackCandidateInGPU_kernel; + lst::addpLSasTrackCandidateInGPU addpLSasTrackCandidateInGPU_kernel; auto const addpLSasTrackCandidateInGPUTask(alpaka::createTaskKernel(addpLSasTrackCandidateInGPU_workDiv, addpLSasTrackCandidateInGPU_kernel, nLowerModules_, @@ -787,10 +787,10 @@ void SDL::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ } } -void SDL::Event::createPixelTriplets() { +void lst::Event::createPixelTriplets() { if (pixelTripletsInGPU == nullptr) { - pixelTripletsInGPU = new SDL::PixelTriplets(); - pixelTripletsBuffers = new SDL::PixelTripletsBuffer(N_MAX_PIXEL_TRIPLETS, devAcc, queue); + pixelTripletsInGPU = new lst::PixelTriplets(); + pixelTripletsBuffers = new lst::PixelTripletsBuffer(N_MAX_PIXEL_TRIPLETS, devAcc, queue); pixelTripletsInGPU->setData(*pixelTripletsBuffers); } @@ -865,7 +865,7 @@ void SDL::Event::createPixelTriplets() { WorkDiv3D const createPixelTripletsInGPUFromMapv2_workDiv = createWorkDiv(blocksPerGrid, threadsPerBlock, elementsPerThread); - SDL::createPixelTripletsInGPUFromMapv2 createPixelTripletsInGPUFromMapv2_kernel; + lst::createPixelTripletsInGPUFromMapv2 createPixelTripletsInGPUFromMapv2_kernel; auto const createPixelTripletsInGPUFromMapv2Task( alpaka::createTaskKernel(createPixelTripletsInGPUFromMapv2_workDiv, createPixelTripletsInGPUFromMapv2_kernel, @@ -898,7 +898,7 @@ void SDL::Event::createPixelTriplets() { WorkDiv3D const removeDupPixelTripletsInGPUFromMap_workDiv = createWorkDiv(blocksPerGridDupPixTrip, threadsPerBlockDupPixTrip, elementsPerThread); - SDL::removeDupPixelTripletsInGPUFromMap removeDupPixelTripletsInGPUFromMap_kernel; + lst::removeDupPixelTripletsInGPUFromMap removeDupPixelTripletsInGPUFromMap_kernel; auto const removeDupPixelTripletsInGPUFromMapTask(alpaka::createTaskKernel( removeDupPixelTripletsInGPUFromMap_workDiv, removeDupPixelTripletsInGPUFromMap_kernel, *pixelTripletsInGPU)); @@ -906,13 +906,13 @@ void SDL::Event::createPixelTriplets() { alpaka::wait(queue); } -void SDL::Event::createQuintuplets() { +void lst::Event::createQuintuplets() { Vec3D const threadsPerBlockCreateQuints = createVec(1, 1, 1024); Vec3D const blocksPerGridCreateQuints = createVec(1, 1, 1); WorkDiv3D const createEligibleModulesListForQuintupletsGPU_workDiv = createWorkDiv(blocksPerGridCreateQuints, threadsPerBlockCreateQuints, elementsPerThread); - SDL::createEligibleModulesListForQuintupletsGPU createEligibleModulesListForQuintupletsGPU_kernel; + lst::createEligibleModulesListForQuintupletsGPU createEligibleModulesListForQuintupletsGPU_kernel; auto const createEligibleModulesListForQuintupletsGPUTask( alpaka::createTaskKernel(createEligibleModulesListForQuintupletsGPU_workDiv, createEligibleModulesListForQuintupletsGPU_kernel, @@ -934,8 +934,8 @@ void SDL::Event::createQuintuplets() { unsigned int nTotalQuintuplets = *alpaka::getPtrNative(nTotalQuintuplets_buf); if (quintupletsInGPU == nullptr) { - quintupletsInGPU = new SDL::Quintuplets(); - quintupletsBuffers = new SDL::QuintupletsBuffer(nTotalQuintuplets, nLowerModules_, devAcc, queue); + quintupletsInGPU = new lst::Quintuplets(); + quintupletsBuffers = new lst::QuintupletsBuffer(nTotalQuintuplets, nLowerModules_, devAcc, queue); quintupletsInGPU->setData(*quintupletsBuffers); alpaka::memcpy(queue, quintupletsBuffers->nMemoryLocations_buf, nTotalQuintuplets_buf); @@ -947,7 +947,7 @@ void SDL::Event::createQuintuplets() { WorkDiv3D const createQuintupletsInGPUv2_workDiv = createWorkDiv(blocksPerGridQuints, threadsPerBlockQuints, elementsPerThread); - SDL::createQuintupletsInGPUv2 createQuintupletsInGPUv2_kernel; + lst::createQuintupletsInGPUv2 createQuintupletsInGPUv2_kernel; auto const createQuintupletsInGPUv2Task(alpaka::createTaskKernel(createQuintupletsInGPUv2_workDiv, createQuintupletsInGPUv2_kernel, *modulesBuffers_->data(), @@ -965,7 +965,7 @@ void SDL::Event::createQuintuplets() { WorkDiv3D const removeDupQuintupletsInGPUAfterBuild_workDiv = createWorkDiv(blocksPerGridDupQuint, threadsPerBlockDupQuint, elementsPerThread); - SDL::removeDupQuintupletsInGPUAfterBuild removeDupQuintupletsInGPUAfterBuild_kernel; + lst::removeDupQuintupletsInGPUAfterBuild removeDupQuintupletsInGPUAfterBuild_kernel; auto const removeDupQuintupletsInGPUAfterBuildTask( alpaka::createTaskKernel(removeDupQuintupletsInGPUAfterBuild_workDiv, removeDupQuintupletsInGPUAfterBuild_kernel, @@ -980,7 +980,7 @@ void SDL::Event::createQuintuplets() { WorkDiv3D const addQuintupletRangesToEventExplicit_workDiv = createWorkDiv(blocksPerGridAddQuint, threadsPerBlockAddQuint, elementsPerThread); - SDL::addQuintupletRangesToEventExplicit addQuintupletRangesToEventExplicit_kernel; + lst::addQuintupletRangesToEventExplicit addQuintupletRangesToEventExplicit_kernel; auto const addQuintupletRangesToEventExplicitTask( alpaka::createTaskKernel(addQuintupletRangesToEventExplicit_workDiv, addQuintupletRangesToEventExplicit_kernel, @@ -996,14 +996,14 @@ void SDL::Event::createQuintuplets() { } } -void SDL::Event::pixelLineSegmentCleaning(bool no_pls_dupclean) { +void lst::Event::pixelLineSegmentCleaning(bool no_pls_dupclean) { if (!no_pls_dupclean) { Vec3D const threadsPerBlockCheckHitspLS = createVec(1, 16, 16); Vec3D const blocksPerGridCheckHitspLS = createVec(1, MAX_BLOCKS * 4, MAX_BLOCKS / 4); WorkDiv3D const checkHitspLS_workDiv = createWorkDiv(blocksPerGridCheckHitspLS, threadsPerBlockCheckHitspLS, elementsPerThread); - SDL::checkHitspLS checkHitspLS_kernel; + lst::checkHitspLS checkHitspLS_kernel; auto const checkHitspLSTask(alpaka::createTaskKernel( checkHitspLS_workDiv, checkHitspLS_kernel, *modulesBuffers_->data(), *segmentsInGPU, false)); @@ -1012,15 +1012,15 @@ void SDL::Event::pixelLineSegmentCleaning(bool no_pls_dupclean) { } } -void SDL::Event::createPixelQuintuplets() { +void lst::Event::createPixelQuintuplets() { if (pixelQuintupletsInGPU == nullptr) { - pixelQuintupletsInGPU = new SDL::PixelQuintuplets(); - pixelQuintupletsBuffers = new SDL::PixelQuintupletsBuffer(N_MAX_PIXEL_QUINTUPLETS, devAcc, queue); + pixelQuintupletsInGPU = new lst::PixelQuintuplets(); + pixelQuintupletsBuffers = new lst::PixelQuintupletsBuffer(N_MAX_PIXEL_QUINTUPLETS, devAcc, queue); pixelQuintupletsInGPU->setData(*pixelQuintupletsBuffers); } if (trackCandidatesInGPU == nullptr) { - trackCandidatesInGPU = new SDL::TrackCandidates(); - trackCandidatesBuffers = new SDL::TrackCandidatesBuffer( + trackCandidatesInGPU = new lst::TrackCandidates(); + trackCandidatesBuffers = new lst::TrackCandidatesBuffer( N_MAX_NONPIXEL_TRACK_CANDIDATES + N_MAX_PIXEL_TRACK_CANDIDATES, devAcc, queue); trackCandidatesInGPU->setData(*trackCandidatesBuffers); } @@ -1094,7 +1094,7 @@ void SDL::Event::createPixelQuintuplets() { WorkDiv3D const createPixelQuintupletsInGPUFromMapv2_workDiv = createWorkDiv(blocksPerGridCreatePixQuints, threadsPerBlockCreatePixQuints, elementsPerThread); - SDL::createPixelQuintupletsInGPUFromMapv2 createPixelQuintupletsInGPUFromMapv2_kernel; + lst::createPixelQuintupletsInGPUFromMapv2 createPixelQuintupletsInGPUFromMapv2_kernel; auto const createPixelQuintupletsInGPUFromMapv2Task( alpaka::createTaskKernel(createPixelQuintupletsInGPUFromMapv2_workDiv, createPixelQuintupletsInGPUFromMapv2_kernel, @@ -1116,7 +1116,7 @@ void SDL::Event::createPixelQuintuplets() { WorkDiv3D const removeDupPixelQuintupletsInGPUFromMap_workDiv = createWorkDiv(blocksPerGridDupPix, threadsPerBlockDupPix, elementsPerThread); - SDL::removeDupPixelQuintupletsInGPUFromMap removeDupPixelQuintupletsInGPUFromMap_kernel; + lst::removeDupPixelQuintupletsInGPUFromMap removeDupPixelQuintupletsInGPUFromMap_kernel; auto const removeDupPixelQuintupletsInGPUFromMapTask( alpaka::createTaskKernel(removeDupPixelQuintupletsInGPUFromMap_workDiv, removeDupPixelQuintupletsInGPUFromMap_kernel, @@ -1129,7 +1129,7 @@ void SDL::Event::createPixelQuintuplets() { WorkDiv3D const addpT5asTrackCandidateInGPU_workDiv = createWorkDiv(blocksPerGridAddpT5asTrackCan, threadsPerBlockAddpT5asTrackCan, elementsPerThread); - SDL::addpT5asTrackCandidateInGPU addpT5asTrackCandidateInGPU_kernel; + lst::addpT5asTrackCandidateInGPU addpT5asTrackCandidateInGPU_kernel; auto const addpT5asTrackCandidateInGPUTask(alpaka::createTaskKernel(addpT5asTrackCandidateInGPU_workDiv, addpT5asTrackCandidateInGPU_kernel, nLowerModules_, @@ -1151,7 +1151,7 @@ void SDL::Event::createPixelQuintuplets() { #endif } -void SDL::Event::addMiniDoubletsToEventExplicit() { +void lst::Event::addMiniDoubletsToEventExplicit() { auto nMDsCPU_buf = allocBufWrapper(devHost, nLowerModules_, queue); alpaka::memcpy(queue, nMDsCPU_buf, miniDoubletsBuffers->nMDs_buf, nLowerModules_); @@ -1182,7 +1182,7 @@ void SDL::Event::addMiniDoubletsToEventExplicit() { } } -void SDL::Event::addSegmentsToEventExplicit() { +void lst::Event::addSegmentsToEventExplicit() { auto nSegmentsCPU_buf = allocBufWrapper(devHost, nLowerModules_, queue); alpaka::memcpy(queue, nSegmentsCPU_buf, segmentsBuffers->nSegments_buf, nLowerModules_); @@ -1209,7 +1209,7 @@ void SDL::Event::addSegmentsToEventExplicit() { } } -void SDL::Event::addQuintupletsToEventExplicit() { +void lst::Event::addQuintupletsToEventExplicit() { auto nQuintupletsCPU_buf = allocBufWrapper(devHost, nLowerModules_, queue); alpaka::memcpy(queue, nQuintupletsCPU_buf, quintupletsBuffers->nQuintuplets_buf); @@ -1240,7 +1240,7 @@ void SDL::Event::addQuintupletsToEventExplicit() { } } -void SDL::Event::addTripletsToEventExplicit() { +void lst::Event::addTripletsToEventExplicit() { auto nTripletsCPU_buf = allocBufWrapper(devHost, nLowerModules_, queue); alpaka::memcpy(queue, nTripletsCPU_buf, tripletsBuffers->nTriplets_buf); @@ -1266,7 +1266,7 @@ void SDL::Event::addTripletsToEventExplicit() { } } -unsigned int SDL::Event::getNumberOfHits() { +unsigned int lst::Event::getNumberOfHits() { unsigned int hits = 0; for (auto& it : n_hits_by_layer_barrel_) { hits += it; @@ -1278,22 +1278,22 @@ unsigned int SDL::Event::getNumberOfHits() { return hits; } -unsigned int SDL::Event::getNumberOfHitsByLayer(unsigned int layer) { +unsigned int lst::Event::getNumberOfHitsByLayer(unsigned int layer) { if (layer == 6) return n_hits_by_layer_barrel_[layer]; else return n_hits_by_layer_barrel_[layer] + n_hits_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfHitsByLayerBarrel(unsigned int layer) { +unsigned int lst::Event::getNumberOfHitsByLayerBarrel(unsigned int layer) { return n_hits_by_layer_barrel_[layer]; } -unsigned int SDL::Event::getNumberOfHitsByLayerEndcap(unsigned int layer) { +unsigned int lst::Event::getNumberOfHitsByLayerEndcap(unsigned int layer) { return n_hits_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfMiniDoublets() { +unsigned int lst::Event::getNumberOfMiniDoublets() { unsigned int miniDoublets = 0; for (auto& it : n_minidoublets_by_layer_barrel_) { miniDoublets += it; @@ -1305,22 +1305,22 @@ unsigned int SDL::Event::getNumberOfMiniDoublets() { return miniDoublets; } -unsigned int SDL::Event::getNumberOfMiniDoubletsByLayer(unsigned int layer) { +unsigned int lst::Event::getNumberOfMiniDoubletsByLayer(unsigned int layer) { if (layer == 6) return n_minidoublets_by_layer_barrel_[layer]; else return n_minidoublets_by_layer_barrel_[layer] + n_minidoublets_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfMiniDoubletsByLayerBarrel(unsigned int layer) { +unsigned int lst::Event::getNumberOfMiniDoubletsByLayerBarrel(unsigned int layer) { return n_minidoublets_by_layer_barrel_[layer]; } -unsigned int SDL::Event::getNumberOfMiniDoubletsByLayerEndcap(unsigned int layer) { +unsigned int lst::Event::getNumberOfMiniDoubletsByLayerEndcap(unsigned int layer) { return n_minidoublets_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfSegments() { +unsigned int lst::Event::getNumberOfSegments() { unsigned int segments = 0; for (auto& it : n_segments_by_layer_barrel_) { segments += it; @@ -1332,22 +1332,22 @@ unsigned int SDL::Event::getNumberOfSegments() { return segments; } -unsigned int SDL::Event::getNumberOfSegmentsByLayer(unsigned int layer) { +unsigned int lst::Event::getNumberOfSegmentsByLayer(unsigned int layer) { if (layer == 6) return n_segments_by_layer_barrel_[layer]; else return n_segments_by_layer_barrel_[layer] + n_segments_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfSegmentsByLayerBarrel(unsigned int layer) { +unsigned int lst::Event::getNumberOfSegmentsByLayerBarrel(unsigned int layer) { return n_segments_by_layer_barrel_[layer]; } -unsigned int SDL::Event::getNumberOfSegmentsByLayerEndcap(unsigned int layer) { +unsigned int lst::Event::getNumberOfSegmentsByLayerEndcap(unsigned int layer) { return n_segments_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfTriplets() { +unsigned int lst::Event::getNumberOfTriplets() { unsigned int triplets = 0; for (auto& it : n_triplets_by_layer_barrel_) { triplets += it; @@ -1359,22 +1359,22 @@ unsigned int SDL::Event::getNumberOfTriplets() { return triplets; } -unsigned int SDL::Event::getNumberOfTripletsByLayer(unsigned int layer) { +unsigned int lst::Event::getNumberOfTripletsByLayer(unsigned int layer) { if (layer == 6) return n_triplets_by_layer_barrel_[layer]; else return n_triplets_by_layer_barrel_[layer] + n_triplets_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfTripletsByLayerBarrel(unsigned int layer) { +unsigned int lst::Event::getNumberOfTripletsByLayerBarrel(unsigned int layer) { return n_triplets_by_layer_barrel_[layer]; } -unsigned int SDL::Event::getNumberOfTripletsByLayerEndcap(unsigned int layer) { +unsigned int lst::Event::getNumberOfTripletsByLayerEndcap(unsigned int layer) { return n_triplets_by_layer_endcap_[layer]; } -int SDL::Event::getNumberOfPixelTriplets() { +int lst::Event::getNumberOfPixelTriplets() { auto nPixelTriplets_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nPixelTriplets_buf, pixelTripletsBuffers->nPixelTriplets_buf); @@ -1385,7 +1385,7 @@ int SDL::Event::getNumberOfPixelTriplets() { return nPixelTriplets; } -int SDL::Event::getNumberOfPixelQuintuplets() { +int lst::Event::getNumberOfPixelQuintuplets() { auto nPixelQuintuplets_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nPixelQuintuplets_buf, pixelQuintupletsBuffers->nPixelQuintuplets_buf); @@ -1396,7 +1396,7 @@ int SDL::Event::getNumberOfPixelQuintuplets() { return nPixelQuintuplets; } -unsigned int SDL::Event::getNumberOfQuintuplets() { +unsigned int lst::Event::getNumberOfQuintuplets() { unsigned int quintuplets = 0; for (auto& it : n_quintuplets_by_layer_barrel_) { quintuplets += it; @@ -1408,22 +1408,22 @@ unsigned int SDL::Event::getNumberOfQuintuplets() { return quintuplets; } -unsigned int SDL::Event::getNumberOfQuintupletsByLayer(unsigned int layer) { +unsigned int lst::Event::getNumberOfQuintupletsByLayer(unsigned int layer) { if (layer == 6) return n_quintuplets_by_layer_barrel_[layer]; else return n_quintuplets_by_layer_barrel_[layer] + n_quintuplets_by_layer_endcap_[layer]; } -unsigned int SDL::Event::getNumberOfQuintupletsByLayerBarrel(unsigned int layer) { +unsigned int lst::Event::getNumberOfQuintupletsByLayerBarrel(unsigned int layer) { return n_quintuplets_by_layer_barrel_[layer]; } -unsigned int SDL::Event::getNumberOfQuintupletsByLayerEndcap(unsigned int layer) { +unsigned int lst::Event::getNumberOfQuintupletsByLayerEndcap(unsigned int layer) { return n_quintuplets_by_layer_endcap_[layer]; } -int SDL::Event::getNumberOfTrackCandidates() { +int lst::Event::getNumberOfTrackCandidates() { auto nTrackCandidates_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nTrackCandidates_buf, trackCandidatesBuffers->nTrackCandidates_buf); @@ -1434,7 +1434,7 @@ int SDL::Event::getNumberOfTrackCandidates() { return nTrackCandidates; } -int SDL::Event::getNumberOfPT5TrackCandidates() { +int lst::Event::getNumberOfPT5TrackCandidates() { auto nTrackCandidatesPT5_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nTrackCandidatesPT5_buf, trackCandidatesBuffers->nTrackCandidatespT5_buf); @@ -1445,7 +1445,7 @@ int SDL::Event::getNumberOfPT5TrackCandidates() { return nTrackCandidatesPT5; } -int SDL::Event::getNumberOfPT3TrackCandidates() { +int lst::Event::getNumberOfPT3TrackCandidates() { auto nTrackCandidatesPT3_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nTrackCandidatesPT3_buf, trackCandidatesBuffers->nTrackCandidatespT3_buf); @@ -1456,7 +1456,7 @@ int SDL::Event::getNumberOfPT3TrackCandidates() { return nTrackCandidatesPT3; } -int SDL::Event::getNumberOfPLSTrackCandidates() { +int lst::Event::getNumberOfPLSTrackCandidates() { auto nTrackCandidatesPLS_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nTrackCandidatesPLS_buf, trackCandidatesBuffers->nTrackCandidatespLS_buf); @@ -1467,7 +1467,7 @@ int SDL::Event::getNumberOfPLSTrackCandidates() { return nTrackCandidatesPLS; } -int SDL::Event::getNumberOfPixelTrackCandidates() { +int lst::Event::getNumberOfPixelTrackCandidates() { auto nTrackCandidates_buf = allocBufWrapper(devHost, 1, queue); auto nTrackCandidatesT5_buf = allocBufWrapper(devHost, 1, queue); @@ -1481,7 +1481,7 @@ int SDL::Event::getNumberOfPixelTrackCandidates() { return nTrackCandidates - nTrackCandidatesT5; } -int SDL::Event::getNumberOfT5TrackCandidates() { +int lst::Event::getNumberOfT5TrackCandidates() { auto nTrackCandidatesT5_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nTrackCandidatesT5_buf, trackCandidatesBuffers->nTrackCandidatesT5_buf); @@ -1492,7 +1492,7 @@ int SDL::Event::getNumberOfT5TrackCandidates() { return nTrackCandidatesT5; } -SDL::HitsBuffer* SDL::Event::getHits() //std::shared_ptr should take care of garbage collection +lst::HitsBuffer* lst::Event::getHits() //std::shared_ptr should take care of garbage collection { if (hitsInCPU == nullptr) { auto nHits_buf = allocBufWrapper(devHost, 1, queue); @@ -1500,7 +1500,7 @@ SDL::HitsBuffer* SDL::Event::getHits() //std::shared_ptr should alpaka::wait(queue); unsigned int nHits = *alpaka::getPtrNative(nHits_buf); - hitsInCPU = new SDL::HitsBuffer(nModules_, nHits, devHost, queue); + hitsInCPU = new lst::HitsBuffer(nModules_, nHits, devHost, queue); hitsInCPU->setData(*hitsInCPU); *alpaka::getPtrNative(hitsInCPU->nHits_buf) = nHits; @@ -1515,14 +1515,14 @@ SDL::HitsBuffer* SDL::Event::getHits() //std::shared_ptr should return hitsInCPU; } -SDL::HitsBuffer* SDL::Event::getHitsInCMSSW() { +lst::HitsBuffer* lst::Event::getHitsInCMSSW() { if (hitsInCPU == nullptr) { auto nHits_buf = allocBufWrapper(devHost, 1, queue); alpaka::memcpy(queue, nHits_buf, hitsBuffers->nHits_buf); alpaka::wait(queue); unsigned int nHits = *alpaka::getPtrNative(nHits_buf); - hitsInCPU = new SDL::HitsBuffer(nModules_, nHits, devHost, queue); + hitsInCPU = new lst::HitsBuffer(nModules_, nHits, devHost, queue); hitsInCPU->setData(*hitsInCPU); *alpaka::getPtrNative(hitsInCPU->nHits_buf) = nHits; @@ -1532,9 +1532,9 @@ SDL::HitsBuffer* SDL::Event::getHitsInCMSSW() { return hitsInCPU; } -SDL::ObjectRangesBuffer* SDL::Event::getRanges() { +lst::ObjectRangesBuffer* lst::Event::getRanges() { if (rangesInCPU == nullptr) { - rangesInCPU = new SDL::ObjectRangesBuffer(nModules_, nLowerModules_, devHost, queue); + rangesInCPU = new lst::ObjectRangesBuffer(nModules_, nLowerModules_, devHost, queue); rangesInCPU->setData(*rangesInCPU); alpaka::memcpy(queue, rangesInCPU->hitRanges_buf, rangesBuffers->hitRanges_buf); @@ -1547,7 +1547,7 @@ SDL::ObjectRangesBuffer* SDL::Event::getRanges() { return rangesInCPU; } -SDL::MiniDoubletsBuffer* SDL::Event::getMiniDoublets() { +lst::MiniDoubletsBuffer* lst::Event::getMiniDoublets() { if (mdsInCPU == nullptr) { // Get nMemoryLocations parameter to initialize host based mdsInCPU auto nMemHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1555,7 +1555,7 @@ SDL::MiniDoubletsBuffer* SDL::Event::getMiniDoublets() { alpaka::wait(queue); unsigned int nMemHost = *alpaka::getPtrNative(nMemHost_buf); - mdsInCPU = new SDL::MiniDoubletsBuffer(nMemHost, nLowerModules_, devHost, queue); + mdsInCPU = new lst::MiniDoubletsBuffer(nMemHost, nLowerModules_, devHost, queue); mdsInCPU->setData(*mdsInCPU); *alpaka::getPtrNative(mdsInCPU->nMemoryLocations_buf) = nMemHost; @@ -1569,7 +1569,7 @@ SDL::MiniDoubletsBuffer* SDL::Event::getMiniDoublets() { return mdsInCPU; } -SDL::SegmentsBuffer* SDL::Event::getSegments() { +lst::SegmentsBuffer* lst::Event::getSegments() { if (segmentsInCPU == nullptr) { // Get nMemoryLocations parameter to initialize host based segmentsInCPU auto nMemHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1578,7 +1578,7 @@ SDL::SegmentsBuffer* SDL::Event::getSegments() { unsigned int nMemHost = *alpaka::getPtrNative(nMemHost_buf); segmentsInCPU = - new SDL::SegmentsBuffer(nMemHost, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devHost, queue); + new lst::SegmentsBuffer(nMemHost, nLowerModules_, N_MAX_PIXEL_SEGMENTS_PER_MODULE, devHost, queue); segmentsInCPU->setData(*segmentsInCPU); *alpaka::getPtrNative(segmentsInCPU->nMemoryLocations_buf) = nMemHost; @@ -1605,7 +1605,7 @@ SDL::SegmentsBuffer* SDL::Event::getSegments() { return segmentsInCPU; } -SDL::TripletsBuffer* SDL::Event::getTriplets() { +lst::TripletsBuffer* lst::Event::getTriplets() { if (tripletsInCPU == nullptr) { // Get nMemoryLocations parameter to initialize host based tripletsInCPU auto nMemHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1613,7 +1613,7 @@ SDL::TripletsBuffer* SDL::Event::getTriplets() { alpaka::wait(queue); unsigned int nMemHost = *alpaka::getPtrNative(nMemHost_buf); - tripletsInCPU = new SDL::TripletsBuffer(nMemHost, nLowerModules_, devHost, queue); + tripletsInCPU = new lst::TripletsBuffer(nMemHost, nLowerModules_, devHost, queue); tripletsInCPU->setData(*tripletsInCPU); *alpaka::getPtrNative(tripletsInCPU->nMemoryLocations_buf) = nMemHost; @@ -1641,7 +1641,7 @@ SDL::TripletsBuffer* SDL::Event::getTriplets() { return tripletsInCPU; } -SDL::QuintupletsBuffer* SDL::Event::getQuintuplets() { +lst::QuintupletsBuffer* lst::Event::getQuintuplets() { if (quintupletsInCPU == nullptr) { // Get nMemoryLocations parameter to initialize host based quintupletsInCPU auto nMemHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1649,7 +1649,7 @@ SDL::QuintupletsBuffer* SDL::Event::getQuintuplets() { alpaka::wait(queue); unsigned int nMemHost = *alpaka::getPtrNative(nMemHost_buf); - quintupletsInCPU = new SDL::QuintupletsBuffer(nMemHost, nLowerModules_, devHost, queue); + quintupletsInCPU = new lst::QuintupletsBuffer(nMemHost, nLowerModules_, devHost, queue); quintupletsInCPU->setData(*quintupletsInCPU); *alpaka::getPtrNative(quintupletsInCPU->nMemoryLocations_buf) = nMemHost; @@ -1677,7 +1677,7 @@ SDL::QuintupletsBuffer* SDL::Event::getQuintuplets() { return quintupletsInCPU; } -SDL::PixelTripletsBuffer* SDL::Event::getPixelTriplets() { +lst::PixelTripletsBuffer* lst::Event::getPixelTriplets() { if (pixelTripletsInCPU == nullptr) { // Get nPixelTriplets parameter to initialize host based quintupletsInCPU auto nPixelTriplets_buf = allocBufWrapper(devHost, 1, queue); @@ -1685,7 +1685,7 @@ SDL::PixelTripletsBuffer* SDL::Event::getPixelTriplets() { alpaka::wait(queue); unsigned int nPixelTriplets = *alpaka::getPtrNative(nPixelTriplets_buf); - pixelTripletsInCPU = new SDL::PixelTripletsBuffer(nPixelTriplets, devHost, queue); + pixelTripletsInCPU = new lst::PixelTripletsBuffer(nPixelTriplets, devHost, queue); pixelTripletsInCPU->setData(*pixelTripletsInCPU); *alpaka::getPtrNative(pixelTripletsInCPU->nPixelTriplets_buf) = nPixelTriplets; @@ -1716,7 +1716,7 @@ SDL::PixelTripletsBuffer* SDL::Event::getPixelTriplets() { return pixelTripletsInCPU; } -SDL::PixelQuintupletsBuffer* SDL::Event::getPixelQuintuplets() { +lst::PixelQuintupletsBuffer* lst::Event::getPixelQuintuplets() { if (pixelQuintupletsInCPU == nullptr) { // Get nPixelQuintuplets parameter to initialize host based quintupletsInCPU auto nPixelQuintuplets_buf = allocBufWrapper(devHost, 1, queue); @@ -1724,7 +1724,7 @@ SDL::PixelQuintupletsBuffer* SDL::Event::getPixelQuintuplets() { alpaka::wait(queue); unsigned int nPixelQuintuplets = *alpaka::getPtrNative(nPixelQuintuplets_buf); - pixelQuintupletsInCPU = new SDL::PixelQuintupletsBuffer(nPixelQuintuplets, devHost, queue); + pixelQuintupletsInCPU = new lst::PixelQuintupletsBuffer(nPixelQuintuplets, devHost, queue); pixelQuintupletsInCPU->setData(*pixelQuintupletsInCPU); *alpaka::getPtrNative(pixelQuintupletsInCPU->nPixelQuintuplets_buf) = nPixelQuintuplets; @@ -1752,7 +1752,7 @@ SDL::PixelQuintupletsBuffer* SDL::Event::getPixelQuintuplets() { return pixelQuintupletsInCPU; } -SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidates() { +lst::TrackCandidatesBuffer* lst::Event::getTrackCandidates() { if (trackCandidatesInCPU == nullptr) { // Get nTrackCanHost parameter to initialize host based trackCandidatesInCPU auto nTrackCanHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1760,7 +1760,7 @@ SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidates() { alpaka::wait(queue); unsigned int nTrackCanHost = *alpaka::getPtrNative(nTrackCanHost_buf); - trackCandidatesInCPU = new SDL::TrackCandidatesBuffer( + trackCandidatesInCPU = new lst::TrackCandidatesBuffer( N_MAX_NONPIXEL_TRACK_CANDIDATES + N_MAX_PIXEL_TRACK_CANDIDATES, devHost, queue); trackCandidatesInCPU->setData(*trackCandidatesInCPU); @@ -1790,7 +1790,7 @@ SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidates() { return trackCandidatesInCPU; } -SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidatesInCMSSW() { +lst::TrackCandidatesBuffer* lst::Event::getTrackCandidatesInCMSSW() { if (trackCandidatesInCPU == nullptr) { // Get nTrackCanHost parameter to initialize host based trackCandidatesInCPU auto nTrackCanHost_buf = allocBufWrapper(devHost, 1, queue); @@ -1798,7 +1798,7 @@ SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidatesInCMSS alpaka::wait(queue); unsigned int nTrackCanHost = *alpaka::getPtrNative(nTrackCanHost_buf); - trackCandidatesInCPU = new SDL::TrackCandidatesBuffer( + trackCandidatesInCPU = new lst::TrackCandidatesBuffer( N_MAX_NONPIXEL_TRACK_CANDIDATES + N_MAX_PIXEL_TRACK_CANDIDATES, devHost, queue); trackCandidatesInCPU->setData(*trackCandidatesInCPU); @@ -1818,10 +1818,11 @@ SDL::TrackCandidatesBuffer* SDL::Event::getTrackCandidatesInCMSS return trackCandidatesInCPU; } -SDL::ModulesBuffer* SDL::Event::getModules(bool isFull) { +<<<<<<< HEAD +lst::ModulesBuffer* lst::Event::getModules(bool isFull) { if (modulesInCPU == nullptr) { // The last input here is just a small placeholder for the allocation. - modulesInCPU = new SDL::ModulesBuffer(devHost, nModules_, nPixels_); + modulesInCPU = new lst::ModulesBuffer(devHost, nModules_, nPixels_); modulesInCPU->copyFromSrc(queue, *modulesBuffers_, isFull); } diff --git a/RecoTracker/LSTCore/src/alpaka/Event.h b/RecoTracker/LSTCore/src/alpaka/Event.h index 281da93d07c9e..69ec34d0104c4 100644 --- a/RecoTracker/LSTCore/src/alpaka/Event.h +++ b/RecoTracker/LSTCore/src/alpaka/Event.h @@ -16,7 +16,7 @@ #include "HeterogeneousCore/AlpakaInterface/interface/host.h" -namespace SDL { +namespace lst { using namespace ALPAKA_ACCELERATOR_NAMESPACE; @@ -202,5 +202,5 @@ namespace SDL { ModulesBuffer* getModules(bool isFull = false); }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/Hit.h b/RecoTracker/LSTCore/src/alpaka/Hit.h index ed5a074b56895..493eefd71f057 100644 --- a/RecoTracker/LSTCore/src/alpaka/Hit.h +++ b/RecoTracker/LSTCore/src/alpaka/Hit.h @@ -4,7 +4,7 @@ #include "RecoTracker/LSTCore/interface/alpaka/Constants.h" #include "RecoTracker/LSTCore/interface/Module.h" -namespace SDL { +namespace lst { struct Hits { unsigned int* nHits; float* xs; @@ -194,8 +194,8 @@ namespace SDL { struct moduleRangesKernel { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Hits hitsInGPU, + struct lst::Modules modulesInGPU, + struct lst::Hits hitsInGPU, int const& nLowerModules) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -223,8 +223,8 @@ namespace SDL { unsigned int nEndCapMap, // Number of elements in endcap map const unsigned int* geoMapDetId, // DetId's from endcap map const float* geoMapPhi, // Phi values from endcap map - struct SDL::Modules modulesInGPU, - struct SDL::Hits hitsInGPU, + struct lst::Modules modulesInGPU, + struct lst::Hits hitsInGPU, unsigned int const& nHits) const // Total number of hits in event { auto const globalThreadIdx = alpaka::getIdx(acc); @@ -236,7 +236,7 @@ namespace SDL { int iDetId = hitsInGPU.detid[ihit]; hitsInGPU.rts[ihit] = alpaka::math::sqrt(acc, ihit_x * ihit_x + ihit_y * ihit_y); - hitsInGPU.phis[ihit] = SDL::phi(acc, ihit_x, ihit_y); + hitsInGPU.phis[ihit] = lst::phi(acc, ihit_x, ihit_y); hitsInGPU.etas[ihit] = ((ihit_z > 0) - (ihit_z < 0)) * alpaka::math::acosh( @@ -268,5 +268,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/Kernels.h b/RecoTracker/LSTCore/src/alpaka/Kernels.h index b9072fb288269..0ec8e1ed7de84 100644 --- a/RecoTracker/LSTCore/src/alpaka/Kernels.h +++ b/RecoTracker/LSTCore/src/alpaka/Kernels.h @@ -12,24 +12,24 @@ #include "Quintuplet.h" #include "PixelTriplet.h" -namespace SDL { - ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmQuintupletFromMemory(struct SDL::Quintuplets& quintupletsInGPU, +namespace lst { + ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmQuintupletFromMemory(struct lst::Quintuplets& quintupletsInGPU, unsigned int quintupletIndex, bool secondpass = false) { quintupletsInGPU.isDup[quintupletIndex] |= 1 + secondpass; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelTripletFromMemory(struct SDL::PixelTriplets& pixelTripletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelTripletFromMemory(struct lst::PixelTriplets& pixelTripletsInGPU, unsigned int pixelTripletIndex) { pixelTripletsInGPU.isDup[pixelTripletIndex] = true; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelQuintupletFromMemory(struct SDL::PixelQuintuplets& pixelQuintupletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelQuintupletFromMemory(struct lst::PixelQuintuplets& pixelQuintupletsInGPU, unsigned int pixelQuintupletIndex) { pixelQuintupletsInGPU.isDup[pixelQuintupletIndex] = true; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelSegmentFromMemory(struct SDL::Segments& segmentsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelSegmentFromMemory(struct lst::Segments& segmentsInGPU, unsigned int pixelSegmentArrayIndex, bool secondpass = false) { segmentsInGPU.isDup[pixelSegmentArrayIndex] |= 1 + secondpass; @@ -37,7 +37,7 @@ namespace SDL { ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkHitsT5(unsigned int ix, unsigned int jx, - struct SDL::Quintuplets& quintupletsInGPU) { + struct lst::Quintuplets& quintupletsInGPU) { unsigned int hits1[Params_T5::kHits]; unsigned int hits2[Params_T5::kHits]; @@ -64,7 +64,7 @@ namespace SDL { ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkHitspT5(unsigned int ix, unsigned int jx, - struct SDL::PixelQuintuplets& pixelQuintupletsInGPU) { + struct lst::PixelQuintuplets& pixelQuintupletsInGPU) { unsigned int hits1[Params_pT5::kHits]; unsigned int hits2[Params_pT5::kHits]; @@ -91,7 +91,7 @@ namespace SDL { ALPAKA_FN_ACC ALPAKA_FN_INLINE void checkHitspT3(unsigned int ix, unsigned int jx, - struct SDL::PixelTriplets& pixelTripletsInGPU, + struct lst::PixelTriplets& pixelTripletsInGPU, int* matched) { int phits1[Params_pLS::kHits]; int phits2[Params_pLS::kHits]; @@ -144,9 +144,9 @@ namespace SDL { struct removeDupQuintupletsInGPUAfterBuild { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Quintuplets quintupletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -167,7 +167,7 @@ namespace SDL { float eta2 = __H2F(quintupletsInGPU.eta[jx]); float phi2 = __H2F(quintupletsInGPU.phi[jx]); float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float score_rphisum2 = __H2F(quintupletsInGPU.score_rphisum[jx]); if (dEta > 0.1f) @@ -194,8 +194,8 @@ namespace SDL { struct removeDupQuintupletsInGPUBeforeTC { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Quintuplets quintupletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -239,7 +239,7 @@ namespace SDL { float score_rphisum2 = __H2F(quintupletsInGPU.score_rphisum[jx]); float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); if (dEta > 0.1f) continue; @@ -268,7 +268,7 @@ namespace SDL { struct removeDupPixelTripletsInGPUFromMap { template - ALPAKA_FN_ACC void operator()(TAcc const& acc, struct SDL::PixelTriplets pixelTripletsInGPU) const { + ALPAKA_FN_ACC void operator()(TAcc const& acc, struct lst::PixelTriplets pixelTripletsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -305,7 +305,7 @@ namespace SDL { struct removeDupPixelQuintupletsInGPUFromMap { template - ALPAKA_FN_ACC void operator()(TAcc const& acc, struct SDL::PixelQuintuplets pixelQuintupletsInGPU) const { + ALPAKA_FN_ACC void operator()(TAcc const& acc, struct lst::PixelQuintuplets pixelQuintupletsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -333,8 +333,8 @@ namespace SDL { struct checkHitspLS { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Segments segmentsInGPU, + struct lst::Modules modulesInGPU, + struct lst::Segments segmentsInGPU, bool secondpass) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -410,7 +410,7 @@ namespace SDL { } if (secondpass) { float dEta = alpaka::math::abs(acc, eta_pix1 - eta_pix2); - float dPhi = SDL::calculate_dPhi(phi_pix1, phi_pix2); + float dPhi = lst::calculate_dPhi(phi_pix1, phi_pix2); float dR2 = dEta * dEta + dPhi * dPhi; if ((npMatched >= 1) || (dR2 < 1e-5f)) { @@ -421,5 +421,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/LST.dev.cc b/RecoTracker/LSTCore/src/alpaka/LST.dev.cc index 79a80c1a66b9d..8304e292d63af 100644 --- a/RecoTracker/LSTCore/src/alpaka/LST.dev.cc +++ b/RecoTracker/LSTCore/src/alpaka/LST.dev.cc @@ -20,7 +20,7 @@ namespace { } // namespace template <> -void SDL::LST::prepareInput(const std::vector see_px, +void lst::LST::prepareInput(const std::vector see_px, const std::vector see_py, const std::vector see_pz, const std::vector see_dxy, @@ -213,7 +213,7 @@ void SDL::LST::prepareInput(const std::vector see_px, } template <> -std::vector SDL::LST::getHitIdxs(const short trackCandidateType, +std::vector lst::LST::getHitIdxs(const short trackCandidateType, const unsigned int TCIdx, const unsigned int* TCHitIndices, const unsigned int* hitIndices) { @@ -249,14 +249,14 @@ std::vector SDL::LST::getHitIdxs(const short trackCandidate } template <> -void SDL::LST::getOutput(SDL::Event& event) { +void lst::LST::getOutput(lst::Event& event) { std::vector> tc_hitIdxs; std::vector tc_len; std::vector tc_seedIdx; std::vector tc_trackCandidateType; - SDL::HitsBuffer& hitsInGPU = (*event.getHitsInCMSSW()); - SDL::TrackCandidates const* trackCandidates = event.getTrackCandidatesInCMSSW()->data(); + lst::HitsBuffer& hitsInGPU = (*event.getHitsInCMSSW()); + lst::TrackCandidatesBuffer& trackCandidatesInGPU = (*event.getTrackCandidatesInCMSSW()); unsigned int nTrackCandidates = *trackCandidates->nTrackCandidates; for (unsigned int idx = 0; idx < nTrackCandidates; idx++) { @@ -278,7 +278,7 @@ void SDL::LST::getOutput(SDL::Event& event) { template <> template <> -void SDL::LST::run(Queue& queue, +void lst::LST::run(Queue& queue, bool verbose, const LSTESData* deviceESData, const std::vector see_px, @@ -302,7 +302,7 @@ void SDL::LST::run(Queue& queue, const std::vector ph2_z, bool no_pls_dupclean, bool tc_pls_triplets) { - auto event = SDL::Event(verbose, queue, deviceESData); + auto event = lst::Event(verbose, queue, deviceESData); prepareInput(see_px, see_py, see_pz, diff --git a/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h b/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h index 623f95a437e00..1ae62844019f8 100644 --- a/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h +++ b/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h @@ -8,7 +8,7 @@ #include "Hit.h" #include "ObjectRanges.h" -namespace SDL { +namespace lst { struct MiniDoublets { unsigned int* nMemoryLocations; @@ -192,9 +192,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void addMDToMemory(TAcc const& acc, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Hits& hitsInGPU, - struct SDL::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Hits& hitsInGPU, + struct lst::Modules& modulesInGPU, unsigned int lowerHitIdx, unsigned int upperHitIdx, uint16_t& lowerModuleIdx, @@ -266,7 +266,7 @@ namespace SDL { mdsInGPU.outerLowEdgeY[idx] = hitsInGPU.lowEdgeYs[outerHitIndex]; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE float isTighterTiltedModules(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE float isTighterTiltedModules(struct lst::Modules& modulesInGPU, uint16_t& moduleIndex) { // The "tighter" tilted modules are the subset of tilted modules that have smaller spacing // This is the same as what was previously considered as"isNormalTiltedModules" @@ -287,7 +287,7 @@ namespace SDL { return false; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE float moduleGapSize(struct SDL::Modules& modulesInGPU, uint16_t& moduleIndex) { + ALPAKA_FN_ACC ALPAKA_FN_INLINE float moduleGapSize(struct lst::Modules& modulesInGPU, uint16_t& moduleIndex) { float miniDeltaTilted[3] = {0.26f, 0.26f, 0.26f}; float miniDeltaFlat[6] = {0.26f, 0.16f, 0.16f, 0.18f, 0.18f, 0.18f}; float miniDeltaLooseTilted[3] = {0.4f, 0.4f, 0.4f}; @@ -341,7 +341,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE float dPhiThreshold(TAcc const& acc, float rt, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t& moduleIndex, float dPhi = 0, float dz = 0) { @@ -403,7 +403,7 @@ namespace SDL { template ALPAKA_FN_INLINE ALPAKA_FN_ACC void shiftStripHits(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex, uint16_t& upperModuleIndex, unsigned int lowerHitIndex, @@ -429,8 +429,8 @@ namespace SDL { // lowerModule // lowerHit // upperHit - // SDL::endcapGeometry - // SDL::tiltedGeometry + // lst::endcapGeometry + // lst::tiltedGeometry // Some variables relevant to the function float xp; // pixel x (pixel hit x) @@ -509,7 +509,7 @@ namespace SDL { drprime = (moduleSeparation / alpaka::math::sin(acc, angleA + angleB)) * alpaka::math::sin(acc, angleA); // Compute arctan of the slope and take care of the slope = infinity case - absArctanSlope = ((slope != SDL::SDL_INF) ? fabs(alpaka::math::atan(acc, slope)) : float(M_PI) / 2.f); + absArctanSlope = ((slope != lst::lst_INF) ? fabs(alpaka::math::atan(acc, slope)) : float(M_PI) / 2.f); // Depending on which quadrant the pixel hit lies, we define the angleM by shifting them slightly differently if (xp > 0 and yp > 0) { @@ -533,7 +533,7 @@ namespace SDL { // Compute the new strip hit position (if the slope value is in special condition take care of the exceptions) if (slope == - SDL::SDL_INF) // Designated for tilted module when the slope is exactly infinity (module lying along y-axis) + lst::lst_INF) // Designated for tilted module when the slope is exactly infinity (module lying along y-axis) { xn = xa; // New x point is simply where the anchor is yn = yo; // No shift in y @@ -569,7 +569,7 @@ namespace SDL { template ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex, uint16_t& upperModuleIndex, unsigned int lowerHitIndex, @@ -591,7 +591,7 @@ namespace SDL { float yUpper, float zUpper, float rtUpper) { - if (modulesInGPU.subdets[lowerModuleIndex] == SDL::Barrel) { + if (modulesInGPU.subdets[lowerModuleIndex] == lst::Barrel) { return runMiniDoubletDefaultAlgoBarrel(acc, modulesInGPU, lowerModuleIndex, @@ -644,7 +644,7 @@ namespace SDL { template ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgoBarrel(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex, uint16_t& upperModuleIndex, unsigned int lowerHitIndex, @@ -667,7 +667,7 @@ namespace SDL { float zUpper, float rtUpper) { dz = zLower - zUpper; - const float dzCut = modulesInGPU.moduleType[lowerModuleIndex] == SDL::PS ? 2.f : 10.f; + const float dzCut = modulesInGPU.moduleType[lowerModuleIndex] == lst::PS ? 2.f : 10.f; //const float sign = ((dz > 0) - (dz < 0)) * ((hitsInGPU.zs[lowerHitIndex] > 0) - (hitsInGPU.zs[lowerHitIndex] < 0)); const float sign = ((dz > 0) - (dz < 0)) * ((zLower > 0) - (zLower < 0)); const float invertedcrossercut = (alpaka::math::abs(acc, dz) > 2) * sign; @@ -677,7 +677,7 @@ namespace SDL { float miniCut = 0; - miniCut = modulesInGPU.moduleLayerType[lowerModuleIndex] == SDL::Pixel + miniCut = modulesInGPU.moduleLayerType[lowerModuleIndex] == lst::Pixel ? dPhiThreshold(acc, rtLower, modulesInGPU, lowerModuleIndex) : dPhiThreshold(acc, rtUpper, modulesInGPU, lowerModuleIndex); @@ -708,27 +708,27 @@ namespace SDL { yn = shiftedCoords[1]; // Lower or the upper hit needs to be modified depending on which one was actually shifted - if (modulesInGPU.moduleLayerType[lowerModuleIndex] == SDL::Pixel) { + if (modulesInGPU.moduleLayerType[lowerModuleIndex] == lst::Pixel) { shiftedX = xn; shiftedY = yn; shiftedZ = zUpper; shiftedRt2 = xn * xn + yn * yn; - dPhi = SDL::deltaPhi(acc, xLower, yLower, shiftedX, shiftedY); //function from Hit.cc - noShiftedDphi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, xLower, yLower, shiftedX, shiftedY); //function from Hit.cc + noShiftedDphi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); } else { shiftedX = xn; shiftedY = yn; shiftedZ = zLower; shiftedRt2 = xn * xn + yn * yn; - dPhi = SDL::deltaPhi(acc, shiftedX, shiftedY, xUpper, yUpper); - noShiftedDphi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, shiftedX, shiftedY, xUpper, yUpper); + noShiftedDphi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); } } else { shiftedX = 0; shiftedY = 0; shiftedZ = 0; - dPhi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); noShiftedDphi = dPhi; } @@ -740,31 +740,31 @@ namespace SDL { if (modulesInGPU.sides[lowerModuleIndex] != Center) { // When it is tilted, use the new shifted positions // TODO: This is somewhat of an mystery.... somewhat confused why this is the case - if (modulesInGPU.moduleLayerType[lowerModuleIndex] != SDL::Pixel) { + if (modulesInGPU.moduleLayerType[lowerModuleIndex] != lst::Pixel) { // dPhi Change should be calculated so that the upper hit has higher rt. // In principle, this kind of check rt_lower < rt_upper should not be necessary because the hit shifting should have taken care of this. // (i.e. the strip hit is shifted to be aligned in the line of sight from interaction point to pixel hit of PS module guaranteeing rt ordering) // But I still placed this check for safety. (TODO: After checking explicitly if not needed remove later?) // setdeltaPhiChange(lowerHit.rt() < upperHitMod.rt() ? lowerHit.deltaPhiChange(upperHitMod) : upperHitMod.deltaPhiChange(lowerHit)); - dPhiChange = (rtLower * rtLower < shiftedRt2) ? SDL::deltaPhiChange(acc, xLower, yLower, shiftedX, shiftedY) - : SDL::deltaPhiChange(acc, shiftedX, shiftedY, xLower, yLower); - noShiftedDphiChange = rtLower < rtUpper ? SDL::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper) - : SDL::deltaPhiChange(acc, xUpper, yUpper, xLower, yLower); + dPhiChange = (rtLower * rtLower < shiftedRt2) ? lst::deltaPhiChange(acc, xLower, yLower, shiftedX, shiftedY) + : lst::deltaPhiChange(acc, shiftedX, shiftedY, xLower, yLower); + noShiftedDphiChange = rtLower < rtUpper ? lst::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper) + : lst::deltaPhiChange(acc, xUpper, yUpper, xLower, yLower); } else { // dPhi Change should be calculated so that the upper hit has higher rt. // In principle, this kind of check rt_lower < rt_upper should not be necessary because the hit shifting should have taken care of this. // (i.e. the strip hit is shifted to be aligned in the line of sight from interaction point to pixel hit of PS module guaranteeing rt ordering) // But I still placed this check for safety. (TODO: After checking explicitly if not needed remove later?) - dPhiChange = (shiftedRt2 < rtUpper * rtUpper) ? SDL::deltaPhiChange(acc, shiftedX, shiftedY, xUpper, yUpper) - : SDL::deltaPhiChange(acc, xUpper, yUpper, shiftedX, shiftedY); - noShiftedDphiChange = rtLower < rtUpper ? SDL::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper) - : SDL::deltaPhiChange(acc, xUpper, yUpper, xLower, yLower); + dPhiChange = (shiftedRt2 < rtUpper * rtUpper) ? lst::deltaPhiChange(acc, shiftedX, shiftedY, xUpper, yUpper) + : lst::deltaPhiChange(acc, xUpper, yUpper, shiftedX, shiftedY); + noShiftedDphiChange = rtLower < rtUpper ? lst::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper) + : lst::deltaPhiChange(acc, xUpper, yUpper, xLower, yLower); } } else { // When it is flat lying module, whichever is the lowerSide will always have rt lower - dPhiChange = SDL::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper); + dPhiChange = lst::deltaPhiChange(acc, xLower, yLower, xUpper, yUpper); noShiftedDphiChange = dPhiChange; } @@ -775,7 +775,7 @@ namespace SDL { template ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgoEndcap(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex, uint16_t& upperModuleIndex, unsigned int lowerHitIndex, @@ -810,7 +810,7 @@ namespace SDL { return false; // Cut #2 : drt cut. The dz difference can't be larger than 1cm. (max separation is 4mm for modules in the endcap) // Ref to original code: https://github.com/slava77/cms-tkph2-ntuple/blob/184d2325147e6930030d3d1f780136bc2dd29ce6/doubletAnalysis.C#L3100 - const float drtCut = modulesInGPU.moduleType[lowerModuleIndex] == SDL::PS ? 2.f : 10.f; + const float drtCut = modulesInGPU.moduleType[lowerModuleIndex] == lst::PS ? 2.f : 10.f; drt = rtLower - rtUpper; if (alpaka::math::abs(acc, drt) >= drtCut) return false; @@ -838,37 +838,37 @@ namespace SDL { yn = shiftedCoords[1]; zn = shiftedCoords[2]; - if (modulesInGPU.moduleType[lowerModuleIndex] == SDL::PS) { + if (modulesInGPU.moduleType[lowerModuleIndex] == lst::PS) { // Appropriate lower or upper hit is modified after checking which one was actually shifted - if (modulesInGPU.moduleLayerType[lowerModuleIndex] == SDL::Pixel) { + if (modulesInGPU.moduleLayerType[lowerModuleIndex] == lst::Pixel) { shiftedX = xn; shiftedY = yn; shiftedZ = zUpper; - dPhi = SDL::deltaPhi(acc, xLower, yLower, shiftedX, shiftedY); - noShiftedDphi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, xLower, yLower, shiftedX, shiftedY); + noShiftedDphi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); } else { shiftedX = xn; shiftedY = yn; shiftedZ = zLower; - dPhi = SDL::deltaPhi(acc, shiftedX, shiftedY, xUpper, yUpper); - noShiftedDphi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, shiftedX, shiftedY, xUpper, yUpper); + noShiftedDphi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); } } else { shiftedX = xn; shiftedY = yn; shiftedZ = zUpper; - dPhi = SDL::deltaPhi(acc, xLower, yLower, xn, yn); - noShiftedDphi = SDL::deltaPhi(acc, xLower, yLower, xUpper, yUpper); + dPhi = lst::deltaPhi(acc, xLower, yLower, xn, yn); + noShiftedDphi = lst::deltaPhi(acc, xLower, yLower, xUpper, yUpper); } // dz needs to change if it is a PS module where the strip hits are shifted in order to properly account for the case when a tilted module falls under "endcap logic" // if it was an endcap it will have zero effect - if (modulesInGPU.moduleType[lowerModuleIndex] == SDL::PS) { - dz = modulesInGPU.moduleLayerType[lowerModuleIndex] == SDL::Pixel ? zLower - zn : zUpper - zn; + if (modulesInGPU.moduleType[lowerModuleIndex] == lst::PS) { + dz = modulesInGPU.moduleLayerType[lowerModuleIndex] == lst::Pixel ? zLower - zn : zUpper - zn; } float miniCut = 0; - miniCut = modulesInGPU.moduleLayerType[lowerModuleIndex] == SDL::Pixel + miniCut = modulesInGPU.moduleLayerType[lowerModuleIndex] == lst::Pixel ? dPhiThreshold(acc, rtLower, modulesInGPU, lowerModuleIndex, dPhi, dz) : dPhiThreshold(acc, rtUpper, modulesInGPU, lowerModuleIndex, dPhi, dz); @@ -889,10 +889,10 @@ namespace SDL { struct createMiniDoubletsInGPUv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Hits hitsInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Hits hitsInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -987,8 +987,8 @@ namespace SDL { struct createMDArrayRangesGPU { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -1077,10 +1077,10 @@ namespace SDL { struct addMiniDoubletRangesToEventExplicit { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::Hits hitsInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::Hits hitsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -1095,5 +1095,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/NeuralNetwork.h b/RecoTracker/LSTCore/src/alpaka/NeuralNetwork.h index 8a45d1f8872d5..f72f4ffaf5b6a 100644 --- a/RecoTracker/LSTCore/src/alpaka/NeuralNetwork.h +++ b/RecoTracker/LSTCore/src/alpaka/NeuralNetwork.h @@ -10,153 +10,158 @@ #include "Hit.h" #include "Triplet.h" -namespace T5DNN { - - template - ALPAKA_FN_ACC ALPAKA_FN_INLINE float runInference(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, - const float* xVec, - const float* yVec, - const unsigned int* mdIndices, - const uint16_t* lowerModuleIndices, - const unsigned int& innerTripletIndex, - const unsigned int& outerTripletIndex, - const float& innerRadius, - const float& outerRadius, - const float& bridgeRadius) { - // Unpack x-coordinates of hits - float x1 = xVec[0]; - float x2 = xVec[1]; - float x3 = xVec[2]; - float x4 = xVec[3]; - float x5 = xVec[4]; - // Unpack y-coordinates of hits - float y1 = yVec[0]; - float y2 = yVec[1]; - float y3 = yVec[2]; - float y4 = yVec[3]; - float y5 = yVec[4]; - // Unpack module indices - unsigned int mdIndex1 = mdIndices[0]; - unsigned int mdIndex2 = mdIndices[1]; - unsigned int mdIndex3 = mdIndices[2]; - unsigned int mdIndex4 = mdIndices[3]; - unsigned int mdIndex5 = mdIndices[4]; - // Unpack module indices - uint16_t lowerModuleIndex1 = lowerModuleIndices[0]; - uint16_t lowerModuleIndex2 = lowerModuleIndices[1]; - uint16_t lowerModuleIndex3 = lowerModuleIndices[2]; - uint16_t lowerModuleIndex4 = lowerModuleIndices[3]; - uint16_t lowerModuleIndex5 = lowerModuleIndices[4]; - - // Compute some convenience variables - short layer2_adjustment = 0; - if (modulesInGPU.layers[lowerModuleIndex1] == 1) { - layer2_adjustment = 1; // get upper segment to be in second layer - } - unsigned int md_idx_for_t5_eta_phi = - segmentsInGPU.mdIndices[2 * tripletsInGPU.segmentIndices[2 * innerTripletIndex + layer2_adjustment]]; - bool is_endcap1 = (modulesInGPU.subdets[lowerModuleIndex1] == 4); // true if anchor hit 1 is in the endcap - bool is_endcap2 = (modulesInGPU.subdets[lowerModuleIndex2] == 4); // true if anchor hit 2 is in the endcap - bool is_endcap3 = (modulesInGPU.subdets[lowerModuleIndex3] == 4); // true if anchor hit 3 is in the endcap - bool is_endcap4 = (modulesInGPU.subdets[lowerModuleIndex4] == 4); // true if anchor hit 4 is in the endcap - bool is_endcap5 = (modulesInGPU.subdets[lowerModuleIndex5] == 4); // true if anchor hit 5 is in the endcap - - // Build DNN input vector (corresponding output N-tuple branch noted in parenthetical in comment) - float x[38] = { - SDL::temp_log10(acc, 2 * SDL::k2Rinv1GeVf * innerRadius), // inner T3 pT (t3_pt) - mdsInGPU.anchorEta[mdIndex1], // inner T3 anchor hit 1 eta (t3_0_eta) - mdsInGPU.anchorPhi[mdIndex1], // inner T3 anchor hit 1 phi (t3_0_phi) - mdsInGPU.anchorZ[mdIndex1], // inner T3 anchor hit 1 z (t3_0_z) - alpaka::math::sqrt(acc, x1 * x1 + y1 * y1), // inner T3 anchor hit 1 r (t3_0_r) - float(modulesInGPU.layers[lowerModuleIndex1] + 6 * is_endcap1), // inner T3 anchor hit 1 layer (t3_0_layer) - mdsInGPU.anchorEta[mdIndex2], // inner T3 anchor hit 2 eta (t3_2_eta) - mdsInGPU.anchorPhi[mdIndex2], // inner T3 anchor hit 2 phi (t3_2_phi) - mdsInGPU.anchorZ[mdIndex2], // inner T3 anchor hit 2 z (t3_2_z) - alpaka::math::sqrt(acc, x2 * x2 + y2 * y2), // inner T3 anchor hit 2 r (t3_2_r) - float(modulesInGPU.layers[lowerModuleIndex2] + 6 * is_endcap2), // inner T3 anchor hit 2 layer (t3_2_layer) - mdsInGPU.anchorEta[mdIndex3], // inner T3 anchor hit 3 eta (t3_4_eta) - mdsInGPU.anchorPhi[mdIndex3], // inner T3 anchor hit 3 phi (t3_4_phi) - mdsInGPU.anchorZ[mdIndex3], // inner T3 anchor hit 3 z (t3_4_z) - alpaka::math::sqrt(acc, x3 * x3 + y3 * y3), // inner T3 anchor hit 3 r (t3_4_r) - float(modulesInGPU.layers[lowerModuleIndex3] + 6 * is_endcap3), // inner T3 anchor hit 3 layer (t3_4_layer) - SDL::temp_log10(acc, 2 * SDL::k2Rinv1GeVf * outerRadius), // outer T3 pT (t3_pt) - mdsInGPU.anchorEta[mdIndex3], // outer T3 anchor hit 4 eta (t3_0_eta) - mdsInGPU.anchorPhi[mdIndex3], // outer T3 anchor hit 4 phi (t3_0_phi) - mdsInGPU.anchorZ[mdIndex3], // outer T3 anchor hit 3 eta (t3_0_z) - alpaka::math::sqrt(acc, x3 * x3 + y3 * y3), // outer T3 anchor hit 3 r (t3_0_r) - float(modulesInGPU.layers[lowerModuleIndex3] + 6 * is_endcap3), // outer T3 anchor hit 3 layer (t3_0_layer) - mdsInGPU.anchorEta[mdIndex4], // outer T3 anchor hit 4 eta (t3_2_eta) - mdsInGPU.anchorPhi[mdIndex4], // outer T3 anchor hit 4 phi (t3_2_phi) - mdsInGPU.anchorZ[mdIndex4], // outer T3 anchor hit 4 z (t3_2_z) - alpaka::math::sqrt(acc, x4 * x4 + y4 * y4), // outer T3 anchor hit 4 r (t3_2_r) - float(modulesInGPU.layers[lowerModuleIndex4] + 6 * is_endcap4), // outer T3 anchor hit 4 layer (t3_2_layer) - mdsInGPU.anchorEta[mdIndex5], // outer T3 anchor hit 5 eta (t3_4_eta) - mdsInGPU.anchorPhi[mdIndex5], // outer T3 anchor hit 5 phi (t3_4_phi) - mdsInGPU.anchorZ[mdIndex5], // outer T3 anchor hit 5 z (t3_4_z) - alpaka::math::sqrt(acc, x5 * x5 + y5 * y5), // outer T3 anchor hit 5 r (t3_4_r) - float(modulesInGPU.layers[lowerModuleIndex5] + 6 * is_endcap5), // outer T3 anchor hit 5 layer (t3_4_layer) - SDL::temp_log10(acc, (innerRadius + outerRadius) * SDL::k2Rinv1GeVf), // T5 pT (t5_pt) - mdsInGPU.anchorEta[md_idx_for_t5_eta_phi], // T5 eta (t5_eta) - mdsInGPU.anchorPhi[md_idx_for_t5_eta_phi], // T5 phi (t5_phi) - SDL::temp_log10(acc, innerRadius), // T5 inner radius (t5_innerRadius) - SDL::temp_log10(acc, bridgeRadius), // T5 bridge radius (t5_bridgeRadius) - SDL::temp_log10(acc, outerRadius) // T5 outer radius (t5_outerRadius) - }; - - // (0): Linear(in_features=38, out_features=32, bias=True) => x = x*W_T + b - float x_0[32]; - for (unsigned int col = 0; col < 32; ++col) { - x_0[col] = 0; - for (unsigned int inner = 0; inner < 38; ++inner) { - x_0[col] += x[inner] * wgtT_0[inner][col]; +namespace lst { + + namespace t5dnn { + + template + ALPAKA_FN_ACC ALPAKA_FN_INLINE float runInference(TAcc const& acc, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, + const float* xVec, + const float* yVec, + const unsigned int* mdIndices, + const uint16_t* lowerModuleIndices, + const unsigned int& innerTripletIndex, + const unsigned int& outerTripletIndex, + const float& innerRadius, + const float& outerRadius, + const float& bridgeRadius) { + // Unpack x-coordinates of hits + float x1 = xVec[0]; + float x2 = xVec[1]; + float x3 = xVec[2]; + float x4 = xVec[3]; + float x5 = xVec[4]; + // Unpack y-coordinates of hits + float y1 = yVec[0]; + float y2 = yVec[1]; + float y3 = yVec[2]; + float y4 = yVec[3]; + float y5 = yVec[4]; + // Unpack module indices + unsigned int mdIndex1 = mdIndices[0]; + unsigned int mdIndex2 = mdIndices[1]; + unsigned int mdIndex3 = mdIndices[2]; + unsigned int mdIndex4 = mdIndices[3]; + unsigned int mdIndex5 = mdIndices[4]; + // Unpack module indices + uint16_t lowerModuleIndex1 = lowerModuleIndices[0]; + uint16_t lowerModuleIndex2 = lowerModuleIndices[1]; + uint16_t lowerModuleIndex3 = lowerModuleIndices[2]; + uint16_t lowerModuleIndex4 = lowerModuleIndices[3]; + uint16_t lowerModuleIndex5 = lowerModuleIndices[4]; + + // Compute some convenience variables + short layer2_adjustment = 0; + if (modulesInGPU.layers[lowerModuleIndex1] == 1) { + layer2_adjustment = 1; // get upper segment to be in second layer } - x_0[col] += bias_0[col]; - } + unsigned int md_idx_for_t5_eta_phi = + segmentsInGPU.mdIndices[2 * tripletsInGPU.segmentIndices[2 * innerTripletIndex + layer2_adjustment]]; + bool is_endcap1 = (modulesInGPU.subdets[lowerModuleIndex1] == 4); // true if anchor hit 1 is in the endcap + bool is_endcap2 = (modulesInGPU.subdets[lowerModuleIndex2] == 4); // true if anchor hit 2 is in the endcap + bool is_endcap3 = (modulesInGPU.subdets[lowerModuleIndex3] == 4); // true if anchor hit 3 is in the endcap + bool is_endcap4 = (modulesInGPU.subdets[lowerModuleIndex4] == 4); // true if anchor hit 4 is in the endcap + bool is_endcap5 = (modulesInGPU.subdets[lowerModuleIndex5] == 4); // true if anchor hit 5 is in the endcap - // (1): ReLU() - float x_1[32]; - for (unsigned int col = 0; col < 32; ++col) { - x_1[col] = (x_0[col] > 0.f) ? x_0[col] : 0.f; - } + // Build DNN input vector (corresponding output N-tuple branch noted in parenthetical in comment) + float x[38] = { + lst::temp_log10(acc, 2 * lst::k2Rinv1GeVf * innerRadius), // inner T3 pT (t3_pt) + mdsInGPU.anchorEta[mdIndex1], // inner T3 anchor hit 1 eta (t3_0_eta) + mdsInGPU.anchorPhi[mdIndex1], // inner T3 anchor hit 1 phi (t3_0_phi) + mdsInGPU.anchorZ[mdIndex1], // inner T3 anchor hit 1 z (t3_0_z) + alpaka::math::sqrt(acc, x1 * x1 + y1 * y1), // inner T3 anchor hit 1 r (t3_0_r) + float(modulesInGPU.layers[lowerModuleIndex1] + 6 * is_endcap1), // inner T3 anchor hit 1 layer (t3_0_layer) + mdsInGPU.anchorEta[mdIndex2], // inner T3 anchor hit 2 eta (t3_2_eta) + mdsInGPU.anchorPhi[mdIndex2], // inner T3 anchor hit 2 phi (t3_2_phi) + mdsInGPU.anchorZ[mdIndex2], // inner T3 anchor hit 2 z (t3_2_z) + alpaka::math::sqrt(acc, x2 * x2 + y2 * y2), // inner T3 anchor hit 2 r (t3_2_r) + float(modulesInGPU.layers[lowerModuleIndex2] + 6 * is_endcap2), // inner T3 anchor hit 2 layer (t3_2_layer) + mdsInGPU.anchorEta[mdIndex3], // inner T3 anchor hit 3 eta (t3_4_eta) + mdsInGPU.anchorPhi[mdIndex3], // inner T3 anchor hit 3 phi (t3_4_phi) + mdsInGPU.anchorZ[mdIndex3], // inner T3 anchor hit 3 z (t3_4_z) + alpaka::math::sqrt(acc, x3 * x3 + y3 * y3), // inner T3 anchor hit 3 r (t3_4_r) + float(modulesInGPU.layers[lowerModuleIndex3] + 6 * is_endcap3), // inner T3 anchor hit 3 layer (t3_4_layer) + lst::temp_log10(acc, 2 * lst::k2Rinv1GeVf * outerRadius), // outer T3 pT (t3_pt) + mdsInGPU.anchorEta[mdIndex3], // outer T3 anchor hit 4 eta (t3_0_eta) + mdsInGPU.anchorPhi[mdIndex3], // outer T3 anchor hit 4 phi (t3_0_phi) + mdsInGPU.anchorZ[mdIndex3], // outer T3 anchor hit 3 eta (t3_0_z) + alpaka::math::sqrt(acc, x3 * x3 + y3 * y3), // outer T3 anchor hit 3 r (t3_0_r) + float(modulesInGPU.layers[lowerModuleIndex3] + 6 * is_endcap3), // outer T3 anchor hit 3 layer (t3_0_layer) + mdsInGPU.anchorEta[mdIndex4], // outer T3 anchor hit 4 eta (t3_2_eta) + mdsInGPU.anchorPhi[mdIndex4], // outer T3 anchor hit 4 phi (t3_2_phi) + mdsInGPU.anchorZ[mdIndex4], // outer T3 anchor hit 4 z (t3_2_z) + alpaka::math::sqrt(acc, x4 * x4 + y4 * y4), // outer T3 anchor hit 4 r (t3_2_r) + float(modulesInGPU.layers[lowerModuleIndex4] + 6 * is_endcap4), // outer T3 anchor hit 4 layer (t3_2_layer) + mdsInGPU.anchorEta[mdIndex5], // outer T3 anchor hit 5 eta (t3_4_eta) + mdsInGPU.anchorPhi[mdIndex5], // outer T3 anchor hit 5 phi (t3_4_phi) + mdsInGPU.anchorZ[mdIndex5], // outer T3 anchor hit 5 z (t3_4_z) + alpaka::math::sqrt(acc, x5 * x5 + y5 * y5), // outer T3 anchor hit 5 r (t3_4_r) + float(modulesInGPU.layers[lowerModuleIndex5] + 6 * is_endcap5), // outer T3 anchor hit 5 layer (t3_4_layer) + lst::temp_log10(acc, (innerRadius + outerRadius) * lst::k2Rinv1GeVf), // T5 pT (t5_pt) + mdsInGPU.anchorEta[md_idx_for_t5_eta_phi], // T5 eta (t5_eta) + mdsInGPU.anchorPhi[md_idx_for_t5_eta_phi], // T5 phi (t5_phi) + lst::temp_log10(acc, innerRadius), // T5 inner radius (t5_innerRadius) + lst::temp_log10(acc, bridgeRadius), // T5 bridge radius (t5_bridgeRadius) + lst::temp_log10(acc, outerRadius) // T5 outer radius (t5_outerRadius) + }; - // (2): Linear(in_features=32, out_features=32, bias=True) => x = x*W_T + b - float x_2[32]; - for (unsigned int col = 0; col < 32; ++col) { - x_2[col] = 0; - for (unsigned int inner = 0; inner < 32; ++inner) { - x_2[col] += x_1[inner] * wgtT_2[inner][col]; + // (0): Linear(in_features=38, out_features=32, bias=True) => x = x*W_T + b + float x_0[32]; + for (unsigned int col = 0; col < 32; ++col) { + x_0[col] = 0; + for (unsigned int inner = 0; inner < 38; ++inner) { + x_0[col] += x[inner] * wgtT_0[inner][col]; + } + x_0[col] += bias_0[col]; } - x_2[col] += bias_2[col]; - } - // (3): ReLU() - float x_3[32]; - for (unsigned int col = 0; col < 32; ++col) { - x_3[col] = (x_2[col] > 0.f) ? x_2[col] : 0.f; - } + // (1): ReLU() + float x_1[32]; + for (unsigned int col = 0; col < 32; ++col) { + x_1[col] = (x_0[col] > 0.f) ? x_0[col] : 0.f; + } - // (4): Linear(in_features=32, out_features=1, bias=True) => x = x*W_T + b - float x_4[1]; - for (unsigned int col = 0; col < 1; ++col) { - x_4[col] = 0; - for (unsigned int inner = 0; inner < 32; ++inner) { - x_4[col] += x_3[inner] * wgtT_4[inner][col]; + // (2): Linear(in_features=32, out_features=32, bias=True) => x = x*W_T + b + float x_2[32]; + for (unsigned int col = 0; col < 32; ++col) { + x_2[col] = 0; + for (unsigned int inner = 0; inner < 32; ++inner) { + x_2[col] += x_1[inner] * wgtT_2[inner][col]; + } + x_2[col] += bias_2[col]; + } + + // (3): ReLU() + float x_3[32]; + for (unsigned int col = 0; col < 32; ++col) { + x_3[col] = (x_2[col] > 0.f) ? x_2[col] : 0.f; + } + + // (4): Linear(in_features=32, out_features=1, bias=True) => x = x*W_T + b + float x_4[1]; + for (unsigned int col = 0; col < 1; ++col) { + x_4[col] = 0; + for (unsigned int inner = 0; inner < 32; ++inner) { + x_4[col] += x_3[inner] * wgtT_4[inner][col]; + } + x_4[col] += bias_4[col]; + } + + // (5): Sigmoid() + float x_5[1]; + for (unsigned int col = 0; col < 1; ++col) { + x_5[col] = alpaka::math::exp(acc, x_4[col]) / (alpaka::math::exp(acc, x_4[col]) + 1); } - x_4[col] += bias_4[col]; - } - // (5): Sigmoid() - float x_5[1]; - for (unsigned int col = 0; col < 1; ++col) { - x_5[col] = alpaka::math::exp(acc, x_4[col]) / (alpaka::math::exp(acc, x_4[col]) + 1); + return x_5[0]; } - return x_5[0]; - } -} // namespace T5DNN + } // namespace t5dnn + +} //namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/NeuralNetworkWeights.h b/RecoTracker/LSTCore/src/alpaka/NeuralNetworkWeights.h index 959ebb56e8b68..a7a380985eb28 100644 --- a/RecoTracker/LSTCore/src/alpaka/NeuralNetworkWeights.h +++ b/RecoTracker/LSTCore/src/alpaka/NeuralNetworkWeights.h @@ -3,309 +3,315 @@ #include -namespace T5DNN { - ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_0[32] = { - -4.5069356f, -5.8842053f, 1.0793180f, -0.1540973f, -0.4705772f, 6.4027028f, -0.6620818f, -7.0734525f, - 0.6211641f, 4.9630723f, 3.4310920f, -0.8856288f, 4.5843782f, -6.0180559f, 0.0126438f, -1.5725276f, - -0.8549317f, -6.8545237f, -1.2129461f, 3.0617838f, -0.3911322f, 0.0799793f, -2.5398655f, -0.5780622f, - 2.8533990f, -0.1777968f, -2.6457164f, -0.7976936f, 4.5644889f, -2.1747942f, 3.4286616f, -10.1073380f}; - ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_0[38][32] = { - {6.1269712f, -10.6625051f, 17.4907818f, -0.0019928f, -3.4468415f, 1.6674044f, -7.8957767f, 2.2077549f, - 9.5517254f, -5.1345053f, -30.1643391f, 4.0148559f, -19.8330841f, -18.3806915f, 0.1334764f, 1.6213616f, - -4.1423774f, -15.3062429f, -1.0209556f, 1.5580219f, 0.7426265f, 0.0033929f, 1.3924170f, 0.9196110f, - -0.8995734f, 1.0594707f, 39.4390869f, 8.7642002f, 28.4583893f, -5.9235659f, 3.7221889f, 14.4167147f}, - {1.7863803f, -0.6068707f, 0.3166098f, -0.0608759f, 0.5939785f, 0.4870262f, -3.1375074f, -17.7147388f, - -0.7231818f, -9.3808413f, 2.2070611f, 15.7461920f, 0.9355862f, 2.3942475f, -0.0671409f, 3.5954301f, - -3.0463996f, -2.0748904f, -0.5450584f, -4.4800100f, 0.6074556f, -0.0161482f, 3.0624702f, -4.5688419f, - 2.9881518f, -0.3714012f, -0.0387531f, -0.7699140f, 4.4028845f, 5.0333014f, -4.7350726f, -8.6568584f}, - {5.6548429f, -0.0207700f, 0.1785973f, 0.0881671f, 0.2530097f, -0.1893259f, -0.1105739f, -0.5183877f, - 1.0728362f, 0.1833011f, 1.7765219f, 0.3127359f, 0.0455277f, -0.1442616f, -0.1048361f, -0.1235604f, - -0.1217661f, -0.5487315f, 0.7575656f, -0.1177454f, -17.0993137f, 0.1628031f, 0.2789381f, 0.5304270f, - 0.0837841f, -3.1120780f, 0.0074821f, -0.1648044f, -0.3395336f, 0.3958135f, 0.8718957f, -1.1980486f}, - {0.2401041f, -0.0585765f, -0.0144584f, 0.0411095f, 0.0752229f, 0.0292672f, -0.2437613f, -1.4396472f, - -0.0971315f, -1.7181139f, 0.2417643f, 2.2030578f, 0.0566049f, 0.1081589f, -0.1060181f, 0.3473758f, - -0.7095683f, -0.0345675f, 0.2794849f, -1.1702278f, 0.2622930f, -0.0072611f, 0.5026371f, -1.2882922f, - -0.4712771f, 0.0597130f, -0.0039970f, -0.6050836f, 0.1554724f, 1.0991164f, -0.4975886f, 0.2597970f}, - {0.0766028f, 0.0218421f, -0.1739017f, -0.0076569f, 0.0384461f, -0.1841756f, 0.9677940f, -3.1114254f, - 2.3830564f, 2.0706992f, -0.9643140f, 0.7361387f, -0.0060253f, -0.1554846f, -0.0831100f, 2.8754771f, - -1.4403527f, -0.5281797f, 0.5157787f, 4.2405987f, 0.4807618f, 0.0217647f, -1.2626950f, 0.9145837f, - -0.3931780f, 0.3426280f, -0.0065206f, -0.7510439f, -0.4555758f, 2.7724340f, -1.2173026f, 0.1039017f}, - {0.5685715f, 0.3927337f, 0.4942532f, -0.0671033f, -0.2808350f, -0.0336000f, -1.3983957f, 0.9876546f, - -2.3840380f, 0.7315395f, -2.2009561f, -1.4631602f, -0.4672308f, -0.4994236f, 0.1169335f, -1.1894208f, - -1.2692982f, 0.3303853f, -2.0147655f, -0.9912014f, 1.0042895f, 0.1121151f, -1.0789106f, -2.2821584f, - -6.6459913f, -0.0959398f, -0.0068429f, -2.8177626f, 0.3213172f, -2.6832986f, -4.7613306f, -0.9985733f}, - {1.4419515f, -0.3864825f, -0.6756768f, -0.1273375f, 0.4321181f, 0.3354745f, -0.8236564f, -2.8190827f, - 0.7090831f, 1.9072700f, -3.1834064f, -2.6938572f, 0.5051147f, 1.4382831f, 0.1241910f, -0.7352629f, - 0.7703634f, -1.7556250f, -2.1104112f, 3.0603442f, 1.9873468f, -0.0358815f, -1.0087154f, 3.8253262f, - -0.5466214f, 0.0875162f, 0.2691758f, 0.7121435f, 1.9314718f, -0.1580560f, 3.6484149f, -5.3173709f}, - {6.9104381f, -0.0033664f, -1.4405546f, -0.1768288f, 0.2028089f, -0.1012344f, -4.4735684f, 0.6354278f, - 4.3039737f, 0.2056303f, 1.8338999f, -1.1351355f, 0.1015760f, -0.0733253f, -0.0561627f, 2.5292397f, - 1.6314448f, -0.9333628f, -0.7773662f, 0.8313186f, -0.7829623f, 0.1265118f, 0.5922315f, -0.3463379f, - -1.3269740f, -3.3302619f, -0.0061799f, 2.3374722f, 0.0880938f, 0.7470241f, -0.4205743f, -4.7557602f}, - {0.0380794f, 0.0947470f, 0.0419397f, 0.0582226f, -0.0603404f, 0.0234028f, -0.2575402f, 0.4125248f, - 0.3035339f, 0.2663808f, -0.6092452f, -1.4727812f, 0.0247187f, -0.0539688f, -0.0150413f, 0.2094955f, - 0.5379737f, -0.3255228f, -0.5639279f, 0.0786276f, 0.6703192f, 0.1557026f, -0.2753083f, 1.1463971f, - -0.9372965f, 0.5657740f, 0.0041413f, 0.0870248f, 0.0101520f, -0.8214461f, 0.1212932f, 1.5648646f}, - {-0.0969819f, 0.0137566f, 1.3515147f, -0.0155047f, -0.1416170f, -0.1636726f, 0.5184190f, 0.4732984f, - 0.6815788f, -1.0522166f, -0.4486531f, -0.0516016f, 0.0201894f, -0.0849667f, -0.0861271f, -1.2027841f, - 1.2458711f, -0.7061657f, 1.0381308f, -0.3450044f, -0.1300479f, -0.0828402f, 0.6859242f, -1.0575374f, - 0.6947553f, -0.0922188f, 0.0199132f, 0.8038982f, -0.1734094f, -0.1057449f, 1.6305015f, -0.0688597f}, - {-1.8151448f, 0.1024327f, 1.7063105f, 0.1130912f, -0.1081472f, -0.2904744f, -1.3465070f, -1.0455177f, - -0.4581082f, -3.2220871f, 0.5221398f, -5.1637673f, 0.0811146f, -0.1326323f, -0.0379338f, -3.0439703f, - -2.4246936f, -0.3670847f, -3.1256330f, -1.6595014f, -3.4715190f, -0.1526113f, -1.0420206f, 0.9536474f, - -3.2932863f, 1.6048199f, 0.0025162f, -3.6049840f, 0.0604250f, -2.2404826f, 1.8406851f, -3.1381185f}, - {1.2985691f, -1.1044264f, 0.9062797f, -0.0788333f, 0.2694912f, 0.0032800f, -0.0574267f, 0.9734111f, - 1.1532565f, 2.6786125f, -3.8574269f, -2.2871449f, -0.1261243f, 1.0545347f, -0.1454154f, -0.5609738f, - 1.8385800f, -0.8035598f, -1.7668265f, 5.1665063f, 0.7966110f, 0.0940206f, -2.3943975f, 2.3344002f, - 1.0342182f, 0.4806454f, -0.3880928f, 0.6998246f, 1.4011886f, -1.7313483f, 4.9702630f, -6.0058608f}, - {1.0300356f, 0.0616315f, -0.1113776f, -0.1694220f, 0.7159944f, 0.0626456f, 2.0994680f, 0.3452290f, - -3.0487001f, 0.0654031f, -1.1510723f, 0.5370992f, -0.0290704f, -0.0300795f, 0.0751569f, -0.2345951f, - -0.3472281f, 0.4424143f, 1.2444530f, -0.2114656f, 0.7865694f, -0.0709381f, -0.1839961f, -0.0529834f, - 0.5867608f, -3.8793530f, -0.0814745f, -0.6368676f, 0.0361213f, -0.5549288f, 0.5661780f, 1.8374584f}, - {0.3345098f, 0.0068199f, -0.4205509f, -0.1088801f, -0.1043202f, -0.0040804f, 0.3400922f, 0.2673528f, - -0.6050695f, 0.4443954f, -0.4319905f, -0.6044132f, -0.0260679f, 0.0137036f, 0.0765494f, -0.0095099f, - 0.5880439f, -0.0083854f, -0.2407522f, 0.1942379f, 0.6554548f, -0.1322891f, -0.8298992f, 0.7909554f, - 1.0528831f, 0.1970959f, 0.0754069f, -0.0947960f, -0.0279494f, -0.5888316f, 0.8919419f, 0.4828835f}, - {0.3995822f, -0.2139665f, 0.3982936f, -0.1285759f, -0.3445527f, -0.1167238f, -0.1263519f, 0.8393803f, - -0.7758383f, 0.0719291f, -0.0134762f, 0.1715237f, 0.0796666f, 0.1023507f, -0.1172728f, -1.2364722f, - 1.2592632f, -0.3168479f, 0.7487004f, -1.5170647f, -0.2235429f, -0.1620898f, 1.4064828f, -1.0821995f, - 0.0740103f, -1.0412805f, -0.0621277f, 0.2439800f, 0.2684972f, -1.1661061f, 0.7859434f, -0.6170313f}, - {2.1615884f, 0.1431713f, 0.0642652f, -0.0522325f, -0.2658786f, -0.0245810f, -1.6857448f, -0.6685011f, - -0.6978170f, -0.8716729f, 0.3129902f, -2.5870812f, -0.2855283f, -0.3205920f, -0.0084069f, 1.3182145f, - -0.6923816f, -0.3730274f, -2.3638811f, -1.1128502f, -2.4709859f, 0.1349022f, -0.3574466f, -0.6597407f, - -4.1122031f, 0.2240651f, 0.1806145f, -1.6836300f, -0.0766231f, -3.2611966f, 0.0091456f, -0.0997367f}, - {5.2476101f, -0.1966512f, 4.8935304f, -0.1551689f, 1.6919724f, -0.8324367f, 14.3318472f, -0.3503132f, - 10.3614969f, -9.1522884f, -0.2543063f, -1.8476851f, 16.7961140f, 9.9541416f, -0.0434563f, -9.6973553f, - -5.0469398f, 6.1688442f, 7.6429725f, -7.3149266f, 1.2345183f, 0.1412155f, 0.7114770f, -1.6378664f, - 5.1548996f, 0.3686100f, -45.3027611f, 3.0492647f, -37.3445892f, 2.7421410f, -2.7958770f, -25.2034016f}, - {1.4597454f, -1.0561740f, 0.9751291f, 0.0446527f, 0.3691662f, 0.1006782f, 0.1418435f, 0.8871480f, - 1.1603093f, 2.8034730f, -4.0856910f, -1.9786842f, -0.2206208f, 0.9539357f, 0.0868183f, -0.6811873f, - 1.9642411f, -0.8065316f, -2.0244894f, 5.2936082f, 0.6120632f, -0.1194160f, -2.3925939f, 2.5555069f, - 1.0149733f, 0.4607603f, -0.2197217f, 0.5703423f, 1.4049014f, -1.5900208f, 5.1645074f, -6.0569463f}, - {0.9000676f, -0.0028781f, -0.1967366f, 0.1039593f, 0.7993248f, 0.0655172f, 2.2296758f, 0.4391927f, - -3.0292840f, 0.0334536f, -1.1728534f, 0.3479103f, -0.1190938f, 0.0410203f, 0.1146637f, -0.2958017f, - -0.3240463f, 0.4361866f, 1.0564958f, -0.1989332f, 0.5194008f, -0.0628912f, -0.1733121f, -0.1255383f, - 0.5990249f, -3.7692382f, 0.0995128f, -0.7101220f, -0.0785123f, -0.3514554f, 0.6662078f, 2.0991604f}, - {0.1781942f, -0.1873588f, -0.4653996f, -0.0153059f, -0.1399561f, -0.0498718f, 0.4552556f, 0.2300792f, - -0.7682312f, 0.4342302f, -0.3787803f, -0.6089386f, -0.1049337f, 0.0395331f, 0.0220332f, 0.0114750f, - 0.4672548f, 0.1284784f, -0.2472819f, 0.2892784f, 0.4788667f, 0.0472555f, -0.6593549f, 0.6508777f, - 0.9286987f, 0.3043948f, -0.0635985f, 0.0814399f, -0.1168853f, -0.6688027f, 0.8876534f, 0.4865684f}, - {0.4024099f, 0.0480259f, 0.4588822f, -0.1793082f, -0.2151573f, -0.1871128f, -0.1502780f, 1.1011307f, - -0.9467706f, 0.2632496f, -0.1257263f, -0.0241331f, 0.2280627f, 0.0878608f, -0.1334262f, -1.1642927f, - 1.0943586f, -0.4799654f, 0.5981907f, -1.5051398f, -0.4235946f, 0.0012827f, 1.2342577f, -0.8281875f, - 0.2776567f, -1.0362227f, 0.0408372f, 0.1540821f, 0.1777556f, -1.2684357f, 0.8836584f, -0.4001710f}, - {2.1558056f, 0.2082023f, 0.0863442f, 0.0364868f, -0.3985825f, 0.0307202f, -1.8889453f, -0.5614714f, - -0.7311882f, -0.8075573f, 0.4895108f, -2.7770483f, -0.3121874f, -0.1671291f, -0.1281284f, 1.3212786f, - -0.5310181f, -0.1974759f, -2.6240873f, -0.8320529f, -2.3875966f, -0.0286360f, -0.6263188f, -0.6553424f, - -4.1658955f, -0.0601300f, 0.0946256f, -1.6795633f, -0.1251303f, -3.0974686f, 0.2412274f, -0.0687501f}, - {2.0523887f, -0.6387668f, 2.0633900f, -0.0550964f, 0.5181718f, -0.4202190f, 1.8569367f, 0.8295385f, - 0.8555872f, 2.4727983f, -0.2072828f, -1.9006120f, 0.5379534f, 0.4463673f, 0.1468820f, 0.4918649f, - -3.4016700f, 0.2884440f, -1.9418719f, 4.5157170f, -0.5160927f, -0.0199372f, 3.1353824f, -0.9863126f, - -1.5135859f, 0.7576568f, 0.6715558f, 2.7409093f, 0.9291748f, -0.3247162f, 1.8204515f, -8.9181070f}, - {-0.1428107f, -0.0829889f, 0.4213613f, 0.0225415f, 1.2238166f, 0.0477106f, 0.3031853f, -0.7466553f, - 2.0663500f, 0.7588379f, 0.3689216f, -0.2003786f, 0.1242338f, 0.1693589f, -0.0351716f, -0.0186597f, - -0.0189417f, 0.5468715f, -0.2862698f, -0.1311738f, 3.0747476f, -0.0310747f, 0.0943165f, 0.3139819f, - 0.6274695f, -1.8314874f, 0.0147495f, 0.3554756f, 0.3829916f, 0.4891713f, 0.1328600f, 1.0535098f}, - {0.0534900f, 0.1787969f, -0.0571320f, -0.0685673f, 0.1968977f, 0.0374476f, 0.7876674f, 0.0828491f, - 0.6444036f, -0.2203166f, -0.2383427f, 0.5397566f, 0.0106769f, -0.1230072f, -0.0135021f, -0.5691944f, - -1.5040319f, 0.0406933f, -0.0025478f, 0.9251419f, -1.7180276f, -0.1112956f, 1.4840862f, 0.0407115f, - -0.0100329f, 0.0583593f, -0.0110524f, 0.7431355f, -0.0971857f, -0.5501527f, -0.6371027f, -0.1935233f}, - {-0.6455778f, 0.2317368f, 0.9285696f, -0.1415854f, 0.0822560f, 0.2488030f, -2.6992166f, 0.0884904f, - 0.6735302f, -0.1467820f, 0.5641044f, 0.6436581f, 0.0818401f, -0.0336634f, -0.0729000f, -0.1206900f, - -2.5739892f, 0.5776953f, 0.9531668f, -1.2362405f, -0.0615577f, -0.0143544f, -2.7525210f, 1.3738545f, - 0.2751348f, -1.7463943f, -0.0020144f, 2.4814103f, 0.1716725f, -0.7055540f, -0.3474010f, 0.4482578f}, - {-0.2526205f, -0.7463821f, -3.6076138f, -0.1511098f, 0.1216256f, 0.0888247f, -1.0190924f, -1.3260181f, - -0.0443211f, -4.8911066f, -3.4385188f, -6.0057454f, 0.3340450f, 0.2997236f, -0.0907855f, 0.7500492f, - -0.4007562f, 1.9382039f, 0.5687234f, 2.6511824f, 4.7703862f, 0.0006749f, -0.0201394f, -3.5885489f, - -4.1518898f, 0.0807014f, -0.0584071f, -0.8100027f, 0.7697087f, -0.8038046f, -1.2945876f, -4.0110312f}, - {0.4337017f, -1.1532011f, 2.0740633f, 0.0271806f, 0.6654227f, 0.1012998f, -4.0791736f, 1.2631345f, - 1.9511020f, 2.3272331f, 1.2707534f, 1.6306664f, 0.4936035f, 0.8285242f, 0.0807625f, 3.8652387f, - 0.0281145f, 1.6877037f, 1.2557380f, -0.3036775f, 0.5604967f, 0.1551418f, -0.9599600f, -6.3067718f, - -0.6352320f, 0.8058553f, 0.3657880f, -2.0491202f, -0.3926269f, 2.5650854f, 1.3697821f, -8.3070078f}, - {5.1334143f, -0.0351738f, -0.4774780f, -0.0679726f, 1.4569254f, 0.0580191f, -0.3649136f, -0.2298838f, - -3.3826666f, -0.7392708f, -0.6036060f, -0.2612940f, -0.1877640f, -0.1145124f, -0.0042578f, -0.0311193f, - -0.0320479f, 0.5270581f, -0.4324475f, 0.2681437f, 4.7813129f, -0.0222701f, -0.0525629f, -0.2861001f, - -0.1251072f, 3.9112861f, 0.0045046f, -0.0426071f, -0.3299106f, -0.0686970f, -0.1602017f, -0.0070103f}, - {-0.6633690f, 0.0103367f, 0.5998458f, 0.1256577f, -0.0359184f, -0.0176820f, -0.6458368f, -0.0370536f, - 0.3542259f, 0.1394724f, 0.8255956f, 0.2501569f, 0.0320156f, -0.0256806f, 0.0277949f, 0.0036392f, - 0.2825173f, 0.1400358f, 1.0011463f, -0.6792242f, 0.0672508f, 0.0728705f, -0.1089695f, -1.0414587f, - -0.4135485f, 0.4293025f, -0.0041241f, -0.9564193f, 0.0314900f, 0.8658463f, -0.7734696f, -0.7610567f}, - {-0.0200122f, -0.0749178f, -1.5026549f, -0.0387432f, -0.0713735f, 0.1214790f, 1.8730290f, -0.0552839f, - -1.6867150f, 0.2282097f, 0.7161849f, -0.1018546f, -0.1092003f, 0.0365504f, -0.1326883f, 1.2310545f, - 0.1800210f, 0.7024739f, -2.9606545f, 1.2275347f, -0.2050014f, 0.0940569f, 0.4761694f, 0.8812068f, - -0.0083424f, -1.5406264f, 0.0061815f, -2.7606382f, 0.0248556f, 1.1086880f, -1.3608936f, 1.0795454f}, - {0.9734020f, 0.3905411f, -3.7008634f, 0.0013557f, 0.1649124f, 0.9935362f, 1.3489184f, 0.9505764f, - 0.7966231f, -0.1627246f, -2.5754328f, 1.4892205f, 0.8586300f, 0.6974363f, 0.1320204f, -0.7840260f, - 0.3121157f, 0.0966901f, 2.7447381f, 1.8256680f, 0.7229405f, -0.1723188f, 0.9145948f, -2.1376033f, - 0.5259342f, 0.0731194f, -0.2908303f, -0.2603913f, -0.2326528f, 3.6684167f, -0.2883157f, -2.8546307f}, - {-4.8917460f, 6.7944999f, -0.2255474f, 0.1051999f, 3.9000113f, 2.0624907f, 5.3019547f, 10.0209141f, - 1.1268179f, 2.2669628f, -6.5002980f, 1.8408583f, 5.3039579f, 2.2055962f, 0.1055369f, 1.7230233f, - 6.9605255f, 7.7025104f, 2.9880707f, -0.9274251f, -0.2287160f, -0.0206735f, 0.6885675f, 2.8179996f, - -7.1129837f, -1.3772345f, 3.8655453f, -5.9388318f, -0.0469947f, 7.2763596f, -6.3536129f, -17.0069847f}, - {1.8787041f, -0.9953383f, -1.4839923f, 0.1308209f, 0.3657510f, 0.3106483f, -1.4158971f, -6.7449651f, - 0.6553892f, -4.5046172f, -3.5489719f, 3.5363002f, 0.5454772f, 2.3521471f, 0.1612140f, -0.9744226f, - 0.6546553f, -2.7179255f, -1.7758157f, 0.3089439f, 1.7462813f, 0.1654593f, -0.2440207f, 3.9501827f, - 1.3750844f, 0.0596805f, -0.1977254f, 0.0264880f, 2.6396444f, 1.0816911f, 3.6413448f, -6.0299959f}, - {-4.1295738f, 0.1044480f, 0.2131937f, 0.0420826f, 0.5292229f, 0.0090477f, -0.0973486f, 0.9596778f, - 2.9579651f, -0.6364226f, -1.7556342f, 0.1539868f, -0.1273174f, -0.1348504f, 0.1257833f, -1.4168571f, - -1.0960362f, 0.0482449f, -1.4395387f, -0.2524115f, -2.9162085f, -0.0451428f, -0.4021681f, -0.5756381f, - 0.0515293f, -3.1996479f, -0.0007676f, -1.3878343f, -0.2864279f, -0.9579773f, -1.0999249f, 1.6500067f}, - {-2.4806111f, -6.8115449f, 3.2805641f, 0.1187415f, -0.9950783f, 6.2553434f, -1.6450261f, -6.1463733f, - 2.7507148f, 4.2995782f, 0.0461297f, -0.5417359f, 2.4306326f, -7.3530145f, 0.0698273f, -0.9394333f, - -1.3595498f, -7.5141478f, -1.4911395f, 3.2300410f, 0.1203540f, 0.0314884f, -2.0116949f, -0.8167119f, - 2.4133310f, 0.1920709f, 1.0619365f, 0.2459123f, 6.9166069f, -2.6384118f, 3.6829739f, -7.2385545f}, - {0.9408096f, 14.9067144f, 1.7709646f, 0.1105646f, -0.5600107f, -15.3188124f, -12.3718462f, -1.8893757f, - 13.6364670f, -5.7327847f, -14.1805468f, 1.0581509f, -14.2186184f, 14.8948650f, 0.0190344f, 5.4395180f, - 6.7243400f, 9.8468456f, 4.5144215f, -1.4551491f, 1.1032411f, -0.0317988f, 2.3398454f, -3.1671596f, - -7.7541409f, 1.1255593f, 6.7340465f, -4.4448423f, -9.1472626f, -3.1959128f, 4.4181323f, -2.7904994f}, - {-2.1621978f, -4.7202382f, 1.7378219f, 0.1417439f, -0.5000908f, 5.4468708f, 1.4260571f, -6.6136570f, - 1.5713804f, 3.4479704f, 2.7354901f, -0.7388076f, 5.4666147f, -3.8697338f, -0.1368596f, -2.7903373f, - -1.2043713f, -4.9554005f, 0.3324645f, 1.6767365f, 0.1156244f, -0.0326964f, -2.0945346f, -0.4590589f, - 3.0942657f, 0.0015020f, -6.2626700f, -0.3969755f, 0.7717427f, -1.9667094f, 2.9664171f, -11.9477053f}, - }; - ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_2[32] = { - 9.8383608f, 3.6922295f, 3.5774977f, -4.4619012f, 6.5087032f, -0.9540017f, -0.5059246f, 0.0706402f, - 14.3396597f, -0.2771132f, -4.8409863f, -8.3581600f, -3.5078344f, 4.3287506f, -5.7808843f, 3.9264839f, - -2.1697845f, -0.0040514f, -0.2095029f, -6.8678174f, 1.7911285f, -0.4510343f, 1.2410443f, -4.5678806f, - -0.5693849f, 2.3320096f, 4.4606552f, -6.3771009f, -4.3149071f, -0.1905672f, -3.5726390f, -1.0744030f}; - ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_2[32][32] = { - {-0.0155548f, 0.0243339f, 0.0037967f, -0.2771824f, 0.0111955f, -0.0115980f, 0.0079653f, -2.9803498f, - -0.0061037f, -0.0956634f, 0.0332446f, 0.0179244f, -0.0080377f, -9.0180779f, 0.1720033f, 0.0350694f, - -0.0146588f, -0.2135506f, -0.3158041f, 1.3697664f, 0.0119146f, 0.0119120f, -0.0986927f, 0.0297492f, - 0.0355827f, -0.1196868f, -0.0745119f, 0.0281862f, -0.0422190f, -0.3069138f, -0.0477367f, -0.0550450f}, - {-1.7374619f, 1.4822800f, -2.1885235f, 1.8354234f, -0.5380136f, 1.6621803f, 0.6251035f, 0.1008954f, - -0.8387129f, -0.2063313f, 1.0661691f, -0.9799694f, -5.1710258f, -3.2260630f, -1.5073707f, -1.0792168f, - 1.8569958f, -0.2289213f, 0.0563821f, -1.6398847f, -4.1649504f, -2.7527378f, -0.0134577f, 3.0424533f, - 0.0364320f, 0.6762254f, -3.1551330f, 2.4888904f, 1.4757305f, -0.3141717f, -2.0126467f, -0.1675602f}, - {-0.9571826f, 0.0914152f, 0.0404339f, 0.2927902f, 0.2933607f, 0.0619171f, 0.0772318f, -1.3796169f, - -0.8194544f, -0.2179988f, -1.1241078f, -0.1443964f, 0.0559355f, -1.2914546f, -0.3445117f, 0.2031156f, - 0.0273864f, -0.0193422f, -0.2136522f, 0.0429592f, 0.0212854f, 0.0414394f, -1.1734651f, 0.0582848f, - 0.0136039f, -0.1892604f, 0.0764908f, -0.0130132f, -0.1272559f, -0.0818855f, -0.0408583f, -0.1563294f}, - {-0.0213695f, 0.0596942f, -0.0641309f, -0.0146449f, 0.0416586f, -0.0378931f, 0.1234860f, 0.1622967f, - 0.0794091f, -0.0639933f, -0.1030663f, 0.0579078f, 0.1050275f, -0.0136866f, 0.0149978f, 0.0876813f, - 0.0693554f, 0.1612417f, -0.0595916f, -0.1008234f, -0.0579058f, 0.0915138f, 0.1321436f, -0.1484535f, - -0.0920316f, -0.0024532f, -0.1045300f, 0.0924260f, 0.0277524f, -0.0287276f, -0.1271127f, 0.1164243f}, - {0.0713067f, 0.0198056f, -0.3023696f, -0.0025908f, -0.0085885f, -1.1157553f, 0.0236462f, -0.0704844f, - -0.0189257f, -0.0997382f, 0.3379845f, -0.1229390f, -0.0616165f, -0.8968034f, 0.0401445f, -0.1144476f, - -0.0532077f, 0.0604580f, 0.0609454f, -0.1613472f, 0.0103525f, -0.1653874f, 0.0205189f, 0.0758978f, - -0.1514593f, 0.0151441f, 0.2043469f, 0.0349607f, -0.1361278f, -0.1255922f, 0.0631648f, 0.3570991f}, - {0.3371337f, -3.7541580f, 2.2215877f, -0.3390516f, 0.1912718f, -4.1861577f, -1.2264019f, 2.8179801f, - 0.0667294f, -0.0093539f, 2.3029909f, 3.1814916f, 3.9780347f, 0.2310601f, 0.3986159f, -0.8544636f, - 0.4139664f, -0.1876569f, -0.2448732f, -2.8053334f, 4.0488625f, 2.1094146f, -6.7310257f, -4.9950023f, - -0.8315823f, 0.0555959f, 2.4573720f, -3.7234364f, -4.2910552f, -0.2995245f, -3.2605181f, 2.3620574f}, - {-1.5522735f, -0.1866350f, -0.0067679f, 0.3196557f, 1.4052233f, 2.8143549f, -0.9992948f, -0.5309914f, - -25.8852596f, -0.1218249f, 0.6625420f, 0.3007106f, -0.2767264f, -0.1847300f, -0.5313534f, -0.0383462f, - -0.1987552f, 0.0581405f, -0.3376078f, 1.2621028f, 0.0818709f, -0.1401216f, -0.4550788f, -0.1592657f, - 0.0597123f, 0.1344101f, -0.1005317f, -0.1538406f, 2.9142656f, -0.0806051f, -0.4267367f, -31.9512234f}, - {0.6859627f, 0.1212986f, 0.1291616f, 0.0459838f, -0.0899920f, 0.0287645f, 0.1987007f, -2.7079368f, - -0.2628384f, -0.1402464f, -0.6302179f, -0.2923960f, -0.1106663f, 0.8256195f, -2.8054097f, -0.0296494f, - -0.5632019f, -0.1335654f, -0.1558440f, -6.8611612f, 0.0203786f, 0.0046566f, -0.4401442f, -0.0471430f, - 0.4535986f, -0.8657981f, 0.0684740f, 0.0518814f, -0.0123748f, -0.2270164f, 0.0922878f, -0.3863277f}, - {0.0127175f, 2.3346109f, -0.4390767f, -0.4657893f, 0.1659466f, -0.1132782f, -0.4928388f, 0.7652873f, - 1.1510741f, -0.0879600f, 0.2721785f, -0.1878961f, -0.3477249f, -0.8473209f, -0.8931856f, -0.4328294f, - -11.9181929f, -0.0282545f, -0.0217915f, 1.6676594f, -0.2122232f, -0.6190930f, 1.9053432f, -0.7592348f, - -1.0739189f, -0.7170524f, 0.3864411f, -0.8849231f, 0.1393488f, 0.0738489f, 0.4460345f, 1.9020857f}, - {0.4453296f, -0.0767821f, 0.1638939f, 1.6997167f, -0.1098599f, -0.0551604f, 0.0040561f, -13.5290670f, - -0.1285677f, -0.0590394f, 0.6499141f, -0.7617344f, 0.0453151f, 0.3104213f, -1.0711143f, 0.1361838f, - -0.4365610f, -0.1300649f, 0.2013344f, -0.5308123f, 0.1451896f, 0.1030715f, -0.6487910f, -0.3136590f, - -0.0280079f, 0.5394178f, 0.1318262f, -0.0159292f, 0.0636870f, -0.3224248f, -0.1868187f, -0.2468304f}, - {-0.0333494f, -0.0834255f, -0.1221875f, 0.6861304f, 0.0521738f, -0.0416543f, -0.4437352f, -19.3246250f, - -0.1520821f, 0.0528602f, -0.6375434f, -0.5803806f, -0.0958465f, -2.0058544f, -0.8282642f, 0.0259000f, - 0.4846996f, 0.1211179f, 0.0356884f, 1.0009497f, 0.0635682f, -0.0314105f, -0.0011147f, 0.0131714f, - -0.3410152f, 0.2798154f, 0.0961889f, 0.1266228f, -0.0934717f, -0.0904307f, 0.1355542f, 0.5722573f}, - {0.2146454f, 0.2143834f, 0.1290650f, -0.9063646f, 0.2100945f, 0.1331054f, -0.2620614f, -0.1264993f, - 0.1313979f, 0.0455465f, -0.8395286f, -0.4967833f, -0.0538581f, 0.9155380f, 0.6627046f, 0.1691243f, - 0.9887002f, -0.1597013f, -0.1236713f, -1.9041336f, 0.0427585f, 0.0849747f, -5.2559652f, -0.3133100f, - 0.0141170f, -0.1635530f, 0.4938746f, 0.0162943f, 0.2107756f, -0.3413893f, -0.0657575f, 1.0542560f}, - {-2.8868380f, -2.0837426f, -1.0611480f, -0.6143807f, -0.6398501f, -2.8018746f, 0.5166737f, -1.0814301f, - -1.9272422f, -0.1017482f, -0.4651161f, -1.4021232f, 1.8854499f, 0.1815407f, 0.5965426f, -2.3344259f, - -0.0690846f, -0.1678239f, -0.4219488f, 0.6215640f, 1.0270095f, -0.3473049f, -0.3926674f, -0.7942593f, - 1.1305071f, -1.4621233f, -0.8051161f, -0.7698632f, -2.6038630f, -0.3090037f, -1.6365144f, -1.0179478f}, - {0.0046026f, 1.1319581f, -2.6405678f, -2.0353596f, -2.1687336f, 0.3364883f, 2.1122196f, 0.2584647f, - -2.4344857f, -0.0378498f, 0.6158544f, -0.6060749f, -4.9598379f, 0.1570698f, 2.2436838f, -2.6198347f, - -2.0935996f, -0.1845744f, -0.0716080f, -1.9338604f, -4.1995640f, -3.6706774f, -1.6762524f, 3.9646862f, - -0.9677961f, 1.8319578f, -3.1916575f, 3.7312632f, 0.0820446f, -0.0497568f, -0.0898171f, -0.2499462f}, - {-0.0780375f, -0.0286571f, 0.1007227f, 0.0012229f, -0.0531285f, 0.0840718f, 0.1013894f, 0.1312424f, - -0.0673772f, 0.1603183f, 0.0074385f, -0.0718321f, -0.1549873f, 0.1616689f, 0.0405887f, -0.1558588f, - 0.0740745f, 0.1696893f, -0.0064026f, -0.1656420f, -0.1186674f, -0.1262667f, -0.0784757f, -0.1280154f, - 0.0909976f, 0.0853046f, -0.1075811f, 0.1310615f, 0.0610194f, 0.0647223f, 0.1360559f, 0.0440074f}, - {-0.2106480f, 0.0087131f, 0.1119385f, -1.0611318f, 0.5250220f, 0.0525479f, -0.2733742f, -1.0799565f, - -0.5601607f, -0.0651806f, -1.9793440f, -0.3373334f, -0.1550518f, 0.8932216f, 0.7264332f, -0.0450735f, - 1.2373760f, -0.1236272f, 0.0680048f, -3.0446634f, -0.1533586f, -0.0127355f, -0.3326311f, -0.0225603f, - -0.2265739f, -2.3752897f, -0.3771705f, -0.0728938f, 0.1741305f, 0.1111639f, 0.4131119f, 0.2239323f}, - {-2.5691276f, -1.4011253f, -2.0640867f, -3.7236946f, 1.5542637f, -0.9456654f, -1.7575809f, 3.6794879f, - -0.4439790f, -0.1009826f, 3.6702275f, -0.1935008f, -0.4423219f, -0.3825364f, -0.4784791f, 0.5927492f, - -2.3482494f, 0.0801714f, -0.1567418f, -1.7934613f, -0.1706410f, -0.6326947f, 0.6260155f, 0.3631033f, - -0.9325932f, 1.9647995f, -1.3409088f, 1.3501998f, 0.0367797f, -0.1744210f, 1.8690013f, -1.0737898f}, - {-0.5934777f, 0.6232591f, -0.3391055f, 0.2640936f, -0.2824444f, 0.4815128f, 0.6625078f, -0.1103976f, - 0.9555223f, -0.0624896f, -0.6778919f, 0.1181502f, -0.5425385f, 0.7297349f, -1.7261271f, -0.2917557f, - 1.1873137f, -0.2725933f, 0.0975242f, 1.7756181f, -0.5735835f, -0.4453230f, 0.9800369f, 0.9344145f, - -1.8692539f, 0.0120440f, -0.7315661f, 0.6250805f, 0.3839143f, -0.0376306f, 0.3816243f, 0.6059195f}, - {0.5522162f, -1.8043815f, -10.9379101f, 0.5719097f, -0.2246755f, -1.4856353f, 0.4877502f, 0.7163438f, - -11.8135147f, -0.0180790f, -0.9928634f, 0.1107815f, -0.0005064f, -0.3824990f, -0.7453306f, -1.9909632f, - -7.4362645f, -0.0245507f, -0.1815712f, -3.5507584f, -0.0075889f, -11.0296011f, -1.1292133f, -0.0710276f, - 0.5675677f, 0.2017778f, -0.0684891f, -0.0367653f, -1.6674192f, 0.0281711f, -0.8356591f, -0.0447807f}, - {0.2537312f, -3.0178010f, -0.3493635f, 1.8573236f, 0.4017631f, 0.9912633f, -0.8625028f, -0.7783228f, - -1.7815375f, -0.1204695f, 1.8551122f, 0.3344182f, -0.2828701f, -1.3226960f, -1.4470471f, 0.2895959f, - 0.6780876f, -0.2010069f, 0.0425280f, -2.1786852f, -0.1274053f, -0.2549899f, -0.2233993f, -0.1561645f, - -0.4640818f, 0.6375850f, 0.7733670f, -0.2388286f, 1.0447853f, -0.1503223f, 0.3823584f, -13.8176088f}, - {0.2575197f, -2.2127593f, -0.0389457f, -0.0215759f, 0.1659477f, -0.0097748f, -0.1935415f, -0.9091369f, - -0.1453371f, 0.0442428f, -0.1206519f, 0.1435609f, -0.0186047f, -5.0154042f, 0.0538177f, 0.0403250f, - 0.0240955f, 0.0331080f, 0.0517951f, 0.7422639f, 0.0069818f, 0.0248351f, -0.2205741f, -0.0082387f, - 0.2043269f, 0.0459435f, 0.0876343f, 0.0140607f, 0.1056308f, 0.0062555f, 0.0184278f, -0.5539715f}, - {-0.0398742f, 0.1075264f, 0.1725024f, -0.0755192f, -0.0360048f, 0.1325573f, 0.0903103f, -0.0882263f, - 0.1207692f, 0.0032722f, 0.0048489f, -0.1257241f, 0.1450990f, -0.0713558f, 0.1116815f, 0.1107689f, - -0.1447252f, 0.1581838f, -0.0160124f, -0.0425587f, 0.1411217f, 0.0865060f, -0.0643460f, -0.0431262f, - -0.1452804f, -0.0195101f, 0.1234572f, 0.0520887f, 0.1117576f, -0.0751791f, 0.1511539f, 0.1224861f}, - {0.7728126f, 2.3075340f, -0.0385258f, -3.1270287f, 0.9414487f, 3.5251477f, -0.8043440f, 0.7212446f, - -7.6850162f, -0.1609414f, -3.7687578f, -1.0751100f, -0.2052089f, 5.0728245f, 2.2835267f, 0.5930225f, - 0.1303335f, -0.1428799f, -0.3715075f, 0.5136011f, -0.4755619f, -0.2192461f, -3.8696294f, -0.0062392f, - -1.3774812f, -0.0034140f, -1.5944362f, 0.9773729f, 3.2859125f, -0.1616932f, -1.2785367f, -13.5732412f}, - {0.5535743f, 0.1461481f, -0.2218016f, -0.2971808f, -0.2169309f, 0.1564545f, -0.0390397f, 1.1558976f, - -0.0119933f, -0.0774637f, 1.1907971f, -0.5127968f, -0.0066028f, -1.6794037f, -0.3650940f, 0.2555613f, - -0.9488379f, 0.0449603f, -0.1620417f, 0.1583214f, 0.0000908f, 0.0152763f, -1.0660053f, -0.0139402f, - -1.7440189f, 0.2515209f, 0.3333162f, 0.1904725f, 0.1116094f, -0.2287960f, -0.0007165f, -1.7047704f}, - {-5.9897852f, -0.1316296f, -0.0218074f, -0.4602887f, 0.3288545f, -0.0882939f, -0.5929499f, 0.4294790f, - -0.0383545f, 0.0556869f, 0.1975944f, 0.1341491f, 0.0629570f, -2.2742157f, 0.0175826f, -0.1439869f, - -24.8701649f, -0.1582915f, -0.2460304f, -3.9643264f, 0.0863483f, 0.0180861f, -0.2210452f, -0.0868723f, - -0.4175525f, -0.8231756f, 0.0247534f, -0.1473545f, -0.0021330f, -0.0410253f, -1.1944869f, -1.1523768f}, - {0.1031547f, -3.3402514f, -4.3636522f, -0.1534714f, -0.0622189f, 0.0374694f, -0.0870097f, -4.1865788f, - -0.0555377f, 0.0252329f, 0.1339467f, 0.0461691f, -0.0503090f, 0.0289890f, -0.0095674f, -0.3289992f, - -0.0279080f, 0.0274977f, -0.0903500f, 0.5610157f, -0.0478177f, 0.4346960f, 0.4822784f, -0.1058945f, - -0.2026870f, -0.0560638f, 0.0910069f, -0.0818529f, 0.0819198f, -0.0292193f, 0.3040628f, -0.1275230f}, - {-5.8789845f, -17.1114635f, -4.6755161f, 0.1016624f, -0.8685016f, -0.3898779f, -2.3363957f, 0.1413794f, - -2.4254086f, -0.2171030f, -0.0901150f, 0.7058705f, 0.4166250f, -0.0231085f, -0.1789686f, -9.4244318f, - -0.6418229f, -0.0857969f, 0.1683681f, -0.0310597f, -0.0247807f, -5.3748040f, -7.4730940f, 0.1019564f, - -1.2126822f, -0.3726285f, -1.0287101f, 0.1803891f, -0.2227769f, -0.0791530f, -0.0159770f, -1.4883354f}, - {-17.9394970f, -0.5228514f, -11.3547935f, -0.0672671f, -2.0371394f, -0.9076943f, 2.4331825f, -6.9409127f, - 0.8286008f, 0.0208618f, -0.8009814f, 1.2268484f, 0.1943726f, -1.7297083f, -0.7668949f, -6.5505466f, - -0.6495168f, -0.0404727f, -0.1260914f, -3.5029383f, -0.0852898f, -2.9679556f, 1.6404767f, -0.0251449f, - 1.1460075f, -0.7877688f, -0.0586593f, -0.4741839f, -1.7420560f, 0.0295600f, -2.3574052f, 0.0974777f}, - {0.4443443f, 0.6384261f, 1.3317494f, -1.0085982f, 0.9508762f, 1.3168396f, -0.1862490f, -0.1801148f, - 1.1106120f, -0.0654911f, 0.1186706f, -0.7198273f, 0.5449172f, -0.5886080f, 0.7504217f, 1.8046317f, - -0.1294390f, -0.1939137f, -0.2383934f, 0.4131435f, 0.6910310f, 1.2821866f, -0.1088722f, -0.5660405f, - -0.1188610f, 0.0364403f, 0.3597929f, -0.6409024f, 1.2114668f, -0.0212278f, 0.8423592f, 0.4848156f}, - {-0.8772649f, -13.5265112f, -4.5540547f, -0.2856667f, 0.7604876f, -0.6829260f, -0.8320626f, 0.6541347f, - 0.4020181f, 0.0009324f, -10.9660740f, -0.3540186f, -0.2316812f, 0.3576394f, 0.0998953f, -1.5738430f, - 1.2089975f, 0.0706465f, -0.2538019f, 0.7016497f, -0.0282650f, -3.1291001f, -0.4375663f, -0.3979468f, - -0.1588882f, 0.3978875f, 0.2038192f, -0.4281644f, -0.5787544f, -0.0922198f, 0.9595569f, 0.0212818f}, - {0.3392667f, 0.1170919f, -0.0705636f, -0.1025443f, -0.1192213f, -0.0495686f, 0.0284667f, -0.1226804f, - 0.0050191f, -0.0516545f, -1.0892097f, 0.0033689f, 0.0471462f, 1.4266804f, 0.0288870f, -0.0110408f, - -1.1283765f, -0.1299917f, -0.4318301f, -0.9854419f, -0.0190479f, -0.0269406f, 0.3697925f, -0.0757695f, - -0.3632923f, -0.1714077f, 0.0669245f, 0.0557428f, -0.1713906f, -0.4307863f, -0.1749060f, -2.1246362f}, - {0.8383662f, -3.8122442f, 0.1568939f, -2.2105119f, -0.7086993f, -0.4664145f, -0.3578597f, 0.5554636f, - 0.6965880f, -0.1506968f, 0.2646832f, 0.2874083f, 0.1901203f, -2.4997077f, -0.3519035f, -0.0518054f, - 1.0862818f, -0.2502540f, -0.3133347f, -0.7411230f, 0.1268138f, 0.1069811f, -0.8109779f, 0.0264679f, - 0.1604289f, -0.7534032f, -0.1419461f, 0.0688303f, -0.1570919f, -0.3055144f, -0.7415189f, 2.5547018f}, - }; - ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_4[1] = {1.4616280f}; - ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_4[32][1] = { - {0.0609813f}, {0.0685224f}, {0.1655236f}, {-0.0599842f}, {0.0669006f}, {-0.1817371f}, {-0.0539167f}, - {-0.0737955f}, {0.0654664f}, {0.0302955f}, {-0.0586768f}, {0.0717433f}, {0.1472274f}, {-0.0610073f}, - {-0.0601061f}, {0.2086218f}, {-0.0545418f}, {-0.0388369f}, {-0.0613536f}, {-0.1141072f}, {-0.2289097f}, - {-0.3354485f}, {0.0831025f}, {0.1333673f}, {0.0490410f}, {0.0484894f}, {0.0436755f}, {-0.1479877f}, - {0.1540713f}, {0.0021261f}, {-0.0845848f}, {-0.0564973f}, - }; -} // namespace T5DNN +namespace lst { + + namespace t5dnn { + + ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_0[32] = { + -4.5069356f, -5.8842053f, 1.0793180f, -0.1540973f, -0.4705772f, 6.4027028f, -0.6620818f, -7.0734525f, + 0.6211641f, 4.9630723f, 3.4310920f, -0.8856288f, 4.5843782f, -6.0180559f, 0.0126438f, -1.5725276f, + -0.8549317f, -6.8545237f, -1.2129461f, 3.0617838f, -0.3911322f, 0.0799793f, -2.5398655f, -0.5780622f, + 2.8533990f, -0.1777968f, -2.6457164f, -0.7976936f, 4.5644889f, -2.1747942f, 3.4286616f, -10.1073380f}; + ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_0[38][32] = { + {6.1269712f, -10.6625051f, 17.4907818f, -0.0019928f, -3.4468415f, 1.6674044f, -7.8957767f, 2.2077549f, + 9.5517254f, -5.1345053f, -30.1643391f, 4.0148559f, -19.8330841f, -18.3806915f, 0.1334764f, 1.6213616f, + -4.1423774f, -15.3062429f, -1.0209556f, 1.5580219f, 0.7426265f, 0.0033929f, 1.3924170f, 0.9196110f, + -0.8995734f, 1.0594707f, 39.4390869f, 8.7642002f, 28.4583893f, -5.9235659f, 3.7221889f, 14.4167147f}, + {1.7863803f, -0.6068707f, 0.3166098f, -0.0608759f, 0.5939785f, 0.4870262f, -3.1375074f, -17.7147388f, + -0.7231818f, -9.3808413f, 2.2070611f, 15.7461920f, 0.9355862f, 2.3942475f, -0.0671409f, 3.5954301f, + -3.0463996f, -2.0748904f, -0.5450584f, -4.4800100f, 0.6074556f, -0.0161482f, 3.0624702f, -4.5688419f, + 2.9881518f, -0.3714012f, -0.0387531f, -0.7699140f, 4.4028845f, 5.0333014f, -4.7350726f, -8.6568584f}, + {5.6548429f, -0.0207700f, 0.1785973f, 0.0881671f, 0.2530097f, -0.1893259f, -0.1105739f, -0.5183877f, + 1.0728362f, 0.1833011f, 1.7765219f, 0.3127359f, 0.0455277f, -0.1442616f, -0.1048361f, -0.1235604f, + -0.1217661f, -0.5487315f, 0.7575656f, -0.1177454f, -17.0993137f, 0.1628031f, 0.2789381f, 0.5304270f, + 0.0837841f, -3.1120780f, 0.0074821f, -0.1648044f, -0.3395336f, 0.3958135f, 0.8718957f, -1.1980486f}, + {0.2401041f, -0.0585765f, -0.0144584f, 0.0411095f, 0.0752229f, 0.0292672f, -0.2437613f, -1.4396472f, + -0.0971315f, -1.7181139f, 0.2417643f, 2.2030578f, 0.0566049f, 0.1081589f, -0.1060181f, 0.3473758f, + -0.7095683f, -0.0345675f, 0.2794849f, -1.1702278f, 0.2622930f, -0.0072611f, 0.5026371f, -1.2882922f, + -0.4712771f, 0.0597130f, -0.0039970f, -0.6050836f, 0.1554724f, 1.0991164f, -0.4975886f, 0.2597970f}, + {0.0766028f, 0.0218421f, -0.1739017f, -0.0076569f, 0.0384461f, -0.1841756f, 0.9677940f, -3.1114254f, + 2.3830564f, 2.0706992f, -0.9643140f, 0.7361387f, -0.0060253f, -0.1554846f, -0.0831100f, 2.8754771f, + -1.4403527f, -0.5281797f, 0.5157787f, 4.2405987f, 0.4807618f, 0.0217647f, -1.2626950f, 0.9145837f, + -0.3931780f, 0.3426280f, -0.0065206f, -0.7510439f, -0.4555758f, 2.7724340f, -1.2173026f, 0.1039017f}, + {0.5685715f, 0.3927337f, 0.4942532f, -0.0671033f, -0.2808350f, -0.0336000f, -1.3983957f, 0.9876546f, + -2.3840380f, 0.7315395f, -2.2009561f, -1.4631602f, -0.4672308f, -0.4994236f, 0.1169335f, -1.1894208f, + -1.2692982f, 0.3303853f, -2.0147655f, -0.9912014f, 1.0042895f, 0.1121151f, -1.0789106f, -2.2821584f, + -6.6459913f, -0.0959398f, -0.0068429f, -2.8177626f, 0.3213172f, -2.6832986f, -4.7613306f, -0.9985733f}, + {1.4419515f, -0.3864825f, -0.6756768f, -0.1273375f, 0.4321181f, 0.3354745f, -0.8236564f, -2.8190827f, + 0.7090831f, 1.9072700f, -3.1834064f, -2.6938572f, 0.5051147f, 1.4382831f, 0.1241910f, -0.7352629f, + 0.7703634f, -1.7556250f, -2.1104112f, 3.0603442f, 1.9873468f, -0.0358815f, -1.0087154f, 3.8253262f, + -0.5466214f, 0.0875162f, 0.2691758f, 0.7121435f, 1.9314718f, -0.1580560f, 3.6484149f, -5.3173709f}, + {6.9104381f, -0.0033664f, -1.4405546f, -0.1768288f, 0.2028089f, -0.1012344f, -4.4735684f, 0.6354278f, + 4.3039737f, 0.2056303f, 1.8338999f, -1.1351355f, 0.1015760f, -0.0733253f, -0.0561627f, 2.5292397f, + 1.6314448f, -0.9333628f, -0.7773662f, 0.8313186f, -0.7829623f, 0.1265118f, 0.5922315f, -0.3463379f, + -1.3269740f, -3.3302619f, -0.0061799f, 2.3374722f, 0.0880938f, 0.7470241f, -0.4205743f, -4.7557602f}, + {0.0380794f, 0.0947470f, 0.0419397f, 0.0582226f, -0.0603404f, 0.0234028f, -0.2575402f, 0.4125248f, + 0.3035339f, 0.2663808f, -0.6092452f, -1.4727812f, 0.0247187f, -0.0539688f, -0.0150413f, 0.2094955f, + 0.5379737f, -0.3255228f, -0.5639279f, 0.0786276f, 0.6703192f, 0.1557026f, -0.2753083f, 1.1463971f, + -0.9372965f, 0.5657740f, 0.0041413f, 0.0870248f, 0.0101520f, -0.8214461f, 0.1212932f, 1.5648646f}, + {-0.0969819f, 0.0137566f, 1.3515147f, -0.0155047f, -0.1416170f, -0.1636726f, 0.5184190f, 0.4732984f, + 0.6815788f, -1.0522166f, -0.4486531f, -0.0516016f, 0.0201894f, -0.0849667f, -0.0861271f, -1.2027841f, + 1.2458711f, -0.7061657f, 1.0381308f, -0.3450044f, -0.1300479f, -0.0828402f, 0.6859242f, -1.0575374f, + 0.6947553f, -0.0922188f, 0.0199132f, 0.8038982f, -0.1734094f, -0.1057449f, 1.6305015f, -0.0688597f}, + {-1.8151448f, 0.1024327f, 1.7063105f, 0.1130912f, -0.1081472f, -0.2904744f, -1.3465070f, -1.0455177f, + -0.4581082f, -3.2220871f, 0.5221398f, -5.1637673f, 0.0811146f, -0.1326323f, -0.0379338f, -3.0439703f, + -2.4246936f, -0.3670847f, -3.1256330f, -1.6595014f, -3.4715190f, -0.1526113f, -1.0420206f, 0.9536474f, + -3.2932863f, 1.6048199f, 0.0025162f, -3.6049840f, 0.0604250f, -2.2404826f, 1.8406851f, -3.1381185f}, + {1.2985691f, -1.1044264f, 0.9062797f, -0.0788333f, 0.2694912f, 0.0032800f, -0.0574267f, 0.9734111f, + 1.1532565f, 2.6786125f, -3.8574269f, -2.2871449f, -0.1261243f, 1.0545347f, -0.1454154f, -0.5609738f, + 1.8385800f, -0.8035598f, -1.7668265f, 5.1665063f, 0.7966110f, 0.0940206f, -2.3943975f, 2.3344002f, + 1.0342182f, 0.4806454f, -0.3880928f, 0.6998246f, 1.4011886f, -1.7313483f, 4.9702630f, -6.0058608f}, + {1.0300356f, 0.0616315f, -0.1113776f, -0.1694220f, 0.7159944f, 0.0626456f, 2.0994680f, 0.3452290f, + -3.0487001f, 0.0654031f, -1.1510723f, 0.5370992f, -0.0290704f, -0.0300795f, 0.0751569f, -0.2345951f, + -0.3472281f, 0.4424143f, 1.2444530f, -0.2114656f, 0.7865694f, -0.0709381f, -0.1839961f, -0.0529834f, + 0.5867608f, -3.8793530f, -0.0814745f, -0.6368676f, 0.0361213f, -0.5549288f, 0.5661780f, 1.8374584f}, + {0.3345098f, 0.0068199f, -0.4205509f, -0.1088801f, -0.1043202f, -0.0040804f, 0.3400922f, 0.2673528f, + -0.6050695f, 0.4443954f, -0.4319905f, -0.6044132f, -0.0260679f, 0.0137036f, 0.0765494f, -0.0095099f, + 0.5880439f, -0.0083854f, -0.2407522f, 0.1942379f, 0.6554548f, -0.1322891f, -0.8298992f, 0.7909554f, + 1.0528831f, 0.1970959f, 0.0754069f, -0.0947960f, -0.0279494f, -0.5888316f, 0.8919419f, 0.4828835f}, + {0.3995822f, -0.2139665f, 0.3982936f, -0.1285759f, -0.3445527f, -0.1167238f, -0.1263519f, 0.8393803f, + -0.7758383f, 0.0719291f, -0.0134762f, 0.1715237f, 0.0796666f, 0.1023507f, -0.1172728f, -1.2364722f, + 1.2592632f, -0.3168479f, 0.7487004f, -1.5170647f, -0.2235429f, -0.1620898f, 1.4064828f, -1.0821995f, + 0.0740103f, -1.0412805f, -0.0621277f, 0.2439800f, 0.2684972f, -1.1661061f, 0.7859434f, -0.6170313f}, + {2.1615884f, 0.1431713f, 0.0642652f, -0.0522325f, -0.2658786f, -0.0245810f, -1.6857448f, -0.6685011f, + -0.6978170f, -0.8716729f, 0.3129902f, -2.5870812f, -0.2855283f, -0.3205920f, -0.0084069f, 1.3182145f, + -0.6923816f, -0.3730274f, -2.3638811f, -1.1128502f, -2.4709859f, 0.1349022f, -0.3574466f, -0.6597407f, + -4.1122031f, 0.2240651f, 0.1806145f, -1.6836300f, -0.0766231f, -3.2611966f, 0.0091456f, -0.0997367f}, + {5.2476101f, -0.1966512f, 4.8935304f, -0.1551689f, 1.6919724f, -0.8324367f, 14.3318472f, -0.3503132f, + 10.3614969f, -9.1522884f, -0.2543063f, -1.8476851f, 16.7961140f, 9.9541416f, -0.0434563f, -9.6973553f, + -5.0469398f, 6.1688442f, 7.6429725f, -7.3149266f, 1.2345183f, 0.1412155f, 0.7114770f, -1.6378664f, + 5.1548996f, 0.3686100f, -45.3027611f, 3.0492647f, -37.3445892f, 2.7421410f, -2.7958770f, -25.2034016f}, + {1.4597454f, -1.0561740f, 0.9751291f, 0.0446527f, 0.3691662f, 0.1006782f, 0.1418435f, 0.8871480f, + 1.1603093f, 2.8034730f, -4.0856910f, -1.9786842f, -0.2206208f, 0.9539357f, 0.0868183f, -0.6811873f, + 1.9642411f, -0.8065316f, -2.0244894f, 5.2936082f, 0.6120632f, -0.1194160f, -2.3925939f, 2.5555069f, + 1.0149733f, 0.4607603f, -0.2197217f, 0.5703423f, 1.4049014f, -1.5900208f, 5.1645074f, -6.0569463f}, + {0.9000676f, -0.0028781f, -0.1967366f, 0.1039593f, 0.7993248f, 0.0655172f, 2.2296758f, 0.4391927f, + -3.0292840f, 0.0334536f, -1.1728534f, 0.3479103f, -0.1190938f, 0.0410203f, 0.1146637f, -0.2958017f, + -0.3240463f, 0.4361866f, 1.0564958f, -0.1989332f, 0.5194008f, -0.0628912f, -0.1733121f, -0.1255383f, + 0.5990249f, -3.7692382f, 0.0995128f, -0.7101220f, -0.0785123f, -0.3514554f, 0.6662078f, 2.0991604f}, + {0.1781942f, -0.1873588f, -0.4653996f, -0.0153059f, -0.1399561f, -0.0498718f, 0.4552556f, 0.2300792f, + -0.7682312f, 0.4342302f, -0.3787803f, -0.6089386f, -0.1049337f, 0.0395331f, 0.0220332f, 0.0114750f, + 0.4672548f, 0.1284784f, -0.2472819f, 0.2892784f, 0.4788667f, 0.0472555f, -0.6593549f, 0.6508777f, + 0.9286987f, 0.3043948f, -0.0635985f, 0.0814399f, -0.1168853f, -0.6688027f, 0.8876534f, 0.4865684f}, + {0.4024099f, 0.0480259f, 0.4588822f, -0.1793082f, -0.2151573f, -0.1871128f, -0.1502780f, 1.1011307f, + -0.9467706f, 0.2632496f, -0.1257263f, -0.0241331f, 0.2280627f, 0.0878608f, -0.1334262f, -1.1642927f, + 1.0943586f, -0.4799654f, 0.5981907f, -1.5051398f, -0.4235946f, 0.0012827f, 1.2342577f, -0.8281875f, + 0.2776567f, -1.0362227f, 0.0408372f, 0.1540821f, 0.1777556f, -1.2684357f, 0.8836584f, -0.4001710f}, + {2.1558056f, 0.2082023f, 0.0863442f, 0.0364868f, -0.3985825f, 0.0307202f, -1.8889453f, -0.5614714f, + -0.7311882f, -0.8075573f, 0.4895108f, -2.7770483f, -0.3121874f, -0.1671291f, -0.1281284f, 1.3212786f, + -0.5310181f, -0.1974759f, -2.6240873f, -0.8320529f, -2.3875966f, -0.0286360f, -0.6263188f, -0.6553424f, + -4.1658955f, -0.0601300f, 0.0946256f, -1.6795633f, -0.1251303f, -3.0974686f, 0.2412274f, -0.0687501f}, + {2.0523887f, -0.6387668f, 2.0633900f, -0.0550964f, 0.5181718f, -0.4202190f, 1.8569367f, 0.8295385f, + 0.8555872f, 2.4727983f, -0.2072828f, -1.9006120f, 0.5379534f, 0.4463673f, 0.1468820f, 0.4918649f, + -3.4016700f, 0.2884440f, -1.9418719f, 4.5157170f, -0.5160927f, -0.0199372f, 3.1353824f, -0.9863126f, + -1.5135859f, 0.7576568f, 0.6715558f, 2.7409093f, 0.9291748f, -0.3247162f, 1.8204515f, -8.9181070f}, + {-0.1428107f, -0.0829889f, 0.4213613f, 0.0225415f, 1.2238166f, 0.0477106f, 0.3031853f, -0.7466553f, + 2.0663500f, 0.7588379f, 0.3689216f, -0.2003786f, 0.1242338f, 0.1693589f, -0.0351716f, -0.0186597f, + -0.0189417f, 0.5468715f, -0.2862698f, -0.1311738f, 3.0747476f, -0.0310747f, 0.0943165f, 0.3139819f, + 0.6274695f, -1.8314874f, 0.0147495f, 0.3554756f, 0.3829916f, 0.4891713f, 0.1328600f, 1.0535098f}, + {0.0534900f, 0.1787969f, -0.0571320f, -0.0685673f, 0.1968977f, 0.0374476f, 0.7876674f, 0.0828491f, + 0.6444036f, -0.2203166f, -0.2383427f, 0.5397566f, 0.0106769f, -0.1230072f, -0.0135021f, -0.5691944f, + -1.5040319f, 0.0406933f, -0.0025478f, 0.9251419f, -1.7180276f, -0.1112956f, 1.4840862f, 0.0407115f, + -0.0100329f, 0.0583593f, -0.0110524f, 0.7431355f, -0.0971857f, -0.5501527f, -0.6371027f, -0.1935233f}, + {-0.6455778f, 0.2317368f, 0.9285696f, -0.1415854f, 0.0822560f, 0.2488030f, -2.6992166f, 0.0884904f, + 0.6735302f, -0.1467820f, 0.5641044f, 0.6436581f, 0.0818401f, -0.0336634f, -0.0729000f, -0.1206900f, + -2.5739892f, 0.5776953f, 0.9531668f, -1.2362405f, -0.0615577f, -0.0143544f, -2.7525210f, 1.3738545f, + 0.2751348f, -1.7463943f, -0.0020144f, 2.4814103f, 0.1716725f, -0.7055540f, -0.3474010f, 0.4482578f}, + {-0.2526205f, -0.7463821f, -3.6076138f, -0.1511098f, 0.1216256f, 0.0888247f, -1.0190924f, -1.3260181f, + -0.0443211f, -4.8911066f, -3.4385188f, -6.0057454f, 0.3340450f, 0.2997236f, -0.0907855f, 0.7500492f, + -0.4007562f, 1.9382039f, 0.5687234f, 2.6511824f, 4.7703862f, 0.0006749f, -0.0201394f, -3.5885489f, + -4.1518898f, 0.0807014f, -0.0584071f, -0.8100027f, 0.7697087f, -0.8038046f, -1.2945876f, -4.0110312f}, + {0.4337017f, -1.1532011f, 2.0740633f, 0.0271806f, 0.6654227f, 0.1012998f, -4.0791736f, 1.2631345f, + 1.9511020f, 2.3272331f, 1.2707534f, 1.6306664f, 0.4936035f, 0.8285242f, 0.0807625f, 3.8652387f, + 0.0281145f, 1.6877037f, 1.2557380f, -0.3036775f, 0.5604967f, 0.1551418f, -0.9599600f, -6.3067718f, + -0.6352320f, 0.8058553f, 0.3657880f, -2.0491202f, -0.3926269f, 2.5650854f, 1.3697821f, -8.3070078f}, + {5.1334143f, -0.0351738f, -0.4774780f, -0.0679726f, 1.4569254f, 0.0580191f, -0.3649136f, -0.2298838f, + -3.3826666f, -0.7392708f, -0.6036060f, -0.2612940f, -0.1877640f, -0.1145124f, -0.0042578f, -0.0311193f, + -0.0320479f, 0.5270581f, -0.4324475f, 0.2681437f, 4.7813129f, -0.0222701f, -0.0525629f, -0.2861001f, + -0.1251072f, 3.9112861f, 0.0045046f, -0.0426071f, -0.3299106f, -0.0686970f, -0.1602017f, -0.0070103f}, + {-0.6633690f, 0.0103367f, 0.5998458f, 0.1256577f, -0.0359184f, -0.0176820f, -0.6458368f, -0.0370536f, + 0.3542259f, 0.1394724f, 0.8255956f, 0.2501569f, 0.0320156f, -0.0256806f, 0.0277949f, 0.0036392f, + 0.2825173f, 0.1400358f, 1.0011463f, -0.6792242f, 0.0672508f, 0.0728705f, -0.1089695f, -1.0414587f, + -0.4135485f, 0.4293025f, -0.0041241f, -0.9564193f, 0.0314900f, 0.8658463f, -0.7734696f, -0.7610567f}, + {-0.0200122f, -0.0749178f, -1.5026549f, -0.0387432f, -0.0713735f, 0.1214790f, 1.8730290f, -0.0552839f, + -1.6867150f, 0.2282097f, 0.7161849f, -0.1018546f, -0.1092003f, 0.0365504f, -0.1326883f, 1.2310545f, + 0.1800210f, 0.7024739f, -2.9606545f, 1.2275347f, -0.2050014f, 0.0940569f, 0.4761694f, 0.8812068f, + -0.0083424f, -1.5406264f, 0.0061815f, -2.7606382f, 0.0248556f, 1.1086880f, -1.3608936f, 1.0795454f}, + {0.9734020f, 0.3905411f, -3.7008634f, 0.0013557f, 0.1649124f, 0.9935362f, 1.3489184f, 0.9505764f, + 0.7966231f, -0.1627246f, -2.5754328f, 1.4892205f, 0.8586300f, 0.6974363f, 0.1320204f, -0.7840260f, + 0.3121157f, 0.0966901f, 2.7447381f, 1.8256680f, 0.7229405f, -0.1723188f, 0.9145948f, -2.1376033f, + 0.5259342f, 0.0731194f, -0.2908303f, -0.2603913f, -0.2326528f, 3.6684167f, -0.2883157f, -2.8546307f}, + {-4.8917460f, 6.7944999f, -0.2255474f, 0.1051999f, 3.9000113f, 2.0624907f, 5.3019547f, 10.0209141f, + 1.1268179f, 2.2669628f, -6.5002980f, 1.8408583f, 5.3039579f, 2.2055962f, 0.1055369f, 1.7230233f, + 6.9605255f, 7.7025104f, 2.9880707f, -0.9274251f, -0.2287160f, -0.0206735f, 0.6885675f, 2.8179996f, + -7.1129837f, -1.3772345f, 3.8655453f, -5.9388318f, -0.0469947f, 7.2763596f, -6.3536129f, -17.0069847f}, + {1.8787041f, -0.9953383f, -1.4839923f, 0.1308209f, 0.3657510f, 0.3106483f, -1.4158971f, -6.7449651f, + 0.6553892f, -4.5046172f, -3.5489719f, 3.5363002f, 0.5454772f, 2.3521471f, 0.1612140f, -0.9744226f, + 0.6546553f, -2.7179255f, -1.7758157f, 0.3089439f, 1.7462813f, 0.1654593f, -0.2440207f, 3.9501827f, + 1.3750844f, 0.0596805f, -0.1977254f, 0.0264880f, 2.6396444f, 1.0816911f, 3.6413448f, -6.0299959f}, + {-4.1295738f, 0.1044480f, 0.2131937f, 0.0420826f, 0.5292229f, 0.0090477f, -0.0973486f, 0.9596778f, + 2.9579651f, -0.6364226f, -1.7556342f, 0.1539868f, -0.1273174f, -0.1348504f, 0.1257833f, -1.4168571f, + -1.0960362f, 0.0482449f, -1.4395387f, -0.2524115f, -2.9162085f, -0.0451428f, -0.4021681f, -0.5756381f, + 0.0515293f, -3.1996479f, -0.0007676f, -1.3878343f, -0.2864279f, -0.9579773f, -1.0999249f, 1.6500067f}, + {-2.4806111f, -6.8115449f, 3.2805641f, 0.1187415f, -0.9950783f, 6.2553434f, -1.6450261f, -6.1463733f, + 2.7507148f, 4.2995782f, 0.0461297f, -0.5417359f, 2.4306326f, -7.3530145f, 0.0698273f, -0.9394333f, + -1.3595498f, -7.5141478f, -1.4911395f, 3.2300410f, 0.1203540f, 0.0314884f, -2.0116949f, -0.8167119f, + 2.4133310f, 0.1920709f, 1.0619365f, 0.2459123f, 6.9166069f, -2.6384118f, 3.6829739f, -7.2385545f}, + {0.9408096f, 14.9067144f, 1.7709646f, 0.1105646f, -0.5600107f, -15.3188124f, -12.3718462f, -1.8893757f, + 13.6364670f, -5.7327847f, -14.1805468f, 1.0581509f, -14.2186184f, 14.8948650f, 0.0190344f, 5.4395180f, + 6.7243400f, 9.8468456f, 4.5144215f, -1.4551491f, 1.1032411f, -0.0317988f, 2.3398454f, -3.1671596f, + -7.7541409f, 1.1255593f, 6.7340465f, -4.4448423f, -9.1472626f, -3.1959128f, 4.4181323f, -2.7904994f}, + {-2.1621978f, -4.7202382f, 1.7378219f, 0.1417439f, -0.5000908f, 5.4468708f, 1.4260571f, -6.6136570f, + 1.5713804f, 3.4479704f, 2.7354901f, -0.7388076f, 5.4666147f, -3.8697338f, -0.1368596f, -2.7903373f, + -1.2043713f, -4.9554005f, 0.3324645f, 1.6767365f, 0.1156244f, -0.0326964f, -2.0945346f, -0.4590589f, + 3.0942657f, 0.0015020f, -6.2626700f, -0.3969755f, 0.7717427f, -1.9667094f, 2.9664171f, -11.9477053f}, + }; + ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_2[32] = { + 9.8383608f, 3.6922295f, 3.5774977f, -4.4619012f, 6.5087032f, -0.9540017f, -0.5059246f, 0.0706402f, + 14.3396597f, -0.2771132f, -4.8409863f, -8.3581600f, -3.5078344f, 4.3287506f, -5.7808843f, 3.9264839f, + -2.1697845f, -0.0040514f, -0.2095029f, -6.8678174f, 1.7911285f, -0.4510343f, 1.2410443f, -4.5678806f, + -0.5693849f, 2.3320096f, 4.4606552f, -6.3771009f, -4.3149071f, -0.1905672f, -3.5726390f, -1.0744030f}; + ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_2[32][32] = { + {-0.0155548f, 0.0243339f, 0.0037967f, -0.2771824f, 0.0111955f, -0.0115980f, 0.0079653f, -2.9803498f, + -0.0061037f, -0.0956634f, 0.0332446f, 0.0179244f, -0.0080377f, -9.0180779f, 0.1720033f, 0.0350694f, + -0.0146588f, -0.2135506f, -0.3158041f, 1.3697664f, 0.0119146f, 0.0119120f, -0.0986927f, 0.0297492f, + 0.0355827f, -0.1196868f, -0.0745119f, 0.0281862f, -0.0422190f, -0.3069138f, -0.0477367f, -0.0550450f}, + {-1.7374619f, 1.4822800f, -2.1885235f, 1.8354234f, -0.5380136f, 1.6621803f, 0.6251035f, 0.1008954f, + -0.8387129f, -0.2063313f, 1.0661691f, -0.9799694f, -5.1710258f, -3.2260630f, -1.5073707f, -1.0792168f, + 1.8569958f, -0.2289213f, 0.0563821f, -1.6398847f, -4.1649504f, -2.7527378f, -0.0134577f, 3.0424533f, + 0.0364320f, 0.6762254f, -3.1551330f, 2.4888904f, 1.4757305f, -0.3141717f, -2.0126467f, -0.1675602f}, + {-0.9571826f, 0.0914152f, 0.0404339f, 0.2927902f, 0.2933607f, 0.0619171f, 0.0772318f, -1.3796169f, + -0.8194544f, -0.2179988f, -1.1241078f, -0.1443964f, 0.0559355f, -1.2914546f, -0.3445117f, 0.2031156f, + 0.0273864f, -0.0193422f, -0.2136522f, 0.0429592f, 0.0212854f, 0.0414394f, -1.1734651f, 0.0582848f, + 0.0136039f, -0.1892604f, 0.0764908f, -0.0130132f, -0.1272559f, -0.0818855f, -0.0408583f, -0.1563294f}, + {-0.0213695f, 0.0596942f, -0.0641309f, -0.0146449f, 0.0416586f, -0.0378931f, 0.1234860f, 0.1622967f, + 0.0794091f, -0.0639933f, -0.1030663f, 0.0579078f, 0.1050275f, -0.0136866f, 0.0149978f, 0.0876813f, + 0.0693554f, 0.1612417f, -0.0595916f, -0.1008234f, -0.0579058f, 0.0915138f, 0.1321436f, -0.1484535f, + -0.0920316f, -0.0024532f, -0.1045300f, 0.0924260f, 0.0277524f, -0.0287276f, -0.1271127f, 0.1164243f}, + {0.0713067f, 0.0198056f, -0.3023696f, -0.0025908f, -0.0085885f, -1.1157553f, 0.0236462f, -0.0704844f, + -0.0189257f, -0.0997382f, 0.3379845f, -0.1229390f, -0.0616165f, -0.8968034f, 0.0401445f, -0.1144476f, + -0.0532077f, 0.0604580f, 0.0609454f, -0.1613472f, 0.0103525f, -0.1653874f, 0.0205189f, 0.0758978f, + -0.1514593f, 0.0151441f, 0.2043469f, 0.0349607f, -0.1361278f, -0.1255922f, 0.0631648f, 0.3570991f}, + {0.3371337f, -3.7541580f, 2.2215877f, -0.3390516f, 0.1912718f, -4.1861577f, -1.2264019f, 2.8179801f, + 0.0667294f, -0.0093539f, 2.3029909f, 3.1814916f, 3.9780347f, 0.2310601f, 0.3986159f, -0.8544636f, + 0.4139664f, -0.1876569f, -0.2448732f, -2.8053334f, 4.0488625f, 2.1094146f, -6.7310257f, -4.9950023f, + -0.8315823f, 0.0555959f, 2.4573720f, -3.7234364f, -4.2910552f, -0.2995245f, -3.2605181f, 2.3620574f}, + {-1.5522735f, -0.1866350f, -0.0067679f, 0.3196557f, 1.4052233f, 2.8143549f, -0.9992948f, -0.5309914f, + -25.8852596f, -0.1218249f, 0.6625420f, 0.3007106f, -0.2767264f, -0.1847300f, -0.5313534f, -0.0383462f, + -0.1987552f, 0.0581405f, -0.3376078f, 1.2621028f, 0.0818709f, -0.1401216f, -0.4550788f, -0.1592657f, + 0.0597123f, 0.1344101f, -0.1005317f, -0.1538406f, 2.9142656f, -0.0806051f, -0.4267367f, -31.9512234f}, + {0.6859627f, 0.1212986f, 0.1291616f, 0.0459838f, -0.0899920f, 0.0287645f, 0.1987007f, -2.7079368f, + -0.2628384f, -0.1402464f, -0.6302179f, -0.2923960f, -0.1106663f, 0.8256195f, -2.8054097f, -0.0296494f, + -0.5632019f, -0.1335654f, -0.1558440f, -6.8611612f, 0.0203786f, 0.0046566f, -0.4401442f, -0.0471430f, + 0.4535986f, -0.8657981f, 0.0684740f, 0.0518814f, -0.0123748f, -0.2270164f, 0.0922878f, -0.3863277f}, + {0.0127175f, 2.3346109f, -0.4390767f, -0.4657893f, 0.1659466f, -0.1132782f, -0.4928388f, 0.7652873f, + 1.1510741f, -0.0879600f, 0.2721785f, -0.1878961f, -0.3477249f, -0.8473209f, -0.8931856f, -0.4328294f, + -11.9181929f, -0.0282545f, -0.0217915f, 1.6676594f, -0.2122232f, -0.6190930f, 1.9053432f, -0.7592348f, + -1.0739189f, -0.7170524f, 0.3864411f, -0.8849231f, 0.1393488f, 0.0738489f, 0.4460345f, 1.9020857f}, + {0.4453296f, -0.0767821f, 0.1638939f, 1.6997167f, -0.1098599f, -0.0551604f, 0.0040561f, -13.5290670f, + -0.1285677f, -0.0590394f, 0.6499141f, -0.7617344f, 0.0453151f, 0.3104213f, -1.0711143f, 0.1361838f, + -0.4365610f, -0.1300649f, 0.2013344f, -0.5308123f, 0.1451896f, 0.1030715f, -0.6487910f, -0.3136590f, + -0.0280079f, 0.5394178f, 0.1318262f, -0.0159292f, 0.0636870f, -0.3224248f, -0.1868187f, -0.2468304f}, + {-0.0333494f, -0.0834255f, -0.1221875f, 0.6861304f, 0.0521738f, -0.0416543f, -0.4437352f, -19.3246250f, + -0.1520821f, 0.0528602f, -0.6375434f, -0.5803806f, -0.0958465f, -2.0058544f, -0.8282642f, 0.0259000f, + 0.4846996f, 0.1211179f, 0.0356884f, 1.0009497f, 0.0635682f, -0.0314105f, -0.0011147f, 0.0131714f, + -0.3410152f, 0.2798154f, 0.0961889f, 0.1266228f, -0.0934717f, -0.0904307f, 0.1355542f, 0.5722573f}, + {0.2146454f, 0.2143834f, 0.1290650f, -0.9063646f, 0.2100945f, 0.1331054f, -0.2620614f, -0.1264993f, + 0.1313979f, 0.0455465f, -0.8395286f, -0.4967833f, -0.0538581f, 0.9155380f, 0.6627046f, 0.1691243f, + 0.9887002f, -0.1597013f, -0.1236713f, -1.9041336f, 0.0427585f, 0.0849747f, -5.2559652f, -0.3133100f, + 0.0141170f, -0.1635530f, 0.4938746f, 0.0162943f, 0.2107756f, -0.3413893f, -0.0657575f, 1.0542560f}, + {-2.8868380f, -2.0837426f, -1.0611480f, -0.6143807f, -0.6398501f, -2.8018746f, 0.5166737f, -1.0814301f, + -1.9272422f, -0.1017482f, -0.4651161f, -1.4021232f, 1.8854499f, 0.1815407f, 0.5965426f, -2.3344259f, + -0.0690846f, -0.1678239f, -0.4219488f, 0.6215640f, 1.0270095f, -0.3473049f, -0.3926674f, -0.7942593f, + 1.1305071f, -1.4621233f, -0.8051161f, -0.7698632f, -2.6038630f, -0.3090037f, -1.6365144f, -1.0179478f}, + {0.0046026f, 1.1319581f, -2.6405678f, -2.0353596f, -2.1687336f, 0.3364883f, 2.1122196f, 0.2584647f, + -2.4344857f, -0.0378498f, 0.6158544f, -0.6060749f, -4.9598379f, 0.1570698f, 2.2436838f, -2.6198347f, + -2.0935996f, -0.1845744f, -0.0716080f, -1.9338604f, -4.1995640f, -3.6706774f, -1.6762524f, 3.9646862f, + -0.9677961f, 1.8319578f, -3.1916575f, 3.7312632f, 0.0820446f, -0.0497568f, -0.0898171f, -0.2499462f}, + {-0.0780375f, -0.0286571f, 0.1007227f, 0.0012229f, -0.0531285f, 0.0840718f, 0.1013894f, 0.1312424f, + -0.0673772f, 0.1603183f, 0.0074385f, -0.0718321f, -0.1549873f, 0.1616689f, 0.0405887f, -0.1558588f, + 0.0740745f, 0.1696893f, -0.0064026f, -0.1656420f, -0.1186674f, -0.1262667f, -0.0784757f, -0.1280154f, + 0.0909976f, 0.0853046f, -0.1075811f, 0.1310615f, 0.0610194f, 0.0647223f, 0.1360559f, 0.0440074f}, + {-0.2106480f, 0.0087131f, 0.1119385f, -1.0611318f, 0.5250220f, 0.0525479f, -0.2733742f, -1.0799565f, + -0.5601607f, -0.0651806f, -1.9793440f, -0.3373334f, -0.1550518f, 0.8932216f, 0.7264332f, -0.0450735f, + 1.2373760f, -0.1236272f, 0.0680048f, -3.0446634f, -0.1533586f, -0.0127355f, -0.3326311f, -0.0225603f, + -0.2265739f, -2.3752897f, -0.3771705f, -0.0728938f, 0.1741305f, 0.1111639f, 0.4131119f, 0.2239323f}, + {-2.5691276f, -1.4011253f, -2.0640867f, -3.7236946f, 1.5542637f, -0.9456654f, -1.7575809f, 3.6794879f, + -0.4439790f, -0.1009826f, 3.6702275f, -0.1935008f, -0.4423219f, -0.3825364f, -0.4784791f, 0.5927492f, + -2.3482494f, 0.0801714f, -0.1567418f, -1.7934613f, -0.1706410f, -0.6326947f, 0.6260155f, 0.3631033f, + -0.9325932f, 1.9647995f, -1.3409088f, 1.3501998f, 0.0367797f, -0.1744210f, 1.8690013f, -1.0737898f}, + {-0.5934777f, 0.6232591f, -0.3391055f, 0.2640936f, -0.2824444f, 0.4815128f, 0.6625078f, -0.1103976f, + 0.9555223f, -0.0624896f, -0.6778919f, 0.1181502f, -0.5425385f, 0.7297349f, -1.7261271f, -0.2917557f, + 1.1873137f, -0.2725933f, 0.0975242f, 1.7756181f, -0.5735835f, -0.4453230f, 0.9800369f, 0.9344145f, + -1.8692539f, 0.0120440f, -0.7315661f, 0.6250805f, 0.3839143f, -0.0376306f, 0.3816243f, 0.6059195f}, + {0.5522162f, -1.8043815f, -10.9379101f, 0.5719097f, -0.2246755f, -1.4856353f, 0.4877502f, 0.7163438f, + -11.8135147f, -0.0180790f, -0.9928634f, 0.1107815f, -0.0005064f, -0.3824990f, -0.7453306f, -1.9909632f, + -7.4362645f, -0.0245507f, -0.1815712f, -3.5507584f, -0.0075889f, -11.0296011f, -1.1292133f, -0.0710276f, + 0.5675677f, 0.2017778f, -0.0684891f, -0.0367653f, -1.6674192f, 0.0281711f, -0.8356591f, -0.0447807f}, + {0.2537312f, -3.0178010f, -0.3493635f, 1.8573236f, 0.4017631f, 0.9912633f, -0.8625028f, -0.7783228f, + -1.7815375f, -0.1204695f, 1.8551122f, 0.3344182f, -0.2828701f, -1.3226960f, -1.4470471f, 0.2895959f, + 0.6780876f, -0.2010069f, 0.0425280f, -2.1786852f, -0.1274053f, -0.2549899f, -0.2233993f, -0.1561645f, + -0.4640818f, 0.6375850f, 0.7733670f, -0.2388286f, 1.0447853f, -0.1503223f, 0.3823584f, -13.8176088f}, + {0.2575197f, -2.2127593f, -0.0389457f, -0.0215759f, 0.1659477f, -0.0097748f, -0.1935415f, -0.9091369f, + -0.1453371f, 0.0442428f, -0.1206519f, 0.1435609f, -0.0186047f, -5.0154042f, 0.0538177f, 0.0403250f, + 0.0240955f, 0.0331080f, 0.0517951f, 0.7422639f, 0.0069818f, 0.0248351f, -0.2205741f, -0.0082387f, + 0.2043269f, 0.0459435f, 0.0876343f, 0.0140607f, 0.1056308f, 0.0062555f, 0.0184278f, -0.5539715f}, + {-0.0398742f, 0.1075264f, 0.1725024f, -0.0755192f, -0.0360048f, 0.1325573f, 0.0903103f, -0.0882263f, + 0.1207692f, 0.0032722f, 0.0048489f, -0.1257241f, 0.1450990f, -0.0713558f, 0.1116815f, 0.1107689f, + -0.1447252f, 0.1581838f, -0.0160124f, -0.0425587f, 0.1411217f, 0.0865060f, -0.0643460f, -0.0431262f, + -0.1452804f, -0.0195101f, 0.1234572f, 0.0520887f, 0.1117576f, -0.0751791f, 0.1511539f, 0.1224861f}, + {0.7728126f, 2.3075340f, -0.0385258f, -3.1270287f, 0.9414487f, 3.5251477f, -0.8043440f, 0.7212446f, + -7.6850162f, -0.1609414f, -3.7687578f, -1.0751100f, -0.2052089f, 5.0728245f, 2.2835267f, 0.5930225f, + 0.1303335f, -0.1428799f, -0.3715075f, 0.5136011f, -0.4755619f, -0.2192461f, -3.8696294f, -0.0062392f, + -1.3774812f, -0.0034140f, -1.5944362f, 0.9773729f, 3.2859125f, -0.1616932f, -1.2785367f, -13.5732412f}, + {0.5535743f, 0.1461481f, -0.2218016f, -0.2971808f, -0.2169309f, 0.1564545f, -0.0390397f, 1.1558976f, + -0.0119933f, -0.0774637f, 1.1907971f, -0.5127968f, -0.0066028f, -1.6794037f, -0.3650940f, 0.2555613f, + -0.9488379f, 0.0449603f, -0.1620417f, 0.1583214f, 0.0000908f, 0.0152763f, -1.0660053f, -0.0139402f, + -1.7440189f, 0.2515209f, 0.3333162f, 0.1904725f, 0.1116094f, -0.2287960f, -0.0007165f, -1.7047704f}, + {-5.9897852f, -0.1316296f, -0.0218074f, -0.4602887f, 0.3288545f, -0.0882939f, -0.5929499f, 0.4294790f, + -0.0383545f, 0.0556869f, 0.1975944f, 0.1341491f, 0.0629570f, -2.2742157f, 0.0175826f, -0.1439869f, + -24.8701649f, -0.1582915f, -0.2460304f, -3.9643264f, 0.0863483f, 0.0180861f, -0.2210452f, -0.0868723f, + -0.4175525f, -0.8231756f, 0.0247534f, -0.1473545f, -0.0021330f, -0.0410253f, -1.1944869f, -1.1523768f}, + {0.1031547f, -3.3402514f, -4.3636522f, -0.1534714f, -0.0622189f, 0.0374694f, -0.0870097f, -4.1865788f, + -0.0555377f, 0.0252329f, 0.1339467f, 0.0461691f, -0.0503090f, 0.0289890f, -0.0095674f, -0.3289992f, + -0.0279080f, 0.0274977f, -0.0903500f, 0.5610157f, -0.0478177f, 0.4346960f, 0.4822784f, -0.1058945f, + -0.2026870f, -0.0560638f, 0.0910069f, -0.0818529f, 0.0819198f, -0.0292193f, 0.3040628f, -0.1275230f}, + {-5.8789845f, -17.1114635f, -4.6755161f, 0.1016624f, -0.8685016f, -0.3898779f, -2.3363957f, 0.1413794f, + -2.4254086f, -0.2171030f, -0.0901150f, 0.7058705f, 0.4166250f, -0.0231085f, -0.1789686f, -9.4244318f, + -0.6418229f, -0.0857969f, 0.1683681f, -0.0310597f, -0.0247807f, -5.3748040f, -7.4730940f, 0.1019564f, + -1.2126822f, -0.3726285f, -1.0287101f, 0.1803891f, -0.2227769f, -0.0791530f, -0.0159770f, -1.4883354f}, + {-17.9394970f, -0.5228514f, -11.3547935f, -0.0672671f, -2.0371394f, -0.9076943f, 2.4331825f, -6.9409127f, + 0.8286008f, 0.0208618f, -0.8009814f, 1.2268484f, 0.1943726f, -1.7297083f, -0.7668949f, -6.5505466f, + -0.6495168f, -0.0404727f, -0.1260914f, -3.5029383f, -0.0852898f, -2.9679556f, 1.6404767f, -0.0251449f, + 1.1460075f, -0.7877688f, -0.0586593f, -0.4741839f, -1.7420560f, 0.0295600f, -2.3574052f, 0.0974777f}, + {0.4443443f, 0.6384261f, 1.3317494f, -1.0085982f, 0.9508762f, 1.3168396f, -0.1862490f, -0.1801148f, + 1.1106120f, -0.0654911f, 0.1186706f, -0.7198273f, 0.5449172f, -0.5886080f, 0.7504217f, 1.8046317f, + -0.1294390f, -0.1939137f, -0.2383934f, 0.4131435f, 0.6910310f, 1.2821866f, -0.1088722f, -0.5660405f, + -0.1188610f, 0.0364403f, 0.3597929f, -0.6409024f, 1.2114668f, -0.0212278f, 0.8423592f, 0.4848156f}, + {-0.8772649f, -13.5265112f, -4.5540547f, -0.2856667f, 0.7604876f, -0.6829260f, -0.8320626f, 0.6541347f, + 0.4020181f, 0.0009324f, -10.9660740f, -0.3540186f, -0.2316812f, 0.3576394f, 0.0998953f, -1.5738430f, + 1.2089975f, 0.0706465f, -0.2538019f, 0.7016497f, -0.0282650f, -3.1291001f, -0.4375663f, -0.3979468f, + -0.1588882f, 0.3978875f, 0.2038192f, -0.4281644f, -0.5787544f, -0.0922198f, 0.9595569f, 0.0212818f}, + {0.3392667f, 0.1170919f, -0.0705636f, -0.1025443f, -0.1192213f, -0.0495686f, 0.0284667f, -0.1226804f, + 0.0050191f, -0.0516545f, -1.0892097f, 0.0033689f, 0.0471462f, 1.4266804f, 0.0288870f, -0.0110408f, + -1.1283765f, -0.1299917f, -0.4318301f, -0.9854419f, -0.0190479f, -0.0269406f, 0.3697925f, -0.0757695f, + -0.3632923f, -0.1714077f, 0.0669245f, 0.0557428f, -0.1713906f, -0.4307863f, -0.1749060f, -2.1246362f}, + {0.8383662f, -3.8122442f, 0.1568939f, -2.2105119f, -0.7086993f, -0.4664145f, -0.3578597f, 0.5554636f, + 0.6965880f, -0.1506968f, 0.2646832f, 0.2874083f, 0.1901203f, -2.4997077f, -0.3519035f, -0.0518054f, + 1.0862818f, -0.2502540f, -0.3133347f, -0.7411230f, 0.1268138f, 0.1069811f, -0.8109779f, 0.0264679f, + 0.1604289f, -0.7534032f, -0.1419461f, 0.0688303f, -0.1570919f, -0.3055144f, -0.7415189f, 2.5547018f}, + }; + ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_4[1] = {1.4616280f}; + ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_4[32][1] = { + {0.0609813f}, {0.0685224f}, {0.1655236f}, {-0.0599842f}, {0.0669006f}, {-0.1817371f}, {-0.0539167f}, + {-0.0737955f}, {0.0654664f}, {0.0302955f}, {-0.0586768f}, {0.0717433f}, {0.1472274f}, {-0.0610073f}, + {-0.0601061f}, {0.2086218f}, {-0.0545418f}, {-0.0388369f}, {-0.0613536f}, {-0.1141072f}, {-0.2289097f}, + {-0.3354485f}, {0.0831025f}, {0.1333673f}, {0.0490410f}, {0.0484894f}, {0.0436755f}, {-0.1479877f}, + {0.1540713f}, {0.0021261f}, {-0.0845848f}, {-0.0564973f}, + }; + + } // namespace t5dnn + +} //namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h b/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h index bc933469aa022..bf6b95d069d5f 100644 --- a/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h +++ b/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h @@ -11,7 +11,7 @@ #include "ObjectRanges.h" #include "Quintuplet.h" -namespace SDL { +namespace lst { // One pixel segment, one outer tracker triplet! struct PixelTriplets { unsigned int* pixelSegmentIndices; @@ -132,11 +132,11 @@ namespace SDL { inline void setData(PixelTripletsBuffer& buf) { data_.setData(buf); } }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addPixelTripletToMemory(struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, - struct SDL::PixelTriplets& pixelTripletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addPixelTripletToMemory(struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, + struct lst::PixelTriplets& pixelTripletsInGPU, unsigned int pixelSegmentIndex, unsigned int tripletIndex, float pixelRadius, @@ -214,10 +214,10 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runPixelTrackletDefaultAlgopT3(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::ObjectRanges& rangesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::ObjectRanges& rangesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& pixelLowerModuleIndex, uint16_t& outerInnerLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -259,8 +259,8 @@ namespace SDL { unsigned int thirdMDIndex = segmentsInGPU.mdIndices[Params_LS::kLayers * outerSegmentIndex]; unsigned int fourthMDIndex = segmentsInGPU.mdIndices[Params_LS::kLayers * outerSegmentIndex + 1]; - if (outerInnerLowerModuleSubdet == SDL::Barrel and - (outerOuterLowerModuleSubdet == SDL::Barrel or outerOuterLowerModuleSubdet == SDL::Endcap)) { + if (outerInnerLowerModuleSubdet == lst::Barrel and + (outerOuterLowerModuleSubdet == lst::Barrel or outerOuterLowerModuleSubdet == lst::Endcap)) { return runTripletDefaultAlgoPPBB(acc, modulesInGPU, rangesInGPU, @@ -289,7 +289,7 @@ namespace SDL { sdlCut, betaOutCut, deltaBetaCut); - } else if (outerInnerLowerModuleSubdet == SDL::Endcap and outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (outerInnerLowerModuleSubdet == lst::Endcap and outerOuterLowerModuleSubdet == lst::Endcap) { return runTripletDefaultAlgoPPEE(acc, modulesInGPU, rangesInGPU, @@ -323,23 +323,23 @@ namespace SDL { return false; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RZChiSquaredCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RZChiSquaredCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, float& rzChiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); if (layer1 == 8 and layer2 == 9 and layer3 == 10) { return rzChiSquared < 13.6067f; @@ -395,7 +395,7 @@ namespace SDL { float chiSquared = 0.f; float absArctanSlope, angleM, xPrime, yPrime, sigma2; for (size_t i = 0; i < nPoints; i++) { - absArctanSlope = ((slopes[i] != SDL::SDL_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) + absArctanSlope = ((slopes[i] != lst::lst_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) : 0.5f * float(M_PI)); if (xs[i] > 0 and ys[i] > 0) { angleM = 0.5f * float(M_PI) - absArctanSlope; @@ -426,7 +426,7 @@ namespace SDL { //TODO: merge this one and the pT5 function later into a single function template ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT3RPhiChiSquared(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t* lowerModuleIndices, float& g, float& f, @@ -496,7 +496,7 @@ namespace SDL { }; ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT3RPhiChiSquaredInwards( - struct SDL::Modules& modulesInGPU, float& g, float& f, float& r, float* xPix, float* yPix) { + struct lst::Modules& modulesInGPU, float& g, float& f, float& r, float* xPix, float* yPix) { float residual = (xPix[0] - g) * (xPix[0] - g) + (yPix[0] - f) * (yPix[0] - f) - r * r; float chiSquared = residual * residual; residual = (xPix[1] - g) * (xPix[1] - g) + (yPix[1] - f) * (yPix[1] - f) - r * r; @@ -507,23 +507,23 @@ namespace SDL { }; //90pc threshold - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RPhiChiSquaredCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RPhiChiSquaredCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, float& chiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); if (layer1 == 8 and layer2 == 9 and layer3 == 10) { return chiSquared < 7.003f; @@ -554,23 +554,23 @@ namespace SDL { return true; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RPhiChiSquaredInwardsCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT3RPhiChiSquaredInwardsCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, float& chiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); if (layer1 == 7 and layer2 == 8 and layer3 == 9) // endcap layer 1,2,3, ps { @@ -723,18 +723,18 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passRadiusCriterion(TAcc const& acc, - struct SDL::Modules const& modulesInGPU, + struct lst::Modules const& modulesInGPU, float const& pixelRadius, float const& pixelRadiusError, float const& tripletRadius, uint16_t const& lowerModuleIndex, uint16_t const& middleModuleIndex, uint16_t const& upperModuleIndex) { - if (modulesInGPU.subdets[lowerModuleIndex] == SDL::Endcap) { + if (modulesInGPU.subdets[lowerModuleIndex] == lst::Endcap) { return passRadiusCriterionEEE(acc, pixelRadius, pixelRadiusError, tripletRadius); - } else if (modulesInGPU.subdets[middleModuleIndex] == SDL::Endcap) { + } else if (modulesInGPU.subdets[middleModuleIndex] == lst::Endcap) { return passRadiusCriterionBEE(acc, pixelRadius, pixelRadiusError, tripletRadius); - } else if (modulesInGPU.subdets[upperModuleIndex] == SDL::Endcap) { + } else if (modulesInGPU.subdets[upperModuleIndex] == lst::Endcap) { return passRadiusCriterionBBE(acc, pixelRadius, pixelRadiusError, tripletRadius); } else { return passRadiusCriterionBBB(acc, pixelRadius, pixelRadiusError, tripletRadius); @@ -743,7 +743,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT3RZChiSquared(TAcc const& acc, - struct SDL::Modules const& modulesInGPU, + struct lst::Modules const& modulesInGPU, const uint16_t* lowerModuleIndices, const float* rtPix, const float* xPix, @@ -784,14 +784,14 @@ namespace SDL { float p = alpaka::math::sqrt(acc, Px * Px + Py * Py + Pz * Pz); float rou = a / p; - if (moduleSubdet == SDL::Endcap) { + if (moduleSubdet == lst::Endcap) { float s = (zsi - z1) * p / Pz; float x = x1 + Px / a * alpaka::math::sin(acc, rou * s) - Py / a * (1 - alpaka::math::cos(acc, rou * s)); float y = y1 + Py / a * alpaka::math::sin(acc, rou * s) + Px / a * (1 - alpaka::math::cos(acc, rou * s)); diffr = alpaka::math::abs(acc, rtsi - alpaka::math::sqrt(acc, x * x + y * y)) * 100; } - if (moduleSubdet == SDL::Barrel) { + if (moduleSubdet == lst::Barrel) { float paraA = r1 * r1 + 2 * (Px * Px + Py * Py) / (a * a) + 2 * (y1 * Px - x1 * Py) / a - rtsi * rtsi; float paraB = 2 * (x1 * Px + y1 * Py) / a; float paraC = 2 * (y1 * Px - x1 * Py) / a + 2 * (Px * Px + Py * Py) / (a * a); @@ -807,7 +807,7 @@ namespace SDL { diffz = alpaka::math::min(acc, diffz1, diffz2); } - residual = moduleSubdet == SDL::Barrel ? diffz : diffr; + residual = moduleSubdet == lst::Barrel ? diffz : diffr; //PS Modules if (moduleType == 0) { @@ -818,7 +818,7 @@ namespace SDL { } //special dispensation to tilted PS modules! - if (moduleType == 0 and moduleSubdet == SDL::Barrel and moduleSide != Center) { + if (moduleType == 0 and moduleSubdet == lst::Barrel and moduleSide != Center) { float drdz = modulesInGPU.drdzs[lowerModuleIndex]; error2 /= (1 + drdz * drdz); } @@ -832,11 +832,11 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runPixelTripletDefaultAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::ObjectRanges& rangesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::ObjectRanges& rangesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, unsigned int& pixelSegmentIndex, unsigned int tripletIndex, float& pixelRadius, @@ -1029,12 +1029,12 @@ namespace SDL { struct createPixelTripletsInGPUFromMapv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::PixelTriplets pixelTripletsInGPU, + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::PixelTriplets pixelTripletsInGPU, unsigned int* connectedPixelSize, unsigned int* connectedPixelIndex, unsigned int nPixelSegments) const { @@ -1060,7 +1060,7 @@ namespace SDL { } #endif //Removes 2S-2S :FIXME: filter these out in the pixel map - if (modulesInGPU.moduleType[tripletLowerModuleIndex] == SDL::TwoS) + if (modulesInGPU.moduleType[tripletLowerModuleIndex] == lst::TwoS) continue; uint16_t pixelModuleIndex = *modulesInGPU.nLowerModules; @@ -1091,7 +1091,7 @@ namespace SDL { outerTripletArrayIndex += gridThreadExtent[2]) { unsigned int outerTripletIndex = rangesInGPU.tripletModuleIndices[tripletLowerModuleIndex] + outerTripletArrayIndex; - if (modulesInGPU.moduleType[tripletsInGPU.lowerModuleIndices[3 * outerTripletIndex + 1]] == SDL::TwoS) + if (modulesInGPU.moduleType[tripletsInGPU.lowerModuleIndices[3 * outerTripletIndex + 1]] == lst::TwoS) continue; //REMOVES PS-2S if (tripletsInGPU.partOfPT5[outerTripletIndex]) @@ -1177,32 +1177,32 @@ namespace SDL { float dr, float lIn) { if (lIn == 0) { - betaOut += SDL::copysignf( + betaOut += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaOut); return; } if (betaIn * betaOut > 0.f and - (alpaka::math::abs(acc, pt_beta) < 4.f * SDL::pt_betaMax or + (alpaka::math::abs(acc, pt_beta) < 4.f * lst::pt_betaMax or (lIn >= 11 and alpaka::math::abs(acc, pt_beta) < - 8.f * SDL::pt_betaMax))) //and the pt_beta is well-defined; less strict for endcap-endcap + 8.f * lst::pt_betaMax))) //and the pt_beta is well-defined; less strict for endcap-endcap { const float betaInUpd = betaIn + - SDL::copysignf(alpaka::math::asin( + lst::copysignf(alpaka::math::asin( acc, alpaka::math::min( - acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version const float betaOutUpd = betaOut + - SDL::copysignf(alpaka::math::asin( + lst::copysignf(alpaka::math::asin( acc, alpaka::math::min( - acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaOut); //FIXME: need a faster version betaAv = 0.5f * (betaInUpd + betaOutUpd); @@ -1210,65 +1210,65 @@ namespace SDL { const float pt_beta_inv = 1.f / alpaka::math::abs(acc, dr * k2Rinv1GeVf / alpaka::math::sin(acc, betaAv)); //get a better pt estimate - betaIn += SDL::copysignf( - alpaka::math::asin(acc, alpaka::math::min(acc, sdIn_dr * SDL::k2Rinv1GeVf * pt_beta_inv, SDL::sinAlphaMax)), + betaIn += lst::copysignf( + alpaka::math::asin(acc, alpaka::math::min(acc, sdIn_dr * lst::k2Rinv1GeVf * pt_beta_inv, lst::sinAlphaMax)), betaIn); //FIXME: need a faster version - betaOut += SDL::copysignf( - alpaka::math::asin(acc, alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf * pt_beta_inv, SDL::sinAlphaMax)), + betaOut += lst::copysignf( + alpaka::math::asin(acc, alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf * pt_beta_inv, lst::sinAlphaMax)), betaOut); //FIXME: need a faster version //update the av and pt betaAv = 0.5f * (betaIn + betaOut); //2nd update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate } else if (lIn < 11 && alpaka::math::abs(acc, betaOut) < 0.2f * alpaka::math::abs(acc, betaIn) && - alpaka::math::abs(acc, pt_beta) < 12.f * SDL::pt_betaMax) //use betaIn sign as ref + alpaka::math::abs(acc, pt_beta) < 12.f * lst::pt_betaMax) //use betaIn sign as ref { const float pt_betaIn = dr * k2Rinv1GeVf / alpaka::math::sin(acc, betaIn); const float betaInUpd = - betaIn + SDL::copysignf( + betaIn + lst::copysignf( alpaka::math::asin( acc, alpaka::math::min( - acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), SDL::sinAlphaMax)), + acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version const float betaOutUpd = betaOut + - SDL::copysignf( + lst::copysignf( alpaka::math::asin( acc, alpaka::math::min( - acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), SDL::sinAlphaMax)), + acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version betaAv = (alpaka::math::abs(acc, betaOut) > 0.2f * alpaka::math::abs(acc, betaIn)) ? (0.5f * (betaInUpd + betaOutUpd)) : betaInUpd; //1st update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate - betaIn += SDL::copysignf( + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + betaIn += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version - betaOut += SDL::copysignf( + betaOut += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version //update the av and pt betaAv = 0.5f * (betaIn + betaOut); //2nd update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate } }; template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runTripletDefaultAlgoPPBB(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::ObjectRanges& rangesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::ObjectRanges& rangesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& pixelModuleIndex, uint16_t& outerInnerLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -1293,7 +1293,7 @@ namespace SDL { float& betaOutCut, float& deltaBetaCut) // pixel to BB and BE segments { - bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS); + bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS); float rt_InLo = mdsInGPU.anchorRt[firstMDIndex]; float rt_InUp = mdsInGPU.anchorRt[secondMDIndex]; @@ -1315,7 +1315,7 @@ namespace SDL { float rt_InOut = rt_InUp; - if (alpaka::math::abs(acc, SDL::deltaPhi(acc, x_InUp, y_InUp, x_OutLo, y_OutLo)) > 0.5f * float(M_PI)) + if (alpaka::math::abs(acc, lst::deltaPhi(acc, x_InUp, y_InUp, x_OutLo, y_OutLo)) > 0.5f * float(M_PI)) return false; unsigned int pixelSegmentArrayIndex = innerSegmentIndex - rangesInGPU.segmentModuleIndices[pixelModuleIndex]; @@ -1383,7 +1383,7 @@ namespace SDL { sdlCut = alpha1GeV_OutLo + alpaka::math::sqrt(acc, sdlMuls2 + sdlPVoff * sdlPVoff); #ifdef CUT_VALUE_DEBUG - dPhiPos = SDL::deltaPhi(acc, x_InUp, y_InUp, x_OutUp, y_OutUp); + dPhiPos = lst::deltaPhi(acc, x_InUp, y_InUp, x_OutUp, y_OutUp); #endif //no dphipos cut @@ -1393,7 +1393,7 @@ namespace SDL { float diffX = x_OutLo - x_InLo; float diffY = y_OutLo - y_InLo; - dPhi = SDL::deltaPhi(acc, midPointX, midPointY, diffX, diffY); + dPhi = lst::deltaPhi(acc, midPointX, midPointY, diffX, diffY); if (alpaka::math::abs(acc, dPhi) > sdlCut) return false; @@ -1403,11 +1403,11 @@ namespace SDL { float alpha_InLo = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float alpha_OutLo = __H2F(segmentsInGPU.dPhiChanges[outerSegmentIndex]); - bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == SDL::Endcap and - modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::TwoS; + bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == lst::Endcap and + modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::TwoS; float alpha_OutUp, alpha_OutUp_highEdge, alpha_OutUp_lowEdge; - alpha_OutUp = SDL::deltaPhi(acc, x_OutUp, y_OutUp, x_OutUp - x_OutLo, y_OutUp - y_OutLo); + alpha_OutUp = lst::deltaPhi(acc, x_OutUp, y_OutUp, x_OutUp - x_OutLo, y_OutUp - y_OutLo); alpha_OutUp_highEdge = alpha_OutUp; alpha_OutUp_lowEdge = alpha_OutUp; @@ -1421,22 +1421,22 @@ namespace SDL { float tl_axis_lowEdge_x = tl_axis_x; float tl_axis_lowEdge_y = tl_axis_y; - betaIn = -SDL::deltaPhi(acc, px, py, tl_axis_x, tl_axis_y); + betaIn = -lst::deltaPhi(acc, px, py, tl_axis_x, tl_axis_y); float betaInRHmin = betaIn; float betaInRHmax = betaIn; - betaOut = -alpha_OutUp + SDL::deltaPhi(acc, x_OutUp, y_OutUp, tl_axis_x, tl_axis_y); + betaOut = -alpha_OutUp + lst::deltaPhi(acc, x_OutUp, y_OutUp, tl_axis_x, tl_axis_y); float betaOutRHmin = betaOut; float betaOutRHmax = betaOut; if (isEC_lastLayer) { - alpha_OutUp_highEdge = SDL::deltaPhi(acc, + alpha_OutUp_highEdge = lst::deltaPhi(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex], mdsInGPU.anchorHighEdgeY[fourthMDIndex], mdsInGPU.anchorHighEdgeX[fourthMDIndex] - x_OutLo, mdsInGPU.anchorHighEdgeY[fourthMDIndex] - y_OutLo); - alpha_OutUp_lowEdge = SDL::deltaPhi(acc, + alpha_OutUp_lowEdge = lst::deltaPhi(acc, mdsInGPU.anchorLowEdgeX[fourthMDIndex], mdsInGPU.anchorLowEdgeY[fourthMDIndex], mdsInGPU.anchorLowEdgeX[fourthMDIndex] - x_OutLo, @@ -1447,12 +1447,12 @@ namespace SDL { tl_axis_lowEdge_x = mdsInGPU.anchorLowEdgeX[fourthMDIndex] - x_InUp; tl_axis_lowEdge_y = mdsInGPU.anchorLowEdgeY[fourthMDIndex] - y_InUp; - betaOutRHmin = -alpha_OutUp_highEdge + SDL::deltaPhi(acc, + betaOutRHmin = -alpha_OutUp_highEdge + lst::deltaPhi(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex], mdsInGPU.anchorHighEdgeY[fourthMDIndex], tl_axis_highEdge_x, tl_axis_highEdge_y); - betaOutRHmax = -alpha_OutUp_lowEdge + SDL::deltaPhi(acc, + betaOutRHmax = -alpha_OutUp_lowEdge + lst::deltaPhi(acc, mdsInGPU.anchorLowEdgeX[fourthMDIndex], mdsInGPU.anchorLowEdgeY[fourthMDIndex], tl_axis_lowEdge_x, @@ -1490,7 +1490,7 @@ namespace SDL { betaOutRHmax *= betaOutMMSF; float min_ptBeta_ptBetaMax = alpaka::math::min( - acc, alpaka::math::abs(acc, pt_beta), SDL::pt_betaMax); //need to confirm the range-out value of 7 GeV + acc, alpaka::math::abs(acc, pt_beta), lst::pt_betaMax); //need to confirm the range-out value of 7 GeV const float dBetaMuls2 = sdlThetaMulsF2 * 16.f / (min_ptBeta_ptBetaMax * min_ptBeta_ptBetaMax); const float alphaInAbsReg = alpaka::math::max(acc, @@ -1544,10 +1544,10 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runTripletDefaultAlgoPPEE(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::ObjectRanges& rangesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::ObjectRanges& rangesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& pixelModuleIndex, uint16_t& outerInnerLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -1573,7 +1573,7 @@ namespace SDL { float& deltaBetaCut, float& kZ) // pixel to EE segments { - bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS); + bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS); float z_InUp = mdsInGPU.anchorZ[secondMDIndex]; float z_OutLo = mdsInGPU.anchorZ[thirdMDIndex]; @@ -1619,19 +1619,19 @@ namespace SDL { zLo = z_InUp + (z_InUp - deltaZLum) * (rtOut_o_rtIn - 1.f) * (z_InUp > 0.f ? 1.f : dzDrtScale) - zGeom; //slope-correction only on outer end - const float dLum = SDL::copysignf(deltaZLum, z_InUp); - bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS; + const float dLum = lst::copysignf(deltaZLum, z_InUp); + bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS; const float rtGeom1 = isOutSgInnerMDPS ? pixelPSZpitch : strip2SZpitch; //FIXME: make this chosen by configuration for lay11,12 full PS - const float zGeom1 = SDL::copysignf(zGeom, z_InUp); //used in B-E region + const float zGeom1 = lst::copysignf(zGeom, z_InUp); //used in B-E region rtLo = rt_InUp * (1.f + (z_OutLo - z_InUp - zGeom1) / (z_InUp + zGeom1 + dLum) / dzDrtScale) - rtGeom1; //slope correction only on the lower end float zInForHi = z_InUp - zGeom1 - dLum; if (zInForHi * z_InUp < 0) - zInForHi = SDL::copysignf(0.1f, z_InUp); + zInForHi = lst::copysignf(0.1f, z_InUp); rtHi = rt_InUp * (1.f + (z_OutLo - z_InUp + zGeom1) / zInForHi) + rtGeom1; // Cut #2: rt condition @@ -1671,7 +1671,7 @@ namespace SDL { const float sdlPVoff = 0.1f / rt_OutLo; sdlCut = alpha1GeV_OutLo + alpaka::math::sqrt(acc, sdlMuls2 + sdlPVoff * sdlPVoff); - deltaPhiPos = SDL::deltaPhi(acc, x_InUp, y_InUp, x_OutUp, y_OutUp); + deltaPhiPos = lst::deltaPhi(acc, x_InUp, y_InUp, x_OutUp, y_OutUp); float midPointX = 0.5f * (x_InLo + x_OutLo); float midPointY = 0.5f * (y_InLo + y_OutLo); @@ -1679,7 +1679,7 @@ namespace SDL { float diffX = x_OutLo - x_InLo; float diffY = y_OutLo - y_InLo; - dPhi = SDL::deltaPhi(acc, midPointX, midPointY, diffX, diffY); + dPhi = lst::deltaPhi(acc, midPointX, midPointY, diffX, diffY); // Cut #5: deltaPhiChange if (alpaka::math::abs(acc, dPhi) > sdlCut) @@ -1688,12 +1688,12 @@ namespace SDL { float alpha_InLo = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float alpha_OutLo = __H2F(segmentsInGPU.dPhiChanges[outerSegmentIndex]); - bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == SDL::Endcap and - modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::TwoS; + bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == lst::Endcap and + modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::TwoS; float alpha_OutUp, alpha_OutUp_highEdge, alpha_OutUp_lowEdge; - alpha_OutUp = SDL::deltaPhi(acc, x_OutUp, y_OutUp, x_OutUp - x_OutLo, y_OutUp - y_OutLo); + alpha_OutUp = lst::deltaPhi(acc, x_OutUp, y_OutUp, x_OutUp - x_OutLo, y_OutUp - y_OutLo); alpha_OutUp_highEdge = alpha_OutUp; alpha_OutUp_lowEdge = alpha_OutUp; @@ -1706,21 +1706,21 @@ namespace SDL { float tl_axis_lowEdge_x = tl_axis_x; float tl_axis_lowEdge_y = tl_axis_y; - betaIn = -SDL::deltaPhi(acc, px, py, tl_axis_x, tl_axis_y); + betaIn = -lst::deltaPhi(acc, px, py, tl_axis_x, tl_axis_y); float betaInRHmin = betaIn; float betaInRHmax = betaIn; - betaOut = -alpha_OutUp + SDL::deltaPhi(acc, x_OutUp, y_OutUp, tl_axis_x, tl_axis_y); + betaOut = -alpha_OutUp + lst::deltaPhi(acc, x_OutUp, y_OutUp, tl_axis_x, tl_axis_y); float betaOutRHmin = betaOut; float betaOutRHmax = betaOut; if (isEC_lastLayer) { - alpha_OutUp_highEdge = SDL::deltaPhi(acc, + alpha_OutUp_highEdge = lst::deltaPhi(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex], mdsInGPU.anchorHighEdgeY[fourthMDIndex], mdsInGPU.anchorHighEdgeX[fourthMDIndex] - x_OutLo, mdsInGPU.anchorHighEdgeY[fourthMDIndex] - y_OutLo); - alpha_OutUp_lowEdge = SDL::deltaPhi(acc, + alpha_OutUp_lowEdge = lst::deltaPhi(acc, mdsInGPU.anchorLowEdgeX[fourthMDIndex], mdsInGPU.anchorLowEdgeY[fourthMDIndex], mdsInGPU.anchorLowEdgeX[fourthMDIndex] - x_OutLo, @@ -1731,12 +1731,12 @@ namespace SDL { tl_axis_lowEdge_x = mdsInGPU.anchorLowEdgeX[fourthMDIndex] - x_InUp; tl_axis_lowEdge_y = mdsInGPU.anchorLowEdgeY[fourthMDIndex] - y_InUp; - betaOutRHmin = -alpha_OutUp_highEdge + SDL::deltaPhi(acc, + betaOutRHmin = -alpha_OutUp_highEdge + lst::deltaPhi(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex], mdsInGPU.anchorHighEdgeY[fourthMDIndex], tl_axis_highEdge_x, tl_axis_highEdge_y); - betaOutRHmax = -alpha_OutUp_lowEdge + SDL::deltaPhi(acc, + betaOutRHmax = -alpha_OutUp_lowEdge + lst::deltaPhi(acc, mdsInGPU.anchorLowEdgeX[fourthMDIndex], mdsInGPU.anchorLowEdgeY[fourthMDIndex], tl_axis_lowEdge_x, @@ -1772,7 +1772,7 @@ namespace SDL { betaOutRHmax *= betaOutMMSF; float min_ptBeta_ptBetaMax = alpaka::math::min( - acc, alpaka::math::abs(acc, pt_beta), SDL::pt_betaMax); //need to confirm the range-out value of 7 GeV + acc, alpaka::math::abs(acc, pt_beta), lst::pt_betaMax); //need to confirm the range-out value of 7 GeV const float dBetaMuls2 = sdlThetaMulsF2 * 16.f / (min_ptBeta_ptBetaMax * min_ptBeta_ptBetaMax); const float alphaInAbsReg = @@ -1827,7 +1827,7 @@ namespace SDL { #endif return dBeta * dBeta <= dBetaCut2; }; -} // namespace SDL +} // namespace lst #endif #ifndef RecoTracker_LSTCore_src_alpaka_PixelQuintuplet_h @@ -1843,7 +1843,7 @@ namespace SDL { #include "Quintuplet.h" #include "PixelTriplet.h" -namespace SDL { +namespace lst { struct PixelQuintuplets { unsigned int* pixelIndices; unsigned int* T5Indices; @@ -1939,11 +1939,11 @@ namespace SDL { inline void setData(PixelQuintupletsBuffer& buf) { data_.setData(buf); } }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addPixelQuintupletToMemory(struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Quintuplets& quintupletsInGPU, - struct SDL::PixelQuintuplets& pixelQuintupletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addPixelQuintupletToMemory(struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Quintuplets& quintupletsInGPU, + struct lst::PixelQuintuplets& pixelQuintupletsInGPU, unsigned int pixelIndex, unsigned int T5Index, unsigned int pixelQuintupletIndex, @@ -2035,7 +2035,7 @@ namespace SDL { pixelQuintupletsInGPU.rPhiChiSquaredInwards[pixelQuintupletIndex] = rPhiChiSquaredInwards; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RZChiSquaredCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RZChiSquaredCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, @@ -2043,25 +2043,25 @@ namespace SDL { uint16_t& lowerModuleIndex5, float& rzChiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); const int layer4 = modulesInGPU.layers[lowerModuleIndex4] + - 6 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex4] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex4] == lst::TwoS); const int layer5 = modulesInGPU.layers[lowerModuleIndex5] + - 6 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex5] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex5] == lst::TwoS); if (layer1 == 1 and layer2 == 2 and layer3 == 3) { if (layer4 == 12 and layer5 == 13) { @@ -2125,7 +2125,7 @@ namespace SDL { return true; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, @@ -2133,25 +2133,25 @@ namespace SDL { uint16_t& lowerModuleIndex5, float rPhiChiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); const int layer4 = modulesInGPU.layers[lowerModuleIndex4] + - 6 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex4] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex4] == lst::TwoS); const int layer5 = modulesInGPU.layers[lowerModuleIndex5] + - 6 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex5] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex5] == lst::TwoS); if (layer1 == 1 and layer2 == 2 and layer3 == 3) { if (layer4 == 12 and layer5 == 13) { @@ -2234,7 +2234,7 @@ namespace SDL { float chiSquared = 0.f; float absArctanSlope, angleM, xPrime, yPrime, sigma2; for (size_t i = 0; i < nPoints; i++) { - absArctanSlope = ((slopes[i] != SDL::SDL_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) + absArctanSlope = ((slopes[i] != lst::lst_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) : 0.5f * float(M_PI)); if (xs[i] > 0 and ys[i] > 0) { angleM = 0.5f * float(M_PI) - absArctanSlope; @@ -2263,7 +2263,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void computeSigmasForRegression_pT5(TAcc const& acc, - SDL::Modules& modulesInGPU, + lst::Modules& modulesInGPU, const uint16_t* lowerModuleIndices, float* delta1, float* delta2, @@ -2349,7 +2349,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RPhiChiSquared(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t* lowerModuleIndices, float& g, float& f, @@ -2371,7 +2371,7 @@ namespace SDL { }; ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RPhiChiSquaredInwards( - struct SDL::Modules& modulesInGPU, float& g, float& f, float& r, float* xPix, float* yPix) { + struct lst::Modules& modulesInGPU, float& g, float& f, float& r, float* xPix, float* yPix) { /* Using the computed regression center and radius, compute the chi squared for the pixels */ @@ -2385,7 +2385,7 @@ namespace SDL { return chiSquared; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredInwardsCuts(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredInwardsCuts(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, @@ -2393,25 +2393,25 @@ namespace SDL { uint16_t& lowerModuleIndex5, float rPhiChiSquared) { const int layer1 = modulesInGPU.layers[lowerModuleIndex1] + - 6 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS); const int layer2 = modulesInGPU.layers[lowerModuleIndex2] + - 6 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS); const int layer3 = modulesInGPU.layers[lowerModuleIndex3] + - 6 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS); const int layer4 = modulesInGPU.layers[lowerModuleIndex4] + - 6 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex4] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex4] == lst::TwoS); const int layer5 = modulesInGPU.layers[lowerModuleIndex5] + - 6 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) + - 5 * (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex5] == SDL::TwoS); + 6 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) + + 5 * (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex5] == lst::TwoS); if (layer1 == 1 and layer2 == 2 and layer3 == 3) { if (layer4 == 12 and layer5 == 13) { @@ -2477,12 +2477,12 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runPixelQuintupletDefaultAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::ObjectRanges& rangesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, - struct SDL::Quintuplets& quintupletsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::ObjectRanges& rangesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, + struct lst::Quintuplets& quintupletsInGPU, unsigned int& pixelSegmentIndex, unsigned int& quintupletIndex, float& rzChiSquared, @@ -2625,7 +2625,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RZChiSquared(TAcc const& acc, - struct SDL::Modules& modulesInGPU, + struct lst::Modules& modulesInGPU, uint16_t* lowerModuleIndices, float* rtPix, float* zPix, @@ -2645,7 +2645,7 @@ namespace SDL { const int moduleSide = modulesInGPU.sides[lowerModuleIndex]; const int moduleSubdet = modulesInGPU.subdets[lowerModuleIndex]; - residual = (moduleSubdet == SDL::Barrel) ? (zs[i] - zPix[0]) - slope * (rts[i] - rtPix[0]) + residual = (moduleSubdet == lst::Barrel) ? (zs[i] - zPix[0]) - slope * (rts[i] - rtPix[0]) : (rts[i] - rtPix[0]) - (zs[i] - zPix[0]) / slope; const float& drdz = modulesInGPU.drdzs[lowerModuleIndex]; //PS Modules @@ -2657,7 +2657,7 @@ namespace SDL { } //special dispensation to tilted PS modules! - if (moduleType == 0 and moduleSubdet == SDL::Barrel and moduleSide != Center) { + if (moduleType == 0 and moduleSubdet == lst::Barrel and moduleSide != Center) { error2 /= (1.f + drdz * drdz); } RMSE += (residual * residual) / error2; @@ -2670,16 +2670,16 @@ namespace SDL { struct createPixelQuintupletsInGPUFromMapv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::PixelQuintuplets pixelQuintupletsInGPU, + struct lst::Modules modulesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::Quintuplets quintupletsInGPU, + struct lst::PixelQuintuplets pixelQuintupletsInGPU, unsigned int* connectedPixelSize, unsigned int* connectedPixelIndex, unsigned int nPixelSegments, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::ObjectRanges rangesInGPU) const { auto const globalBlockIdx = alpaka::getIdx(acc); auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridBlockExtent = alpaka::getWorkDiv(acc); @@ -2693,7 +2693,7 @@ namespace SDL { uint16_t quintupletLowerModuleIndex = modulesInGPU.connectedPixels[iLSModule]; if (quintupletLowerModuleIndex >= *modulesInGPU.nLowerModules) continue; - if (modulesInGPU.moduleType[quintupletLowerModuleIndex] == SDL::TwoS) + if (modulesInGPU.moduleType[quintupletLowerModuleIndex] == lst::TwoS) continue; uint16_t pixelModuleIndex = *modulesInGPU.nLowerModules; if (segmentsInGPU.isDup[i_pLS]) @@ -2777,5 +2777,5 @@ namespace SDL { } // end i_pLS } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h index 26813dbcf4126..d6111c1b4ed4d 100644 --- a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h +++ b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h @@ -12,7 +12,7 @@ #include "ObjectRanges.h" #include "Triplet.h" -namespace SDL { +namespace lst { struct Quintuplets { unsigned int* tripletIndices; uint16_t* lowerModuleIndices; @@ -148,8 +148,8 @@ namespace SDL { return ((firstMin <= secondMin) && (secondMin < firstMax)) || ((secondMin < firstMin) && (firstMin < secondMax)); }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addQuintupletToMemory(struct SDL::Triplets& tripletsInGPU, - struct SDL::Quintuplets& quintupletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addQuintupletToMemory(struct lst::Triplets& tripletsInGPU, + struct lst::Quintuplets& quintupletsInGPU, unsigned int innerTripletIndex, unsigned int outerTripletIndex, uint16_t& lowerModule1, @@ -231,7 +231,7 @@ namespace SDL { }; //90% constraint - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passChiSquaredConstraint(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passChiSquaredConstraint(struct lst::Modules& modulesInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, @@ -316,8 +316,8 @@ namespace SDL { //bounds can be found at http://uaf-10.t2.ucsd.edu/~bsathian/SDL/T5_RZFix/t5_rz_thresholds.txt template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passT5RZConstraint(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, unsigned int firstMDIndex, unsigned int secondMDIndex, unsigned int thirdMDIndex, @@ -527,7 +527,7 @@ namespace SDL { continue; } - // calculation is copied from PixelTriplet.cc SDL::computePT3RZChiSquared + // calculation is copied from PixelTriplet.cc lst::computePT3RZChiSquared float diffr = 0, diffz = 0; float rou = a / p; @@ -585,14 +585,14 @@ namespace SDL { subdets = modulesInGPU.subdets[lowerModuleIndex3]; } if (i == 2 || i == 3) { - residual = (layeri <= 6 && ((side == SDL::Center) or (drdz < 1))) ? diffz : diffr; + residual = (layeri <= 6 && ((side == lst::Center) or (drdz < 1))) ? diffz : diffr; float projection_missing2 = 1.f; if (drdz < 1) - projection_missing2 = ((subdets == SDL::Endcap) or (side == SDL::Center)) + projection_missing2 = ((subdets == lst::Endcap) or (side == lst::Center)) ? 1.f : 1.f / (1 + drdz * drdz); // cos(atan(drdz)), if dr/dz<1 if (drdz > 1) - projection_missing2 = ((subdets == SDL::Endcap) or (side == SDL::Center)) + projection_missing2 = ((subdets == lst::Endcap) or (side == lst::Center)) ? 1.f : (drdz * drdz) / (1 + drdz * drdz); //sin(atan(drdz)), if dr/dz>1 error2 = error2 * projection_missing2; @@ -750,8 +750,8 @@ namespace SDL { }; template - ALPAKA_FN_ACC ALPAKA_FN_INLINE bool T5HasCommonMiniDoublet(struct SDL::Triplets& tripletsInGPU, - struct SDL::Segments& segmentsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE bool T5HasCommonMiniDoublet(struct lst::Triplets& tripletsInGPU, + struct lst::Segments& segmentsInGPU, unsigned int innerTripletIndex, unsigned int outerTripletIndex) { unsigned int innerOuterSegmentIndex = tripletsInGPU.segmentIndices[2 * innerTripletIndex + 1]; @@ -777,7 +777,7 @@ namespace SDL { //brute force float candidateRadius; float g, f; - minimumRadius = SDL::SDL_INF; + minimumRadius = lst::lst_INF; maximumRadius = 0.f; for (size_t i = 0; i < 3; i++) { float x1 = x1Vec[i]; @@ -1149,7 +1149,7 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void computeSigmasForRegression(TAcc const& acc, - SDL::Modules& modulesInGPU, + lst::Modules& modulesInGPU, const uint16_t* lowerModuleIndices, float* delta1, float* delta2, @@ -1267,7 +1267,7 @@ namespace SDL { // Computing sigmas is a very tricky affair // if the module is tilted or endcap, we need to use the slopes properly! - absArctanSlope = ((slopes[i] != SDL::SDL_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) + absArctanSlope = ((slopes[i] != lst::lst_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) : 0.5f * float(M_PI)); if (xs[i] > 0 and ys[i] > 0) { @@ -1350,7 +1350,7 @@ namespace SDL { float chiSquared = 0.f; float absArctanSlope, angleM, xPrime, yPrime, sigma2; for (size_t i = 0; i < nPoints; i++) { - absArctanSlope = ((slopes[i] != SDL::SDL_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) + absArctanSlope = ((slopes[i] != lst::lst_INF) ? alpaka::math::abs(acc, alpaka::math::atan(acc, slopes[i])) : 0.5f * float(M_PI)); if (xs[i] > 0 and ys[i] > 0) { angleM = 0.5f * float(M_PI) - absArctanSlope; @@ -1389,32 +1389,32 @@ namespace SDL { float dr, float lIn) { if (lIn == 0) { - betaOut += SDL::copysignf( + betaOut += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaOut); return; } if (betaIn * betaOut > 0.f and - (alpaka::math::abs(acc, pt_beta) < 4.f * SDL::pt_betaMax or + (alpaka::math::abs(acc, pt_beta) < 4.f * lst::pt_betaMax or (lIn >= 11 and alpaka::math::abs(acc, pt_beta) < - 8.f * SDL::pt_betaMax))) //and the pt_beta is well-defined; less strict for endcap-endcap + 8.f * lst::pt_betaMax))) //and the pt_beta is well-defined; less strict for endcap-endcap { const float betaInUpd = betaIn + - SDL::copysignf(alpaka::math::asin( + lst::copysignf(alpaka::math::asin( acc, alpaka::math::min( - acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version const float betaOutUpd = betaOut + - SDL::copysignf(alpaka::math::asin( + lst::copysignf(alpaka::math::asin( acc, alpaka::math::min( - acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaOut); //FIXME: need a faster version betaAv = 0.5f * (betaInUpd + betaOutUpd); @@ -1422,64 +1422,64 @@ namespace SDL { const float pt_beta_inv = 1.f / alpaka::math::abs(acc, dr * k2Rinv1GeVf / alpaka::math::sin(acc, betaAv)); //get a better pt estimate - betaIn += SDL::copysignf( - alpaka::math::asin(acc, alpaka::math::min(acc, sdIn_dr * SDL::k2Rinv1GeVf * pt_beta_inv, SDL::sinAlphaMax)), + betaIn += lst::copysignf( + alpaka::math::asin(acc, alpaka::math::min(acc, sdIn_dr * lst::k2Rinv1GeVf * pt_beta_inv, lst::sinAlphaMax)), betaIn); //FIXME: need a faster version - betaOut += SDL::copysignf( - alpaka::math::asin(acc, alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf * pt_beta_inv, SDL::sinAlphaMax)), + betaOut += lst::copysignf( + alpaka::math::asin(acc, alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf * pt_beta_inv, lst::sinAlphaMax)), betaOut); //FIXME: need a faster version //update the av and pt betaAv = 0.5f * (betaIn + betaOut); //2nd update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate } else if (lIn < 11 && alpaka::math::abs(acc, betaOut) < 0.2f * alpaka::math::abs(acc, betaIn) && - alpaka::math::abs(acc, pt_beta) < 12.f * SDL::pt_betaMax) //use betaIn sign as ref + alpaka::math::abs(acc, pt_beta) < 12.f * lst::pt_betaMax) //use betaIn sign as ref { const float pt_betaIn = dr * k2Rinv1GeVf / alpaka::math::sin(acc, betaIn); const float betaInUpd = - betaIn + SDL::copysignf( + betaIn + lst::copysignf( alpaka::math::asin( acc, alpaka::math::min( - acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), SDL::sinAlphaMax)), + acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version const float betaOutUpd = betaOut + - SDL::copysignf( + lst::copysignf( alpaka::math::asin( acc, alpaka::math::min( - acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), SDL::sinAlphaMax)), + acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_betaIn), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version betaAv = (alpaka::math::abs(acc, betaOut) > 0.2f * alpaka::math::abs(acc, betaIn)) ? (0.5f * (betaInUpd + betaOutUpd)) : betaInUpd; //1st update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate - betaIn += SDL::copysignf( + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + betaIn += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdIn_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdIn_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version - betaOut += SDL::copysignf( + betaOut += lst::copysignf( alpaka::math::asin( acc, - alpaka::math::min(acc, sdOut_dr * SDL::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), SDL::sinAlphaMax)), + alpaka::math::min(acc, sdOut_dr * lst::k2Rinv1GeVf / alpaka::math::abs(acc, pt_beta), lst::sinAlphaMax)), betaIn); //FIXME: need a faster version //update the av and pt betaAv = 0.5f * (betaIn + betaOut); //2nd update - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate } }; template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runQuintupletDefaultAlgoBBBB(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& innerOuterLowerModuleIndex, uint16_t& outerInnerLowerModuleIndex, @@ -1505,8 +1505,8 @@ namespace SDL { float& betaInCut, float& betaOutCut, float& deltaBetaCut) { - bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS); - bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS); + bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS); + bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS); float rt_InLo = mdsInGPU.anchorRt[firstMDIndex]; float rt_InOut = mdsInGPU.anchorRt[secondMDIndex]; @@ -1517,17 +1517,17 @@ namespace SDL { float z_OutLo = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeV_OutLo = - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float rtRatio_OutLoInLo = rt_OutLo / rt_InLo; // Outer segment beginning rt divided by inner segment beginning rt; float dzDrtScale = alpaka::math::tan(acc, alpha1GeV_OutLo) / alpha1GeV_OutLo; // The track can bend in r-z plane slightly - float zpitch_InLo = (isPS_InLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); - float zpitch_OutLo = (isPS_OutLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); + float zpitch_InLo = (isPS_InLo ? lst::pixelPSZpitch : lst::strip2SZpitch); + float zpitch_OutLo = (isPS_OutLo ? lst::pixelPSZpitch : lst::strip2SZpitch); - zHi = z_InLo + (z_InLo + SDL::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo < 0.f ? 1.f : dzDrtScale) + + zHi = z_InLo + (z_InLo + lst::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo < 0.f ? 1.f : dzDrtScale) + (zpitch_InLo + zpitch_OutLo); - zLo = z_InLo + (z_InLo - SDL::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - + zLo = z_InLo + (z_InLo - lst::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - (zpitch_InLo + zpitch_OutLo); //Cut 1 - z compatibility @@ -1548,7 +1548,7 @@ namespace SDL { float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2f * (rt_OutLo - rt_InLo) / 50.f) * (r3_InLo / rt_InLo); - float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; dzErr += sdlMuls2 * drt_OutLo_InLo * drt_OutLo_InLo / 3.f * coshEta * coshEta; dzErr = alpaka::math::sqrt(acc, dzErr); @@ -1556,7 +1556,7 @@ namespace SDL { const float dzMean = dz_InSeg / drt_InSeg * drt_OutLo_InLo; const float zWindow = dzErr / drt_InSeg * drt_OutLo_InLo + - (zpitch_InLo + zpitch_OutLo); //FIXME for SDL::ptCut lower than ~0.8 need to add curv path correction + (zpitch_InLo + zpitch_OutLo); //FIXME for lst::ptCut lower than ~0.8 need to add curv path correction zLoPointed = z_InLo + dzMean * (z_InLo > 0.f ? 1.f : dzDrtScale) - zWindow; zHiPointed = z_InLo + dzMean * (z_InLo < 0.f ? 1.f : dzDrtScale) + zWindow; @@ -1567,7 +1567,7 @@ namespace SDL { float sdlPVoff = 0.1f / rt_OutLo; sdlCut = alpha1GeV_OutLo + alpaka::math::sqrt(acc, sdlMuls2 + sdlPVoff * sdlPVoff); - deltaPhiPos = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); + deltaPhiPos = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); // Cut #3: FIXME:deltaPhiPos can be tighter if (alpaka::math::abs(acc, deltaPhiPos) > sdlCut) return false; @@ -1577,7 +1577,7 @@ namespace SDL { float diffX = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float diffY = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - dPhi = SDL::deltaPhi(acc, midPointX, midPointY, diffX, diffY); + dPhi = lst::deltaPhi(acc, midPointX, midPointY, diffX, diffY); // Cut #4: deltaPhiChange if (alpaka::math::abs(acc, dPhi) > sdlCut) @@ -1588,13 +1588,13 @@ namespace SDL { float alpha_InLo = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float alpha_OutLo = __H2F(segmentsInGPU.dPhiChanges[outerSegmentIndex]); - bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == SDL::Endcap and - modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::TwoS; + bool isEC_lastLayer = modulesInGPU.subdets[outerOuterLowerModuleIndex] == lst::Endcap and + modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::TwoS; float alpha_OutUp, alpha_OutUp_highEdge, alpha_OutUp_lowEdge; - alpha_OutUp = SDL::phi_mpi_pi(acc, - SDL::phi(acc, + alpha_OutUp = lst::phi_mpi_pi(acc, + lst::phi(acc, mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[thirdMDIndex], mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex]) - mdsInGPU.anchorPhi[fourthMDIndex]); @@ -1609,26 +1609,26 @@ namespace SDL { float tl_axis_lowEdge_x = tl_axis_x; float tl_axis_lowEdge_y = tl_axis_y; - betaIn = alpha_InLo - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = alpha_InLo - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); float betaInRHmin = betaIn; float betaInRHmax = betaIn; betaOut = - -alpha_OutUp + SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); + -alpha_OutUp + lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); float betaOutRHmin = betaOut; float betaOutRHmax = betaOut; if (isEC_lastLayer) { alpha_OutUp_highEdge = - SDL::phi_mpi_pi(acc, - SDL::phi(acc, + lst::phi_mpi_pi(acc, + lst::phi(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex] - mdsInGPU.anchorX[thirdMDIndex], mdsInGPU.anchorHighEdgeY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex]) - mdsInGPU.anchorHighEdgePhi[fourthMDIndex]); alpha_OutUp_lowEdge = - SDL::phi_mpi_pi(acc, - SDL::phi(acc, + lst::phi_mpi_pi(acc, + lst::phi(acc, mdsInGPU.anchorLowEdgeX[fourthMDIndex] - mdsInGPU.anchorX[thirdMDIndex], mdsInGPU.anchorLowEdgeY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex]) - mdsInGPU.anchorLowEdgePhi[fourthMDIndex]); @@ -1638,11 +1638,11 @@ namespace SDL { tl_axis_lowEdge_x = mdsInGPU.anchorLowEdgeX[fourthMDIndex] - mdsInGPU.anchorX[firstMDIndex]; tl_axis_lowEdge_y = mdsInGPU.anchorLowEdgeY[fourthMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaOutRHmin = -alpha_OutUp_highEdge + SDL::phi_mpi_pi(acc, - SDL::phi(acc, tl_axis_highEdge_x, tl_axis_highEdge_y) - + betaOutRHmin = -alpha_OutUp_highEdge + lst::phi_mpi_pi(acc, + lst::phi(acc, tl_axis_highEdge_x, tl_axis_highEdge_y) - mdsInGPU.anchorHighEdgePhi[fourthMDIndex]); - betaOutRHmax = -alpha_OutUp_lowEdge + SDL::phi_mpi_pi(acc, - SDL::phi(acc, tl_axis_lowEdge_x, tl_axis_lowEdge_y) - + betaOutRHmax = -alpha_OutUp_lowEdge + lst::phi_mpi_pi(acc, + lst::phi(acc, tl_axis_lowEdge_x, tl_axis_lowEdge_y) - mdsInGPU.anchorLowEdgePhi[fourthMDIndex]); } @@ -1660,7 +1660,7 @@ namespace SDL { betaInCut = alpaka::math::asin( acc, alpaka::math::min( - acc, (-rt_InSeg * corrF + drt_tl_axis) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, (-rt_InSeg * corrF + drt_tl_axis) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / drt_InSeg); //Cut #5: first beta cut @@ -1668,7 +1668,7 @@ namespace SDL { return false; float betaAv = 0.5f * (betaIn + betaOut); - pt_beta = drt_tl_axis * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); + pt_beta = drt_tl_axis * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); int lIn = 5; int lOut = isEC_lastLayer ? 11 : 5; float sdOut_dr = alpaka::math::sqrt(acc, @@ -1678,7 +1678,7 @@ namespace SDL { (mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex])); float sdOut_d = mdsInGPU.anchorRt[fourthMDIndex] - mdsInGPU.anchorRt[thirdMDIndex]; - SDL::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, rt_InSeg, sdOut_dr, drt_tl_axis, lIn); + lst::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, rt_InSeg, sdOut_dr, drt_tl_axis, lIn); const float betaInMMSF = (alpaka::math::abs(acc, betaInRHmin + betaInRHmax) > 0) ? (2.f * betaIn / alpaka::math::abs(acc, betaInRHmin + betaInRHmax)) @@ -1692,19 +1692,19 @@ namespace SDL { betaOutRHmax *= betaOutMMSF; float min_ptBeta_maxPtBeta = alpaka::math::min( - acc, alpaka::math::abs(acc, pt_beta), SDL::pt_betaMax); //need to confimm the range-out value of 7 GeV + acc, alpaka::math::abs(acc, pt_beta), lst::pt_betaMax); //need to confimm the range-out value of 7 GeV const float dBetaMuls2 = sdlThetaMulsF2 * 16.f / (min_ptBeta_maxPtBeta * min_ptBeta_maxPtBeta); const float alphaInAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, alpha_InLo), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); const float alphaOutAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, alpha_OutLo), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); - const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * SDL::deltaZLum / z_InLo); - const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * SDL::deltaZLum / z_OutLo); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); + const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * lst::deltaZLum / z_InLo); + const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * lst::deltaZLum / z_OutLo); const float dBetaLum2 = (dBetaInLum + dBetaOutLum) * (dBetaInLum + dBetaOutLum); const float sinDPhi = alpaka::math::sin(acc, dPhi); @@ -1725,7 +1725,7 @@ namespace SDL { //FIXME: need faster version betaOutCut = - alpaka::math::asin(acc, alpaka::math::min(acc, drt_tl_axis * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + alpaka::math::asin(acc, alpaka::math::min(acc, drt_tl_axis * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdOut_d) + alpaka::math::sqrt(acc, dBetaLum2 + dBetaMuls2); //Cut #6: The real beta cut @@ -1746,9 +1746,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runQuintupletDefaultAlgoBBEE(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& innerOuterLowerModuleIndex, uint16_t& outerInnerLowerModuleIndex, @@ -1774,8 +1774,8 @@ namespace SDL { float& betaOutCut, float& deltaBetaCut, float& kZ) { - bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS); - bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS); + bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS); + bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS); float rt_InLo = mdsInGPU.anchorRt[firstMDIndex]; float rt_InOut = mdsInGPU.anchorRt[secondMDIndex]; @@ -1786,25 +1786,25 @@ namespace SDL { float z_OutLo = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeV_OutLo = - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float rtRatio_OutLoInLo = rt_OutLo / rt_InLo; // Outer segment beginning rt divided by inner segment beginning rt; float dzDrtScale = alpaka::math::tan(acc, alpha1GeV_OutLo) / alpha1GeV_OutLo; // The track can bend in r-z plane slightly - float zpitch_InLo = (isPS_InLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); - float zpitch_OutLo = (isPS_OutLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); + float zpitch_InLo = (isPS_InLo ? lst::pixelPSZpitch : lst::strip2SZpitch); + float zpitch_OutLo = (isPS_OutLo ? lst::pixelPSZpitch : lst::strip2SZpitch); float zGeom = zpitch_InLo + zpitch_OutLo; - zLo = z_InLo + (z_InLo - SDL::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - zGeom; + zLo = z_InLo + (z_InLo - lst::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - zGeom; // Cut #0: Preliminary (Only here in endcap case) if (z_InLo * z_OutLo <= 0) return false; - float dLum = SDL::copysignf(SDL::deltaZLum, z_InLo); - bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS; - float rtGeom1 = isOutSgInnerMDPS ? SDL::pixelPSZpitch : SDL::strip2SZpitch; - float zGeom1 = SDL::copysignf(zGeom, z_InLo); + float dLum = lst::copysignf(lst::deltaZLum, z_InLo); + bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS; + float rtGeom1 = isOutSgInnerMDPS ? lst::pixelPSZpitch : lst::strip2SZpitch; + float zGeom1 = lst::copysignf(zGeom, z_InLo); rtLo = rt_InLo * (1.f + (z_OutLo - z_InLo - zGeom1) / (z_InLo + zGeom1 + dLum) / dzDrtScale) - rtGeom1; //slope correction only on the lower end zOut = z_OutLo; @@ -1816,7 +1816,7 @@ namespace SDL { float zInForHi = z_InLo - zGeom1 - dLum; if (zInForHi * z_InLo < 0) { - zInForHi = SDL::copysignf(0.1f, z_InLo); + zInForHi = lst::copysignf(0.1f, z_InLo); } rtHi = rt_InLo * (1.f + (z_OutLo - z_InLo + zGeom1) / zInForHi) + rtGeom1; @@ -1833,13 +1833,13 @@ namespace SDL { const float coshEta = dr3SDIn / drtSDIn; //direction estimate const float dzOutInAbs = alpaka::math::abs(acc, z_OutLo - z_InLo); const float multDzDr = dzOutInAbs * coshEta / (coshEta * coshEta - 1.f); - const float zGeom1_another = SDL::pixelPSZpitch; + const float zGeom1_another = lst::pixelPSZpitch; kZ = (z_OutLo - z_InLo) / dzSDIn; float drtErr = zGeom1_another * zGeom1_another * drtSDIn * drtSDIn / dzSDIn / dzSDIn * (1.f - 2.f * kZ + 2.f * kZ * kZ); const float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2f * (rt_OutLo - rt_InLo) / 50.f) * (rIn / rt_InLo); - const float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + const float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; drtErr += sdlMuls2 * multDzDr * multDzDr / 3.f * coshEta * coshEta; drtErr = alpaka::math::sqrt(acc, drtErr); @@ -1850,7 +1850,7 @@ namespace SDL { const float sdlPVoff = 0.1f / rt_OutLo; sdlCut = alpha1GeV_OutLo + alpaka::math::sqrt(acc, sdlMuls2 + sdlPVoff * sdlPVoff); - deltaPhiPos = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); + deltaPhiPos = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); //Cut #4: deltaPhiPos can be tighter if (alpaka::math::abs(acc, deltaPhiPos) > sdlCut) @@ -1861,7 +1861,7 @@ namespace SDL { float diffX = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float diffY = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - dPhi = SDL::deltaPhi(acc, midPointX, midPointY, diffX, diffY); + dPhi = lst::deltaPhi(acc, midPointX, midPointY, diffX, diffY); // Cut #5: deltaPhiChange if (alpaka::math::abs(acc, dPhi) > sdlCut) return false; @@ -1871,32 +1871,32 @@ namespace SDL { float sdIn_alpha_max = __H2F(segmentsInGPU.dPhiChangeMaxs[innerSegmentIndex]); float sdOut_alpha = sdIn_alpha; - float sdOut_alphaOut = SDL::phi_mpi_pi(acc, - SDL::phi(acc, + float sdOut_alphaOut = lst::phi_mpi_pi(acc, + lst::phi(acc, mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[thirdMDIndex], mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex]) - mdsInGPU.anchorPhi[fourthMDIndex]); - float sdOut_alphaOut_min = SDL::phi_mpi_pi( + float sdOut_alphaOut_min = lst::phi_mpi_pi( acc, __H2F(segmentsInGPU.dPhiChangeMins[outerSegmentIndex]) - __H2F(segmentsInGPU.dPhiMins[outerSegmentIndex])); - float sdOut_alphaOut_max = SDL::phi_mpi_pi( + float sdOut_alphaOut_max = lst::phi_mpi_pi( acc, __H2F(segmentsInGPU.dPhiChangeMaxs[outerSegmentIndex]) - __H2F(segmentsInGPU.dPhiMaxs[outerSegmentIndex])); float tl_axis_x = mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaIn = sdIn_alpha - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = sdIn_alpha - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); float betaInRHmin = betaIn; float betaInRHmax = betaIn; betaOut = - -sdOut_alphaOut + SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); + -sdOut_alphaOut + lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); float betaOutRHmin = betaOut; float betaOutRHmax = betaOut; - bool isEC_secondLayer = (modulesInGPU.subdets[innerOuterLowerModuleIndex] == SDL::Endcap) and - (modulesInGPU.moduleType[innerOuterLowerModuleIndex] == SDL::TwoS); + bool isEC_secondLayer = (modulesInGPU.subdets[innerOuterLowerModuleIndex] == lst::Endcap) and + (modulesInGPU.moduleType[innerOuterLowerModuleIndex] == lst::TwoS); if (isEC_secondLayer) { betaInRHmin = betaIn - sdIn_alpha_min + sdIn_alpha; @@ -1930,7 +1930,7 @@ namespace SDL { const float corrF = 1.f; betaInCut = alpaka::math::asin( - acc, alpaka::math::min(acc, (-sdIn_dr * corrF + dr) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, alpaka::math::min(acc, (-sdIn_dr * corrF + dr) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdIn_d); //Cut #6: first beta cut @@ -1938,7 +1938,7 @@ namespace SDL { return false; float betaAv = 0.5f * (betaIn + betaOut); - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); float lIn = 5; float lOut = 11; @@ -1950,7 +1950,7 @@ namespace SDL { (mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex])); float sdOut_d = mdsInGPU.anchorRt[fourthMDIndex] - mdsInGPU.anchorRt[thirdMDIndex]; - SDL::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, sdIn_dr, sdOut_dr, dr, lIn); + lst::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, sdIn_dr, sdOut_dr, dr, lIn); const float betaInMMSF = (alpaka::math::abs(acc, betaInRHmin + betaInRHmax) > 0) ? (2.f * betaIn / alpaka::math::abs(acc, betaInRHmin + betaInRHmax)) @@ -1964,25 +1964,25 @@ namespace SDL { betaOutRHmax *= betaOutMMSF; float min_ptBeta_maxPtBeta = alpaka::math::min( - acc, alpaka::math::abs(acc, pt_beta), SDL::pt_betaMax); //need to confirm the range-out value of 7 GeV + acc, alpaka::math::abs(acc, pt_beta), lst::pt_betaMax); //need to confirm the range-out value of 7 GeV const float dBetaMuls2 = sdlThetaMulsF2 * 16.f / (min_ptBeta_maxPtBeta * min_ptBeta_maxPtBeta); const float alphaInAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, sdIn_alpha), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); const float alphaOutAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, sdOut_alpha), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); - const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * SDL::deltaZLum / z_InLo); - const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * SDL::deltaZLum / z_OutLo); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); + const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * lst::deltaZLum / z_InLo); + const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * lst::deltaZLum / z_OutLo); const float dBetaLum2 = (dBetaInLum + dBetaOutLum) * (dBetaInLum + dBetaOutLum); const float sinDPhi = alpaka::math::sin(acc, dPhi); const float dBetaRIn2 = 0; // TODO-RH float dBetaROut = 0; - if (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::TwoS) { + if (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::TwoS) { dBetaROut = (alpaka::math::sqrt(acc, mdsInGPU.anchorHighEdgeX[fourthMDIndex] * mdsInGPU.anchorHighEdgeX[fourthMDIndex] + @@ -1995,7 +1995,7 @@ namespace SDL { const float dBetaROut2 = dBetaROut * dBetaROut; //FIXME: need faster version - betaOutCut = alpaka::math::asin(acc, alpaka::math::min(acc, dr * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + betaOutCut = alpaka::math::asin(acc, alpaka::math::min(acc, dr * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdOut_d) + alpaka::math::sqrt(acc, dBetaLum2 + dBetaMuls2); //Cut #6: The real beta cut @@ -2016,9 +2016,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runQuintupletDefaultAlgoEEEE(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& innerOuterLowerModuleIndex, uint16_t& outerInnerLowerModuleIndex, @@ -2044,8 +2044,8 @@ namespace SDL { float& betaOutCut, float& deltaBetaCut, float& kZ) { - bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS); - bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS); + bool isPS_InLo = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS); + bool isPS_OutLo = (modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS); float rt_InLo = mdsInGPU.anchorRt[firstMDIndex]; float rt_InOut = mdsInGPU.anchorRt[secondMDIndex]; @@ -2056,29 +2056,29 @@ namespace SDL { float z_OutLo = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeV_OutLo = - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float rtRatio_OutLoInLo = rt_OutLo / rt_InLo; // Outer segment beginning rt divided by inner segment beginning rt; float dzDrtScale = alpaka::math::tan(acc, alpha1GeV_OutLo) / alpha1GeV_OutLo; // The track can bend in r-z plane slightly - float zpitch_InLo = (isPS_InLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); - float zpitch_OutLo = (isPS_OutLo ? SDL::pixelPSZpitch : SDL::strip2SZpitch); + float zpitch_InLo = (isPS_InLo ? lst::pixelPSZpitch : lst::strip2SZpitch); + float zpitch_OutLo = (isPS_OutLo ? lst::pixelPSZpitch : lst::strip2SZpitch); float zGeom = zpitch_InLo + zpitch_OutLo; - zLo = z_InLo + (z_InLo - SDL::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - + zLo = z_InLo + (z_InLo - lst::deltaZLum) * (rtRatio_OutLoInLo - 1.f) * (z_InLo > 0.f ? 1.f : dzDrtScale) - zGeom; //slope-correction only on outer end // Cut #0: Preliminary (Only here in endcap case) if ((z_InLo * z_OutLo) <= 0) return false; - float dLum = SDL::copysignf(SDL::deltaZLum, z_InLo); - bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == SDL::PS; - bool isInSgInnerMDPS = modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS; + float dLum = lst::copysignf(lst::deltaZLum, z_InLo); + bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerInnerLowerModuleIndex] == lst::PS; + bool isInSgInnerMDPS = modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS; - float rtGeom = (isInSgInnerMDPS and isOutSgInnerMDPS) ? 2.f * SDL::pixelPSZpitch - : (isInSgInnerMDPS or isOutSgInnerMDPS) ? SDL::pixelPSZpitch + SDL::strip2SZpitch - : 2.f * SDL::strip2SZpitch; + float rtGeom = (isInSgInnerMDPS and isOutSgInnerMDPS) ? 2.f * lst::pixelPSZpitch + : (isInSgInnerMDPS or isOutSgInnerMDPS) ? lst::pixelPSZpitch + lst::strip2SZpitch + : 2.f * lst::strip2SZpitch; float dz = z_OutLo - z_InLo; rtLo = rt_InLo * (1.f + dz / (z_InLo + dLum) / dzDrtScale) - rtGeom; //slope correction only on the lower end @@ -2093,7 +2093,7 @@ namespace SDL { if ((rtOut < rtLo) || (rtOut > rtHi)) return false; - bool isInSgOuterMDPS = modulesInGPU.moduleType[innerOuterLowerModuleIndex] == SDL::PS; + bool isInSgOuterMDPS = modulesInGPU.moduleType[innerOuterLowerModuleIndex] == lst::PS; const float drtSDIn = rt_InOut - rt_InLo; const float dzSDIn = z_InOut - z_InLo; @@ -2106,11 +2106,11 @@ namespace SDL { kZ = (z_OutLo - z_InLo) / dzSDIn; float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2f * (rt_OutLo - rt_InLo) / 50.f); - float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; float drtErr = alpaka::math::sqrt( acc, - SDL::pixelPSZpitch * SDL::pixelPSZpitch * 2.f / (dzSDIn * dzSDIn) * (dzOutInAbs * dzOutInAbs) + + lst::pixelPSZpitch * lst::pixelPSZpitch * 2.f / (dzSDIn * dzSDIn) * (dzOutInAbs * dzOutInAbs) + sdlMuls2 * multDzDr * multDzDr / 3.f * coshEta * coshEta); float drtMean = drtSDIn * dzOutInAbs / alpaka::math::abs(acc, dzSDIn); @@ -2130,7 +2130,7 @@ namespace SDL { float sdlPVoff = 0.1f / rtOut; sdlCut = alpha1GeV_OutLo + alpaka::math::sqrt(acc, sdlMuls2 + sdlPVoff * sdlPVoff); - deltaPhiPos = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); + deltaPhiPos = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[secondMDIndex]); if (alpaka::math::abs(acc, deltaPhiPos) > sdlCut) return false; @@ -2140,7 +2140,7 @@ namespace SDL { float diffX = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float diffY = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - dPhi = SDL::deltaPhi(acc, midPointX, midPointY, diffX, diffY); + dPhi = lst::deltaPhi(acc, midPointX, midPointY, diffX, diffY); // Cut #5: deltaPhiChange if (alpaka::math::abs(acc, dPhi) > sdlCut) @@ -2148,20 +2148,20 @@ namespace SDL { float sdIn_alpha = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float sdOut_alpha = sdIn_alpha; //weird - float sdOut_dPhiPos = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[thirdMDIndex]); + float sdOut_dPhiPos = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[thirdMDIndex]); float sdOut_dPhiChange = __H2F(segmentsInGPU.dPhiChanges[outerSegmentIndex]); float sdOut_dPhiChange_min = __H2F(segmentsInGPU.dPhiChangeMins[outerSegmentIndex]); float sdOut_dPhiChange_max = __H2F(segmentsInGPU.dPhiChangeMaxs[outerSegmentIndex]); - float sdOut_alphaOutRHmin = SDL::phi_mpi_pi(acc, sdOut_dPhiChange_min - sdOut_dPhiPos); - float sdOut_alphaOutRHmax = SDL::phi_mpi_pi(acc, sdOut_dPhiChange_max - sdOut_dPhiPos); - float sdOut_alphaOut = SDL::phi_mpi_pi(acc, sdOut_dPhiChange - sdOut_dPhiPos); + float sdOut_alphaOutRHmin = lst::phi_mpi_pi(acc, sdOut_dPhiChange_min - sdOut_dPhiPos); + float sdOut_alphaOutRHmax = lst::phi_mpi_pi(acc, sdOut_dPhiChange_max - sdOut_dPhiPos); + float sdOut_alphaOut = lst::phi_mpi_pi(acc, sdOut_dPhiChange - sdOut_dPhiPos); float tl_axis_x = mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaIn = sdIn_alpha - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = sdIn_alpha - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); float sdIn_alphaRHmin = __H2F(segmentsInGPU.dPhiChangeMins[innerSegmentIndex]); float sdIn_alphaRHmax = __H2F(segmentsInGPU.dPhiChangeMaxs[innerSegmentIndex]); @@ -2169,7 +2169,7 @@ namespace SDL { float betaInRHmax = betaIn + sdIn_alphaRHmax - sdIn_alpha; betaOut = - -sdOut_alphaOut + SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); + -sdOut_alphaOut + lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[fourthMDIndex]); float betaOutRHmin = betaOut - sdOut_alphaOutRHmin + sdOut_alphaOut; float betaOutRHmax = betaOut - sdOut_alphaOutRHmax + sdOut_alphaOut; @@ -2197,7 +2197,7 @@ namespace SDL { const float corrF = 1.f; betaInCut = alpaka::math::asin( - acc, alpaka::math::min(acc, (-sdIn_dr * corrF + dr) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, alpaka::math::min(acc, (-sdIn_dr * corrF + dr) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdIn_d); //Cut #6: first beta cut @@ -2205,7 +2205,7 @@ namespace SDL { return false; float betaAv = 0.5f * (betaIn + betaOut); - pt_beta = dr * SDL::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); + pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); int lIn = 11; //endcap int lOut = 13; //endcap @@ -2217,7 +2217,7 @@ namespace SDL { (mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex])); float sdOut_d = mdsInGPU.anchorRt[fourthMDIndex] - mdsInGPU.anchorRt[thirdMDIndex]; - SDL::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, sdIn_dr, sdOut_dr, dr, lIn); + lst::runDeltaBetaIterationsT5(acc, betaIn, betaOut, betaAv, pt_beta, sdIn_dr, sdOut_dr, dr, lIn); const float betaInMMSF = (alpaka::math::abs(acc, betaInRHmin + betaInRHmax) > 0) ? (2.f * betaIn / alpaka::math::abs(acc, betaInRHmin + betaInRHmax)) @@ -2231,26 +2231,26 @@ namespace SDL { betaOutRHmax *= betaOutMMSF; float min_ptBeta_maxPtBeta = alpaka::math::min( - acc, alpaka::math::abs(acc, pt_beta), SDL::pt_betaMax); //need to confirm the range-out value of 7 GeV + acc, alpaka::math::abs(acc, pt_beta), lst::pt_betaMax); //need to confirm the range-out value of 7 GeV const float dBetaMuls2 = sdlThetaMulsF2 * 16.f / (min_ptBeta_maxPtBeta * min_ptBeta_maxPtBeta); const float alphaInAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, sdIn_alpha), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_InLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); const float alphaOutAbsReg = alpaka::math::max( acc, alpaka::math::abs(acc, sdOut_alpha), - alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * SDL::k2Rinv1GeVf / 3.0f, SDL::sinAlphaMax))); - const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * SDL::deltaZLum / z_InLo); - const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * SDL::deltaZLum / z_OutLo); + alpaka::math::asin(acc, alpaka::math::min(acc, rt_OutLo * lst::k2Rinv1GeVf / 3.0f, lst::sinAlphaMax))); + const float dBetaInLum = lIn < 11 ? 0.0f : alpaka::math::abs(acc, alphaInAbsReg * lst::deltaZLum / z_InLo); + const float dBetaOutLum = lOut < 11 ? 0.0f : alpaka::math::abs(acc, alphaOutAbsReg * lst::deltaZLum / z_OutLo); const float dBetaLum2 = (dBetaInLum + dBetaOutLum) * (dBetaInLum + dBetaOutLum); const float dBetaRIn2 = 0; // TODO-RH float dBetaROut2 = 0; //TODO-RH //FIXME: need faster version - betaOutCut = alpaka::math::asin(acc, alpaka::math::min(acc, dr * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + betaOutCut = alpaka::math::asin(acc, alpaka::math::min(acc, dr * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdOut_d) + alpaka::math::sqrt(acc, dBetaLum2 + dBetaMuls2); //Cut #6: The real beta cut @@ -2272,9 +2272,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runQuintupletAlgoSelector(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& innerOuterLowerModuleIndex, uint16_t& outerInnerLowerModuleIndex, @@ -2317,8 +2317,8 @@ namespace SDL { short outerInnerLowerModuleSubdet = modulesInGPU.subdets[outerInnerLowerModuleIndex]; short outerOuterLowerModuleSubdet = modulesInGPU.subdets[outerOuterLowerModuleIndex]; - if (innerInnerLowerModuleSubdet == SDL::Barrel and innerOuterLowerModuleSubdet == SDL::Barrel and - outerInnerLowerModuleSubdet == SDL::Barrel and outerOuterLowerModuleSubdet == SDL::Barrel) { + if (innerInnerLowerModuleSubdet == lst::Barrel and innerOuterLowerModuleSubdet == lst::Barrel and + outerInnerLowerModuleSubdet == lst::Barrel and outerOuterLowerModuleSubdet == lst::Barrel) { return runQuintupletDefaultAlgoBBBB(acc, modulesInGPU, mdsInGPU, @@ -2348,8 +2348,8 @@ namespace SDL { betaInCut, betaOutCut, deltaBetaCut); - } else if (innerInnerLowerModuleSubdet == SDL::Barrel and innerOuterLowerModuleSubdet == SDL::Barrel and - outerInnerLowerModuleSubdet == SDL::Endcap and outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Barrel and innerOuterLowerModuleSubdet == lst::Barrel and + outerInnerLowerModuleSubdet == lst::Endcap and outerOuterLowerModuleSubdet == lst::Endcap) { return runQuintupletDefaultAlgoBBEE(acc, modulesInGPU, mdsInGPU, @@ -2379,8 +2379,8 @@ namespace SDL { betaOutCut, deltaBetaCut, kZ); - } else if (innerInnerLowerModuleSubdet == SDL::Barrel and innerOuterLowerModuleSubdet == SDL::Barrel and - outerInnerLowerModuleSubdet == SDL::Barrel and outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Barrel and innerOuterLowerModuleSubdet == lst::Barrel and + outerInnerLowerModuleSubdet == lst::Barrel and outerOuterLowerModuleSubdet == lst::Endcap) { return runQuintupletDefaultAlgoBBBB(acc, modulesInGPU, mdsInGPU, @@ -2410,8 +2410,8 @@ namespace SDL { betaInCut, betaOutCut, deltaBetaCut); - } else if (innerInnerLowerModuleSubdet == SDL::Barrel and innerOuterLowerModuleSubdet == SDL::Endcap and - outerInnerLowerModuleSubdet == SDL::Endcap and outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Barrel and innerOuterLowerModuleSubdet == lst::Endcap and + outerInnerLowerModuleSubdet == lst::Endcap and outerOuterLowerModuleSubdet == lst::Endcap) { return runQuintupletDefaultAlgoBBEE(acc, modulesInGPU, mdsInGPU, @@ -2441,8 +2441,8 @@ namespace SDL { betaOutCut, deltaBetaCut, kZ); - } else if (innerInnerLowerModuleSubdet == SDL::Endcap and innerOuterLowerModuleSubdet == SDL::Endcap and - outerInnerLowerModuleSubdet == SDL::Endcap and outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Endcap and innerOuterLowerModuleSubdet == lst::Endcap and + outerInnerLowerModuleSubdet == lst::Endcap and outerOuterLowerModuleSubdet == lst::Endcap) { return runQuintupletDefaultAlgoEEEE(acc, modulesInGPU, mdsInGPU, @@ -2479,10 +2479,10 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runQuintupletDefaultAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, uint16_t& lowerModuleIndex1, uint16_t& lowerModuleIndex2, uint16_t& lowerModuleIndex3, @@ -2612,24 +2612,24 @@ namespace SDL { float x3Vec[] = {x3, x3, x3}; float y3Vec[] = {y3, y3, y3}; - if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex1] == SDL::TwoS) { + if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex1] == lst::TwoS) { x1Vec[1] = mdsInGPU.anchorLowEdgeX[firstMDIndex]; x1Vec[2] = mdsInGPU.anchorHighEdgeX[firstMDIndex]; y1Vec[1] = mdsInGPU.anchorLowEdgeY[firstMDIndex]; y1Vec[2] = mdsInGPU.anchorHighEdgeY[firstMDIndex]; } - if (modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex2] == SDL::TwoS) { + if (modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex2] == lst::TwoS) { x2Vec[1] = mdsInGPU.anchorLowEdgeX[secondMDIndex]; x2Vec[2] = mdsInGPU.anchorHighEdgeX[secondMDIndex]; y2Vec[1] = mdsInGPU.anchorLowEdgeY[secondMDIndex]; y2Vec[2] = mdsInGPU.anchorHighEdgeY[secondMDIndex]; } - if (modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex3] == SDL::TwoS) { + if (modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex3] == lst::TwoS) { x3Vec[1] = mdsInGPU.anchorLowEdgeX[thirdMDIndex]; x3Vec[2] = mdsInGPU.anchorHighEdgeX[thirdMDIndex]; @@ -2644,8 +2644,8 @@ namespace SDL { x1Vec[i] = x4; y1Vec[i] = y4; } - if (modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex4] == SDL::TwoS) { + if (modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex4] == lst::TwoS) { x1Vec[1] = mdsInGPU.anchorLowEdgeX[fourthMDIndex]; x1Vec[2] = mdsInGPU.anchorHighEdgeX[fourthMDIndex]; @@ -2660,8 +2660,8 @@ namespace SDL { x2Vec[i] = x5; y2Vec[i] = y5; } - if (modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap and - modulesInGPU.moduleType[lowerModuleIndex5] == SDL::TwoS) { + if (modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap and + modulesInGPU.moduleType[lowerModuleIndex5] == lst::TwoS) { x2Vec[1] = mdsInGPU.anchorLowEdgeX[fifthMDIndex]; x2Vec[2] = mdsInGPU.anchorHighEdgeX[fifthMDIndex]; @@ -2713,11 +2713,11 @@ namespace SDL { //split by category bool matchedRadii; - if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex2] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex3] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex4] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex5] == SDL::Barrel) { + if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex2] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex3] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex4] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex5] == lst::Barrel) { matchedRadii = matchRadiiBBBBB(acc, innerRadius, bridgeRadius, @@ -2728,11 +2728,11 @@ namespace SDL { bridgeInvRadiusMax, outerInvRadiusMin, outerInvRadiusMax); - } else if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex2] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex3] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex4] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) { + } else if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex2] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex3] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex4] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) { matchedRadii = matchRadiiBBBBE(acc, innerRadius, bridgeRadius, @@ -2749,11 +2749,11 @@ namespace SDL { bridgeInvRadiusMax, outerInvRadiusMin, outerInvRadiusMax); - } else if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex2] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex3] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) { + } else if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex2] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex3] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) { if (modulesInGPU.layers[lowerModuleIndex1] == 1) { matchedRadii = matchRadiiBBBEE12378(acc, innerRadius, @@ -2808,11 +2808,11 @@ namespace SDL { } } - else if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex2] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) { + else if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex2] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) { matchedRadii = matchRadiiBBEEE(acc, innerRadius, bridgeRadius, @@ -2829,11 +2829,11 @@ namespace SDL { bridgeInvRadiusMax, outerInvRadiusMin, outerInvRadiusMax); - } else if (modulesInGPU.subdets[lowerModuleIndex1] == SDL::Barrel and - modulesInGPU.subdets[lowerModuleIndex2] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex3] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex4] == SDL::Endcap and - modulesInGPU.subdets[lowerModuleIndex5] == SDL::Endcap) { + } else if (modulesInGPU.subdets[lowerModuleIndex1] == lst::Barrel and + modulesInGPU.subdets[lowerModuleIndex2] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex3] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex4] == lst::Endcap and + modulesInGPU.subdets[lowerModuleIndex5] == lst::Endcap) { matchedRadii = matchRadiiBEEEE(acc, innerRadius, bridgeRadius, @@ -2898,22 +2898,22 @@ namespace SDL { #ifdef USE_T5_DNN unsigned int mdIndices[] = {firstMDIndex, secondMDIndex, thirdMDIndex, fourthMDIndex, fifthMDIndex}; - float inference = T5DNN::runInference(acc, - modulesInGPU, - mdsInGPU, - segmentsInGPU, - tripletsInGPU, - xVec, - yVec, - mdIndices, - lowerModuleIndices, - innerTripletIndex, - outerTripletIndex, - innerRadius, - outerRadius, - bridgeRadius); - TightCutFlag = TightCutFlag and (inference > T5DNN::LSTWP2); // T5-in-TC cut - if (inference <= T5DNN::LSTWP2) // T5-building cut + float inference = lst::t5dnn::runInference(acc, + modulesInGPU, + mdsInGPU, + segmentsInGPU, + tripletsInGPU, + xVec, + yVec, + mdIndices, + lowerModuleIndices, + innerTripletIndex, + outerTripletIndex, + innerRadius, + outerRadius, + bridgeRadius); + TightCutFlag = TightCutFlag and (inference > lst::t5dnn::LSTWP2); // T5-in-TC cut + if (inference <= lst::t5dnn::LSTWP2) // T5-building cut return false; #endif @@ -2971,12 +2971,12 @@ namespace SDL { struct createQuintupletsInGPUv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::ObjectRanges rangesInGPU, + struct lst::Modules modulesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::Quintuplets quintupletsInGPU, + struct lst::ObjectRanges rangesInGPU, uint16_t nEligibleT5Modules) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -3058,7 +3058,7 @@ namespace SDL { float eta = mdsInGPU.anchorEta[segmentsInGPU.mdIndices[2 * tripletsInGPU.segmentIndices[2 * innerTripletIndex + layer2_adjustment]]]; - float pt = (innerRadius + outerRadius) * SDL::k2Rinv1GeVf; + float pt = (innerRadius + outerRadius) * lst::k2Rinv1GeVf; float scores = chiSquared + nonAnchorChiSquared; addQuintupletToMemory(tripletsInGPU, quintupletsInGPU, @@ -3100,9 +3100,9 @@ namespace SDL { struct createEligibleModulesListForQuintupletsGPU { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -3126,9 +3126,9 @@ namespace SDL { if (tripletsInGPU.nTriplets[i] == 0) continue; - if (module_subdets == SDL::Barrel and module_layers >= 3) + if (module_subdets == lst::Barrel and module_layers >= 3) continue; - if (module_subdets == SDL::Endcap and module_layers > 1) + if (module_subdets == lst::Endcap and module_layers > 1) continue; int nEligibleT5Modules = alpaka::atomicOp(acc, &nEligibleT5Modulesx, 1); @@ -3198,9 +3198,9 @@ namespace SDL { struct addQuintupletRangesToEventExplicit { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Quintuplets quintupletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -3216,5 +3216,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/Segment.h b/RecoTracker/LSTCore/src/alpaka/Segment.h index 5e25f8815e58d..397f426f45f47 100644 --- a/RecoTracker/LSTCore/src/alpaka/Segment.h +++ b/RecoTracker/LSTCore/src/alpaka/Segment.h @@ -9,7 +9,7 @@ #include "Hit.h" #include "ObjectRanges.h" -namespace SDL { +namespace lst { struct Segments { FPX* dPhis; FPX* dPhiMins; @@ -175,7 +175,7 @@ namespace SDL { inline void setData(SegmentsBuffer& buf) { data_.setData(buf); } }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE float isTighterTiltedModules_seg(struct SDL::Modules& modulesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE float isTighterTiltedModules_seg(struct lst::Modules& modulesInGPU, unsigned int moduleIndex) { // The "tighter" tilted modules are the subset of tilted modules that have smaller spacing // This is the same as what was previously considered as"isNormalTiltedModules" @@ -229,7 +229,7 @@ namespace SDL { return moduleSeparation; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE float moduleGapSize_seg(struct SDL::Modules& modulesInGPU, unsigned int moduleIndex) { + ALPAKA_FN_ACC ALPAKA_FN_INLINE float moduleGapSize_seg(struct lst::Modules& modulesInGPU, unsigned int moduleIndex) { static constexpr float miniDeltaTilted[3] = {0.26f, 0.26f, 0.26f}; static constexpr float miniDeltaFlat[6] = {0.26f, 0.16f, 0.16f, 0.18f, 0.18f, 0.18f}; static constexpr float miniDeltaLooseTilted[3] = {0.4f, 0.4f, 0.4f}; @@ -264,8 +264,8 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void dAlphaThreshold(TAcc const& acc, float* dAlphaThresholdValues, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, float& xIn, float& yIn, float& zIn, @@ -278,7 +278,7 @@ namespace SDL { uint16_t& outerLowerModuleIndex, unsigned int& innerMDIndex, unsigned int& outerMDIndex) { - float sdMuls = (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel) + float sdMuls = (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel) ? miniMulsPtScaleBarrel[modulesInGPU.layers[innerLowerModuleIndex] - 1] * 3.f / ptCut : miniMulsPtScaleEndcap[modulesInGPU.layers[innerLowerModuleIndex] - 1] * 3.f / ptCut; @@ -288,15 +288,15 @@ namespace SDL { const float dAlpha_Bfield = alpaka::math::asin(acc, alpaka::math::min(acc, segmentDr * k2Rinv1GeVf / ptCut, sinAlphaMax)); - bool isInnerTilted = modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel and - modulesInGPU.sides[innerLowerModuleIndex] != SDL::Center; - bool isOuterTilted = modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Barrel and - modulesInGPU.sides[outerLowerModuleIndex] != SDL::Center; + bool isInnerTilted = modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel and + modulesInGPU.sides[innerLowerModuleIndex] != lst::Center; + bool isOuterTilted = modulesInGPU.subdets[outerLowerModuleIndex] == lst::Barrel and + modulesInGPU.sides[outerLowerModuleIndex] != lst::Center; const float& drdzInner = modulesInGPU.drdzs[innerLowerModuleIndex]; const float& drdzOuter = modulesInGPU.drdzs[outerLowerModuleIndex]; - float innerModuleGapSize = SDL::moduleGapSize_seg(modulesInGPU, innerLowerModuleIndex); - float outerModuleGapSize = SDL::moduleGapSize_seg(modulesInGPU, outerLowerModuleIndex); + float innerModuleGapSize = lst::moduleGapSize_seg(modulesInGPU, innerLowerModuleIndex); + float outerModuleGapSize = lst::moduleGapSize_seg(modulesInGPU, outerLowerModuleIndex); const float innerminiTilt2 = isInnerTilted ? ((0.5f * 0.5f) * (pixelPSZpitch * pixelPSZpitch) * (drdzInner * drdzInner) / (1.f + drdzInner * drdzInner) / (innerModuleGapSize * innerModuleGapSize)) @@ -312,14 +312,14 @@ namespace SDL { float sdLumForInnerMini2; float sdLumForOuterMini2; - if (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel) { + if (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel) { sdLumForInnerMini2 = innerminiTilt2 * (dAlpha_Bfield * dAlpha_Bfield); } else { sdLumForInnerMini2 = (mdsInGPU.dphis[innerMDIndex] * mdsInGPU.dphis[innerMDIndex]) * (deltaZLum * deltaZLum) / (mdsInGPU.dzs[innerMDIndex] * mdsInGPU.dzs[innerMDIndex]); } - if (modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Barrel) { + if (modulesInGPU.subdets[outerLowerModuleIndex] == lst::Barrel) { sdLumForOuterMini2 = outerminiTilt2 * (dAlpha_Bfield * dAlpha_Bfield); } else { sdLumForOuterMini2 = (mdsInGPU.dphis[outerMDIndex] * mdsInGPU.dphis[outerMDIndex]) * (deltaZLum * deltaZLum) / @@ -329,23 +329,23 @@ namespace SDL { // Unique stuff for the segment dudes alone float dAlpha_res_inner = 0.02f / miniDelta * - (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel ? 1.0f : alpaka::math::abs(acc, zIn) / rtIn); + (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel ? 1.0f : alpaka::math::abs(acc, zIn) / rtIn); float dAlpha_res_outer = 0.02f / miniDelta * - (modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Barrel ? 1.0f : alpaka::math::abs(acc, zOut) / rtOut); + (modulesInGPU.subdets[outerLowerModuleIndex] == lst::Barrel ? 1.0f : alpaka::math::abs(acc, zOut) / rtOut); float dAlpha_res = dAlpha_res_inner + dAlpha_res_outer; - if (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel and - modulesInGPU.sides[innerLowerModuleIndex] == SDL::Center) { + if (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel and + modulesInGPU.sides[innerLowerModuleIndex] == lst::Center) { dAlphaThresholdValues[0] = dAlpha_Bfield + alpaka::math::sqrt(acc, dAlpha_res * dAlpha_res + sdMuls * sdMuls); } else { dAlphaThresholdValues[0] = dAlpha_Bfield + alpaka::math::sqrt(acc, dAlpha_res * dAlpha_res + sdMuls * sdMuls + sdLumForInnerMini2); } - if (modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Barrel and - modulesInGPU.sides[outerLowerModuleIndex] == SDL::Center) { + if (modulesInGPU.subdets[outerLowerModuleIndex] == lst::Barrel and + modulesInGPU.sides[outerLowerModuleIndex] == lst::Center) { dAlphaThresholdValues[1] = dAlpha_Bfield + alpaka::math::sqrt(acc, dAlpha_res * dAlpha_res + sdMuls * sdMuls); } else { dAlphaThresholdValues[1] = @@ -356,7 +356,7 @@ namespace SDL { dAlphaThresholdValues[2] = dAlpha_Bfield + alpaka::math::sqrt(acc, dAlpha_res * dAlpha_res + sdMuls * sdMuls); }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addSegmentToMemory(struct SDL::Segments& segmentsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addSegmentToMemory(struct lst::Segments& segmentsInGPU, unsigned int lowerMDIndex, unsigned int upperMDIndex, uint16_t innerLowerModuleIndex, @@ -391,8 +391,8 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void addPixelSegmentToMemory(TAcc const& acc, - struct SDL::Segments& segmentsInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::MiniDoublets& mdsInGPU, unsigned int innerMDIndex, unsigned int outerMDIndex, uint16_t pixelModuleIndex, @@ -430,7 +430,7 @@ namespace SDL { mdsInGPU.anchorY[innerMDIndex] + circleRadius * alpaka::math::cos(acc, circlePhi)}; //check which of the circles can accommodate r3LH better (we won't get perfect agreement) - float bestChiSquared = SDL::SDL_INF; + float bestChiSquared = lst::lst_INF; float chiSquared; size_t bestIndex; for (size_t i = 0; i < 2; i++) { @@ -454,8 +454,8 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runSegmentDefaultAlgoBarrel(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, uint16_t& innerLowerModuleIndex, uint16_t& outerLowerModuleIndex, unsigned int& innerMDIndex, @@ -479,7 +479,7 @@ namespace SDL { float& dAlphaInnerMDSegmentThreshold, float& dAlphaOuterMDSegmentThreshold, float& dAlphaInnerMDOuterMDThreshold) { - float sdMuls = (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel) + float sdMuls = (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel) ? miniMulsPtScaleBarrel[modulesInGPU.layers[innerLowerModuleIndex] - 1] * 3.f / ptCut : miniMulsPtScaleEndcap[modulesInGPU.layers[innerLowerModuleIndex] - 1] * 3.f / ptCut; @@ -510,12 +510,12 @@ namespace SDL { sdCut = sdSlope + alpaka::math::sqrt(acc, sdMuls * sdMuls + sdPVoff * sdPVoff); - dPhi = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); + dPhi = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); if (alpaka::math::abs(acc, dPhi) > sdCut) return false; - dPhiChange = SDL::phi_mpi_pi(acc, SDL::phi(acc, xOut - xIn, yOut - yIn) - mdsInGPU.anchorPhi[innerMDIndex]); + dPhiChange = lst::phi_mpi_pi(acc, lst::phi(acc, xOut - xIn, yOut - yIn) - mdsInGPU.anchorPhi[innerMDIndex]); if (alpaka::math::abs(acc, dPhiChange) > sdCut) return false; @@ -557,8 +557,8 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runSegmentDefaultAlgoEndcap(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, uint16_t& innerLowerModuleIndex, uint16_t& outerLowerModuleIndex, unsigned int& innerMDIndex, @@ -595,8 +595,8 @@ namespace SDL { zOut = mdsInGPU.anchorZ[outerMDIndex]; rtOut = mdsInGPU.anchorRt[outerMDIndex]; - bool outerLayerEndcapTwoS = (modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Endcap) && - (modulesInGPU.moduleType[outerLowerModuleIndex] == SDL::TwoS); + bool outerLayerEndcapTwoS = (modulesInGPU.subdets[outerLowerModuleIndex] == lst::Endcap) && + (modulesInGPU.moduleType[outerLowerModuleIndex] == lst::TwoS); float sdSlope = alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * k2Rinv1GeVf / ptCut, sinAlphaMax)); float disks2SMinRadius = 60.f; @@ -612,7 +612,7 @@ namespace SDL { float dz = zOut - zIn; // Alpaka: Needs to be moved over - float dLum = SDL::copysignf(deltaZLum, zIn); + float dLum = lst::copysignf(deltaZLum, zIn); float drtDzScale = sdSlope / alpaka::math::tan(acc, sdSlope); rtLo = alpaka::math::max( @@ -624,14 +624,14 @@ namespace SDL { if ((rtOut < rtLo) || (rtOut > rtHi)) return false; - dPhi = SDL::phi_mpi_pi(acc, mdsInGPU.anchorPhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); + dPhi = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); sdCut = sdSlope; if (outerLayerEndcapTwoS) { float dPhiPos_high = - SDL::phi_mpi_pi(acc, mdsInGPU.anchorHighEdgePhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); + lst::phi_mpi_pi(acc, mdsInGPU.anchorHighEdgePhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); float dPhiPos_low = - SDL::phi_mpi_pi(acc, mdsInGPU.anchorLowEdgePhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); + lst::phi_mpi_pi(acc, mdsInGPU.anchorLowEdgePhi[outerMDIndex] - mdsInGPU.anchorPhi[innerMDIndex]); dPhiMax = alpaka::math::abs(acc, dPhiPos_high) > alpaka::math::abs(acc, dPhiPos_low) ? dPhiPos_high : dPhiPos_low; dPhiMin = alpaka::math::abs(acc, dPhiPos_high) > alpaka::math::abs(acc, dPhiPos_low) ? dPhiPos_low : dPhiPos_high; @@ -687,8 +687,8 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runSegmentDefaultAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, uint16_t& innerLowerModuleIndex, uint16_t& outerLowerModuleIndex, unsigned int& innerMDIndex, @@ -719,8 +719,8 @@ namespace SDL { rtLo = -999.f; rtHi = -999.f; - if (modulesInGPU.subdets[innerLowerModuleIndex] == SDL::Barrel and - modulesInGPU.subdets[outerLowerModuleIndex] == SDL::Barrel) { + if (modulesInGPU.subdets[innerLowerModuleIndex] == lst::Barrel and + modulesInGPU.subdets[outerLowerModuleIndex] == lst::Barrel) { return runSegmentDefaultAlgoBarrel(acc, modulesInGPU, mdsInGPU, @@ -780,10 +780,10 @@ namespace SDL { struct createSegmentsInGPUv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalBlockIdx = alpaka::getIdx(acc); auto const blockThreadIdx = alpaka::getIdx(acc); auto const gridBlockExtent = alpaka::getWorkDiv(acc); @@ -892,9 +892,9 @@ namespace SDL { struct createSegmentArrayRanges { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::MiniDoublets mdsInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::MiniDoublets mdsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -990,9 +990,9 @@ namespace SDL { struct addSegmentRangesToEventExplicit { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Segments segmentsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -1011,11 +1011,11 @@ namespace SDL { struct addPixelSegmentToEventKernel { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::Hits hitsInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::Hits hitsInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, unsigned int* hitIndices0, unsigned int* hitIndices1, unsigned int* hitIndices2, @@ -1095,6 +1095,6 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h index 96a459c449a50..dbc061dfa7e92 100644 --- a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h +++ b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h @@ -12,7 +12,7 @@ #include "Hit.h" #include "ObjectRanges.h" -namespace SDL { +namespace lst { struct TrackCandidates { short* trackCandidateType; // 4-T5 5-pT3 7-pT5 8-pLS unsigned int* directObjectIndices; // Will hold direct indices to each type containers @@ -109,7 +109,7 @@ namespace SDL { inline void setData(TrackCandidatesBuffer& buf) { data_.setData(buf); } }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addpLSTrackCandidateToMemory(struct SDL::TrackCandidates& trackCandidatesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addpLSTrackCandidateToMemory(struct lst::TrackCandidates& trackCandidatesInGPU, unsigned int trackletIndex, unsigned int trackCandidateIndex, uint4 hitIndices, @@ -128,7 +128,7 @@ namespace SDL { trackCandidatesInGPU.hitIndices[Params_pT5::kHits * trackCandidateIndex + 3] = hitIndices.w; }; - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTrackCandidateToMemory(struct SDL::TrackCandidates& trackCandidatesInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTrackCandidateToMemory(struct lst::TrackCandidates& trackCandidatesInGPU, short trackCandidateType, unsigned int innerTrackletIndex, unsigned int outerTrackletIndex, @@ -167,9 +167,9 @@ namespace SDL { ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkPixelHits(unsigned int ix, unsigned int jx, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Hits& hitsInGPU) { + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Hits& hitsInGPU) { int phits1[Params_pLS::kHits]; int phits2[Params_pLS::kHits]; @@ -208,11 +208,11 @@ namespace SDL { struct crossCleanpT3 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::PixelTriplets pixelTripletsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::PixelQuintuplets pixelQuintupletsInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::PixelTriplets pixelTripletsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::PixelQuintuplets pixelQuintupletsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -236,7 +236,7 @@ namespace SDL { float eta2 = segmentsInGPU.eta[pLS_jx - prefix]; float phi2 = segmentsInGPU.phi[pLS_jx - prefix]; float dEta = alpaka::math::abs(acc, (eta1 - eta2)); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float dR2 = dEta * dEta + dPhi * dPhi; if (dR2 < 1e-5f) @@ -249,11 +249,11 @@ namespace SDL { struct crossCleanT5 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::PixelQuintuplets pixelQuintupletsInGPU, - struct SDL::PixelTriplets pixelTripletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Quintuplets quintupletsInGPU, + struct lst::PixelQuintuplets pixelQuintupletsInGPU, + struct lst::PixelTriplets pixelTripletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -289,7 +289,7 @@ namespace SDL { } float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float dR2 = dEta * dEta + dPhi * dPhi; if (dR2 < 1e-3f) @@ -306,14 +306,14 @@ namespace SDL { struct crossCleanpLS { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::PixelTriplets pixelTripletsInGPU, - struct SDL::TrackCandidates trackCandidatesInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Hits hitsInGPU, - struct SDL::Quintuplets quintupletsInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::PixelTriplets pixelTripletsInGPU, + struct lst::TrackCandidates trackCandidatesInGPU, + struct lst::Segments segmentsInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Hits hitsInGPU, + struct lst::Quintuplets quintupletsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -339,7 +339,7 @@ namespace SDL { float eta2 = __H2F(quintupletsInGPU.eta[quintupletIndex]); float phi2 = __H2F(quintupletsInGPU.phi[quintupletIndex]); float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float dR2 = dEta * dEta + dPhi * dPhi; if (dR2 < 1e-3f) @@ -356,7 +356,7 @@ namespace SDL { float eta2 = __H2F(pixelTripletsInGPU.eta_pix[pT3Index]); float phi2 = __H2F(pixelTripletsInGPU.phi_pix[pT3Index]); float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float dR2 = dEta * dEta + dPhi * dPhi; if (dR2 < 0.000001f) @@ -373,7 +373,7 @@ namespace SDL { float eta2 = segmentsInGPU.eta[pLSIndex - prefix]; float phi2 = segmentsInGPU.phi[pLSIndex - prefix]; float dEta = alpaka::math::abs(acc, eta1 - eta2); - float dPhi = SDL::calculate_dPhi(phi1, phi2); + float dPhi = lst::calculate_dPhi(phi1, phi2); float dR2 = dEta * dEta + dPhi * dPhi; if (dR2 < 0.000001f) @@ -388,10 +388,10 @@ namespace SDL { template ALPAKA_FN_ACC void operator()(TAcc const& acc, uint16_t nLowerModules, - struct SDL::PixelTriplets pixelTripletsInGPU, - struct SDL::TrackCandidates trackCandidatesInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::PixelTriplets pixelTripletsInGPU, + struct lst::TrackCandidates trackCandidatesInGPU, + struct lst::Segments segmentsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -440,9 +440,9 @@ namespace SDL { template ALPAKA_FN_ACC void operator()(TAcc const& acc, uint16_t nLowerModules, - struct SDL::Quintuplets quintupletsInGPU, - struct SDL::TrackCandidates trackCandidatesInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Quintuplets quintupletsInGPU, + struct lst::TrackCandidates trackCandidatesInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -494,8 +494,8 @@ namespace SDL { template ALPAKA_FN_ACC void operator()(TAcc const& acc, uint16_t nLowerModules, - struct SDL::TrackCandidates trackCandidatesInGPU, - struct SDL::Segments segmentsInGPU, + struct lst::TrackCandidates trackCandidatesInGPU, + struct lst::Segments segmentsInGPU, bool tc_pls_triplets) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -533,10 +533,10 @@ namespace SDL { template ALPAKA_FN_ACC void operator()(TAcc const& acc, uint16_t nLowerModules, - struct SDL::PixelQuintuplets pixelQuintupletsInGPU, - struct SDL::TrackCandidates trackCandidatesInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::PixelQuintuplets pixelQuintupletsInGPU, + struct lst::TrackCandidates trackCandidatesInGPU, + struct lst::Segments segmentsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -581,5 +581,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/src/alpaka/Triplet.h b/RecoTracker/LSTCore/src/alpaka/Triplet.h index 3362fdaa97991..7375a68db26c8 100644 --- a/RecoTracker/LSTCore/src/alpaka/Triplet.h +++ b/RecoTracker/LSTCore/src/alpaka/Triplet.h @@ -9,7 +9,7 @@ #include "Hit.h" #include "ObjectRanges.h" -namespace SDL { +namespace lst { struct Triplets { unsigned int* segmentIndices; uint16_t* lowerModuleIndices; //3 of them now @@ -152,10 +152,10 @@ namespace SDL { }; #ifdef CUT_VALUE_DEBUG - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTripletToMemory(struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTripletToMemory(struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, unsigned int& innerSegmentIndex, unsigned int& outerSegmentIndex, uint16_t& innerInnerLowerModuleIndex, @@ -179,10 +179,10 @@ namespace SDL { float& betaInCut, unsigned int& tripletIndex) #else - ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTripletToMemory(struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, - struct SDL::Triplets& tripletsInGPU, + ALPAKA_FN_ACC ALPAKA_FN_INLINE void addTripletToMemory(struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, + struct lst::Triplets& tripletsInGPU, unsigned int& innerSegmentIndex, unsigned int& outerSegmentIndex, uint16_t& innerInnerLowerModuleIndex, @@ -240,9 +240,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passRZConstraint(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -300,9 +300,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPointingConstraintBBB(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -314,8 +314,8 @@ namespace SDL { unsigned int& innerSegmentIndex, float& betaIn, float& betaInCut) { - bool isPSIn = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS); - bool isPSOut = (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::PS); + bool isPSIn = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS); + bool isPSOut = (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::PS); float rtIn = mdsInGPU.anchorRt[firstMDIndex]; float rtMid = mdsInGPU.anchorRt[secondMDIndex]; @@ -326,16 +326,16 @@ namespace SDL { zOut = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeVOut = - alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float rtRatio_OutIn = rtOut / rtIn; // Outer segment beginning rt divided by inner segment beginning rt; float dzDrtScale = alpaka::math::tan(acc, alpha1GeVOut) / alpha1GeVOut; // The track can bend in r-z plane slightly - float zpitchIn = (isPSIn ? SDL::pixelPSZpitch : SDL::strip2SZpitch); - float zpitchOut = (isPSOut ? SDL::pixelPSZpitch : SDL::strip2SZpitch); + float zpitchIn = (isPSIn ? lst::pixelPSZpitch : lst::strip2SZpitch); + float zpitchOut = (isPSOut ? lst::pixelPSZpitch : lst::strip2SZpitch); const float zHi = - zIn + (zIn + SDL::deltaZLum) * (rtRatio_OutIn - 1.f) * (zIn < 0.f ? 1.f : dzDrtScale) + (zpitchIn + zpitchOut); - const float zLo = zIn + (zIn - SDL::deltaZLum) * (rtRatio_OutIn - 1.f) * (zIn > 0.f ? 1.f : dzDrtScale) - + zIn + (zIn + lst::deltaZLum) * (rtRatio_OutIn - 1.f) * (zIn < 0.f ? 1.f : dzDrtScale) + (zpitchIn + zpitchOut); + const float zLo = zIn + (zIn - lst::deltaZLum) * (rtRatio_OutIn - 1.f) * (zIn > 0.f ? 1.f : dzDrtScale) - (zpitchIn + zpitchOut); //slope-correction only on outer end //Cut 1 - z compatibility @@ -354,7 +354,7 @@ namespace SDL { float dzErr = (zpitchIn + zpitchOut) * (zpitchIn + zpitchOut) * 2.f; float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2f * (rtOut - rtIn) / 50.f) * (r3In / rtIn); - float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; dzErr += sdlMuls2 * drt_OutIn * drt_OutIn / 3.f * coshEta * coshEta; dzErr = alpaka::math::sqrt(acc, dzErr); @@ -362,7 +362,7 @@ namespace SDL { const float dzMean = dz_InSeg / drt_InSeg * drt_OutIn; const float zWindow = dzErr / drt_InSeg * drt_OutIn + - (zpitchIn + zpitchOut); //FIXME for SDL::ptCut lower than ~0.8 need to add curv path correction + (zpitchIn + zpitchOut); //FIXME for lst::ptCut lower than ~0.8 need to add curv path correction const float zLoPointed = zIn + dzMean * (zIn > 0.f ? 1.f : dzDrtScale) - zWindow; const float zHiPointed = zIn + dzMean * (zIn < 0.f ? 1.f : dzDrtScale) + zWindow; @@ -376,7 +376,7 @@ namespace SDL { float alpha_InLo = __H2F(segmentsInGPU.dPhiChanges[innerSegmentIndex]); float tl_axis_x = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaIn = alpha_InLo - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = alpha_InLo - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); //beta computation float drt_tl_axis = alpaka::math::sqrt(acc, tl_axis_x * tl_axis_x + tl_axis_y * tl_axis_y); @@ -390,7 +390,7 @@ namespace SDL { (mdsInGPU.anchorY[secondMDIndex] - mdsInGPU.anchorY[firstMDIndex])); betaInCut = alpaka::math::asin( - acc, alpaka::math::min(acc, (-rt_InSeg + drt_tl_axis) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, alpaka::math::min(acc, (-rt_InSeg + drt_tl_axis) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / drt_InSeg); //Cut #3: first beta cut @@ -399,9 +399,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPointingConstraintBBE(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -415,8 +415,8 @@ namespace SDL { unsigned int& outerSegmentIndex, float& betaIn, float& betaInCut) { - bool isPSIn = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS); - bool isPSOut = (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::PS); + bool isPSIn = (modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS); + bool isPSOut = (modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::PS); float rtIn = mdsInGPU.anchorRt[firstMDIndex]; float rtMid = mdsInGPU.anchorRt[secondMDIndex]; @@ -427,29 +427,29 @@ namespace SDL { zOut = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeV_OutLo = - alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float dzDrtScale = alpaka::math::tan(acc, alpha1GeV_OutLo) / alpha1GeV_OutLo; // The track can bend in r-z plane slightly - float zpitchIn = (isPSIn ? SDL::pixelPSZpitch : SDL::strip2SZpitch); - float zpitchOut = (isPSOut ? SDL::pixelPSZpitch : SDL::strip2SZpitch); + float zpitchIn = (isPSIn ? lst::pixelPSZpitch : lst::strip2SZpitch); + float zpitchOut = (isPSOut ? lst::pixelPSZpitch : lst::strip2SZpitch); float zGeom = zpitchIn + zpitchOut; // Cut #0: Preliminary (Only here in endcap case) if (zIn * zOut <= 0) return false; - float dLum = SDL::copysignf(SDL::deltaZLum, zIn); - bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::PS; - float rtGeom1 = isOutSgInnerMDPS ? SDL::pixelPSZpitch : SDL::strip2SZpitch; - float zGeom1 = SDL::copysignf(zGeom, zIn); + float dLum = lst::copysignf(lst::deltaZLum, zIn); + bool isOutSgInnerMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::PS; + float rtGeom1 = isOutSgInnerMDPS ? lst::pixelPSZpitch : lst::strip2SZpitch; + float zGeom1 = lst::copysignf(zGeom, zIn); float rtLo = rtIn * (1.f + (zOut - zIn - zGeom1) / (zIn + zGeom1 + dLum) / dzDrtScale) - rtGeom1; //slope correction only on the lower end //Cut #1: rt condition float zInForHi = zIn - zGeom1 - dLum; if (zInForHi * zIn < 0) { - zInForHi = SDL::copysignf(0.1f, zIn); + zInForHi = lst::copysignf(0.1f, zIn); } float rtHi = rtIn * (1.f + (zOut - zIn + zGeom1) / zInForHi) + rtGeom1; @@ -467,12 +467,12 @@ namespace SDL { const float coshEta = dr3SDIn / drtSDIn; //direction estimate const float dzOutInAbs = alpaka::math::abs(acc, zOut - zIn); const float multDzDr = dzOutInAbs * coshEta / (coshEta * coshEta - 1.f); - const float zGeom1_another = SDL::pixelPSZpitch; + const float zGeom1_another = lst::pixelPSZpitch; const float kZ = (zOut - zIn) / dzSDIn; float drtErr = zGeom1_another * zGeom1_another * drtSDIn * drtSDIn / dzSDIn / dzSDIn * (1.f - 2.f * kZ + 2.f * kZ * kZ); const float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2 * (rtOut - rtIn) / 50.f) * (rIn / rtIn); - const float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + const float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; drtErr += sdlMuls2 * multDzDr * multDzDr / 3.f * coshEta * coshEta; drtErr = alpaka::math::sqrt(acc, drtErr); @@ -489,7 +489,7 @@ namespace SDL { float tl_axis_x = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaIn = sdIn_alpha - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = sdIn_alpha - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); float betaInRHmin = betaIn; float betaInRHmax = betaIn; @@ -511,7 +511,7 @@ namespace SDL { float dr = alpaka::math::sqrt(acc, tl_axis_x * tl_axis_x + tl_axis_y * tl_axis_y); betaInCut = alpaka::math::asin( - acc, alpaka::math::min(acc, (-sdIn_dr + dr) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, alpaka::math::min(acc, (-sdIn_dr + dr) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdIn_d); //Cut #4: first beta cut @@ -520,9 +520,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPointingConstraintEEE(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -544,7 +544,7 @@ namespace SDL { zOut = mdsInGPU.anchorZ[thirdMDIndex]; float alpha1GeV_Out = - alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)); + alpaka::math::asin(acc, alpaka::math::min(acc, rtOut * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)); float dzDrtScale = alpaka::math::tan(acc, alpha1GeV_Out) / alpha1GeV_Out; // The track can bend in r-z plane slightly @@ -553,13 +553,13 @@ namespace SDL { if (zIn * zOut <= 0) return false; - float dLum = SDL::copysignf(SDL::deltaZLum, zIn); - bool isOutSgOuterMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::PS; - bool isInSgInnerMDPS = modulesInGPU.moduleType[innerInnerLowerModuleIndex] == SDL::PS; + float dLum = lst::copysignf(lst::deltaZLum, zIn); + bool isOutSgOuterMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::PS; + bool isInSgInnerMDPS = modulesInGPU.moduleType[innerInnerLowerModuleIndex] == lst::PS; - float rtGeom = (isInSgInnerMDPS and isOutSgOuterMDPS) ? 2.f * SDL::pixelPSZpitch - : (isInSgInnerMDPS or isOutSgOuterMDPS) ? SDL::pixelPSZpitch + SDL::strip2SZpitch - : 2.f * SDL::strip2SZpitch; + float rtGeom = (isInSgInnerMDPS and isOutSgOuterMDPS) ? 2.f * lst::pixelPSZpitch + : (isInSgInnerMDPS or isOutSgOuterMDPS) ? lst::pixelPSZpitch + lst::strip2SZpitch + : 2.f * lst::strip2SZpitch; float dz = zOut - zIn; const float rtLo = rtIn * (1.f + dz / (zIn + dLum) / dzDrtScale) - rtGeom; //slope correction only on the lower end @@ -569,7 +569,7 @@ namespace SDL { if ((rtOut < rtLo) || (rtOut > rtHi)) return false; - bool isInSgOuterMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == SDL::PS; + bool isInSgOuterMDPS = modulesInGPU.moduleType[outerOuterLowerModuleIndex] == lst::PS; float drtSDIn = rtMid - rtIn; float dzSDIn = zMid - zIn; @@ -583,11 +583,11 @@ namespace SDL { float kZ = (zOut - zIn) / dzSDIn; float sdlThetaMulsF2 = (kMulsInGeV * kMulsInGeV) * (0.1f + 0.2f * (rtOut - rtIn) / 50.f); - float sdlMuls2 = sdlThetaMulsF2 * 9.f / (SDL::ptCut * SDL::ptCut) * 16.f; + float sdlMuls2 = sdlThetaMulsF2 * 9.f / (lst::ptCut * lst::ptCut) * 16.f; float drtErr = alpaka::math::sqrt( acc, - SDL::pixelPSZpitch * SDL::pixelPSZpitch * 2.f / (dzSDIn * dzSDIn) * (dzOutInAbs * dzOutInAbs) + + lst::pixelPSZpitch * lst::pixelPSZpitch * 2.f / (dzSDIn * dzSDIn) * (dzOutInAbs * dzOutInAbs) + sdlMuls2 * multDzDr * multDzDr / 3.f * coshEta * coshEta); float drtMean = drtSDIn * dzOutInAbs / alpaka::math::abs(acc, dzSDIn); @@ -611,7 +611,7 @@ namespace SDL { float tl_axis_x = mdsInGPU.anchorX[thirdMDIndex] - mdsInGPU.anchorX[firstMDIndex]; float tl_axis_y = mdsInGPU.anchorY[thirdMDIndex] - mdsInGPU.anchorY[firstMDIndex]; - betaIn = sdIn_alpha - SDL::phi_mpi_pi(acc, SDL::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); + betaIn = sdIn_alpha - lst::phi_mpi_pi(acc, lst::phi(acc, tl_axis_x, tl_axis_y) - mdsInGPU.anchorPhi[firstMDIndex]); float sdIn_alphaRHmin = __H2F(segmentsInGPU.dPhiChangeMins[innerSegmentIndex]); float sdIn_alphaRHmax = __H2F(segmentsInGPU.dPhiChangeMaxs[innerSegmentIndex]); @@ -634,7 +634,7 @@ namespace SDL { float dr = alpaka::math::sqrt(acc, tl_axis_x * tl_axis_x + tl_axis_y * tl_axis_y); betaInCut = alpaka::math::asin( - acc, alpaka::math::min(acc, (-sdIn_dr + dr) * SDL::k2Rinv1GeVf / SDL::ptCut, SDL::sinAlphaMax)) + + acc, alpaka::math::min(acc, (-sdIn_dr + dr) * lst::k2Rinv1GeVf / lst::ptCut, lst::sinAlphaMax)) + (0.02f / sdIn_d); //Cut #4: first beta cut @@ -643,9 +643,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPointingConstraint(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -663,8 +663,8 @@ namespace SDL { short middleLowerModuleSubdet = modulesInGPU.subdets[middleLowerModuleIndex]; short outerOuterLowerModuleSubdet = modulesInGPU.subdets[outerOuterLowerModuleIndex]; - if (innerInnerLowerModuleSubdet == SDL::Barrel and middleLowerModuleSubdet == SDL::Barrel and - outerOuterLowerModuleSubdet == SDL::Barrel) { + if (innerInnerLowerModuleSubdet == lst::Barrel and middleLowerModuleSubdet == lst::Barrel and + outerOuterLowerModuleSubdet == lst::Barrel) { return passPointingConstraintBBB(acc, modulesInGPU, mdsInGPU, @@ -680,8 +680,8 @@ namespace SDL { innerSegmentIndex, betaIn, betaInCut); - } else if (innerInnerLowerModuleSubdet == SDL::Barrel and middleLowerModuleSubdet == SDL::Barrel and - outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Barrel and middleLowerModuleSubdet == lst::Barrel and + outerOuterLowerModuleSubdet == lst::Endcap) { return passPointingConstraintBBE(acc, modulesInGPU, mdsInGPU, @@ -699,8 +699,8 @@ namespace SDL { outerSegmentIndex, betaIn, betaInCut); - } else if (innerInnerLowerModuleSubdet == SDL::Barrel and middleLowerModuleSubdet == SDL::Endcap and - outerOuterLowerModuleSubdet == SDL::Endcap) { + } else if (innerInnerLowerModuleSubdet == lst::Barrel and middleLowerModuleSubdet == lst::Endcap and + outerOuterLowerModuleSubdet == lst::Endcap) { return passPointingConstraintBBE(acc, modulesInGPU, mdsInGPU, @@ -721,8 +721,8 @@ namespace SDL { } - else if (innerInnerLowerModuleSubdet == SDL::Endcap and middleLowerModuleSubdet == SDL::Endcap and - outerOuterLowerModuleSubdet == SDL::Endcap) { + else if (innerInnerLowerModuleSubdet == lst::Endcap and middleLowerModuleSubdet == lst::Endcap and + outerOuterLowerModuleSubdet == lst::Endcap) { return passPointingConstraintEEE(acc, modulesInGPU, mdsInGPU, @@ -780,9 +780,9 @@ namespace SDL { template ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runTripletConstraintsAndAlgo(TAcc const& acc, - struct SDL::Modules& modulesInGPU, - struct SDL::MiniDoublets& mdsInGPU, - struct SDL::Segments& segmentsInGPU, + struct lst::Modules& modulesInGPU, + struct lst::MiniDoublets& mdsInGPU, + struct lst::Segments& segmentsInGPU, uint16_t& innerInnerLowerModuleIndex, uint16_t& middleLowerModuleIndex, uint16_t& outerOuterLowerModuleIndex, @@ -856,11 +856,11 @@ namespace SDL { struct createTripletsInGPUv2 { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::MiniDoublets mdsInGPU, - struct SDL::Segments segmentsInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::ObjectRanges rangesInGPU, + struct lst::Modules modulesInGPU, + struct lst::MiniDoublets mdsInGPU, + struct lst::Segments segmentsInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::ObjectRanges rangesInGPU, uint16_t* index_gpu, uint16_t nonZeroModules) const { auto const globalThreadIdx = alpaka::getIdx(acc); @@ -989,9 +989,9 @@ namespace SDL { struct createTripletArrayRanges { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::ObjectRanges rangesInGPU, - struct SDL::Segments segmentsInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::ObjectRanges rangesInGPU, + struct lst::Segments segmentsInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -1086,9 +1086,9 @@ namespace SDL { struct addTripletRangesToEventExplicit { template ALPAKA_FN_ACC void operator()(TAcc const& acc, - struct SDL::Modules modulesInGPU, - struct SDL::Triplets tripletsInGPU, - struct SDL::ObjectRanges rangesInGPU) const { + struct lst::Modules modulesInGPU, + struct lst::Triplets tripletsInGPU, + struct lst::ObjectRanges rangesInGPU) const { auto const globalThreadIdx = alpaka::getIdx(acc); auto const gridThreadExtent = alpaka::getWorkDiv(acc); @@ -1103,5 +1103,5 @@ namespace SDL { } } }; -} // namespace SDL +} // namespace lst #endif diff --git a/RecoTracker/LSTCore/standalone/bin/sdl.cc b/RecoTracker/LSTCore/standalone/bin/sdl.cc index 498b58ea8731a..3795cdc15bc4f 100644 --- a/RecoTracker/LSTCore/standalone/bin/sdl.cc +++ b/RecoTracker/LSTCore/standalone/bin/sdl.cc @@ -304,11 +304,11 @@ void run_sdl() { queues.push_back(Queue(devAcc)); } - // Load various maps used in the SDL reconstruction + // Load various maps used in the lst reconstruction TStopwatch full_timer; full_timer.Start(); - auto hostESData = SDL::loadAndFillESHost(); - auto deviceESData = cms::alpakatools::CopyToDevice>::copyAsync(queues[0], *hostESData.get()); + auto hostESData = lst::loadAndFillESHost(); + auto deviceESData = cms::alpakatools::CopyToDevice>::copyAsync(queues[0], *hostESData.get()); float timeForMapLoading = full_timer.RealTime() * 1000; if (ana.do_write_ntuple) { @@ -384,9 +384,9 @@ void run_sdl() { full_timer.Reset(); full_timer.Start(); - std::vector *> events; + std::vector *> events; for (int s = 0; s < ana.streams; s++) { - SDL::Event *event = new SDL::Event(ana.verbose >= 2, queues[s], &deviceESData); + lst::Event *event = new lst::Event(ana.verbose >= 2, queues[s], &deviceESData); events.push_back(event); } float timeForEventCreation = full_timer.RealTime() * 1000; diff --git a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc index faccf6b7a25c3..76cfa9760b71a 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc +++ b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.cc @@ -8,8 +8,8 @@ using namespace ALPAKA_ACCELERATOR_NAMESPACE; //____________________________________________________________________________________________ std::tuple, std::vector> convertHitsToHitIdxsAndHitTypes( - SDL::Event* event, std::vector hits) { - SDL::Hits const* hitsEvt = event->getHits()->data(); + lst::Event* event, std::vector hits) { + lst::Hits const* hitsEvt = event->getHits()->data(); std::vector hitidxs; std::vector hittypes; for (auto& hit : hits) { @@ -27,11 +27,11 @@ std::tuple, std::vector> convertHitsToHi // =============== //____________________________________________________________________________________________ -std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned int pLS) { - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::ObjectRanges const* rangesEvt = event->getRanges()->data(); - SDL::Modules const* modulesEvt = event->getModules()->data(); +std::vector getPixelHitsFrompLS(lst::Event* event, unsigned int pLS) { + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::ObjectRanges const* rangesEvt = event->getRanges()->data(); + lst::Modules const* modulesEvt = event->getModules()->data(); const unsigned int pLS_offset = rangesEvt->segmentModuleIndices[*(modulesEvt->nLowerModules)]; unsigned int MD_1 = segments->mdIndices[2 * (pLS + pLS_offset)]; unsigned int MD_2 = segments->mdIndices[2 * (pLS + pLS_offset) + 1]; @@ -46,8 +46,8 @@ std::vector getPixelHitsFrompLS(SDL::Event* event, unsigned } //____________________________________________________________________________________________ -std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsigned int pLS) { - SDL::Hits const* hitsEvt = event->getHits()->data(); +std::vector getPixelHitIdxsFrompLS(lst::Event* event, unsigned int pLS) { + lst::Hits const* hitsEvt = event->getHits()->data(); std::vector hits = getPixelHitsFrompLS(event, pLS); std::vector hitidxs; for (auto& hit : hits) @@ -56,14 +56,14 @@ std::vector getPixelHitIdxsFrompLS(SDL::Event* event, unsig } //____________________________________________________________________________________________ -std::vector getPixelHitTypesFrompLS(SDL::Event* event, unsigned int pLS) { +std::vector getPixelHitTypesFrompLS(lst::Event* event, unsigned int pLS) { std::vector hits = getPixelHitsFrompLS(event, pLS); std::vector hittypes(hits.size(), 0); return hittypes; } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS(lst::Event* event, unsigned pLS) { return convertHitsToHitIdxsAndHitTypes(event, getPixelHitsFrompLS(event, pLS)); } @@ -73,15 +73,15 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getHitsFromMD(SDL::Event* event, unsigned int MD) { - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); +std::vector getHitsFromMD(lst::Event* event, unsigned int MD) { + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); unsigned int hit_1 = miniDoublets->anchorHitIndices[MD]; unsigned int hit_2 = miniDoublets->outerHitIndices[MD]; return {hit_1, hit_2}; } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFromMD(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFromMD(lst::Event* event, unsigned MD) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromMD(event, MD)); } @@ -91,15 +91,15 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getMDsFromLS(SDL::Event* event, unsigned int LS) { - SDL::Segments const* segments = event->getSegments()->data(); +std::vector getMDsFromLS(lst::Event* event, unsigned int LS) { + lst::Segments const* segments = event->getSegments()->data(); unsigned int MD_1 = segments->mdIndices[2 * LS]; unsigned int MD_2 = segments->mdIndices[2 * LS + 1]; return {MD_1, MD_2}; } //____________________________________________________________________________________________ -std::vector getHitsFromLS(SDL::Event* event, unsigned int LS) { +std::vector getHitsFromLS(lst::Event* event, unsigned int LS) { std::vector MDs = getMDsFromLS(event, LS); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -107,7 +107,7 @@ std::vector getHitsFromLS(SDL::Event* event, unsigned int L } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFromLS(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFromLS(lst::Event* event, unsigned LS) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromLS(event, LS)); } @@ -117,15 +117,15 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getLSsFromT3(SDL::Event* event, unsigned int T3) { - SDL::Triplets const* triplets = event->getTriplets()->data(); +std::vector getLSsFromT3(lst::Event* event, unsigned int T3) { + lst::Triplets const* triplets = event->getTriplets()->data(); unsigned int LS_1 = triplets->segmentIndices[2 * T3]; unsigned int LS_2 = triplets->segmentIndices[2 * T3 + 1]; return {LS_1, LS_2}; } //____________________________________________________________________________________________ -std::vector getMDsFromT3(SDL::Event* event, unsigned int T3) { +std::vector getMDsFromT3(lst::Event* event, unsigned int T3) { std::vector LSs = getLSsFromT3(event, T3); std::vector MDs_0 = getMDsFromLS(event, LSs[0]); std::vector MDs_1 = getMDsFromLS(event, LSs[1]); @@ -133,7 +133,7 @@ std::vector getMDsFromT3(SDL::Event* event, unsigned int T3 } //____________________________________________________________________________________________ -std::vector getHitsFromT3(SDL::Event* event, unsigned int T3) { +std::vector getHitsFromT3(lst::Event* event, unsigned int T3) { std::vector MDs = getMDsFromT3(event, T3); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -142,7 +142,7 @@ std::vector getHitsFromT3(SDL::Event* event, unsigned int T } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFromT3(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFromT3(lst::Event* event, unsigned T3) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromT3(event, T3)); } @@ -152,15 +152,15 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getT3sFromT5(SDL::Event* event, unsigned int T5) { - SDL::Quintuplets const* quintuplets = event->getQuintuplets()->data(); +std::vector getT3sFromT5(lst::Event* event, unsigned int T5) { + lst::Quintuplets const* quintuplets = event->getQuintuplets()->data(); unsigned int T3_1 = quintuplets->tripletIndices[2 * T5]; unsigned int T3_2 = quintuplets->tripletIndices[2 * T5 + 1]; return {T3_1, T3_2}; } //____________________________________________________________________________________________ -std::vector getLSsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getLSsFromT5(lst::Event* event, unsigned int T5) { std::vector T3s = getT3sFromT5(event, T5); std::vector LSs_0 = getLSsFromT3(event, T3s[0]); std::vector LSs_1 = getLSsFromT3(event, T3s[1]); @@ -168,7 +168,7 @@ std::vector getLSsFromT5(SDL::Event* event, unsigned int T5 } //____________________________________________________________________________________________ -std::vector getMDsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getMDsFromT5(lst::Event* event, unsigned int T5) { std::vector LSs = getLSsFromT5(event, T5); std::vector MDs_0 = getMDsFromLS(event, LSs[0]); std::vector MDs_1 = getMDsFromLS(event, LSs[1]); @@ -178,7 +178,7 @@ std::vector getMDsFromT5(SDL::Event* event, unsigned int T5 } //____________________________________________________________________________________________ -std::vector getHitsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getHitsFromT5(lst::Event* event, unsigned int T5) { std::vector MDs = getMDsFromT5(event, T5); std::vector hits_0 = getHitsFromMD(event, MDs[0]); std::vector hits_1 = getHitsFromMD(event, MDs[1]); @@ -189,8 +189,8 @@ std::vector getHitsFromT5(SDL::Event* event, unsigned int T } //____________________________________________________________________________________________ -std::vector getHitIdxsFromT5(SDL::Event* event, unsigned int T5) { - SDL::Hits const* hitsEvt = event->getHits()->data(); +std::vector getHitIdxsFromT5(lst::Event* event, unsigned int T5) { + lst::Hits const* hitsEvt = event->getHits()->data(); std::vector hits = getHitsFromT5(event, T5); std::vector hitidxs; for (auto& hit : hits) @@ -198,23 +198,23 @@ std::vector getHitIdxsFromT5(SDL::Event* event, unsigned in return hitidxs; } //____________________________________________________________________________________________ -std::vector getModuleIdxsFromT5(SDL::Event* event, unsigned int T5) { +std::vector getModuleIdxsFromT5(lst::Event* event, unsigned int T5) { std::vector hits = getHitsFromT5(event, T5); std::vector module_idxs; - SDL::Hits const* hitsEvt = event->getHits()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); for (auto& hitIdx : hits) { module_idxs.push_back(hitsEvt->moduleIndices[hitIdx]); } return module_idxs; } //____________________________________________________________________________________________ -std::vector getHitTypesFromT5(SDL::Event* event, unsigned int T5) { +std::vector getHitTypesFromT5(lst::Event* event, unsigned int T5) { return {4, 4, 4, 4, 4, 4, 4, 4, 4, 4}; ; } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFromT5(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFromT5(lst::Event* event, unsigned T5) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFromT5(event, T5)); } @@ -224,46 +224,46 @@ std::tuple, std::vector> getHitIdxsAndHi // =============== //____________________________________________________________________________________________ -unsigned int getPixelLSFrompT3(SDL::Event* event, unsigned int pT3) { - SDL::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); - SDL::ObjectRanges const* rangesEvt = event->getRanges()->data(); - SDL::Modules const* modulesEvt = event->getModules()->data(); +unsigned int getPixelLSFrompT3(lst::Event* event, unsigned int pT3) { + lst::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); + lst::ObjectRanges const* rangesEvt = event->getRanges()->data(); + lst::Modules const* modulesEvt = event->getModules()->data(); const unsigned int pLS_offset = rangesEvt->segmentModuleIndices[*(modulesEvt->nLowerModules)]; return pixelTriplets->pixelSegmentIndices[pT3] - pLS_offset; } //____________________________________________________________________________________________ -unsigned int getT3FrompT3(SDL::Event* event, unsigned int pT3) { - SDL::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); +unsigned int getT3FrompT3(lst::Event* event, unsigned int pT3) { + lst::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); return pixelTriplets->tripletIndices[pT3]; } //____________________________________________________________________________________________ -std::vector getLSsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getLSsFrompT3(lst::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getLSsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getMDsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getMDsFrompT3(lst::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getMDsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getOuterTrackerHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getOuterTrackerHitsFrompT3(lst::Event* event, unsigned int pT3) { unsigned int T3 = getT3FrompT3(event, pT3); return getHitsFromT3(event, T3); } //____________________________________________________________________________________________ -std::vector getPixelHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getPixelHitsFrompT3(lst::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); return getPixelHitsFrompLS(event, pLS); } //____________________________________________________________________________________________ -std::vector getHitsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getHitsFrompT3(lst::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); unsigned int T3 = getT3FrompT3(event, pT3); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); @@ -273,8 +273,8 @@ std::vector getHitsFrompT3(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned int pT3) { - SDL::Hits const* hitsEvt = event->getHits()->data(); +std::vector getHitIdxsFrompT3(lst::Event* event, unsigned int pT3) { + lst::Hits const* hitsEvt = event->getHits()->data(); std::vector hits = getHitsFrompT3(event, pT3); std::vector hitidxs; for (auto& hit : hits) @@ -282,17 +282,17 @@ std::vector getHitIdxsFrompT3(SDL::Event* event, unsigned i return hitidxs; } //____________________________________________________________________________________________ -std::vector getModuleIdxsFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getModuleIdxsFrompT3(lst::Event* event, unsigned int pT3) { std::vector hits = getOuterTrackerHitsFrompT3(event, pT3); std::vector module_idxs; - SDL::Hits const* hitsEvt = event->getHits()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); for (auto& hitIdx : hits) { module_idxs.push_back(hitsEvt->moduleIndices[hitIdx]); } return module_idxs; } //____________________________________________________________________________________________ -std::vector getHitTypesFrompT3(SDL::Event* event, unsigned int pT3) { +std::vector getHitTypesFrompT3(lst::Event* event, unsigned int pT3) { unsigned int pLS = getPixelLSFrompT3(event, pT3); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); // pixel Hits list will be either 3 or 4 and depending on it return accordingly @@ -303,7 +303,7 @@ std::vector getHitTypesFrompT3(SDL::Event* event, unsigned } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3(lst::Event* event, unsigned pT3) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFrompT3(event, pT3)); } @@ -313,52 +313,52 @@ std::tuple, std::vector> getHitIdxsAndHi // =============== //____________________________________________________________________________________________ -unsigned int getPixelLSFrompT5(SDL::Event* event, unsigned int pT5) { - SDL::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); - SDL::ObjectRanges const* rangesEvt = event->getRanges()->data(); - SDL::Modules const* modulesEvt = event->getModules()->data(); +unsigned int getPixelLSFrompT5(lst::Event* event, unsigned int pT5) { + lst::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); + lst::ObjectRanges const* rangesEvt = event->getRanges()->data(); + lst::Modules const* modulesEvt = event->getModules()->data(); const unsigned int pLS_offset = rangesEvt->segmentModuleIndices[*(modulesEvt->nLowerModules)]; return pixelQuintuplets->pixelIndices[pT5] - pLS_offset; } //____________________________________________________________________________________________ -unsigned int getT5FrompT5(SDL::Event* event, unsigned int pT5) { - SDL::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); +unsigned int getT5FrompT5(lst::Event* event, unsigned int pT5) { + lst::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); return pixelQuintuplets->T5Indices[pT5]; } //____________________________________________________________________________________________ -std::vector getT3sFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getT3sFrompT5(lst::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getT3sFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getLSsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getLSsFrompT5(lst::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getLSsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getMDsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getMDsFrompT5(lst::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getMDsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getOuterTrackerHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getOuterTrackerHitsFrompT5(lst::Event* event, unsigned int pT5) { unsigned int T5 = getT5FrompT5(event, pT5); return getHitsFromT5(event, T5); } //____________________________________________________________________________________________ -std::vector getPixelHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getPixelHitsFrompT5(lst::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); return getPixelHitsFrompLS(event, pLS); } //____________________________________________________________________________________________ -std::vector getHitsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getHitsFrompT5(lst::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); unsigned int T5 = getT5FrompT5(event, pT5); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); @@ -368,8 +368,8 @@ std::vector getHitsFrompT5(SDL::Event* event, unsigned int } //____________________________________________________________________________________________ -std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned int pT5) { - SDL::Hits const* hitsEvt = event->getHits()->data(); +std::vector getHitIdxsFrompT5(lst::Event* event, unsigned int pT5) { + lst::Hits const* hitsEvt = event->getHits()->data(); std::vector hits = getHitsFrompT5(event, pT5); std::vector hitidxs; for (auto& hit : hits) @@ -378,10 +378,10 @@ std::vector getHitIdxsFrompT5(SDL::Event* event, unsigned i } //____________________________________________________________________________________________ -std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getModuleIdxsFrompT5(lst::Event* event, unsigned int pT5) { std::vector hits = getOuterTrackerHitsFrompT5(event, pT5); std::vector module_idxs; - SDL::Hits const* hitsEvt = event->getHits()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); for (auto& hitIdx : hits) { module_idxs.push_back(hitsEvt->moduleIndices[hitIdx]); } @@ -389,7 +389,7 @@ std::vector getModuleIdxsFrompT5(SDL::Event* event, unsigne } //____________________________________________________________________________________________ -std::vector getHitTypesFrompT5(SDL::Event* event, unsigned int pT5) { +std::vector getHitTypesFrompT5(lst::Event* event, unsigned int pT5) { unsigned int pLS = getPixelLSFrompT5(event, pT5); std::vector pixelHits = getPixelHitsFrompLS(event, pLS); // pixel Hits list will be either 3 or 4 and depending on it return accordingly @@ -400,7 +400,7 @@ std::vector getHitTypesFrompT5(SDL::Event* event, unsigned } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5(lst::Event* event, unsigned pT5) { return convertHitsToHitIdxsAndHitTypes(event, getHitsFrompT5(event, pT5)); } @@ -410,9 +410,9 @@ std::tuple, std::vector> getHitIdxsAndHi // ============== //____________________________________________________________________________________________ -std::vector getLSsFromTC(SDL::Event* event, unsigned int TC) { +std::vector getLSsFromTC(lst::Event* event, unsigned int TC) { // Get the type of the track candidate - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); short type = trackCandidates->trackCandidateType[TC]; unsigned int objidx = trackCandidates->directObjectIndices[TC]; switch (type) { @@ -432,10 +432,10 @@ std::vector getLSsFromTC(SDL::Event* event, unsigned int TC } //____________________________________________________________________________________________ -std::tuple, std::vector> getHitIdxsAndHitTypesFromTC(SDL::Event* event, +std::tuple, std::vector> getHitIdxsAndHitTypesFromTC(lst::Event* event, unsigned TC) { // Get the type of the track candidate - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); short type = trackCandidates->trackCandidateType[TC]; unsigned int objidx = trackCandidates->directObjectIndices[TC]; switch (type) { diff --git a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h index ecdb83bd3fce7..7e96b3b07a9d1 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h +++ b/RecoTracker/LSTCore/standalone/code/core/AccessHelper.h @@ -5,83 +5,83 @@ #include #include "Event.h" -using SDLEvent = SDL::Event; +using lstEvent = lst::Event; enum { kpT5 = 7, kpT3 = 5, kT5 = 4, kpLS = 8 }; // ----* Hit *---- std::tuple, std::vector> convertHitsToHitIdxsAndHitTypes( - SDLEvent* event, std::vector hits); + lstEvent* event, std::vector hits); // ----* pLS *---- -std::vector getPixelHitsFrompLS(SDLEvent* event, unsigned int pLS); -std::vector getPixelHitIdxsFrompLS(SDLEvent* event, unsigned int pLS); -std::vector getPixelHitTypesFrompLS(SDLEvent* event, unsigned int pLS); -std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS(SDLEvent* event, +std::vector getPixelHitsFrompLS(lstEvent* event, unsigned int pLS); +std::vector getPixelHitIdxsFrompLS(lstEvent* event, unsigned int pLS); +std::vector getPixelHitTypesFrompLS(lstEvent* event, unsigned int pLS); +std::tuple, std::vector> getHitIdxsAndHitTypesFrompLS(lstEvent* event, unsigned pLS); // ----* MD *---- -std::vector getHitsFromMD(SDLEvent* event, unsigned int MD); -std::tuple, std::vector> getHitIdxsAndHitTypesFromMD(SDLEvent* event, +std::vector getHitsFromMD(lstEvent* event, unsigned int MD); +std::tuple, std::vector> getHitIdxsAndHitTypesFromMD(lstEvent* event, unsigned MD); // ----* LS *---- -std::vector getMDsFromLS(SDLEvent* event, unsigned int LS); -std::vector getHitsFromLS(SDLEvent* event, unsigned int LS); -std::tuple, std::vector> getHitIdxsAndHitTypesFromLS(SDLEvent* event, +std::vector getMDsFromLS(lstEvent* event, unsigned int LS); +std::vector getHitsFromLS(lstEvent* event, unsigned int LS); +std::tuple, std::vector> getHitIdxsAndHitTypesFromLS(lstEvent* event, unsigned LS); // ----* T3 *---- -std::vector getLSsFromT3(SDLEvent* event, unsigned int T3); -std::vector getMDsFromT3(SDLEvent* event, unsigned int T3); -std::vector getHitsFromT3(SDLEvent* event, unsigned int T3); -std::tuple, std::vector> getHitIdxsAndHitTypesFromT3(SDLEvent* event, +std::vector getLSsFromT3(lstEvent* event, unsigned int T3); +std::vector getMDsFromT3(lstEvent* event, unsigned int T3); +std::vector getHitsFromT3(lstEvent* event, unsigned int T3); +std::tuple, std::vector> getHitIdxsAndHitTypesFromT3(lstEvent* event, unsigned T3); // ----* T5 *---- -std::vector getT3sFromT5(SDLEvent* event, unsigned int T5); -std::vector getLSsFromT5(SDLEvent* event, unsigned int T5); -std::vector getMDsFromT5(SDLEvent* event, unsigned int T5); -std::vector getHitsFromT5(SDLEvent* event, unsigned int T5); -std::vector getHitIdxsFromT5(SDLEvent* event, unsigned int T5); -std::vector getHitTypesFromT5(SDLEvent* event, unsigned int T5); -std::vector getModuleIdxsFromT5(SDLEvent* event, unsigned int T5); -std::tuple, std::vector> getHitIdxsAndHitTypesFromT5(SDLEvent* event, +std::vector getT3sFromT5(lstEvent* event, unsigned int T5); +std::vector getLSsFromT5(lstEvent* event, unsigned int T5); +std::vector getMDsFromT5(lstEvent* event, unsigned int T5); +std::vector getHitsFromT5(lstEvent* event, unsigned int T5); +std::vector getHitIdxsFromT5(lstEvent* event, unsigned int T5); +std::vector getHitTypesFromT5(lstEvent* event, unsigned int T5); +std::vector getModuleIdxsFromT5(lstEvent* event, unsigned int T5); +std::tuple, std::vector> getHitIdxsAndHitTypesFromT5(lstEvent* event, unsigned T5); // ----* pT3 *---- -unsigned int getPixelLSFrompT3(SDLEvent* event, unsigned int pT3); -unsigned int getT3FrompT3(SDLEvent* event, unsigned int pT3); -std::vector getLSsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getMDsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getOuterTrackerHitsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getPixelHitsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getHitsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getHitIdxsFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getHitTypesFrompT3(SDLEvent* event, unsigned int pT3); -std::vector getModuleIdxsFrompT3(SDLEvent* event, unsigned int pT3); -std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3(SDLEvent* event, +unsigned int getPixelLSFrompT3(lstEvent* event, unsigned int pT3); +unsigned int getT3FrompT3(lstEvent* event, unsigned int pT3); +std::vector getLSsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getMDsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getOuterTrackerHitsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getPixelHitsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getHitsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getHitIdxsFrompT3(lstEvent* event, unsigned int pT3); +std::vector getHitTypesFrompT3(lstEvent* event, unsigned int pT3); +std::vector getModuleIdxsFrompT3(lstEvent* event, unsigned int pT3); +std::tuple, std::vector> getHitIdxsAndHitTypesFrompT3(lstEvent* event, unsigned pT3); // ----* pT5 *---- -unsigned int getPixelLSFrompT5(SDLEvent* event, unsigned int pT5); -unsigned int getT5FrompT5(SDLEvent* event, unsigned int pT5); -std::vector getT3sFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getLSsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getMDsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getOuterTrackerHitsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getPixelHitsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getHitsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getHitIdxsFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getHitTypesFrompT5(SDLEvent* event, unsigned int pT5); -std::vector getModuleIdxsFrompT5(SDLEvent* event, unsigned int pT5); -std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5(SDLEvent* event, +unsigned int getPixelLSFrompT5(lstEvent* event, unsigned int pT5); +unsigned int getT5FrompT5(lstEvent* event, unsigned int pT5); +std::vector getT3sFrompT5(lstEvent* event, unsigned int pT5); +std::vector getLSsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getMDsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getOuterTrackerHitsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getPixelHitsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getHitsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getHitIdxsFrompT5(lstEvent* event, unsigned int pT5); +std::vector getHitTypesFrompT5(lstEvent* event, unsigned int pT5); +std::vector getModuleIdxsFrompT5(lstEvent* event, unsigned int pT5); +std::tuple, std::vector> getHitIdxsAndHitTypesFrompT5(lstEvent* event, unsigned pT5); // ----* TC *---- -std::vector getLSsFromTC(SDLEvent* event, unsigned int TC); -std::vector getHitsFromTC(SDLEvent* event, unsigned int TC); -std::tuple, std::vector> getHitIdxsAndHitTypesFromTC(SDLEvent* event, +std::vector getLSsFromTC(lstEvent* event, unsigned int TC); +std::vector getHitsFromTC(lstEvent* event, unsigned int TC); +std::tuple, std::vector> getHitIdxsAndHitTypesFromTC(lstEvent* event, unsigned int TC); #endif diff --git a/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h b/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h index e1404b7f8f9bc..6decf4bec42c8 100644 --- a/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h +++ b/RecoTracker/LSTCore/standalone/code/core/AnalysisConfig.h @@ -100,7 +100,7 @@ class AnalysisConfig { std::map>> moduleSimHits; std::map modulePopulation; - SDL::ModuleConnectionMap moduleConnectiongMapLoose; + lst::ModuleConnectionMap moduleConnectiongMapLoose; // Boolean to trigger whether to run cut_value_ntupling bool do_cut_value_ntuple; diff --git a/RecoTracker/LSTCore/standalone/code/core/SDLMath.h b/RecoTracker/LSTCore/standalone/code/core/lstMath.h similarity index 98% rename from RecoTracker/LSTCore/standalone/code/core/SDLMath.h rename to RecoTracker/LSTCore/standalone/code/core/lstMath.h index a1bcaecea9b1a..8fd4db3f2bc72 100644 --- a/RecoTracker/LSTCore/standalone/code/core/SDLMath.h +++ b/RecoTracker/LSTCore/standalone/code/core/lstMath.h @@ -1,10 +1,10 @@ -#ifndef SDLMath_h -#define SDLMath_h +#ifndef lstMath_h +#define lstMath_h #include #include #include -namespace SDLMath { +namespace lstMath { inline float Phi_mpi_pi(float x) { if (std::isnan(x)) { std::cout << "MathUtil::Phi_mpi_pi() function called with NaN" << std::endl; @@ -209,5 +209,5 @@ namespace SDLMath { return Hit(x, y, 0); }; -} // namespace SDLMath +} // namespace lstMath #endif diff --git a/RecoTracker/LSTCore/standalone/code/core/trkCore.cc b/RecoTracker/LSTCore/standalone/code/core/trkCore.cc index db8b2f6ac142d..f9ee245c68041 100644 --- a/RecoTracker/LSTCore/standalone/code/core/trkCore.cc +++ b/RecoTracker/LSTCore/standalone/code/core/trkCore.cc @@ -22,7 +22,7 @@ bool goodEvent() { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runMiniDoublet(SDL::Event *event, int evt) { +float runMiniDoublet(lst::Event *event, int evt) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Mini-Doublet start " << evt << std::endl; @@ -74,7 +74,7 @@ float runMiniDoublet(SDL::Event *event, int evt) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runSegment(SDL::Event *event) { +float runSegment(lst::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Segment start" << std::endl; @@ -111,7 +111,7 @@ float runSegment(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runT3(SDL::Event *event) { +float runT3(lst::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco T3 start" << std::endl; @@ -152,7 +152,7 @@ float runT3(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runpT3(SDL::Event *event) { +float runpT3(lst::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Triplet pT3 start" << std::endl; @@ -168,7 +168,7 @@ float runpT3(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runQuintuplet(SDL::Event *event) { +float runQuintuplet(lst::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Quintuplet start" << std::endl; @@ -213,7 +213,7 @@ float runQuintuplet(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean) { +float runPixelLineSegment(lst::Event *event, bool no_pls_dupclean) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Line Segment start" << std::endl; @@ -227,7 +227,7 @@ float runPixelLineSegment(SDL::Event *event, bool no_pls_dupclean) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runPixelQuintuplet(SDL::Event *event) { +float runPixelQuintuplet(lst::Event *event) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco Pixel Quintuplet start" << std::endl; @@ -243,7 +243,7 @@ float runPixelQuintuplet(SDL::Event *event) { } //___________________________________________________________________________________________________________________________________________________________________________________________ -float runTrackCandidate(SDL::Event *event, bool no_pls_dupclean, bool tc_pls_triplets) { +float runTrackCandidate(lst::Event *event, bool no_pls_dupclean, bool tc_pls_triplets) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Reco TrackCandidate start" << std::endl; @@ -501,13 +501,13 @@ float drfracSimHitConsistentWithHelix(int isimtrk, int isimhitidx) { int charge = trk.sim_q()[isimtrk]; // Construct helix object - SDLMath::Helix helix(pt, eta, phi, vx, vy, vz, charge); + lstMath::Helix helix(pt, eta, phi, vx, vy, vz, charge); return drfracSimHitConsistentWithHelix(helix, isimhitidx); } //__________________________________________________________________________________________ -float drfracSimHitConsistentWithHelix(SDLMath::Helix &helix, int isimhitidx) { +float drfracSimHitConsistentWithHelix(lstMath::Helix &helix, int isimhitidx) { // Sim hit vector std::vector point = {trk.simhit_x()[isimhitidx], trk.simhit_y()[isimhitidx], trk.simhit_z()[isimhitidx]}; @@ -539,13 +539,13 @@ float distxySimHitConsistentWithHelix(int isimtrk, int isimhitidx) { int charge = trk.sim_q()[isimtrk]; // Construct helix object - SDLMath::Helix helix(pt, eta, phi, vx, vy, vz, charge); + lstMath::Helix helix(pt, eta, phi, vx, vy, vz, charge); return distxySimHitConsistentWithHelix(helix, isimhitidx); } //__________________________________________________________________________________________ -float distxySimHitConsistentWithHelix(SDLMath::Helix &helix, int isimhitidx) { +float distxySimHitConsistentWithHelix(lstMath::Helix &helix, int isimhitidx) { // Sim hit vector std::vector point = {trk.simhit_x()[isimhitidx], trk.simhit_y()[isimhitidx], trk.simhit_z()[isimhitidx]}; @@ -839,7 +839,7 @@ void addInputsToLineSegmentTrackingPreLoad(std::vector> &out_ } //___________________________________________________________________________________________________________________________________________________________________________________________ -float addInputsToEventPreLoad(SDL::Event *event, +float addInputsToEventPreLoad(lst::Event *event, bool useOMP, std::vector trkX, std::vector trkY, @@ -1143,7 +1143,7 @@ void writeMetaData() { // DEPRECATED FUNCTIONS //__________________________________________________________________________________________ -[[deprecated]] float addInputsToLineSegmentTracking(SDL::Event &event, bool useOMP) { +[[deprecated]] float addInputsToLineSegmentTracking(lst::Event &event, bool useOMP) { TStopwatch my_timer; if (ana.verbose >= 2) std::cout << "Loading Inputs (i.e. outer tracker hits, and pixel line segements) to the Line Segment Tracking.... " @@ -1338,6 +1338,6 @@ void writeMetaData() { } //__________________________________________________________________________________________ -[[deprecated]] float addInputsToLineSegmentTrackingUsingExplicitMemory(SDL::Event &event) { +[[deprecated]] float addInputsToLineSegmentTrackingUsingExplicitMemory(lst::Event &event) { return addInputsToLineSegmentTracking(event, true); } diff --git a/RecoTracker/LSTCore/standalone/code/core/trkCore.h b/RecoTracker/LSTCore/standalone/code/core/trkCore.h index b1900f068c5d5..ae145eb183b08 100644 --- a/RecoTracker/LSTCore/standalone/code/core/trkCore.h +++ b/RecoTracker/LSTCore/standalone/code/core/trkCore.h @@ -6,27 +6,27 @@ #include "TSystem.h" #include "AnalysisConfig.h" #include "ModuleConnectionMap.h" -#include "SDLMath.h" +#include "lstMath.h" #include "Event.h" #include #include -using SDLEvent = SDL::Event; +using lstEvent = lst::Event; // --------------------- ======================== --------------------- bool goodEvent(); -float runMiniDoublet(SDLEvent *event, int evt); -float runSegment(SDLEvent *event); -float runT4(SDLEvent *event); -float runT4x(SDLEvent *event); -float runpT4(SDLEvent *event); -float runT3(SDLEvent *event); -float runTrackCandidate(SDLEvent *event, bool no_pls_dupclean, bool tc_pls_triplets); -float runQuintuplet(SDLEvent *event); -float runPixelQuintuplet(SDLEvent *event); -float runPixelLineSegment(SDLEvent *event, bool no_pls_dupclean); -float runpT3(SDLEvent *event); +float runMiniDoublet(lstEvent *event, int evt); +float runSegment(lstEvent *event); +float runT4(lstEvent *event); +float runT4x(lstEvent *event); +float runpT4(lstEvent *event); +float runT3(lstEvent *event); +float runTrackCandidate(lstEvent *event, bool no_pls_dupclean, bool tc_pls_triplets); +float runQuintuplet(lstEvent *event); +float runPixelQuintuplet(lstEvent *event); +float runPixelLineSegment(lstEvent *event, bool no_pls_dupclean); +float runpT3(lstEvent *event); // --------------------- ======================== --------------------- @@ -40,9 +40,9 @@ int getDenomSimTrkType(std::vector simidxs); // --------------------- ======================== --------------------- float drfracSimHitConsistentWithHelix(int isimtrk, int isimhitidx); -float drfracSimHitConsistentWithHelix(SDLMath::Helix &helix, int isimhitidx); +float drfracSimHitConsistentWithHelix(lstMath::Helix &helix, int isimhitidx); float distxySimHitConsistentWithHelix(int isimtrk, int isimhitidx); -float distxySimHitConsistentWithHelix(SDLMath::Helix &helix, int isimhitidx); +float distxySimHitConsistentWithHelix(lstMath::Helix &helix, int isimhitidx); TVector3 calculateR3FromPCA(const TVector3 &p3, const float dxy, const float dz); // --------------------- ======================== --------------------- @@ -71,7 +71,7 @@ void addInputsToLineSegmentTrackingPreLoad(std::vector> &out_ std::vector> &out_pixelType_vec, std::vector> &out_isQuad_vec); -float addInputsToEventPreLoad(SDLEvent *event, +float addInputsToEventPreLoad(lstEvent *event, bool useOMP, std::vector trkX, std::vector trkY, @@ -107,7 +107,7 @@ void writeMetaData(); // --------------------- ======================== --------------------- // DEPRECATED FUNCTION -float addInputsToLineSegmentTrackingUsingExplicitMemory(SDLEvent &event); -float addInputsToLineSegmentTracking(SDLEvent &event, bool useOMP); +float addInputsToLineSegmentTrackingUsingExplicitMemory(lstEvent &event); +float addInputsToLineSegmentTracking(lstEvent &event, bool useOMP); #endif diff --git a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc index 7ffef21e9005a..4769a8423de71 100644 --- a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc +++ b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc @@ -9,7 +9,7 @@ void createOutputBranches() { } //________________________________________________________________________________________________________________________________ -void fillOutputBranches(SDL::Event* event) { +void fillOutputBranches(lst::Event* event) { setOutputBranches(event); setOptionalOutputBranches(event); if (ana.gnn_ntuple) @@ -183,7 +183,7 @@ void createGnnNtupleBranches() { } //________________________________________________________________________________________________________________________________ -void setOutputBranches(SDL::Event* event) { +void setOutputBranches(lst::Event* event) { // ============ Sim tracks ============= int n_accepted_simtrk = 0; for (unsigned int isimtrk = 0; isimtrk < trk.sim_pt().size(); ++isimtrk) { @@ -226,7 +226,7 @@ void setOutputBranches(SDL::Event* event) { std::vector> tc_matched_simIdx; // ============ Track candidates ============= - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); unsigned int nTrackCandidates = *trackCandidates->nTrackCandidates; for (unsigned int idx = 0; idx < nTrackCandidates; idx++) { // Compute reco quantities of track candidate based on final object @@ -278,7 +278,7 @@ void setOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setOptionalOutputBranches(SDL::Event* event) { +void setOptionalOutputBranches(lst::Event* event) { #ifdef CUT_VALUE_DEBUG setPixelQuintupletOutputBranches(event); @@ -289,12 +289,12 @@ void setOptionalOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setPixelQuintupletOutputBranches(SDL::Event* event) { +void setPixelQuintupletOutputBranches(lst::Event* event) { // ============ pT5 ============= - SDL::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); - SDL::Quintuplets const* quintuplets = event->getQuintuplets()->data(); - SDL::Segments const* segments = event->getSegments()->data(); - SDL::Modules const* modules = event->getModules()->data(); + lst::PixelQuintuplets const* pixelQuintuplets = event->getPixelQuintuplets()->data(); + lst::Quintuplets const* quintuplets = event->getQuintuplets()->data(); + lst::Segments const* segments = event->getSegments()->data(); + lst::Modules const* modules = event->getModules()->data(); int n_accepted_simtrk = ana.tx->getBranch>("sim_TC_matched").size(); unsigned int nPixelQuintuplets = @@ -365,10 +365,10 @@ void setPixelQuintupletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setQuintupletOutputBranches(SDL::Event* event) { - SDL::Quintuplets const* quintuplets = event->getQuintuplets()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); - SDL::Modules const* modules = event->getModules()->data(); +void setQuintupletOutputBranches(lst::Event* event) { + lst::Quintuplets const* quintuplets = event->getQuintuplets()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); + lst::Modules const* modules = event->getModules()->data(); int n_accepted_simtrk = ana.tx->getBranch>("sim_TC_matched").size(); std::vector sim_t5_matched(n_accepted_simtrk); @@ -378,7 +378,7 @@ void setQuintupletOutputBranches(SDL::Event* event) { int nQuintuplets = quintuplets->nQuintuplets[lowerModuleIdx]; for (unsigned int idx = 0; idx < nQuintuplets; idx++) { unsigned int quintupletIndex = ranges->quintupletModuleIndices[lowerModuleIdx] + idx; - float pt = __H2F(quintuplets->innerRadius[quintupletIndex]) * SDL::k2Rinv1GeVf * 2; + float pt = __H2F(quintuplets->innerRadius[quintupletIndex]) * lst::k2Rinv1GeVf * 2; float eta = __H2F(quintuplets->eta[quintupletIndex]); float phi = __H2F(quintuplets->phi[quintupletIndex]); @@ -436,10 +436,10 @@ void setQuintupletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setPixelTripletOutputBranches(SDL::Event* event) { - SDL::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::Segments const* segments = event->getSegments()->data(); +void setPixelTripletOutputBranches(lst::Event* event) { + lst::PixelTriplets const* pixelTriplets = event->getPixelTriplets()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::Segments const* segments = event->getSegments()->data(); int n_accepted_simtrk = ana.tx->getBranch>("sim_TC_matched").size(); unsigned int nPixelTriplets = *pixelTriplets->nPixelTriplets; @@ -499,14 +499,14 @@ void setPixelTripletOutputBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setGnnNtupleBranches(SDL::Event* event) { +void setGnnNtupleBranches(lst::Event* event) { // Get relevant information - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); std::set mds_used_in_sg; std::map md_index_map; @@ -581,11 +581,11 @@ void setGnnNtupleBranches(SDL::Event* event) { std::vector hits = getHitsFromLS(event, sgIdx); // Computing line segment pt estimate (assuming beam spot is at zero) - SDLMath::Hit hitA(0, 0, 0); - SDLMath::Hit hitB(hitsEvt->xs[hits[0]], hitsEvt->ys[hits[0]], hitsEvt->zs[hits[0]]); - SDLMath::Hit hitC(hitsEvt->xs[hits[2]], hitsEvt->ys[hits[2]], hitsEvt->zs[hits[2]]); - SDLMath::Hit center = SDLMath::getCenterFromThreePoints(hitA, hitB, hitC); - float pt = SDLMath::ptEstimateFromRadius(center.rt()); + lst_math::Hit hitA(0, 0, 0); + lst_math::Hit hitB(hitsEvt->xs[hits[0]], hitsEvt->ys[hits[0]], hitsEvt->zs[hits[0]]); + lst_math::Hit hitC(hitsEvt->xs[hits[2]], hitsEvt->ys[hits[2]], hitsEvt->zs[hits[2]]); + lst_math::Hit center = lst_math::getCenterFromThreePoints(hitA, hitB, hitC); + float pt = lst_math::ptEstimateFromRadius(center.rt()); float eta = hitC.eta(); float phi = hitB.phi(); @@ -621,7 +621,7 @@ void setGnnNtupleBranches(SDL::Event* event) { sg_index_map[sgIdx] = ana.tx->getBranch>("LS_isFake").size() - 1; // // T5 eta and phi are computed using outer and innermost hits - // SDLMath::Hit hitA(trk.ph2_x()[anchitidx], trk.ph2_y()[anchitidx], trk.ph2_z()[anchitidx]); + // lstMath::Hit hitA(trk.ph2_x()[anchitidx], trk.ph2_y()[anchitidx], trk.ph2_z()[anchitidx]); // const float phi = hitA.phi(); // const float eta = hitA.eta(); } @@ -640,10 +640,10 @@ void setGnnNtupleBranches(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { +void setGnnNtupleMiniDoublet(lst::Event* event, unsigned int MD) { // Get relevant information - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); // Get the hit indices unsigned int hit0 = miniDoublets->anchorHitIndices[MD]; @@ -680,10 +680,10 @@ void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { float dphichange = miniDoublets->dphichanges[MD]; // Computing pt - float pt = hit0_r * SDL::k2Rinv1GeVf / sin(dphichange); + float pt = hit0_r * lst::k2Rinv1GeVf / sin(dphichange); // T5 eta and phi are computed using outer and innermost hits - SDLMath::Hit hitA(trk.ph2_x()[anchitidx], trk.ph2_y()[anchitidx], trk.ph2_z()[anchitidx]); + lstMath::Hit hitA(trk.ph2_x()[anchitidx], trk.ph2_y()[anchitidx], trk.ph2_z()[anchitidx]); const float phi = hitA.phi(); const float eta = hitA.eta(); @@ -708,10 +708,10 @@ void setGnnNtupleMiniDoublet(SDL::Event* event, unsigned int MD) { } //________________________________________________________________________________________________________________________________ -std::tuple> parseTrackCandidate(SDL::Event* event, +std::tuple> parseTrackCandidate(lst::Event* event, unsigned int idx) { // Get the type of the track candidate - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); short type = trackCandidates->trackCandidateType[idx]; enum { pT5 = 7, pT3 = 5, T5 = 4, pLS = 8 }; @@ -742,12 +742,12 @@ std::tuple> parseTrackCandidate( } //________________________________________________________________________________________________________________________________ -std::tuple, std::vector> parsepT5(SDL::Event* event, +std::tuple, std::vector> parsepT5(lst::Event* event, unsigned int idx) { // Get relevant information - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); - SDL::Quintuplets const* quintuplets = event->getQuintuplets()->data(); - SDL::Segments const* segments = event->getSegments()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Quintuplets const* quintuplets = event->getQuintuplets()->data(); + lst::Segments const* segments = event->getSegments()->data(); // // pictorial representation of a pT5 @@ -843,7 +843,7 @@ std::tuple, std::vectorptIn[pLS]; const float eta_pLS = segments->eta[pLS]; const float phi_pLS = segments->phi[pLS]; - float pt_T5 = __H2F(quintuplets->innerRadius[T5Index]) * 2 * SDL::k2Rinv1GeVf; + float pt_T5 = __H2F(quintuplets->innerRadius[T5Index]) * 2 * lst::k2Rinv1GeVf; const float pt = (pt_T5 + pt_pLS) / 2; // Form the hit idx/type std::vector @@ -854,12 +854,12 @@ std::tuple, std::vector, std::vector> parsepT3(SDL::Event* event, +std::tuple, std::vector> parsepT3(lst::Event* event, unsigned int idx) { // Get relevant information - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); - SDL::Triplets const* triplets = event->getTriplets()->data(); - SDL::Segments const* segments = event->getSegments()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Triplets const* triplets = event->getTriplets()->data(); + lst::Segments const* segments = event->getSegments()->data(); // // pictorial representation of a pT3 @@ -876,7 +876,7 @@ std::tuple, std::vectorptIn[pLS]; const float eta_pLS = segments->eta[pLS]; const float phi_pLS = segments->phi[pLS]; - float pt_T3 = triplets->circleRadius[T3] * 2 * SDL::k2Rinv1GeVf; + float pt_T3 = triplets->circleRadius[T3] * 2 * lst::k2Rinv1GeVf; // average pt const float pt = (pt_pLS + pt_T3) / 2; @@ -889,10 +889,10 @@ std::tuple, std::vector, std::vector> parseT5(SDL::Event* event, +std::tuple, std::vector> parseT5(lst::Event* event, unsigned int idx) { - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); - SDL::Quintuplets const* quintuplets = event->getQuintuplets()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Quintuplets const* quintuplets = event->getQuintuplets()->data(); unsigned int T5 = trackCandidates->directObjectIndices[idx]; std::vector hits = getHitsFromT5(event, T5); @@ -908,11 +908,11 @@ std::tuple, std::vectorinnerRadius[T5] * SDL::k2Rinv1GeVf * 2; + const float pt = quintuplets->innerRadius[T5] * lst::k2Rinv1GeVf * 2; // T5 eta and phi are computed using outer and innermost hits - SDLMath::Hit hitA(trk.ph2_x()[Hit_0], trk.ph2_y()[Hit_0], trk.ph2_z()[Hit_0]); - SDLMath::Hit hitB(trk.ph2_x()[Hit_8], trk.ph2_y()[Hit_8], trk.ph2_z()[Hit_8]); + lstMath::Hit hitA(trk.ph2_x()[Hit_0], trk.ph2_y()[Hit_0], trk.ph2_z()[Hit_0]); + lstMath::Hit hitB(trk.ph2_x()[Hit_8], trk.ph2_y()[Hit_8], trk.ph2_z()[Hit_8]); const float phi = hitA.phi(); const float eta = hitB.eta(); @@ -923,10 +923,10 @@ std::tuple, std::vector, std::vector> parsepLS(SDL::Event* event, +std::tuple, std::vector> parsepLS(lst::Event* event, unsigned int idx) { - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); - SDL::Segments const* segments = event->getSegments()->data(); + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Segments const* segments = event->getSegments()->data(); // Getting pLS index unsigned int pLS = trackCandidates->directObjectIndices[idx]; @@ -944,9 +944,9 @@ std::tuple, std::vector* event) { - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); +void printHitMultiplicities(lst::Event* event) { + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); int nHits = 0; for (unsigned int idx = 0; idx <= *(modules->nLowerModules); @@ -959,9 +959,9 @@ void printHitMultiplicities(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printMiniDoubletMultiplicities(SDL::Event* event) { - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Modules const* modules = event->getModules()->data(); +void printMiniDoubletMultiplicities(lst::Event* event) { + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Modules const* modules = event->getModules()->data(); int nMiniDoublets = 0; int totOccupancyMiniDoublets = 0; @@ -978,7 +978,7 @@ void printMiniDoubletMultiplicities(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printAllObjects(SDL::Event* event) { +void printAllObjects(lst::Event* event) { printMDs(event); printLSs(event); printpLSs(event); @@ -986,11 +986,11 @@ void printAllObjects(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printMDs(SDL::Event* event) { - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); +void printMDs(lst::Event* event) { + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); // Then obtain the lower module index for (unsigned int idx = 0; idx <= *(modules->nLowerModules); ++idx) { @@ -1008,12 +1008,12 @@ void printMDs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printLSs(SDL::Event* event) { - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); +void printLSs(lst::Event* event) { + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); int nSegments = 0; for (unsigned int i = 0; i < *(modules->nLowerModules); ++i) { @@ -1040,12 +1040,12 @@ void printLSs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printpLSs(SDL::Event* event) { - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); +void printpLSs(lst::Event* event) { + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); unsigned int i = *(modules->nLowerModules); unsigned int idx = i; //modules->lowerModuleIndices[i]; @@ -1070,12 +1070,12 @@ void printpLSs(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void printT3s(SDL::Event* event) { - SDL::Triplets const* triplets = event->getTriplets()->data(); - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Hits const* hitsEvt = event->getHits()->data(); - SDL::Modules const* modules = event->getModules()->data(); +void printT3s(lst::Event* event) { + lst::Triplets const* triplets = event->getTriplets()->data(); + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Hits const* hitsEvt = event->getHits()->data(); + lst::Modules const* modules = event->getModules()->data(); int nTriplets = 0; for (unsigned int i = 0; i < *(modules->nLowerModules); ++i) { // unsigned int idx = modules->lowerModuleIndices[i]; @@ -1112,13 +1112,13 @@ void printT3s(SDL::Event* event) { } //________________________________________________________________________________________________________________________________ -void debugPrintOutlierMultiplicities(SDL::Event* event) { - SDL::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); - SDL::Triplets const* triplets = event->getTriplets()->data(); - SDL::Segments const* segments = event->getSegments()->data(); - SDL::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); - SDL::Modules const* modules = event->getModules()->data(); - SDL::ObjectRanges const* ranges = event->getRanges()->data(); +void debugPrintOutlierMultiplicities(lst::Event* event) { + lst::TrackCandidates const* trackCandidates = event->getTrackCandidates()->data(); + lst::Triplets const* triplets = event->getTriplets()->data(); + lst::Segments const* segments = event->getSegments()->data(); + lst::MiniDoublets const* miniDoublets = event->getMiniDoublets()->data(); + lst::Modules const* modules = event->getModules()->data(); + lst::ObjectRanges const* ranges = event->getRanges()->data(); //int nTrackCandidates = 0; for (unsigned int idx = 0; idx <= *(modules->nLowerModules); ++idx) { if (trackCandidates->nTrackCandidates[idx] > 50000) { diff --git a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h index 26b07c90a2641..b9a6197f66f43 100644 --- a/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h +++ b/RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h @@ -4,14 +4,14 @@ #include #include -#include "SDLMath.h" +#include "lstMath.h" #include "Event.h" #include "AnalysisConfig.h" #include "trkCore.h" #include "AccessHelper.h" -using SDLEvent = SDL::Event; +using lstEvent = lst::Event; // Common void createOutputBranches(); @@ -19,40 +19,40 @@ void createRequiredOutputBranches(); void createOptionalOutputBranches(); void createGnnNtupleBranches(); -void fillOutputBranches(SDLEvent* event); -void setOutputBranches(SDLEvent* event); -void setOptionalOutputBranches(SDLEvent* event); -void setPixelQuintupletOutputBranches(SDLEvent* event); -void setQuintupletOutputBranches(SDLEvent* event); -void setPixelTripletOutputBranches(SDLEvent* event); -void setGnnNtupleBranches(SDLEvent* event); -void setGnnNtupleMiniDoublet(SDLEvent* event, unsigned int MD); - -std::tuple> parseTrackCandidate(SDLEvent* event, unsigned int); -std::tuple, std::vector> parsepT5(SDLEvent* event, +void fillOutputBranches(lstEvent* event); +void setOutputBranches(lstEvent* event); +void setOptionalOutputBranches(lstEvent* event); +void setPixelQuintupletOutputBranches(lstEvent* event); +void setQuintupletOutputBranches(lstEvent* event); +void setPixelTripletOutputBranches(lstEvent* event); +void setGnnNtupleBranches(lstEvent* event); +void setGnnNtupleMiniDoublet(lstEvent* event, unsigned int MD); + +std::tuple> parseTrackCandidate(lstEvent* event, unsigned int); +std::tuple, std::vector> parsepT5(lstEvent* event, unsigned int); -std::tuple, std::vector> parsepT3(SDLEvent* event, +std::tuple, std::vector> parsepT3(lstEvent* event, unsigned int); -std::tuple, std::vector> parseT5(SDLEvent* event, +std::tuple, std::vector> parseT5(lstEvent* event, unsigned int); -std::tuple, std::vector> parsepLS(SDLEvent* event, +std::tuple, std::vector> parsepLS(lstEvent* event, unsigned int); // Print multiplicities -void printMiniDoubletMultiplicities(SDLEvent* event); -void printHitMultiplicities(SDLEvent* event); +void printMiniDoubletMultiplicities(lstEvent* event); +void printHitMultiplicities(lstEvent* event); // Print objects (GPU) -void printAllObjects(SDLEvent* event); -void printpT4s(SDLEvent* event); -void printMDs(SDLEvent* event); -void printLSs(SDLEvent* event); -void printpLSs(SDLEvent* event); -void printT3s(SDLEvent* event); -void printT4s(SDLEvent* event); -void printTCs(SDLEvent* event); +void printAllObjects(lstEvent* event); +void printpT4s(lstEvent* event); +void printMDs(lstEvent* event); +void printLSs(lstEvent* event); +void printpLSs(lstEvent* event); +void printT3s(lstEvent* event); +void printT4s(lstEvent* event); +void printTCs(lstEvent* event); // Print anomalous multiplicities -void debugPrintOutlierMultiplicities(SDLEvent* event); +void debugPrintOutlierMultiplicities(lstEvent* event); #endif diff --git a/RecoTracker/LSTCore/standalone/efficiency/bin/sdl_timing b/RecoTracker/LSTCore/standalone/efficiency/bin/sdl_timing index 1ef7ed9b719ef..15c238217633b 100755 --- a/RecoTracker/LSTCore/standalone/efficiency/bin/sdl_timing +++ b/RecoTracker/LSTCore/standalone/efficiency/bin/sdl_timing @@ -151,6 +151,6 @@ fi echo "Total Timing Summary" grep -h "Time for map " timing_temp.txt | cut -d " " -f 6 | awk '{ SUM += $1} END { print "Average time for map loading =",SUM/5,"ms" }' # 5 is the number of stream values run grep -h "Time for input " timing_temp.txt | cut -d " " -f 6 | awk '{ SUM += $1} END { print "Average time for input loading =",SUM/5,"ms" }' # 5 is the number of stream values run -grep -h "Time for event " timing_temp.txt | cut -d " " -f 6 | awk '{ SUM += $1} END { print "Average time for SDL::Event creation =",SUM/21,"ms"}' # 5 is the number of total streams run (1+2+4+6+8) +grep -h "Time for event " timing_temp.txt | cut -d " " -f 6 | awk '{ SUM += $1} END { print "Average time for lst::Event creation =",SUM/21,"ms"}' # 5 is the number of total streams run (1+2+4+6+8) echo " Evt Hits MD LS T3 T5 pLS pT5 pT3 TC Reset Event Short Rate" grep -hr "avg " timing_temp.txt # space is needed to not get certain bad lines