13 const char* path_lst_base = std::getenv(
"LST_BASE");
14 const char* path_tracklooperdir = std::getenv(
"TRACKLOOPERDIR");
16 if (path_lst_base !=
nullptr) {
17 path_str = path_lst_base;
18 }
else if (path_tracklooperdir !=
nullptr) {
19 path_str = path_tracklooperdir;
22 std::stringstream search_path(std::getenv(
"CMSSW_SEARCH_PATH"));
24 while (std::getline(search_path,
path,
':')) {
25 if (std::filesystem::exists(
path +
"/RecoTracker/LSTCore/data")) {
30 path_str +=
"/RecoTracker/LSTCore";
37 if (not std::filesystem::exists(
fullpath)) {
38 throw std::runtime_error(
"Could not find the file = " +
fullpath.string());
51 geometryDataDir() +
"/data/OT800_IT615_pt0.8/tilted_barrel_orientation.bin");
54 geometryDataDir() +
"/data/OT800_IT615_pt0.8/module_connection_tracing_merged.bin");
56 endcapGeometry.
load(endcap_geom);
57 tiltedGeometry.
load(tilted_geom);
58 moduleConnectionMap.
load(mappath);
60 auto pLSMapDir = geometryDataDir() +
"/data/OT800_IT615_pt0.8/pixelmap/pLS_map";
61 const std::array<std::string, 4> connects{
62 {
"_layer1_subdet5",
"_layer2_subdet5",
"_layer1_subdet4",
"_layer2_subdet4"}};
65 static_assert(connects.size() == std::tuple_size<std::decay_t<decltype(pLStoLayer[0])>>{});
66 for (
unsigned int i = 0;
i < connects.size();
i++) {
67 auto connectData = connects[
i].data();
69 path = pLSMapDir + connectData +
".bin";
72 path = pLSMapDir +
"_pos" + connectData +
".bin";
75 path = pLSMapDir +
"_neg" + connectData +
".bin";
83 uint16_t nLowerModules;
90 ::loadMapsHost(pLStoLayer, endcapGeometry, tiltedGeometry, moduleConnectionMap);
92 auto endcapGeometryDev =
94 std::memcpy(endcapGeometryDev->view().geoMapDetId(),
97 std::memcpy(endcapGeometryDev->view().geoMapPhi(),
111 moduleConnectionMap);
112 auto pixelMappingPtr = std::make_shared<PixelMap>(
std::move(pixelMapping));
113 return std::make_unique<LSTESData<alpaka_common::DevHost>>(nModules,
116 endcapGeometry.nEndCapMap,
std::shared_ptr< ModulesHostCollection > loadModulesFromFile(MapPLStoLayer const &pLStoLayer, const char *moduleMetaDataFilePath, uint16_t &nModules, uint16_t &nLowerModules, unsigned int &nPixels, PixelMap &pixelMapping, const EndcapGeometry &endcapGeometry, const TiltedGeometry &tiltedGeometry, const ModuleConnectionMap &moduleConnectionMap)
std::vector< float > geoMapPhi_buf
std::unique_ptr< LSTESData< alpaka_common::DevHost > > loadAndFillESHost()
void load(std::string const &)
TString get_absolute_path_after_check_file_exists(const std::string name)
void load(std::string const &)
void load(std::string const &)
std::array< std::array< ModuleConnectionMap, 4 >, 3 > MapPLStoLayer
std::vector< unsigned int > geoMapDetId_buf