diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
index 75debc1d8b864..f7b8df82d85c3 100644
--- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
+++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
@@ -529,7 +529,7 @@ def condition_(self, fragment, stepList, key, hasHarvest):
)
upgradeWFs['lstOnGPUIters01TrackingOnly'].step3 = upgradeWFs['trackingOnly'].step3 | {
'--procModifiers': 'trackingIters01,trackingLST',
- '--accelerators' : 'gpu-nvidia'
+ '--accelerators' : 'gpu-*'
}
#DeepCore seeding for JetCore iteration workflow
diff --git a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
index 7de7a0b2ad925..7c1dab22afd58 100644
--- a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
+++ b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
@@ -428,10 +428,10 @@
from RecoTracker.LST.lstSeedTracks_cff import lstInitialStepSeedTracks,lstHighPtTripletStepSeedTracks
from RecoTracker.LST.lstPixelSeedInputProducer_cfi import lstPixelSeedInputProducer
from RecoTracker.LST.lstPhase2OTHitsInputProducer_cfi import lstPhase2OTHitsInputProducer
-from RecoTracker.LST.lstProducer_cff import *
+from RecoTracker.LST.lstProducerTask_cff import *
_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstPixelSeedInputProducer, lstPhase2OTHitsInputProducer,
- lstProducer, lstModulesDevESProducer, highPtTripletStepLSTpTracks, highPtTripletStepLSTT5Tracks, highPtTripletStepSelectorLSTT5)
+ lstProducerTask, highPtTripletStepLSTpTracks, highPtTripletStepLSTT5Tracks, highPtTripletStepSelectorLSTT5)
(trackingPhase2PU140 & trackingLST).toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_LST)
# fast tracking mask producer
diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml
index 1b6e79b68e8b4..49e9ee77f5a3b 100644
--- a/RecoTracker/LST/plugins/BuildFile.xml
+++ b/RecoTracker/LST/plugins/BuildFile.xml
@@ -35,7 +35,6 @@
-
diff --git a/RecoTracker/LST/plugins/LSTOutputConverter.cc b/RecoTracker/LST/plugins/LSTOutputConverter.cc
index c40603c9c1e5d..0bbdd68051b87 100644
--- a/RecoTracker/LST/plugins/LSTOutputConverter.cc
+++ b/RecoTracker/LST/plugins/LSTOutputConverter.cc
@@ -3,7 +3,7 @@
#include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
#include "DataFormats/TrackReco/interface/SeedStopInfo.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
-#include "FWCore/Framework/interface/global/EDProducer.h"
+#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
@@ -25,7 +25,7 @@
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
-class LSTOutputConverter : public edm::global::EDProducer<> {
+class LSTOutputConverter : public edm::stream::EDProducer<> {
public:
explicit LSTOutputConverter(edm::ParameterSet const& iConfig);
~LSTOutputConverter() override = default;
@@ -33,7 +33,7 @@ class LSTOutputConverter : public edm::global::EDProducer<> {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
private:
- void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
+ void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
const edm::EDGetTokenT lstOutputToken_;
const edm::EDGetTokenT lstPhase2OTHitsInputToken_;
@@ -110,7 +110,7 @@ void LSTOutputConverter::fillDescriptions(edm::ConfigurationDescriptions& descri
descriptions.addWithDefaultLabel(desc);
}
-void LSTOutputConverter::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
+void LSTOutputConverter::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Setup
auto const& lstOutput = iEvent.get(lstOutputToken_);
auto const& phase2OTRecHits = iEvent.get(lstPhase2OTHitsInputToken_);
diff --git a/RecoTracker/LST/python/lstProducer_cff.py b/RecoTracker/LST/python/lstProducerTask_cff.py
similarity index 77%
rename from RecoTracker/LST/python/lstProducer_cff.py
rename to RecoTracker/LST/python/lstProducerTask_cff.py
index 9cf355bb3a3fa..4497fba36cb9b 100644
--- a/RecoTracker/LST/python/lstProducer_cff.py
+++ b/RecoTracker/LST/python/lstProducerTask_cff.py
@@ -5,4 +5,4 @@
from RecoTracker.LST.lstModulesDevESProducer_cfi import lstModulesDevESProducer
# not scheduled task to get the framework to hide the producer
-dummyLSTModulesDevESProducerTask = cms.Task(lstModulesDevESProducer)
+lstProducerTask = cms.Task(lstModulesDevESProducer, lstProducer)
diff --git a/RecoTracker/LSTCore/BuildFile.xml b/RecoTracker/LSTCore/BuildFile.xml
index 1208407185001..a58a1898046ae 100644
--- a/RecoTracker/LSTCore/BuildFile.xml
+++ b/RecoTracker/LSTCore/BuildFile.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/RecoTracker/LSTCore/interface/Constants.h b/RecoTracker/LSTCore/interface/Common.h
similarity index 69%
rename from RecoTracker/LSTCore/interface/Constants.h
rename to RecoTracker/LSTCore/interface/Common.h
index b1bd4e124eacc..be4e5dd41e133 100644
--- a/RecoTracker/LSTCore/interface/Constants.h
+++ b/RecoTracker/LSTCore/interface/Common.h
@@ -1,5 +1,5 @@
-#ifndef RecoTracker_LSTCore_interface_Constants_h
-#define RecoTracker_LSTCore_interface_Constants_h
+#ifndef RecoTracker_LSTCore_interface_Common_h
+#define RecoTracker_LSTCore_interface_Common_h
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "DataFormats/Common/interface/StdArray.h"
@@ -12,38 +12,14 @@
#endif
#endif
-#ifdef CACHE_ALLOC
-#include "HeterogeneousCore/AlpakaInterface/interface/CachedBufAlloc.h"
-#endif
-
namespace lst {
- // Buffer type for allocations where auto type can't be used.
- template
- using Buf = alpaka::Buf;
-
- // Allocation wrapper function to make integration of the caching allocator easier and reduce code boilerplate.
- template
- ALPAKA_FN_HOST ALPAKA_FN_INLINE Buf allocBufWrapper(TDev const& dev, TSize nElements, TQueue queue) {
-#ifdef CACHE_ALLOC
- return cms::alpakatools::allocCachedBuf(
- dev, queue, alpaka_common::Vec1D(static_cast(nElements)));
-#else
- return alpaka::allocBuf(dev,
- alpaka_common::Vec1D(static_cast(nElements)));
-#endif
- }
-
- // Second allocation wrapper function when queue is not given. Reduces code boilerplate.
- template
- ALPAKA_FN_HOST ALPAKA_FN_INLINE Buf allocBufWrapper(TDev const& dev, TSize nElements) {
- return alpaka::allocBuf(dev,
- alpaka_common::Vec1D(static_cast(nElements)));
- }
-
// Named constants for pixelTypes
enum PixelType : int8_t { kInvalid = -1, kHighPt = 0, kLowPtPosCurv = 1, kLowPtNegCurv = 2 };
+ // Named types for LST objects
+ enum LSTObjType { T5 = 4, pT3 = 5, pT5 = 7, pLS = 8 };
+
// If a compile time flag does not define PT_CUT, default to 0.8 (GeV)
#ifndef PT_CUT
constexpr float PT_CUT = 0.8f;
diff --git a/RecoTracker/LSTCore/interface/HitsSoA.h b/RecoTracker/LSTCore/interface/HitsSoA.h
index 4aed06e1bc31f..b1f5de9eff46e 100644
--- a/RecoTracker/LSTCore/interface/HitsSoA.h
+++ b/RecoTracker/LSTCore/interface/HitsSoA.h
@@ -4,7 +4,7 @@
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/Portable/interface/PortableCollection.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
diff --git a/RecoTracker/LSTCore/interface/LSTESData.h b/RecoTracker/LSTCore/interface/LSTESData.h
index 83798e92dcb3f..b5d68cde5dd26 100644
--- a/RecoTracker/LSTCore/interface/LSTESData.h
+++ b/RecoTracker/LSTCore/interface/LSTESData.h
@@ -1,7 +1,7 @@
#ifndef RecoTracker_LSTCore_interface_LSTESData_h
#define RecoTracker_LSTCore_interface_LSTESData_h
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
#include "RecoTracker/LSTCore/interface/EndcapGeometryDevHostCollection.h"
#include "RecoTracker/LSTCore/interface/ModulesHostCollection.h"
#include "RecoTracker/LSTCore/interface/PixelMap.h"
@@ -21,6 +21,7 @@ namespace lst {
unsigned int nEndCapMap;
std::unique_ptr> modules;
std::unique_ptr> endcapGeometry;
+ // Host-side object that is shared between the LSTESData objects for different devices
std::shared_ptr pixelMapping;
LSTESData(uint16_t const& nModulesIn,
diff --git a/RecoTracker/LSTCore/interface/MiniDoubletsSoA.h b/RecoTracker/LSTCore/interface/MiniDoubletsSoA.h
index c93a00e1a8aec..84375502c34b0 100644
--- a/RecoTracker/LSTCore/interface/MiniDoubletsSoA.h
+++ b/RecoTracker/LSTCore/interface/MiniDoubletsSoA.h
@@ -39,11 +39,11 @@ namespace lst {
SOA_COLUMN(float, outerHighEdgeX),
SOA_COLUMN(float, outerHighEdgeY),
SOA_COLUMN(float, outerLowEdgeX),
- SOA_COLUMN(float, outerLowEdgeY));
+ SOA_COLUMN(float, outerLowEdgeY))
GENERATE_SOA_LAYOUT(MiniDoubletsOccupancySoALayout,
SOA_COLUMN(unsigned int, nMDs),
- SOA_COLUMN(unsigned int, totOccupancyMDs));
+ SOA_COLUMN(unsigned int, totOccupancyMDs))
using MiniDoubletsSoA = MiniDoubletsSoALayout<>;
using MiniDoubletsOccupancySoA = MiniDoubletsOccupancySoALayout<>;
diff --git a/RecoTracker/LSTCore/interface/ModulesSoA.h b/RecoTracker/LSTCore/interface/ModulesSoA.h
index 8bf1dc9232cd1..241dce953b293 100644
--- a/RecoTracker/LSTCore/interface/ModulesSoA.h
+++ b/RecoTracker/LSTCore/interface/ModulesSoA.h
@@ -4,7 +4,7 @@
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/Portable/interface/PortableCollection.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
diff --git a/RecoTracker/LSTCore/interface/ObjectRangesSoA.h b/RecoTracker/LSTCore/interface/ObjectRangesSoA.h
index 09371cd4b2b56..ccab6b23909f6 100644
--- a/RecoTracker/LSTCore/interface/ObjectRangesSoA.h
+++ b/RecoTracker/LSTCore/interface/ObjectRangesSoA.h
@@ -4,7 +4,7 @@
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/Portable/interface/PortableCollection.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
diff --git a/RecoTracker/LSTCore/interface/PixelMap.h b/RecoTracker/LSTCore/interface/PixelMap.h
index a0fd89387e7e4..2c3756d4c6251 100644
--- a/RecoTracker/LSTCore/interface/PixelMap.h
+++ b/RecoTracker/LSTCore/interface/PixelMap.h
@@ -4,7 +4,7 @@
#include
#include
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
struct PixelMap {
diff --git a/RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h b/RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h
index 504594dae6d94..e8ea89b9a2547 100644
--- a/RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h
+++ b/RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h
@@ -5,7 +5,7 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
GENERATE_SOA_LAYOUT(PixelQuintupletsSoALayout,
diff --git a/RecoTracker/LSTCore/interface/PixelTripletsSoA.h b/RecoTracker/LSTCore/interface/PixelTripletsSoA.h
index bf940e2cd3bd0..a0f2c9c416539 100644
--- a/RecoTracker/LSTCore/interface/PixelTripletsSoA.h
+++ b/RecoTracker/LSTCore/interface/PixelTripletsSoA.h
@@ -5,7 +5,7 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
GENERATE_SOA_LAYOUT(PixelTripletsSoALayout,
diff --git a/RecoTracker/LSTCore/interface/QuintupletsSoA.h b/RecoTracker/LSTCore/interface/QuintupletsSoA.h
index 05da002e5e343..4ece80cd11ddd 100644
--- a/RecoTracker/LSTCore/interface/QuintupletsSoA.h
+++ b/RecoTracker/LSTCore/interface/QuintupletsSoA.h
@@ -5,7 +5,7 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
GENERATE_SOA_LAYOUT(QuintupletsSoALayout,
diff --git a/RecoTracker/LSTCore/interface/SegmentsSoA.h b/RecoTracker/LSTCore/interface/SegmentsSoA.h
index b5154dea56e49..24df2fb5a42a0 100644
--- a/RecoTracker/LSTCore/interface/SegmentsSoA.h
+++ b/RecoTracker/LSTCore/interface/SegmentsSoA.h
@@ -4,7 +4,7 @@
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/Portable/interface/PortableCollection.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
@@ -19,9 +19,7 @@ namespace lst {
SOA_COLUMN(uint16_t, outerLowerModuleIndices),
SOA_COLUMN(Params_LS::ArrayUxLayers, mdIndices),
SOA_COLUMN(unsigned int, innerMiniDoubletAnchorHitIndices),
- SOA_COLUMN(unsigned int, outerMiniDoubletAnchorHitIndices)
- //SOA_SCALAR(unsigned int, nMemoryLocations)
- )
+ SOA_COLUMN(unsigned int, outerMiniDoubletAnchorHitIndices))
GENERATE_SOA_LAYOUT(SegmentsOccupancySoALayout,
SOA_COLUMN(unsigned int, nSegments), //number of segments per inner lower module
diff --git a/RecoTracker/LSTCore/interface/TrackCandidatesSoA.h b/RecoTracker/LSTCore/interface/TrackCandidatesSoA.h
index 18bea1e51c6ba..b1fdecf75526a 100644
--- a/RecoTracker/LSTCore/interface/TrackCandidatesSoA.h
+++ b/RecoTracker/LSTCore/interface/TrackCandidatesSoA.h
@@ -5,7 +5,7 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
GENERATE_SOA_LAYOUT(TrackCandidatesSoALayout,
diff --git a/RecoTracker/LSTCore/interface/TripletsSoA.h b/RecoTracker/LSTCore/interface/TripletsSoA.h
index e0407ef3a0912..69c2d97449df3 100644
--- a/RecoTracker/LSTCore/interface/TripletsSoA.h
+++ b/RecoTracker/LSTCore/interface/TripletsSoA.h
@@ -5,7 +5,7 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace lst {
GENERATE_SOA_LAYOUT(TripletsSoALayout,
diff --git a/RecoTracker/LSTCore/interface/alpaka/Constants.h b/RecoTracker/LSTCore/interface/alpaka/Common.h
similarity index 90%
rename from RecoTracker/LSTCore/interface/alpaka/Constants.h
rename to RecoTracker/LSTCore/interface/alpaka/Common.h
index 208f49cc52538..7a1feabfcf076 100644
--- a/RecoTracker/LSTCore/interface/alpaka/Constants.h
+++ b/RecoTracker/LSTCore/interface/alpaka/Common.h
@@ -1,7 +1,9 @@
-#ifndef RecoTracker_LSTCore_interface_alpaka_Constants_h
-#define RecoTracker_LSTCore_interface_alpaka_Constants_h
+#ifndef RecoTracker_LSTCore_interface_alpaka_Common_h
+#define RecoTracker_LSTCore_interface_alpaka_Common_h
-#include "RecoTracker/LSTCore/interface/Constants.h"
+#include
+
+#include "RecoTracker/LSTCore/interface/Common.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
@@ -34,6 +36,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
// expecting a reference (T const&) in the arguments. Hence,
// ALPAKA_STATIC_ACC_MEM_GLOBAL needs to be used in addition to constexpr.
+ ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kPi = std::numbers::pi_v;
// 15 MeV constant from the approximate Bethe-Bloch formula
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kMulsInGeV = 0.015;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kMiniMulsPtScaleBarrel[6] = {
@@ -54,8 +57,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kWidth2S = 0.009;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kWidthPS = 0.01;
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kPt_betaMax = 7.0;
- // 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;
+ // To be updated with std::numeric_limits::infinity() in the code and data files
+ ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float kVerticalModuleSlope = 123456789.0;
namespace t5dnn {
diff --git a/RecoTracker/LSTCore/interface/alpaka/EndcapGeometryDevDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/EndcapGeometryDevDeviceCollection.h
index 002e1e0423804..12f510cf6b367 100644
--- a/RecoTracker/LSTCore/interface/alpaka/EndcapGeometryDevDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/EndcapGeometryDevDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/EndcapGeometryDevSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/HitsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/HitsDeviceCollection.h
index 99494499271e0..5bafd9df246bc 100644
--- a/RecoTracker/LSTCore/interface/alpaka/HitsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/HitsDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/HitsSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/LST.h b/RecoTracker/LSTCore/interface/alpaka/LST.h
index df1319462432e..40d912de3f291 100644
--- a/RecoTracker/LSTCore/interface/alpaka/LST.h
+++ b/RecoTracker/LSTCore/interface/alpaka/LST.h
@@ -1,7 +1,7 @@
#ifndef RecoTracker_LSTCore_interface_alpaka_LST_h
#define RecoTracker_LSTCore_interface_alpaka_LST_h
-#include "RecoTracker/LSTCore/interface/alpaka/Constants.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/LSTESData.h"
#include
@@ -9,7 +9,7 @@
#include
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
- class Event;
+ class LSTEvent;
class LST {
public:
@@ -65,7 +65,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
std::vector const& ph2_y,
std::vector const& ph2_z);
- void getOutput(Event& event);
+ void getOutput(LSTEvent& event);
// Input and output vectors
std::vector in_trkX_;
diff --git a/RecoTracker/LSTCore/interface/alpaka/MiniDoubletsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/MiniDoubletsDeviceCollection.h
index 3011e1d2f87b7..7751f75ac5ec9 100644
--- a/RecoTracker/LSTCore/interface/alpaka/MiniDoubletsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/MiniDoubletsDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/MiniDoubletsSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/ModulesDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/ModulesDeviceCollection.h
index a7510feb0d540..73152a47b6a42 100644
--- a/RecoTracker/LSTCore/interface/alpaka/ModulesDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/ModulesDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/ModulesSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/ObjectRangesDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/ObjectRangesDeviceCollection.h
index edeab720bdbaf..36c6584280fe0 100644
--- a/RecoTracker/LSTCore/interface/alpaka/ObjectRangesDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/ObjectRangesDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/ObjectRangesSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/PixelQuintupletsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/PixelQuintupletsDeviceCollection.h
index e2553f7b42c50..e5feed7677c38 100644
--- a/RecoTracker/LSTCore/interface/alpaka/PixelQuintupletsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/PixelQuintupletsDeviceCollection.h
@@ -1,9 +1,11 @@
#ifndef RecoTracker_LSTCore_interface_PixelQuintupletsDeviceCollection_h
#define RecoTracker_LSTCore_interface_PixelQuintupletsDeviceCollection_h
-#include "RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h"
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
+#include "RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h"
+
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
using PixelQuintupletsDeviceCollection = PortableCollection;
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
diff --git a/RecoTracker/LSTCore/interface/alpaka/PixelTripletsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/PixelTripletsDeviceCollection.h
index ac010b9028ac4..a5938ed82bd8b 100644
--- a/RecoTracker/LSTCore/interface/alpaka/PixelTripletsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/PixelTripletsDeviceCollection.h
@@ -1,9 +1,11 @@
#ifndef RecoTracker_LSTCore_interface_PixelTripletsDeviceCollection_h
#define RecoTracker_LSTCore_interface_PixelTripletsDeviceCollection_h
-#include "RecoTracker/LSTCore/interface/PixelTripletsSoA.h"
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
+#include "RecoTracker/LSTCore/interface/PixelTripletsSoA.h"
+
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
using PixelTripletsDeviceCollection = PortableCollection;
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
diff --git a/RecoTracker/LSTCore/interface/alpaka/QuintupletsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/QuintupletsDeviceCollection.h
index df1aa2e554e2d..13fb5484ea0fd 100644
--- a/RecoTracker/LSTCore/interface/alpaka/QuintupletsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/QuintupletsDeviceCollection.h
@@ -1,9 +1,11 @@
#ifndef RecoTracker_LSTCore_interface_QuintupletsDeviceCollection_h
#define RecoTracker_LSTCore_interface_QuintupletsDeviceCollection_h
-#include "RecoTracker/LSTCore/interface/QuintupletsSoA.h"
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
+#include "RecoTracker/LSTCore/interface/QuintupletsSoA.h"
+
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
using QuintupletsDeviceCollection = PortableCollection2;
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
diff --git a/RecoTracker/LSTCore/interface/alpaka/SegmentsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/SegmentsDeviceCollection.h
index ac634aa51bade..934e6314ae320 100644
--- a/RecoTracker/LSTCore/interface/alpaka/SegmentsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/SegmentsDeviceCollection.h
@@ -3,6 +3,7 @@
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
#include "RecoTracker/LSTCore/interface/SegmentsSoA.h"
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
diff --git a/RecoTracker/LSTCore/interface/alpaka/TrackCandidatesDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/TrackCandidatesDeviceCollection.h
index 057d86180d967..387ca5a108453 100644
--- a/RecoTracker/LSTCore/interface/alpaka/TrackCandidatesDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/TrackCandidatesDeviceCollection.h
@@ -1,9 +1,11 @@
#ifndef RecoTracker_LSTCore_interface_TrackCandidatesDeviceCollection_h
#define RecoTracker_LSTCore_interface_TrackCandidatesDeviceCollection_h
-#include "RecoTracker/LSTCore/interface/TrackCandidatesSoA.h"
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
+#include "RecoTracker/LSTCore/interface/TrackCandidatesSoA.h"
+
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
using TrackCandidatesDeviceCollection = PortableCollection;
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
diff --git a/RecoTracker/LSTCore/interface/alpaka/TripletsDeviceCollection.h b/RecoTracker/LSTCore/interface/alpaka/TripletsDeviceCollection.h
index ea709a7d78efd..6db827680cee3 100644
--- a/RecoTracker/LSTCore/interface/alpaka/TripletsDeviceCollection.h
+++ b/RecoTracker/LSTCore/interface/alpaka/TripletsDeviceCollection.h
@@ -1,9 +1,11 @@
#ifndef RecoTracker_LSTCore_interface_TripletsDeviceCollection_h
#define RecoTracker_LSTCore_interface_TripletsDeviceCollection_h
-#include "RecoTracker/LSTCore/interface/TripletsSoA.h"
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
+#include "RecoTracker/LSTCore/interface/alpaka/Common.h"
+#include "RecoTracker/LSTCore/interface/TripletsSoA.h"
+
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
using TripletsDeviceCollection = PortableCollection2;
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
diff --git a/RecoTracker/LSTCore/src/LSTESData.cc b/RecoTracker/LSTCore/src/LSTESData.cc
index 18fa3adf3a72f..4679d35f5b7aa 100644
--- a/RecoTracker/LSTCore/src/LSTESData.cc
+++ b/RecoTracker/LSTCore/src/LSTESData.cc
@@ -7,7 +7,7 @@
#include "ModuleMethods.h"
namespace {
- std::string trackLooperDir() {
+ std::string geometryDataDir() {
const char* path_lst_base = std::getenv("LST_BASE");
const char* path_tracklooperdir = std::getenv("TRACKLOOPERDIR");
std::string path_str;
@@ -31,7 +31,7 @@ namespace {
}
std::string get_absolute_path_after_check_file_exists(std::string const& name) {
- std::filesystem::path fullpath = std::filesystem::absolute(name.c_str());
+ std::filesystem::path fullpath = std::filesystem::absolute(name);
if (not std::filesystem::exists(fullpath)) {
throw std::runtime_error("Could not find the file = " + fullpath.string());
}
@@ -44,18 +44,18 @@ namespace {
lst::ModuleConnectionMap& 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");
+ get_absolute_path_after_check_file_exists(geometryDataDir() + "/data/OT800_IT615_pt0.8/endcap_orientation.bin");
auto tilted_geom = get_absolute_path_after_check_file_exists(
- trackLooperDir() + "/data/OT800_IT615_pt0.8/tilted_barrel_orientation.bin");
+ geometryDataDir() + "/data/OT800_IT615_pt0.8/tilted_barrel_orientation.bin");
// Module connection map (for line segment building)
auto mappath = get_absolute_path_after_check_file_exists(
- trackLooperDir() + "/data/OT800_IT615_pt0.8/module_connection_tracing_merged.bin");
+ geometryDataDir() + "/data/OT800_IT615_pt0.8/module_connection_tracing_merged.bin");
endcapGeometry.load(endcap_geom);
tiltedGeometry.load(tilted_geom);
moduleConnectionMap.load(mappath);
- auto pLSMapDir = trackLooperDir() + "/data/OT800_IT615_pt0.8/pixelmap/pLS_map";
+ auto pLSMapDir = geometryDataDir() + "/data/OT800_IT615_pt0.8/pixelmap/pLS_map";
const std::array connects{
{"_layer1_subdet5", "_layer2_subdet5", "_layer1_subdet4", "_layer2_subdet4"}};
std::string path;
@@ -97,7 +97,7 @@ std::unique_ptr> lst::loadAndFillESHost()
endcapGeometry.nEndCapMap * sizeof(float));
auto path =
- get_absolute_path_after_check_file_exists(trackLooperDir() + "/data/OT800_IT615_pt0.8/sensor_centroids.bin");
+ get_absolute_path_after_check_file_exists(geometryDataDir() + "/data/OT800_IT615_pt0.8/sensor_centroids.bin");
auto modulesBuffers = lst::loadModulesFromFile(pLStoLayer,
path.c_str(),
nModules,
diff --git a/RecoTracker/LSTCore/src/ModuleConnectionMap.cc b/RecoTracker/LSTCore/src/ModuleConnectionMap.cc
index 881b2a66f6216..0da0f4cc4ac6f 100644
--- a/RecoTracker/LSTCore/src/ModuleConnectionMap.cc
+++ b/RecoTracker/LSTCore/src/ModuleConnectionMap.cc
@@ -26,6 +26,7 @@ void lst::ModuleConnectionMap::load(std::string const& filename) {
if (ifile) {
std::vector connected_detids;
+ connected_detids.reserve(number_of_connections);
// Read the connections for the given detid
for (unsigned int i = 0; i < number_of_connections; ++i) {
@@ -42,7 +43,7 @@ void lst::ModuleConnectionMap::load(std::string const& filename) {
}
if (ifile) {
- moduleConnections_[detid] = connected_detids;
+ moduleConnections_[detid] = std::move(connected_detids);
}
} else {
if (!ifile.eof()) {
@@ -66,6 +67,7 @@ void lst::ModuleConnectionMap::add(std::string const& filename) {
std::stringstream ss(line);
ss >> detid >> number_of_connections;
+ connected_detids.reserve(number_of_connections);
for (int ii = 0; ii < number_of_connections; ++ii) {
ss >> connected_detid;
@@ -90,7 +92,7 @@ void lst::ModuleConnectionMap::print() {
std::cout << "Printing ModuleConnectionMap" << std::endl;
for (auto& pair : moduleConnections_) {
unsigned int detid = pair.first;
- std::vector connected_detids = pair.second;
+ std::vector const& connected_detids = pair.second;
std::cout << " detid: " << detid << std::endl;
for (auto& connected_detid : connected_detids) {
std::cout << " connected_detid: " << connected_detid << std::endl;
diff --git a/RecoTracker/LSTCore/src/ModuleMethods.h b/RecoTracker/LSTCore/src/ModuleMethods.h
index aee17629c7e96..75abe04ec686d 100644
--- a/RecoTracker/LSTCore/src/ModuleMethods.h
+++ b/RecoTracker/LSTCore/src/ModuleMethods.h
@@ -4,7 +4,7 @@
#include