Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
1739720
Started implementing code in C++
ariostas Sep 16, 2025
8878167
Finished with corners
ariostas Sep 17, 2025
bd63e47
Added IO
ariostas Sep 17, 2025
b695081
Format
ariostas Sep 17, 2025
a121d44
Added centroid methods
ariostas Sep 17, 2025
7c75d07
Added orientation methods
ariostas Sep 19, 2025
662f7d2
Started implementing pixel maps
ariostas Sep 24, 2025
38b8735
Finished with pixel maps
ariostas Sep 25, 2025
3b2e3a2
Started implementing module maps
ariostas Sep 25, 2025
6b39965
Some progress on module maps
ariostas Sep 26, 2025
fe7c81d
Switched namespace to lstgeometry
ariostas Sep 26, 2025
17b90b2
A couple of fixes
ariostas Sep 26, 2025
0256927
Finished module maps
ariostas Sep 30, 2025
f5a44ef
Added standalone binary
ariostas Oct 21, 2025
2038d28
Added a couple of outputs
ariostas Oct 21, 2025
61e33ea
Write module maps
ariostas Oct 22, 2025
0d50566
Some progress, but need to switch to gcc13
ariostas Oct 22, 2025
33ec364
Write pixel maps
ariostas Oct 22, 2025
074e368
Fixed pixel maps
ariostas Oct 22, 2025
03b24e6
Simplify pixel maps creation
ariostas Oct 27, 2025
b78a982
Fixed straight line connections
ariostas Oct 27, 2025
d3dba40
Fixed curved line connections
ariostas Oct 28, 2025
4a0ef90
Format code
ariostas Oct 28, 2025
218dffd
A bit of cleanup
ariostas Oct 31, 2025
fedf5a3
Added eta-phi binning
ariostas Nov 3, 2025
ca59512
format
ariostas Nov 3, 2025
9ff260d
Added cmssw scaffoling
ariostas Feb 18, 2026
cf2ed78
Some progress getting required data
ariostas Nov 19, 2025
386cf93
Removed unused struct members
ariostas Nov 19, 2025
fcc5aa9
Everything mostly matches up now, but need to clean up
ariostas Nov 21, 2025
eecb9bc
Switched from mm to cm
ariostas Nov 24, 2025
2a0858f
All CMSSW inputs work
ariostas Nov 24, 2025
78b86ca
Added LSTGeometry struct and moved constuctor to common place
ariostas Nov 25, 2025
51ba97b
Finished dump test
ariostas Dec 1, 2025
9acfea6
A few fixes
ariostas Dec 1, 2025
a4663d8
Fixed orientations
ariostas Dec 2, 2025
0888935
Adapted the LST ES producer
ariostas Dec 3, 2025
7821502
Fixed python file
ariostas Dec 3, 2025
61369ba
Fixed typo
ariostas Dec 4, 2025
c56a823
Make pt cutoff selectable
ariostas Dec 5, 2025
94368d4
A bit of cleanup
ariostas Dec 5, 2025
74f2e9e
Fix typo
ariostas Dec 5, 2025
283fd59
Fix bug from original code
ariostas Dec 5, 2025
74cd74d
Fix typo
ariostas Dec 5, 2025
5dafbad
Fix typo
ariostas Dec 5, 2025
6ac6e04
Fixed type issue
ariostas Dec 5, 2025
5c395e8
Remove kVerticalModuleSlope
ariostas Feb 18, 2026
75e1af8
Minor cleanup
ariostas Dec 8, 2025
cc7baf9
Add ptCut parameter to test
ariostas Dec 16, 2025
0053ffc
Add binary output option
ariostas Dec 17, 2025
2076b5b
Didn't actually need corner coordinates
ariostas Dec 17, 2025
f2236b3
Fixed sign of some angles
ariostas Dec 18, 2025
72cb6bd
Leave a note on how to match the csv files
ariostas Dec 19, 2025
7540ca0
Figured out the sign
ariostas Dec 19, 2025
6983407
Added cli options to test
ariostas Jan 6, 2026
180bb05
Tweak cmssw config
ariostas Jan 8, 2026
1c3a72e
Switch to numerical parameters
ariostas Jan 9, 2026
40f8659
Minor cleanup
ariostas Jan 13, 2026
5bf6f99
Added help option
ariostas Jan 13, 2026
a328d7c
Improve explanation of procedure
ariostas Jan 13, 2026
6deaf04
Rename ES functions for different payloads
ariostas Feb 18, 2026
cc91d49
Moved things to a new LSTGeometry package
ariostas Feb 19, 2026
8c42aea
Renamed Centroid to SensorCentroid
ariostas Feb 19, 2026
413cb29
Fixed python config
ariostas Feb 19, 2026
b3a405f
Removed code for standalone generation from csv files
ariostas Feb 19, 2026
91fc203
Add newline back
ariostas Feb 19, 2026
154533b
Minor tweaks
ariostas Feb 19, 2026
ae28cf9
Fixed test
ariostas Feb 20, 2026
99ad8e1
Started removing Module.h
ariostas Feb 24, 2026
b76a391
Started moving implementations to cc files
ariostas Feb 24, 2026
1b48eb3
Refactored Sensor
ariostas Feb 24, 2026
5b61e02
Removed Module.h
ariostas Feb 24, 2026
a62d0a6
Useful renamings
ariostas Feb 25, 2026
90c2e79
Temporary fix for segfault
ariostas Feb 25, 2026
25385e7
Moved more implementations to cc files
ariostas Feb 26, 2026
5e10176
GeomDetEnumerators::isBarrel doesn't work
ariostas Feb 26, 2026
81ef945
Missed namespace
ariostas Feb 26, 2026
43e8b03
Minor tweaks
ariostas Feb 27, 2026
f76e1f7
Fixed side, isLower and isStrip
ariostas Feb 27, 2026
a4916ad
Fixed slopes
ariostas Mar 2, 2026
a4999bf
Fixed subdet for pixelmap
ariostas Mar 2, 2026
460e347
Tweaked constants and types
ariostas Mar 2, 2026
9a86f17
Fixed pixel map
ariostas Mar 4, 2026
2a6791d
Refactored slopes
ariostas Mar 4, 2026
0ff7265
Find corners with CMSSW functionality
ariostas Mar 5, 2026
17c4e6d
Cleanup
ariostas Mar 6, 2026
b9b0db9
Tried to fix producer labels
ariostas Mar 6, 2026
fda1b75
Fixed typo
ariostas Mar 6, 2026
0bef46d
Started addressing review comments
ariostas Mar 10, 2026
a3b60a0
Addressed some more review issues
ariostas Mar 10, 2026
6b154d6
Removed Module struct
ariostas Mar 11, 2026
373f78d
Revert to previous value of kB
ariostas Mar 11, 2026
4c0f52e
Back to 3.8, but fixed sign in module maps
ariostas Mar 11, 2026
2044970
Fixed eta computation and phi binning
ariostas Mar 12, 2026
9f84e80
Moved Helix out of standalone
ariostas Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include <sstream>

// LST includes
#include "RecoTracker/LSTCore/interface/alpaka/LST.h"
#include "RecoTracker/LSTGeometry/interface/Geometry.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

Expand All @@ -14,22 +17,29 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {

class LSTModulesDevESProducer : public ESProducer {
private:
std::string ptCutLabel_;
double ptCut_;
edm::ESGetToken<lstgeometry::Geometry, TrackerRecoGeometryRecord> lstGeoToken_;

public:
LSTModulesDevESProducer(edm::ParameterSet const& iConfig)
: ESProducer(iConfig), ptCutLabel_(iConfig.getParameter<std::string>("ptCutLabel")) {
setWhatProduced(this, ptCutLabel_);
: ESProducer(iConfig), ptCut_(iConfig.getParameter<double>("ptCut")) {
Comment on lines -22 to +25
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should still have a possibility to have multiple payloads in the same job with different thresholds.

std::ostringstream ptCutOSS;
ptCutOSS << std::setprecision(1) << ptCut_;
std::string ptCutStr = ptCutOSS.str();

auto cc = setWhatProduced(this, "LSTModuleMaps_" + ptCutStr);
lstGeoToken_ = cc.consumes<lstgeometry::Geometry>(edm::ESInputTag("", "LSTGeometry_" + ptCutStr));
}

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("ptCutLabel", "0.8");
desc.add<double>("ptCut", 0.8);
descriptions.addWithDefaultLabel(desc);
}

std::unique_ptr<lst::LSTESData<DevHost>> produce(TrackerRecoGeometryRecord const& iRecord) {
return lst::loadAndFillESHost(ptCutLabel_);
const auto& lstg = iRecord.get(lstGeoToken_);
return lst::fillESDataHost(lstg);
}
};

Expand Down
21 changes: 15 additions & 6 deletions RecoTracker/LST/plugins/alpaka/LSTProducer.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <alpaka/alpaka.hpp>

#include <sstream>

#include "RecoTracker/LSTCore/interface/alpaka/LST.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"
Expand All @@ -25,13 +27,14 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
public:
LSTProducer(edm::ParameterSet const& config)
: EDProducer(config),
lstInputToken_{consumes(config.getParameter<edm::InputTag>("lstInput"))},
lstESToken_{esConsumes(edm::ESInputTag("", config.getParameter<std::string>("ptCutLabel")))},
verbose_(config.getParameter<bool>("verbose")),
ptCut_(config.getParameter<double>("ptCut")),
ptCutStr_(getPtCutStr(ptCut_)),
clustSizeCut_(static_cast<uint16_t>(config.getParameter<uint32_t>("clustSizeCut"))),
nopLSDupClean_(config.getParameter<bool>("nopLSDupClean")),
tcpLSTriplets_(config.getParameter<bool>("tcpLSTriplets")),
lstInputToken_{consumes(config.getParameter<edm::InputTag>("lstInput"))},
lstESToken_{esConsumes(edm::ESInputTag("", "LSTModuleMaps_" + ptCutStr_))},
lstOutputToken_{produces()} {}

void produce(edm::StreamID sid, device::Event& iEvent, const device::EventSetup& iSetup) const override {
Expand All @@ -42,7 +45,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {

lst.run(iEvent.queue(),
verbose_,
static_cast<float>(ptCut_),
ptCut_,
clustSizeCut_,
&lstESDeviceData,
&lstInputDC,
Expand All @@ -60,21 +63,27 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
desc.add<bool>("verbose", false);
desc.add<double>("ptCut", 0.8);
desc.add<uint32_t>("clustSizeCut", 16);
desc.add<std::string>("ptCutLabel", "0.8");
desc.add<bool>("nopLSDupClean", false);
desc.add<bool>("tcpLSTriplets", false);
descriptions.addWithDefaultLabel(desc);
}

private:
const device::EDGetToken<lst::LSTInputDeviceCollection> lstInputToken_;
const device::ESGetToken<lst::LSTESData<Device>, TrackerRecoGeometryRecord> lstESToken_;
const bool verbose_;
const double ptCut_;
const std::string ptCutStr_;
const uint16_t clustSizeCut_;
const bool nopLSDupClean_;
const bool tcpLSTriplets_;
const device::EDGetToken<lst::LSTInputDeviceCollection> lstInputToken_;
const device::ESGetToken<lst::LSTESData<Device>, TrackerRecoGeometryRecord> lstESToken_;
const device::EDPutToken<lst::TrackCandidatesBaseDeviceCollection> lstOutputToken_;

static std::string getPtCutStr(double ptCut) {
std::ostringstream ptCutOSS;
ptCutOSS << std::setprecision(1) << ptCut;
return ptCutOSS.str();
}
};

} // namespace ALPAKA_ACCELERATOR_NAMESPACE
Expand Down
6 changes: 5 additions & 1 deletion RecoTracker/LST/python/lstProducerTask_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

from RecoTracker.LST.lstModulesDevESProducer_cfi import lstModulesDevESProducer

lstProducerTask = cms.Task(lstModulesDevESProducer, lstProducer)
from RecoTracker.LST.lstInputProducer_cfi import lstInputProducer

from RecoTracker.LSTGeometry.lstGeometryESProducer_cfi import lstGeometryESProducer

lstProducerTask = cms.Task(lstGeometryESProducer, lstModulesDevESProducer, lstInputProducer, lstProducer)
1 change: 1 addition & 0 deletions RecoTracker/LSTCore/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<use name="DataFormats/Common"/>
<use name="DataFormats/TrackerRecHit2D"/>
<use name="HeterogeneousCore/AlpakaInterface"/>
<use name="RecoTracker/LSTGeometry"/>
<flags ALPAKA_BACKENDS="1"/>
<export>
<lib name="1"/>
Expand Down
5 changes: 5 additions & 0 deletions RecoTracker/LSTCore/interface/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "DataFormats/Common/interface/StdArray.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

#include "RecoTracker/LSTGeometry/interface/Common.h"

#if defined(FP16_Base)
#if defined ALPAKA_ACC_GPU_CUDA_ENABLED
#include <cuda_fp16.h>
Expand Down Expand Up @@ -42,6 +44,9 @@ namespace lst {
constexpr uint16_t kTCEmptyLowerModule = 0xFFFF; // Sentinel for empty lowerModule index
constexpr unsigned int kTCEmptyHitIdx = 0xFFFFFFFF; // Sentinel for empty hit slots

constexpr float kB = lstgeometry::kB;
constexpr float kC = lstgeometry::kC;

// Half precision wrapper functions.
#if defined(FP16_Base)
#define __F2H __float2half
Expand Down
7 changes: 6 additions & 1 deletion RecoTracker/LSTCore/interface/EndcapGeometry.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef RecoTracker_LSTCore_interface_EndcapGeometry_h
#define RecoTracker_LSTCore_interface_EndcapGeometry_h

#include "RecoTracker/LSTGeometry/interface/Sensor.h"
#include "RecoTracker/LSTGeometry/interface/Slope.h"

#include <map>
#include <string>
#include <vector>
Expand All @@ -18,9 +21,11 @@ namespace lst {
unsigned int nEndCapMap;

EndcapGeometry() = default;
EndcapGeometry(std::string const& filename);
EndcapGeometry(std::string const&);
EndcapGeometry(lstgeometry::Slopes const&, lstgeometry::Sensors const&);

void load(std::string const&);
void load(lstgeometry::Slopes const&, lstgeometry::Sensors const&);
void fillGeoMapArraysExplicit();
float getdxdy_slope(unsigned int detid) const;
};
Expand Down
4 changes: 3 additions & 1 deletion RecoTracker/LSTCore/interface/LSTESData.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "RecoTracker/LSTCore/interface/EndcapGeometryDevHostCollection.h"
#include "RecoTracker/LSTCore/interface/ModulesHostCollection.h"
#include "RecoTracker/LSTCore/interface/PixelMap.h"
#include "RecoTracker/LSTGeometry/interface/Geometry.h"

#include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h"

Expand Down Expand Up @@ -40,7 +41,8 @@ namespace lst {
pixelMapping(pixelMappingIn) {}
};

std::unique_ptr<LSTESData<alpaka_common::DevHost>> loadAndFillESHost(std::string& ptCutLabel);
std::unique_ptr<LSTESData<alpaka_common::DevHost>> loadAndFillESDataHost(std::string& ptCutLabel);
std::unique_ptr<LSTESData<alpaka_common::DevHost>> fillESDataHost(lstgeometry::Geometry const& lstg);

} // namespace lst

Expand Down
6 changes: 4 additions & 2 deletions RecoTracker/LSTCore/interface/ModuleConnectionMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ namespace lst {
std::map<unsigned int, std::vector<unsigned int>> moduleConnections_;

public:
ModuleConnectionMap();
ModuleConnectionMap(std::string const& filename);
ModuleConnectionMap() = default;
ModuleConnectionMap(std::string const&);
ModuleConnectionMap(std::map<unsigned int, std::vector<unsigned int>> const&);

void load(std::string const&);
void load(std::map<unsigned int, std::vector<unsigned int>> const&);
void add(std::string const&);
void print();

Expand Down
6 changes: 5 additions & 1 deletion RecoTracker/LSTCore/interface/TiltedGeometry.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef RecoTracker_LSTCore_interface_TiltedGeometry_h
#define RecoTracker_LSTCore_interface_TiltedGeometry_h

#include "RecoTracker/LSTGeometry/interface/Slope.h"

#include <map>
#include <string>
#include <vector>
Expand All @@ -13,9 +15,11 @@ namespace lst {

public:
TiltedGeometry() = default;
TiltedGeometry(std::string const& filename);
TiltedGeometry(std::string const&);
TiltedGeometry(lstgeometry::Slopes const&);

void load(std::string const&);
void load(lstgeometry::Slopes const&);

float getDrDz(unsigned int detid) const;
float getDxDy(unsigned int detid) const;
Expand Down
6 changes: 2 additions & 4 deletions RecoTracker/LSTCore/interface/alpaka/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
25.007152356, 37.2186993757, 52.3104270826, 68.6658656666, 85.9770373007, 108.301772384};
HOST_DEVICE_CONSTANT float kMiniRminMeanEndcap[5] = {
130.992832231, 154.813883559, 185.352604327, 221.635123002, 265.022076742};
HOST_DEVICE_CONSTANT float k2Rinv1GeVf = (2.99792458e-3 * 3.8) / 2;
HOST_DEVICE_CONSTANT float kR1GeVf = 1. / (2.99792458e-3 * 3.8);
HOST_DEVICE_CONSTANT float k2Rinv1GeVf = (kC * kB) / 2;
HOST_DEVICE_CONSTANT float kR1GeVf = 1. / (kC * kB);
HOST_DEVICE_CONSTANT float kSinAlphaMax = 0.95;
HOST_DEVICE_CONSTANT float kDeltaZLum = 15.0;
HOST_DEVICE_CONSTANT float kPixelPSZpitch = 0.15;
Expand All @@ -43,8 +43,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
HOST_DEVICE_CONSTANT float kWidthPS = 0.01;
HOST_DEVICE_CONSTANT float kPt_betaMax = 7.0;
HOST_DEVICE_CONSTANT int kNTripletThreshold = 1000;
// To be updated with std::numeric_limits<float>::infinity() in the code and data files
HOST_DEVICE_CONSTANT float kVerticalModuleSlope = 123456789.0;
HOST_DEVICE_CONSTANT int kLogicalOTLayers = 11; // logical OT layers are 1..11

HOST_DEVICE_CONSTANT float kMiniDeltaTilted[3] = {0.26f, 0.26f, 0.26f};
Expand Down
16 changes: 16 additions & 0 deletions RecoTracker/LSTCore/src/EndcapGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

lst::EndcapGeometry::EndcapGeometry(std::string const& filename) { load(filename); }

lst::EndcapGeometry::EndcapGeometry(lstgeometry::Slopes const& slopes, lstgeometry::Sensors const& sensors) {
load(slopes, sensors);
}

void lst::EndcapGeometry::load(std::string const& filename) {
dxdy_slope_.clear();
centroid_phis_.clear();
Expand Down Expand Up @@ -39,6 +43,18 @@ void lst::EndcapGeometry::load(std::string const& filename) {
fillGeoMapArraysExplicit();
}

void lst::EndcapGeometry::load(lstgeometry::Slopes const& slopes, lstgeometry::Sensors const& sensors) {
dxdy_slope_.clear();
centroid_phis_.clear();

for (const auto& [detId, slope] : slopes) {
dxdy_slope_[detId] = slope.dxdy;
centroid_phis_[detId] = sensors.at(detId).centerPhi;
}

fillGeoMapArraysExplicit();
}

void lst::EndcapGeometry::fillGeoMapArraysExplicit() {
nEndCapMap = centroid_phis_.size();

Expand Down
84 changes: 83 additions & 1 deletion RecoTracker/LSTCore/src/LSTESData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "ModuleMethods.h"

#include <filesystem>
#include <forward_list>
#include <iterator>

namespace {
std::string geometryDataDir() {
Expand Down Expand Up @@ -79,7 +81,7 @@ namespace {
}
} // namespace

std::unique_ptr<lst::LSTESData<alpaka_common::DevHost>> lst::loadAndFillESHost(std::string& ptCutLabel) {
std::unique_ptr<lst::LSTESData<alpaka_common::DevHost>> lst::loadAndFillESDataHost(std::string& ptCutLabel) {
uint16_t nModules;
uint16_t nLowerModules;
unsigned int nPixels;
Expand Down Expand Up @@ -119,3 +121,83 @@ std::unique_ptr<lst::LSTESData<alpaka_common::DevHost>> lst::loadAndFillESHost(s
std::move(endcapGeometryDev),
pixelMappingPtr);
}

std::unique_ptr<lst::LSTESData<alpaka_common::DevHost>> lst::fillESDataHost(lstgeometry::Geometry const& lstg) {
uint16_t nModules;
uint16_t nLowerModules;
unsigned int nPixels;
MapPLStoLayer pLStoLayer;
EndcapGeometry endcapGeometry;
TiltedGeometry tiltedGeometry;
PixelMap pixelMapping;
ModuleConnectionMap moduleConnectionMap;

endcapGeometry.load(lstg.endcap_slopes, *lstg.sensors);
auto endcapGeometryDev =
std::make_shared<EndcapGeometryDevHostCollection>(cms::alpakatools::host(), endcapGeometry.nEndCapMap);
std::memcpy(endcapGeometryDev->view().geoMapDetId().data(),
endcapGeometry.geoMapDetId_buf.data(),
endcapGeometry.nEndCapMap * sizeof(unsigned int));
std::memcpy(endcapGeometryDev->view().geoMapPhi().data(),
endcapGeometry.geoMapPhi_buf.data(),
endcapGeometry.nEndCapMap * sizeof(float));

tiltedGeometry.load(lstg.barrel_slopes);

std::map<unsigned int, std::vector<unsigned int>> final_modulemap;
for (auto const& [detId, connections] : lstg.module_map) {
final_modulemap[detId] = std::vector<unsigned int>(connections.begin(), connections.end());
}
moduleConnectionMap.load(final_modulemap);

for (auto& [layersubdetcharge, map] : lstg.pixel_map) {
auto& [layer, subdet, charge] = layersubdetcharge;

std::map<unsigned int, std::vector<unsigned int>> final_pixelmap;
for (unsigned int isuperbin = 0; isuperbin < map.size(); isuperbin++) {
auto const& set = map.at(isuperbin);
final_pixelmap[isuperbin] = std::vector<unsigned int>(set.begin(), set.end());
}

if (charge == 0) {
pLStoLayer[0][layer - 1 + (subdet == Endcap ? 2 : 0)] = lst::ModuleConnectionMap(final_pixelmap);
} else if (charge > 0) {
pLStoLayer[1][layer - 1 + (subdet == Endcap ? 2 : 0)] = lst::ModuleConnectionMap(final_pixelmap);
} else {
pLStoLayer[2][layer - 1 + (subdet == Endcap ? 2 : 0)] = lst::ModuleConnectionMap(final_pixelmap);
}
}

ModuleMetaData mmd;
unsigned int counter = 0;
for (auto const& [detId, sensor] : *lstg.sensors) {
mmd.detIdToIndex[detId] = counter;
mmd.module_x[detId] = sensor.centerX;
mmd.module_y[detId] = sensor.centerY;
mmd.module_z[detId] = sensor.centerZ;
mmd.module_type[detId] = static_cast<unsigned int>(sensor.moduleType);
counter++;
}
mmd.detIdToIndex[kPixelModuleId] = counter; //pixel module is the last module in the module list
counter++;
nModules = counter;

auto modulesBuffers = constructModuleCollection(pLStoLayer,
mmd,
nModules,
nLowerModules,
nPixels,
pixelMapping,
endcapGeometry,
tiltedGeometry,
moduleConnectionMap);

auto pixelMappingPtr = std::make_shared<PixelMap>(std::move(pixelMapping));
return std::make_unique<LSTESData<alpaka_common::DevHost>>(nModules,
nLowerModules,
nPixels,
endcapGeometry.nEndCapMap,
std::move(modulesBuffers),
std::move(endcapGeometryDev),
pixelMappingPtr);
}
Loading