diff --git a/Detectors/Base/test/buildMatBudLUT.C b/Detectors/Base/test/buildMatBudLUT.C index 800597d6166fd..243a0c60ded6f 100644 --- a/Detectors/Base/test/buildMatBudLUT.C +++ b/Detectors/Base/test/buildMatBudLUT.C @@ -17,19 +17,21 @@ #include "DetectorsBase/MatLayerCyl.h" #include "DetectorsBase/GeometryManager.h" #include "ITSMFTReconstruction/ChipMappingITS.h" +#include "ITS3Simulation/DescriptorInnerBarrelITS3.h" +#include "ITS3Base/SpecsV2.h" #include "CommonUtils/NameConf.h" #include #include #include #endif -#ifndef GPUCA_ALIGPUCODE // this part is unvisible on GPU version +#ifndef GPUCA_ALIGPUCODE // this part is invisible on GPU version o2::base::MatLayerCylSet mbLUT; bool testMBLUT(const std::string& lutFile = "matbud.root"); -bool buildMatBudLUT(int nTst = 30, int maxLr = -1, const std::string& outFile = "matbud.root", const std::string& geomNamePrefix = "o2sim", const std::string& opts = ""); +bool buildMatBudLUT(int nTst = 60, int maxLr = -1, const std::string& outFile = "matbud.root", const std::string& geomName = "o2sim_geometry-aligned.root"); struct LrData { float rMin = 0.f; @@ -44,17 +46,14 @@ struct LrData { std::vector lrData; void configLayers(); -bool buildMatBudLUT(int nTst, int maxLr, const std::string& outFile, const std::string& geomNamePrefix, const std::string& opts) +bool buildMatBudLUT(int nTst, int maxLr, const std::string& outFile, const std::string& geomNameInput) { - auto geomName = o2::base::NameConf::getGeomFileName(geomNamePrefix); + auto geomName = o2::base::NameConf::getGeomFileName(geomNameInput); if (gSystem->AccessPathName(geomName.c_str())) { // if needed, create geometry - std::cout << geomName << " does not exist. Will create it on the fly\n"; - std::stringstream str; - // constructing an **unaligned** geom (Geant3 used since faster initialization) --> can be avoided by passing an existing geometry - str << "${O2_ROOT}/bin/o2-sim-serial -n 0 -e TGeant3 --configKeyValues \"" << opts << "\" --field 0 -o " << geomNamePrefix; - gSystem->Exec(str.str().c_str()); + std::cout << geomName << " does not exist. Will create it\n"; + gSystem->Exec("$O2_ROOT/bin/o2-sim -n 0 --detectorList ALICE2.1"); } - o2::base::GeometryManager::loadGeometry(geomNamePrefix); + o2::base::GeometryManager::loadGeometry(geomNameInput); configLayers(); if (maxLr < 1) { @@ -64,7 +63,7 @@ bool buildMatBudLUT(int nTst, int maxLr, const std::string& outFile, const std:: } for (int i = 0; i < maxLr; i++) { auto& l = lrData[i]; - printf("L:%3d %6.2f