diff --git a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py
index aaeb59bb3fe03..a2cdc06931bc5 100644
--- a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py
+++ b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py
@@ -397,7 +397,7 @@ def _copyIfExists(mod, pset, name):
from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
trackingLST.toModify(locals()["TrackSeedMonhighPtTripletStep"],
- SeedProducer = "lstPixelSeedInputProducer"
+ SeedProducer = "lstInputProducer"
)
TrackingDQMSourceTier0 += TrackSeedMonSequence
diff --git a/DataFormats/Common/src/classes_def.xml b/DataFormats/Common/src/classes_def.xml
index cbc3868eea51a..bc3e2059db47f 100644
--- a/DataFormats/Common/src/classes_def.xml
+++ b/DataFormats/Common/src/classes_def.xml
@@ -207,4 +207,5 @@
+
diff --git a/Validation/RecoTrack/interface/trackFromSeedFitFailed.h b/DataFormats/TrackReco/interface/trackFromSeedFitFailed.h
similarity index 70%
rename from Validation/RecoTrack/interface/trackFromSeedFitFailed.h
rename to DataFormats/TrackReco/interface/trackFromSeedFitFailed.h
index 6a8479f6b6c8a..a271efee5918f 100644
--- a/Validation/RecoTrack/interface/trackFromSeedFitFailed.h
+++ b/DataFormats/TrackReco/interface/trackFromSeedFitFailed.h
@@ -1,5 +1,5 @@
-#ifndef Validation_RecoTrack_trackFomSeedFitFailed_h
-#define Validation_RecoTrack_trackFomSeedFitFailed_h
+#ifndef DataFormats_TrackReco_trackFomSeedFitFailed_h
+#define DataFormats_TrackReco_trackFomSeedFitFailed_h
#include "DataFormats/TrackReco/interface/Track.h"
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackCandidates_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackCandidates_cfi.py
index 421a0f5cdd47a..93957d71c5571 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackCandidates_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackCandidates_cfi.py
@@ -26,8 +26,8 @@
_hltInitialStepTrackCandidatesLST = cms.EDProducer('LSTOutputConverter',
lstOutput = cms.InputTag('hltLST'),
- phase2OTHits = cms.InputTag('hltPhase2OTHitsInputLST'),
- lstPixelSeeds = cms.InputTag('hltPixelSeedInputLST'),
+ lstInput = cms.InputTag('hltInputLST'),
+ lstPixelSeeds = cms.InputTag('hltInputLST'),
includeT5s = cms.bool(True),
includeNonpLSTSs = cms.bool(False),
propagatorAlong = cms.ESInputTag('', 'PropagatorWithMaterial'),
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrajectorySeedsLST_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrajectorySeedsLST_cfi.py
index 26228c1c35b95..c3585a5b85511 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrajectorySeedsLST_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrajectorySeedsLST_cfi.py
@@ -2,8 +2,8 @@
hltInitialStepTrajectorySeedsLST = cms.EDProducer('LSTOutputConverter',
lstOutput = cms.InputTag('hltLST'),
- phase2OTHits = cms.InputTag('hltPhase2OTHitsInputLST'),
- lstPixelSeeds = cms.InputTag('hltPixelSeedInputLST'),
+ lstInput = cms.InputTag('hltInputLST'),
+ lstPixelSeeds = cms.InputTag('hltInputLST'),
includeT5s = cms.bool(True),
includeNonpLSTSs = cms.bool(True),
propagatorAlong = cms.ESInputTag('', 'PropagatorWithMaterial'),
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInputLST_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInputLST_cfi.py
new file mode 100644
index 0000000000000..c5b871213485b
--- /dev/null
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInputLST_cfi.py
@@ -0,0 +1,21 @@
+import FWCore.ParameterSet.Config as cms
+
+hltInputLST = cms.EDProducer('LSTInputProducer@alpaka',
+ ptCut = cms.double(0.8),
+ phase2OTRecHits = cms.InputTag('hltSiPhase2RecHits'),
+ beamSpot = cms.InputTag('hltOnlineBeamSpot'),
+ seedTracks = cms.VInputTag(
+ 'hltInitialStepSeedTracksLST',
+ 'hltHighPtTripletStepSeedTracksLST'
+ ),
+ alpaka = cms.untracked.PSet(
+ backend = cms.untracked.string('')
+ )
+)
+
+_hltInputLSTSingleIterPatatrack = hltInputLST.clone(
+ seedTracks = ['hltInitialStepSeedTracksLST']
+)
+
+from Configuration.ProcessModifiers.singleIterPatatrack_cff import singleIterPatatrack
+singleIterPatatrack.toReplaceWith(hltInputLST, _hltInputLSTSingleIterPatatrack)
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltLST_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltLST_cfi.py
index dd8337d88d205..2e75a7a866424 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltLST_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltLST_cfi.py
@@ -1,9 +1,9 @@
import FWCore.ParameterSet.Config as cms
hltLST = cms.EDProducer('LSTProducer@alpaka',
- pixelSeedInput = cms.InputTag('hltPixelSeedInputLST'),
- phase2OTHitsInput = cms.InputTag('hltPhase2OTHitsInputLST'),
+ lstInput = cms.InputTag('hltInputLST'),
verbose = cms.bool(False),
+ ptCut = cms.double(0.8),
nopLSDupClean = cms.bool(False),
tcpLSTriplets = cms.bool(False),
mightGet = cms.optional.untracked.vstring,
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2OTHitsInputLST_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2OTHitsInputLST_cfi.py
deleted file mode 100644
index ef388d2efd059..0000000000000
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2OTHitsInputLST_cfi.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import FWCore.ParameterSet.Config as cms
-
-hltPhase2OTHitsInputLST = cms.EDProducer('LSTPhase2OTHitsInputProducer',
- phase2OTRecHits = cms.InputTag('hltSiPhase2RecHits'),
- mightGet = cms.optional.untracked.vstring
-)
diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPixelSeedInputLST_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPixelSeedInputLST_cfi.py
deleted file mode 100644
index c85dfc1682512..0000000000000
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPixelSeedInputLST_cfi.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import FWCore.ParameterSet.Config as cms
-
-hltPixelSeedInputLST = cms.EDProducer('LSTPixelSeedInputProducer',
- beamSpot = cms.InputTag('hltOnlineBeamSpot'),
- seedTracks = cms.VInputTag(
- 'hltInitialStepSeedTracksLST',
- 'hltHighPtTripletStepSeedTracksLST'
- )
-)
-
-_hltPixelSeedInputLSTSingleIterPatatrack = hltPixelSeedInputLST.clone(
- seedTracks = ['hltInitialStepSeedTracksLST']
-)
-
-from Configuration.ProcessModifiers.singleIterPatatrack_cff import singleIterPatatrack
-singleIterPatatrack.toReplaceWith(hltPixelSeedInputLST, _hltPixelSeedInputLSTSingleIterPatatrack)
diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTInitialStepSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTInitialStepSequence_cfi.py
index 3ffb4c0d6063b..aa899f2527736 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTInitialStepSequence_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTInitialStepSequence_cfi.py
@@ -11,9 +11,8 @@
from ..modules.hltInitialStepSeedTracksLST_cfi import *
from ..sequences.HLTHighPtTripletStepSeedingSequence_cfi import *
from ..modules.hltHighPtTripletStepSeedTracksLST_cfi import *
-from ..modules.hltPixelSeedInputLST_cfi import *
from ..modules.hltSiPhase2RecHits_cfi import *
-from ..modules.hltPhase2OTHitsInputLST_cfi import *
+from ..modules.hltInputLST_cfi import *
from ..modules.hltLST_cfi import *
from ..modules.hltInitialStepTrackspTTCLST_cfi import *
from ..modules.hltInitialStepTrackspLSTCLST_cfi import *
@@ -27,9 +26,8 @@
+hltInitialStepSeedTracksLST
+HLTHighPtTripletStepSeedingSequence
+hltHighPtTripletStepSeedTracksLST
- +hltPixelSeedInputLST
+hltSiPhase2RecHits # Probably need to move elsewhere in the final setup
- +hltPhase2OTHitsInputLST # Probably need to move elsewhere in the final setup
+ +hltInputLST
+hltLST
+hltInitialStepTrackCandidates
+hltInitialStepTrackspTTCLST
@@ -55,9 +53,8 @@
_HLTInitialStepSequenceSingleIterPatatrackLSTSeeding = cms.Sequence(
hltInitialStepSeeds
+hltInitialStepSeedTracksLST
- +hltPixelSeedInputLST
+hltSiPhase2RecHits # Probably need to move elsewhere in the final setup
- +hltPhase2OTHitsInputLST # Probably need to move elsewhere in the final setup
+ +hltInputLST
+hltLST
+hltInitialStepTrajectorySeedsLST
+hltInitialStepTrackCandidates
diff --git a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
index 7c1dab22afd58..a3f402800e58e 100644
--- a/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
+++ b/RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
@@ -426,11 +426,10 @@
_HighPtTripletStepTask_LST = HighPtTripletStepTask.copy()
from RecoLocalTracker.Phase2TrackerRecHits.Phase2TrackerRecHits_cfi import siPhase2RecHits
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.lstInputProducer_cfi import lstInputProducer
from RecoTracker.LST.lstProducerTask_cff import *
-_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstPixelSeedInputProducer, lstPhase2OTHitsInputProducer,
+_HighPtTripletStepTask_LST.add(siPhase2RecHits, lstInitialStepSeedTracks, lstHighPtTripletStepSeedTracks, lstInputProducer,
lstProducerTask, highPtTripletStepLSTpTracks, highPtTripletStepLSTT5Tracks, highPtTripletStepSelectorLSTT5)
(trackingPhase2PU140 & trackingLST).toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_LST)
diff --git a/RecoTracker/LST/interface/LSTPhase2OTHitsInput.h b/RecoTracker/LST/interface/LSTPhase2OTHitsInput.h
deleted file mode 100644
index 00fd77846c4c3..0000000000000
--- a/RecoTracker/LST/interface/LSTPhase2OTHitsInput.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef RecoTracker_LST_interface_LSTPhase2OTHitsInput_h
-#define RecoTracker_LST_interface_LSTPhase2OTHitsInput_h
-
-#include
-#include
-
-#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h"
-
-class LSTPhase2OTHitsInput {
-public:
- LSTPhase2OTHitsInput() = default;
- LSTPhase2OTHitsInput(std::vector const detId,
- std::vector const x,
- std::vector const y,
- std::vector const z,
- std::vector const hits)
- : detId_(std::move(detId)), x_(std::move(x)), y_(std::move(y)), z_(std::move(z)), hits_(std::move(hits)) {}
-
- std::vector const& detId() const { return detId_; }
- std::vector const& x() const { return x_; }
- std::vector const& y() const { return y_; }
- std::vector const& z() const { return z_; }
- std::vector const& hits() const { return hits_; }
-
-private:
- std::vector detId_;
- std::vector x_;
- std::vector y_;
- std::vector z_;
- std::vector hits_;
-};
-
-#endif
diff --git a/RecoTracker/LST/interface/LSTPixelSeedInput.h b/RecoTracker/LST/interface/LSTPixelSeedInput.h
deleted file mode 100644
index 18d3768b2e0fc..0000000000000
--- a/RecoTracker/LST/interface/LSTPixelSeedInput.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef RecoTracker_LST_interface_LSTPixelSeedInput_h
-#define RecoTracker_LST_interface_LSTPixelSeedInput_h
-
-#include
-#include
-
-class LSTPixelSeedInput {
-public:
- LSTPixelSeedInput() = default;
- LSTPixelSeedInput(std::vector const px,
- std::vector const py,
- std::vector const pz,
- std::vector const dxy,
- std::vector const dz,
- std::vector const ptErr,
- std::vector const etaErr,
- std::vector const stateTrajGlbX,
- std::vector const stateTrajGlbY,
- std::vector const stateTrajGlbZ,
- std::vector const stateTrajGlbPx,
- std::vector const stateTrajGlbPy,
- std::vector const stateTrajGlbPz,
- std::vector const q,
- std::vector> const hitIdx)
- : px_(std::move(px)),
- py_(std::move(py)),
- pz_(std::move(pz)),
- dxy_(std::move(dxy)),
- dz_(std::move(dz)),
- ptErr_(std::move(ptErr)),
- etaErr_(std::move(etaErr)),
- stateTrajGlbX_(std::move(stateTrajGlbX)),
- stateTrajGlbY_(std::move(stateTrajGlbY)),
- stateTrajGlbZ_(std::move(stateTrajGlbZ)),
- stateTrajGlbPx_(std::move(stateTrajGlbPx)),
- stateTrajGlbPy_(std::move(stateTrajGlbPy)),
- stateTrajGlbPz_(std::move(stateTrajGlbPz)),
- q_(std::move(q)),
- hitIdx_(std::move(hitIdx)) {}
-
- std::vector const& px() const { return px_; }
- std::vector const& py() const { return py_; }
- std::vector const& pz() const { return pz_; }
- std::vector const& dxy() const { return dxy_; }
- std::vector const& dz() const { return dz_; }
- std::vector const& ptErr() const { return ptErr_; }
- std::vector const& etaErr() const { return etaErr_; }
- std::vector const& stateTrajGlbX() const { return stateTrajGlbX_; }
- std::vector const& stateTrajGlbY() const { return stateTrajGlbY_; }
- std::vector const& stateTrajGlbZ() const { return stateTrajGlbZ_; }
- std::vector const& stateTrajGlbPx() const { return stateTrajGlbPx_; }
- std::vector const& stateTrajGlbPy() const { return stateTrajGlbPy_; }
- std::vector const& stateTrajGlbPz() const { return stateTrajGlbPz_; }
- std::vector const& q() const { return q_; }
- std::vector> const& hitIdx() const { return hitIdx_; }
-
-private:
- std::vector px_;
- std::vector py_;
- std::vector pz_;
- std::vector dxy_;
- std::vector dz_;
- std::vector ptErr_;
- std::vector etaErr_;
- std::vector stateTrajGlbX_;
- std::vector stateTrajGlbY_;
- std::vector stateTrajGlbZ_;
- std::vector stateTrajGlbPx_;
- std::vector stateTrajGlbPy_;
- std::vector stateTrajGlbPz_;
- std::vector q_;
- std::vector> hitIdx_;
-};
-
-#endif
diff --git a/RecoTracker/LST/plugins/BuildFile.xml b/RecoTracker/LST/plugins/BuildFile.xml
index 49e9ee77f5a3b..f30edfb62694a 100644
--- a/RecoTracker/LST/plugins/BuildFile.xml
+++ b/RecoTracker/LST/plugins/BuildFile.xml
@@ -20,13 +20,14 @@
-
+
+
diff --git a/RecoTracker/LST/plugins/LSTOutputConverter.cc b/RecoTracker/LST/plugins/LSTOutputConverter.cc
index 13849e52a1209..73eac64f4acc3 100644
--- a/RecoTracker/LST/plugins/LSTOutputConverter.cc
+++ b/RecoTracker/LST/plugins/LSTOutputConverter.cc
@@ -13,7 +13,7 @@
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
-#include "RecoTracker/LST/interface/LSTPhase2OTHitsInput.h"
+#include "RecoTracker/LSTCore/interface/LSTInputHostCollection.h"
#include "RecoTracker/LST/interface/LSTOutput.h"
#include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
@@ -36,7 +36,7 @@ class LSTOutputConverter : public edm::stream::EDProducer<> {
void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
const edm::EDGetTokenT lstOutputToken_;
- const edm::EDGetTokenT lstPhase2OTHitsInputToken_;
+ const edm::EDGetTokenT lstInputToken_;
const edm::EDGetTokenT lstPixelSeedToken_;
const bool includeT5s_;
const bool includeNonpLSTSs_;
@@ -58,7 +58,7 @@ class LSTOutputConverter : public edm::stream::EDProducer<> {
LSTOutputConverter::LSTOutputConverter(edm::ParameterSet const& iConfig)
: lstOutputToken_(consumes(iConfig.getParameter("lstOutput"))),
- lstPhase2OTHitsInputToken_{consumes(iConfig.getParameter("phase2OTHits"))},
+ lstInputToken_{consumes(iConfig.getParameter("lstInput"))},
lstPixelSeedToken_{consumes(iConfig.getParameter("lstPixelSeeds"))},
includeT5s_(iConfig.getParameter("includeT5s")),
includeNonpLSTSs_(iConfig.getParameter("includeNonpLSTSs")),
@@ -89,8 +89,8 @@ void LSTOutputConverter::fillDescriptions(edm::ConfigurationDescriptions& descri
edm::ParameterSetDescription desc;
desc.add("lstOutput", edm::InputTag("lstProducer"));
- desc.add("phase2OTHits", edm::InputTag("lstPhase2OTHitsInputProducer"));
- desc.add("lstPixelSeeds", edm::InputTag("lstPixelSeedInputProducer"));
+ desc.add("lstInput", edm::InputTag("lstInputProducer"));
+ desc.add("lstPixelSeeds", edm::InputTag("lstInputProducer"));
desc.add("includeT5s", true);
desc.add("includeNonpLSTSs", false);
desc.add("propagatorAlong", edm::ESInputTag{"", "PropagatorWithMaterial"});
@@ -113,7 +113,7 @@ void LSTOutputConverter::fillDescriptions(edm::ConfigurationDescriptions& descri
void LSTOutputConverter::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Setup
auto const& lstOutput = iEvent.get(lstOutputToken_);
- auto const& phase2OTRecHits = iEvent.get(lstPhase2OTHitsInputToken_);
+ auto const& lstInputHC = iEvent.get(lstInputToken_);
auto const& pixelSeeds = iEvent.get(lstPixelSeedToken_);
auto const& mf = iSetup.getData(mfToken_);
auto const& propAlo = iSetup.getData(propagatorAlongToken_);
@@ -137,7 +137,7 @@ void LSTOutputConverter::produce(edm::Event& iEvent, const edm::EventSetup& iSet
outputpTTC.reserve(lstTC_len.size());
outputpLSTC.reserve(lstTC_len.size());
- auto const& OTHits = phase2OTRecHits.hits();
+ auto OTHits = lstInputHC.const_view().hits();
LogDebug("LSTOutputConverter") << "lstTC size " << lstTC_len.size();
for (unsigned int i = 0; i < lstTC_len.size(); i++) {
diff --git a/RecoTracker/LST/plugins/LSTPhase2OTHitsInputProducer.cc b/RecoTracker/LST/plugins/LSTPhase2OTHitsInputProducer.cc
deleted file mode 100644
index a0fcc72f598b6..0000000000000
--- a/RecoTracker/LST/plugins/LSTPhase2OTHitsInputProducer.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "FWCore/Framework/interface/global/EDProducer.h"
-
-#include "FWCore/Framework/interface/Event.h"
-#include "FWCore/Framework/interface/MakerMacros.h"
-#include "FWCore/ParameterSet/interface/ParameterSet.h"
-
-#include "RecoTracker/LST/interface/LSTPhase2OTHitsInput.h"
-
-class LSTPhase2OTHitsInputProducer : public edm::global::EDProducer<> {
-public:
- explicit LSTPhase2OTHitsInputProducer(edm::ParameterSet const& iConfig);
- ~LSTPhase2OTHitsInputProducer() override = default;
-
- static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
-
-private:
- void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
-
- const edm::EDGetTokenT phase2OTRecHitToken_;
- const edm::EDPutTokenT lstPhase2OTHitsInputPutToken_;
-};
-
-LSTPhase2OTHitsInputProducer::LSTPhase2OTHitsInputProducer(edm::ParameterSet const& iConfig)
- : phase2OTRecHitToken_(consumes(iConfig.getParameter("phase2OTRecHits"))),
- lstPhase2OTHitsInputPutToken_(produces()) {}
-
-void LSTPhase2OTHitsInputProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
- edm::ParameterSetDescription desc;
-
- desc.add("phase2OTRecHits", edm::InputTag("siPhase2RecHits"));
-
- descriptions.addWithDefaultLabel(desc);
-}
-
-void LSTPhase2OTHitsInputProducer::produce(edm::StreamID iID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
- // Setup
- auto const& phase2OTHits = iEvent.get(phase2OTRecHitToken_);
-
- // Vector definitions
- std::vector ph2_detId;
- ph2_detId.reserve(phase2OTHits.dataSize());
- std::vector ph2_x;
- ph2_x.reserve(phase2OTHits.dataSize());
- std::vector ph2_y;
- ph2_y.reserve(phase2OTHits.dataSize());
- std::vector ph2_z;
- ph2_z.reserve(phase2OTHits.dataSize());
- std::vector ph2_hits;
- ph2_hits.reserve(phase2OTHits.dataSize());
-
- for (auto const& it : phase2OTHits) {
- const DetId hitId = it.detId();
- for (auto const& hit : it) {
- ph2_detId.push_back(hitId.rawId());
- ph2_x.push_back(hit.globalPosition().x());
- ph2_y.push_back(hit.globalPosition().y());
- ph2_z.push_back(hit.globalPosition().z());
- ph2_hits.push_back(&hit);
- }
- }
-
- LSTPhase2OTHitsInput phase2OTHitsInput(
- std::move(ph2_detId), std::move(ph2_x), std::move(ph2_y), std::move(ph2_z), std::move(ph2_hits));
- iEvent.emplace(lstPhase2OTHitsInputPutToken_, std::move(phase2OTHitsInput));
-}
-
-DEFINE_FWK_MODULE(LSTPhase2OTHitsInputProducer);
diff --git a/RecoTracker/LST/plugins/LSTPixelSeedInputProducer.cc b/RecoTracker/LST/plugins/LSTPixelSeedInputProducer.cc
deleted file mode 100644
index 819baf78c6aa4..0000000000000
--- a/RecoTracker/LST/plugins/LSTPixelSeedInputProducer.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-#include "FWCore/Framework/interface/global/EDProducer.h"
-
-#include "FWCore/Framework/interface/Event.h"
-#include "FWCore/Framework/interface/MakerMacros.h"
-#include "FWCore/ParameterSet/interface/ParameterSet.h"
-
-#include "FWCore/Utilities/interface/transform.h"
-
-#include "MagneticField/Engine/interface/MagneticField.h"
-#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
-
-#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
-#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
-
-#include "Validation/RecoTrack/interface/trackFromSeedFitFailed.h"
-
-#include "TrackingTools/Records/interface/TransientRecHitRecord.h"
-#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
-#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
-
-#include "RecoTracker/LST/interface/LSTPixelSeedInput.h"
-
-class LSTPixelSeedInputProducer : public edm::global::EDProducer<> {
-public:
- explicit LSTPixelSeedInputProducer(edm::ParameterSet const& iConfig);
- ~LSTPixelSeedInputProducer() override = default;
-
- static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
-
-private:
- void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
-
- const edm::ESGetToken mfToken_;
- const edm::EDGetTokenT beamSpotToken_;
- std::vector>> seedTokens_;
- const edm::EDPutTokenT lstPixelSeedInputPutToken_;
- const edm::EDPutTokenT lstPixelSeedsPutToken_;
-};
-
-LSTPixelSeedInputProducer::LSTPixelSeedInputProducer(edm::ParameterSet const& iConfig)
- : mfToken_(esConsumes()),
- beamSpotToken_(consumes(iConfig.getParameter("beamSpot"))),
- lstPixelSeedInputPutToken_(produces()),
- lstPixelSeedsPutToken_(produces()) {
- seedTokens_ = edm::vector_transform(iConfig.getParameter>("seedTracks"),
- [&](const edm::InputTag& tag) { return consumes>(tag); });
-}
-
-void LSTPixelSeedInputProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
- edm::ParameterSetDescription desc;
-
- desc.add("beamSpot", edm::InputTag("offlineBeamSpot"));
-
- desc.add>("seedTracks",
- std::vector{edm::InputTag("lstInitialStepSeedTracks"),
- edm::InputTag("lstHighPtTripletStepSeedTracks")});
-
- descriptions.addWithDefaultLabel(desc);
-}
-
-void LSTPixelSeedInputProducer::produce(edm::StreamID iID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
- // Setup
- auto const& mf = iSetup.getData(mfToken_);
- auto const& bs = iEvent.get(beamSpotToken_);
-
- // Vector definitions
- std::vector see_px;
- std::vector see_py;
- std::vector see_pz;
- std::vector see_dxy;
- std::vector see_dz;
- std::vector see_ptErr;
- std::vector see_etaErr;
- std::vector see_stateTrajGlbX;
- std::vector see_stateTrajGlbY;
- std::vector see_stateTrajGlbZ;
- std::vector see_stateTrajGlbPx;
- std::vector see_stateTrajGlbPy;
- std::vector see_stateTrajGlbPz;
- std::vector see_q;
- std::vector> see_hitIdx;
- TrajectorySeedCollection see_seeds;
-
- for (size_t iColl = 0; iColl < seedTokens_.size(); ++iColl) {
- // Get seed tokens
- auto const& seedToken = seedTokens_[iColl];
- auto const& seedTracks = iEvent.get(seedToken);
-
- if (seedTracks.empty())
- continue;
-
- // Get seed track refs
- edm::RefToBaseVector seedTrackRefs;
- for (edm::View::size_type i = 0; i < seedTracks.size(); ++i) {
- seedTrackRefs.push_back(seedTracks.refAt(i));
- }
-
- edm::ProductID id = seedTracks[0].seedRef().id();
-
- for (size_t iSeed = 0; iSeed < seedTrackRefs.size(); ++iSeed) {
- auto const& seedTrackRef = seedTrackRefs[iSeed];
- auto const& seedTrack = *seedTrackRef;
- auto const& seedRef = seedTrack.seedRef();
- auto const& seed = *seedRef;
-
- if (seedRef.id() != id)
- throw cms::Exception("LogicError")
- << "All tracks in 'TracksFromSeeds' collection should point to seeds in the same collection. Now the "
- "element 0 had ProductID "
- << id << " while the element " << seedTrackRef.key() << " had " << seedTrackRef.id() << ".";
-
- const bool seedFitOk = !trackFromSeedFitFailed(seedTrack);
-
- const TrackingRecHit* lastRecHit = &*(seed.recHits().end() - 1);
- TrajectoryStateOnSurface tsos =
- trajectoryStateTransform::transientState(seed.startingState(), lastRecHit->surface(), &mf);
- auto const& stateGlobal = tsos.globalParameters();
-
- std::vector hitIdx;
- for (auto const& hit : seed.recHits()) {
- int subid = hit.geographicalId().subdetId();
- if (subid == (int)PixelSubdetector::PixelBarrel || subid == (int)PixelSubdetector::PixelEndcap) {
- const BaseTrackerRecHit* bhit = dynamic_cast(&hit);
- const auto& clusterRef = bhit->firstClusterRef();
- const auto clusterKey = clusterRef.cluster_pixel().key();
- hitIdx.push_back(clusterKey);
- } else {
- throw cms::Exception("LSTPixelSeedInputProducer") << "Not pixel hits found!";
- }
- }
-
- // Fill output
- see_px.push_back(seedFitOk ? seedTrack.px() : 0);
- see_py.push_back(seedFitOk ? seedTrack.py() : 0);
- see_pz.push_back(seedFitOk ? seedTrack.pz() : 0);
- see_dxy.push_back(seedFitOk ? seedTrack.dxy(bs.position()) : 0);
- see_dz.push_back(seedFitOk ? seedTrack.dz(bs.position()) : 0);
- see_ptErr.push_back(seedFitOk ? seedTrack.ptError() : 0);
- see_etaErr.push_back(seedFitOk ? seedTrack.etaError() : 0);
- see_stateTrajGlbX.push_back(stateGlobal.position().x());
- see_stateTrajGlbY.push_back(stateGlobal.position().y());
- see_stateTrajGlbZ.push_back(stateGlobal.position().z());
- see_stateTrajGlbPx.push_back(stateGlobal.momentum().x());
- see_stateTrajGlbPy.push_back(stateGlobal.momentum().y());
- see_stateTrajGlbPz.push_back(stateGlobal.momentum().z());
- see_q.push_back(seedTrack.charge());
- see_hitIdx.push_back(hitIdx);
- see_seeds.push_back(seed);
- }
- }
-
- LSTPixelSeedInput pixelSeedInput(std::move(see_px),
- std::move(see_py),
- std::move(see_pz),
- std::move(see_dxy),
- std::move(see_dz),
- std::move(see_ptErr),
- std::move(see_etaErr),
- std::move(see_stateTrajGlbX),
- std::move(see_stateTrajGlbY),
- std::move(see_stateTrajGlbZ),
- std::move(see_stateTrajGlbPx),
- std::move(see_stateTrajGlbPy),
- std::move(see_stateTrajGlbPz),
- std::move(see_q),
- std::move(see_hitIdx));
- iEvent.emplace(lstPixelSeedInputPutToken_, std::move(pixelSeedInput));
- iEvent.emplace(lstPixelSeedsPutToken_, std::move(see_seeds));
-}
-
-DEFINE_FWK_MODULE(LSTPixelSeedInputProducer);
diff --git a/RecoTracker/LST/plugins/alpaka/LSTInputProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTInputProducer.cc
new file mode 100644
index 0000000000000..6e7694901ffd6
--- /dev/null
+++ b/RecoTracker/LST/plugins/alpaka/LSTInputProducer.cc
@@ -0,0 +1,223 @@
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/Event.h"
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/EventSetup.h"
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/global/EDProducer.h"
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/EDGetToken.h"
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/EDPutToken.h"
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESGetToken.h"
+#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+
+#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h"
+
+#include "FWCore/Utilities/interface/transform.h"
+#include "MagneticField/Engine/interface/MagneticField.h"
+#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
+#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
+#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
+#include "DataFormats/TrackReco/interface/trackFromSeedFitFailed.h"
+#include "TrackingTools/Records/interface/TransientRecHitRecord.h"
+#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
+#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
+
+#include "RecoTracker/LSTCore/interface/LSTInputHostCollection.h"
+#include "RecoTracker/LSTCore/interface/LSTPrepareInput.h"
+
+namespace ALPAKA_ACCELERATOR_NAMESPACE {
+
+ class LSTInputProducer : public global::EDProducer<> {
+ public:
+ LSTInputProducer(edm::ParameterSet const& iConfig);
+ ~LSTInputProducer() override = default;
+
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+
+ private:
+ void produce(edm::StreamID, device::Event& iEvent, const device::EventSetup& iSetup) const override;
+
+ const double ptCut_;
+
+ const edm::EDGetTokenT phase2OTRecHitToken_;
+
+ const edm::ESGetToken mfToken_;
+ const edm::EDGetTokenT beamSpotToken_;
+ const std::vector>> seedTokens_;
+ const edm::EDPutTokenT lstPixelSeedsPutToken_;
+
+ const edm::EDPutTokenT lstInputPutToken_;
+ };
+
+ LSTInputProducer::LSTInputProducer(edm::ParameterSet const& iConfig)
+ : EDProducer<>(iConfig),
+ ptCut_(iConfig.getParameter("ptCut")),
+ phase2OTRecHitToken_(consumes(iConfig.getParameter("phase2OTRecHits"))),
+ mfToken_(esConsumes()),
+ beamSpotToken_(consumes(iConfig.getParameter("beamSpot"))),
+ seedTokens_(
+ edm::vector_transform(iConfig.getParameter>("seedTracks"),
+ [&](const edm::InputTag& tag) { return consumes>(tag); })),
+ lstPixelSeedsPutToken_(produces()),
+ lstInputPutToken_(produces()) {}
+
+ void LSTInputProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+
+ desc.add("ptCut", 0.8);
+
+ desc.add("phase2OTRecHits", edm::InputTag("siPhase2RecHits"));
+
+ desc.add("beamSpot", edm::InputTag("offlineBeamSpot"));
+ desc.add>("seedTracks",
+ std::vector{edm::InputTag("lstInitialStepSeedTracks"),
+ edm::InputTag("lstHighPtTripletStepSeedTracks")});
+
+ descriptions.addWithDefaultLabel(desc);
+ }
+
+ void LSTInputProducer::produce(edm::StreamID iID, device::Event& iEvent, const device::EventSetup& iSetup) const {
+ // Get the phase2OTRecHits
+ auto const& phase2OTHits = iEvent.get(phase2OTRecHitToken_);
+
+ std::vector ph2_detId;
+ ph2_detId.reserve(phase2OTHits.dataSize());
+ std::vector ph2_x;
+ ph2_x.reserve(phase2OTHits.dataSize());
+ std::vector ph2_y;
+ ph2_y.reserve(phase2OTHits.dataSize());
+ std::vector ph2_z;
+ ph2_z.reserve(phase2OTHits.dataSize());
+ std::vector ph2_hits;
+ ph2_hits.reserve(phase2OTHits.dataSize());
+
+ for (auto const& it : phase2OTHits) {
+ const DetId hitId = it.detId();
+ for (auto const& hit : it) {
+ ph2_detId.push_back(hitId.rawId());
+ ph2_x.push_back(hit.globalPosition().x());
+ ph2_y.push_back(hit.globalPosition().y());
+ ph2_z.push_back(hit.globalPosition().z());
+ ph2_hits.push_back(&hit);
+ }
+ }
+
+ // Get the pixel seeds
+ auto const& mf = iSetup.getData(mfToken_);
+ auto const& bs = iEvent.get(beamSpotToken_);
+
+ // Vector definitions
+ std::vector see_px;
+ std::vector see_py;
+ std::vector see_pz;
+ std::vector see_dxy;
+ std::vector see_dz;
+ std::vector see_ptErr;
+ std::vector see_etaErr;
+ std::vector see_stateTrajGlbX;
+ std::vector see_stateTrajGlbY;
+ std::vector see_stateTrajGlbZ;
+ std::vector see_stateTrajGlbPx;
+ std::vector see_stateTrajGlbPy;
+ std::vector see_stateTrajGlbPz;
+ std::vector see_q;
+ std::vector> see_hitIdx;
+ TrajectorySeedCollection see_seeds;
+
+ for (auto const& seedToken : seedTokens_) {
+ auto const& seedTracks = iEvent.get(seedToken);
+
+ if (seedTracks.empty())
+ continue;
+
+ // Get seed track refs
+ edm::RefToBaseVector seedTrackRefs;
+ for (edm::View::size_type i = 0; i < seedTracks.size(); ++i) {
+ seedTrackRefs.push_back(seedTracks.refAt(i));
+ }
+
+ edm::ProductID id = seedTracks[0].seedRef().id();
+
+ for (size_t iSeed = 0; iSeed < seedTrackRefs.size(); ++iSeed) {
+ auto const& seedTrackRef = seedTrackRefs[iSeed];
+ auto const& seedTrack = *seedTrackRef;
+ auto const& seedRef = seedTrack.seedRef();
+ auto const& seed = *seedRef;
+
+ if (seedRef.id() != id)
+ throw cms::Exception("LogicError")
+ << "All tracks in 'TracksFromSeeds' collection should point to seeds in the same collection. Now the "
+ "element 0 had ProductID "
+ << id << " while the element " << seedTrackRef.key() << " had " << seedTrackRef.id() << ".";
+
+ const bool seedFitOk = !trackFromSeedFitFailed(seedTrack);
+
+ const TrackingRecHit* lastRecHit = &*(seed.recHits().end() - 1);
+ TrajectoryStateOnSurface tsos =
+ trajectoryStateTransform::transientState(seed.startingState(), lastRecHit->surface(), &mf);
+ auto const& stateGlobal = tsos.globalParameters();
+
+ std::vector hitIdx;
+ for (auto const& hit : seed.recHits()) {
+ int subid = hit.geographicalId().subdetId();
+ if (subid == (int)PixelSubdetector::PixelBarrel || subid == (int)PixelSubdetector::PixelEndcap) {
+ const BaseTrackerRecHit* bhit = dynamic_cast(&hit);
+ const auto& clusterRef = bhit->firstClusterRef();
+ const auto clusterKey = clusterRef.cluster_pixel().key();
+ hitIdx.push_back(clusterKey);
+ } else {
+ throw cms::Exception("LSTInputProducer") << "Not pixel hits found!";
+ }
+ }
+
+ // Fill output
+ see_px.push_back(seedFitOk ? seedTrack.px() : 0);
+ see_py.push_back(seedFitOk ? seedTrack.py() : 0);
+ see_pz.push_back(seedFitOk ? seedTrack.pz() : 0);
+ see_dxy.push_back(seedFitOk ? seedTrack.dxy(bs.position()) : 0);
+ see_dz.push_back(seedFitOk ? seedTrack.dz(bs.position()) : 0);
+ see_ptErr.push_back(seedFitOk ? seedTrack.ptError() : 0);
+ see_etaErr.push_back(seedFitOk ? seedTrack.etaError() : 0);
+ see_stateTrajGlbX.push_back(stateGlobal.position().x());
+ see_stateTrajGlbY.push_back(stateGlobal.position().y());
+ see_stateTrajGlbZ.push_back(stateGlobal.position().z());
+ see_stateTrajGlbPx.push_back(stateGlobal.momentum().x());
+ see_stateTrajGlbPy.push_back(stateGlobal.momentum().y());
+ see_stateTrajGlbPz.push_back(stateGlobal.momentum().z());
+ see_q.push_back(seedTrack.charge());
+ see_hitIdx.emplace_back(std::move(hitIdx));
+ see_seeds.push_back(seed);
+ }
+ }
+
+ auto lstInputHC = lst::prepareInput(see_px,
+ see_py,
+ see_pz,
+ see_dxy,
+ see_dz,
+ see_ptErr,
+ see_etaErr,
+ see_stateTrajGlbX,
+ see_stateTrajGlbY,
+ see_stateTrajGlbZ,
+ see_stateTrajGlbPx,
+ see_stateTrajGlbPy,
+ see_stateTrajGlbPz,
+ see_q,
+ see_hitIdx,
+ {},
+ ph2_detId,
+ ph2_x,
+ ph2_y,
+ ph2_z,
+ ph2_hits,
+ ptCut_,
+ iEvent.queue());
+
+ iEvent.emplace(lstInputPutToken_, std::move(lstInputHC));
+ iEvent.emplace(lstPixelSeedsPutToken_, std::move(see_seeds));
+ }
+
+} // namespace ALPAKA_ACCELERATOR_NAMESPACE
+
+#include "HeterogeneousCore/AlpakaCore/interface/alpaka/MakerMacros.h"
+DEFINE_FWK_ALPAKA_MODULE(LSTInputProducer);
diff --git a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc
index 9a8889c1a6a91..48f4ac9bb2366 100644
--- a/RecoTracker/LST/plugins/alpaka/LSTProducer.cc
+++ b/RecoTracker/LST/plugins/alpaka/LSTProducer.cc
@@ -16,8 +16,6 @@
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "RecoTracker/LST/interface/LSTOutput.h"
-#include "RecoTracker/LST/interface/LSTPhase2OTHitsInput.h"
-#include "RecoTracker/LST/interface/LSTPixelSeedInput.h"
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
@@ -27,8 +25,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
public:
LSTProducer(edm::ParameterSet const& config)
: SynchronizingEDProducer(config),
- lstPixelSeedInputToken_{consumes(config.getParameter("pixelSeedInput"))},
- lstPhase2OTHitsInputToken_{consumes(config.getParameter("phase2OTHitsInput"))},
+ lstInputToken_{consumes(config.getParameter("lstInput"))},
lstESToken_{esConsumes(edm::ESInputTag("", config.getParameter("ptCutLabel")))},
verbose_(config.getParameter("verbose")),
ptCut_(config.getParameter("ptCut")),
@@ -38,8 +35,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
void acquire(device::Event const& event, device::EventSetup const& setup) override {
// Inputs
- auto const& pixelSeeds = event.get(lstPixelSeedInputToken_);
- auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_);
+ auto const& lstInputDC = event.get(lstInputToken_);
auto const& lstESDeviceData = setup.getData(lstESToken_);
@@ -47,25 +43,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
verbose_,
static_cast(ptCut_),
&lstESDeviceData,
- pixelSeeds.px(),
- pixelSeeds.py(),
- pixelSeeds.pz(),
- pixelSeeds.dxy(),
- pixelSeeds.dz(),
- pixelSeeds.ptErr(),
- pixelSeeds.etaErr(),
- pixelSeeds.stateTrajGlbX(),
- pixelSeeds.stateTrajGlbY(),
- pixelSeeds.stateTrajGlbZ(),
- pixelSeeds.stateTrajGlbPx(),
- pixelSeeds.stateTrajGlbPy(),
- pixelSeeds.stateTrajGlbPz(),
- pixelSeeds.q(),
- pixelSeeds.hitIdx(),
- phase2OTHits.detId(),
- phase2OTHits.x(),
- phase2OTHits.y(),
- phase2OTHits.z(),
+ &lstInputDC,
nopLSDupClean_,
tcpLSTriplets_);
}
@@ -78,8 +56,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
- desc.add("pixelSeedInput", edm::InputTag{"lstPixelSeedInputProducer"});
- desc.add("phase2OTHitsInput", edm::InputTag{"lstPhase2OTHitsInputProducer"});
+ desc.add("lstInput", edm::InputTag{"lstInputProducer"});
desc.add("verbose", false);
desc.add("ptCut", 0.8);
desc.add("ptCutLabel", "0.8");
@@ -89,8 +66,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
}
private:
- edm::EDGetTokenT lstPixelSeedInputToken_;
- edm::EDGetTokenT lstPhase2OTHitsInputToken_;
+ device::EDGetToken lstInputToken_;
device::ESGetToken, TrackerRecoGeometryRecord> lstESToken_;
const bool verbose_;
const double ptCut_;
diff --git a/RecoTracker/LST/python/lst_cff.py b/RecoTracker/LST/python/lst_cff.py
index af3a80ae77e18..d7fd2bec946a5 100644
--- a/RecoTracker/LST/python/lst_cff.py
+++ b/RecoTracker/LST/python/lst_cff.py
@@ -1,6 +1,5 @@
import FWCore.ParameterSet.Config as cms
from RecoTracker.LST.lstSeedTracks_cff import *
-from RecoTracker.LST.lstPixelSeedInputProducer_cfi import *
-from RecoTracker.LST.lstPhase2OTHitsInputProducer_cfi import *
+from RecoTracker.LST.lstInputProducer_cfi import *
from RecoTracker.LST.lstOutputConverter_cfi import *
diff --git a/RecoTracker/LST/src/classes.h b/RecoTracker/LST/src/classes.h
index 6a6817d9b538e..5cf7a0760d36d 100644
--- a/RecoTracker/LST/src/classes.h
+++ b/RecoTracker/LST/src/classes.h
@@ -2,8 +2,6 @@
#define RecoTracker_LST_classes_h
#include "DataFormats/Common/interface/Wrapper.h"
-#include "RecoTracker/LST/interface/LSTPixelSeedInput.h"
-#include "RecoTracker/LST/interface/LSTPhase2OTHitsInput.h"
#include "RecoTracker/LST/interface/LSTOutput.h"
#endif
diff --git a/RecoTracker/LST/src/classes_def.xml b/RecoTracker/LST/src/classes_def.xml
index d386e7b92a215..7bb6c25d07968 100644
--- a/RecoTracker/LST/src/classes_def.xml
+++ b/RecoTracker/LST/src/classes_def.xml
@@ -1,10 +1,4 @@
-
-
-
-
-
-
diff --git a/RecoTracker/LSTCore/BuildFile.xml b/RecoTracker/LSTCore/BuildFile.xml
index df9ca5e7c34bb..e9cbb2cccf046 100644
--- a/RecoTracker/LSTCore/BuildFile.xml
+++ b/RecoTracker/LSTCore/BuildFile.xml
@@ -2,6 +2,8 @@
+
+
diff --git a/RecoTracker/LSTCore/interface/Common.h b/RecoTracker/LSTCore/interface/Common.h
index 5f96da2773f15..66d184f59902d 100644
--- a/RecoTracker/LSTCore/interface/Common.h
+++ b/RecoTracker/LSTCore/interface/Common.h
@@ -64,6 +64,7 @@ namespace lst {
};
struct Params_pLS {
static constexpr int kLayers = 2, kHits = 4;
+ using ArrayUxHits = edm::StdArray;
};
struct Params_LS {
static constexpr int kLayers = 2, kHits = 4;
diff --git a/RecoTracker/LSTCore/interface/HitsHostCollection.h b/RecoTracker/LSTCore/interface/HitsHostCollection.h
index f26c98c36e069..84255c9240185 100644
--- a/RecoTracker/LSTCore/interface/HitsHostCollection.h
+++ b/RecoTracker/LSTCore/interface/HitsHostCollection.h
@@ -5,6 +5,6 @@
#include "DataFormats/Portable/interface/PortableHostCollection.h"
namespace lst {
- using HitsHostCollection = PortableHostMultiCollection;
+ using HitsHostCollection = PortableHostMultiCollection;
} // namespace lst
#endif
diff --git a/RecoTracker/LSTCore/interface/HitsSoA.h b/RecoTracker/LSTCore/interface/HitsSoA.h
index d26fe61963a0d..93b51bbfb70de 100644
--- a/RecoTracker/LSTCore/interface/HitsSoA.h
+++ b/RecoTracker/LSTCore/interface/HitsSoA.h
@@ -8,13 +8,8 @@
namespace lst {
- GENERATE_SOA_LAYOUT(HitsSoALayout,
- SOA_COLUMN(float, xs),
- SOA_COLUMN(float, ys),
- SOA_COLUMN(float, zs),
+ GENERATE_SOA_LAYOUT(HitsExtendedSoALayout,
SOA_COLUMN(uint16_t, moduleIndices),
- SOA_COLUMN(unsigned int, idxs),
- SOA_COLUMN(unsigned int, detid),
SOA_COLUMN(float, rts),
SOA_COLUMN(float, phis),
SOA_COLUMN(float, etas),
@@ -30,11 +25,11 @@ namespace lst {
SOA_COLUMN(int16_t, hitRangesnLower),
SOA_COLUMN(int16_t, hitRangesnUpper))
- using HitsSoA = HitsSoALayout<>;
+ using HitsExtendedSoA = HitsExtendedSoALayout<>;
using HitsRangesSoA = HitsRangesSoALayout<>;
- using Hits = HitsSoA::View;
- using HitsConst = HitsSoA::ConstView;
+ using HitsExtended = HitsExtendedSoA::View;
+ using HitsExtendedConst = HitsExtendedSoA::ConstView;
using HitsRanges = HitsRangesSoA::View;
using HitsRangesConst = HitsRangesSoA::ConstView;
diff --git a/RecoTracker/LSTCore/interface/LSTInputHostCollection.h b/RecoTracker/LSTCore/interface/LSTInputHostCollection.h
new file mode 100644
index 0000000000000..f9ea02e289769
--- /dev/null
+++ b/RecoTracker/LSTCore/interface/LSTInputHostCollection.h
@@ -0,0 +1,12 @@
+#ifndef RecoTracker_LSTCore_interface_LSTInputHostCollection_h
+#define RecoTracker_LSTCore_interface_LSTInputHostCollection_h
+
+#include "RecoTracker/LSTCore/interface/LSTInputSoA.h"
+#include "DataFormats/Portable/interface/PortableHostCollection.h"
+#include "DataFormats/Portable/interface/PortableDeviceCollection.h"
+
+namespace lst {
+ using LSTInputHostCollection = PortableHostMultiCollection;
+} // namespace lst
+
+#endif
diff --git a/RecoTracker/LSTCore/interface/LSTInputSoA.h b/RecoTracker/LSTCore/interface/LSTInputSoA.h
new file mode 100644
index 0000000000000..1b55d7334c515
--- /dev/null
+++ b/RecoTracker/LSTCore/interface/LSTInputSoA.h
@@ -0,0 +1,54 @@
+#ifndef RecoTracker_LSTCore_interface_LSTInputSoA_h
+#define RecoTracker_LSTCore_interface_LSTInputSoA_h
+
+#ifndef LST_STANDALONE
+#include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
+#endif
+
+#include "DataFormats/SoATemplate/interface/SoALayout.h"
+#include "DataFormats/Portable/interface/PortableCollection.h"
+
+#include "RecoTracker/LSTCore/interface/Common.h"
+
+namespace lst {
+
+ GENERATE_SOA_LAYOUT(HitsBaseSoALayout,
+ SOA_COLUMN(float, xs),
+ SOA_COLUMN(float, ys),
+ SOA_COLUMN(float, zs),
+ SOA_COLUMN(unsigned int, idxs),
+ SOA_COLUMN(unsigned int, detid)
+#ifndef LST_STANDALONE
+ ,
+ SOA_COLUMN(TrackingRecHit const*, hits)
+#endif
+ )
+
+ GENERATE_SOA_LAYOUT(PixelSeedsSoALayout,
+ SOA_COLUMN(Params_pLS::ArrayUxHits, hitIndices),
+ SOA_COLUMN(float, deltaPhi),
+ SOA_COLUMN(unsigned int, seedIdx),
+ SOA_COLUMN(int, charge),
+ SOA_COLUMN(int, superbin),
+ SOA_COLUMN(PixelType, pixelType),
+ SOA_COLUMN(char, isQuad),
+ SOA_COLUMN(float, ptIn),
+ SOA_COLUMN(float, ptErr),
+ SOA_COLUMN(float, px),
+ SOA_COLUMN(float, py),
+ SOA_COLUMN(float, pz),
+ SOA_COLUMN(float, etaErr),
+ SOA_COLUMN(float, eta),
+ SOA_COLUMN(float, phi))
+
+ using HitsBaseSoA = HitsBaseSoALayout<>;
+ using PixelSeedsSoA = PixelSeedsSoALayout<>;
+
+ using HitsBase = HitsBaseSoA::View;
+ using HitsBaseConst = HitsBaseSoA::ConstView;
+ using PixelSeeds = PixelSeedsSoA::View;
+ using PixelSeedsConst = PixelSeedsSoA::ConstView;
+
+} // namespace lst
+
+#endif
diff --git a/RecoTracker/LSTCore/interface/LSTPrepareInput.h b/RecoTracker/LSTCore/interface/LSTPrepareInput.h
new file mode 100644
index 0000000000000..423272c76ecc9
--- /dev/null
+++ b/RecoTracker/LSTCore/interface/LSTPrepareInput.h
@@ -0,0 +1,253 @@
+#ifndef RecoTracker_LSTCore_interface_LSTPrepareInput_h
+#define RecoTracker_LSTCore_interface_LSTPrepareInput_h
+
+#include
+#include