ACTS assertion fails on Geant4 generated MC files
UPDATE 25-05-2024: See the commit for (somewhat crazy) fix. The erroneous behavior is likely a Geant4 bug.
UPDATE 14-05-2024:
It is not TGeoParser.cpp, but for some reason, the 36000 nodes are not built in g4.
The next reasonable step would be to look into MpdTpcDetector::addCylinderSensors, where these nodes are added.
UPDATE 03-05-2024: For some (yet) unknown reason for g4 generated MC files, the virtual geometry is not created for negative z in reconstruction, see attached image: 36000 nodes found instead of 72000.
This bug is there from the beginning, it just went unnoticed, as we always used Geant3. Apparently evetest generated by Geant4 differs from Geant3, which breaks geometry generation - possible candidate method where the faulty behavior occurs is TGeoParser::select
the error message TGeoParser.cpp uses recursion, here is version with added debug messages TGeoParser.cpp
mpdroot/reconstruction/acts-tracking/MpdTpcDetector.cxx:581: std::shared_ptr<const Acts::Surface> Mpd::Tpc::Detector::getSurface(const Acts::GeometryContext&, const Acts::Vector3&): Assertion iter != m_surfaces.end() && "Surface not found" failed.
This should be fixed immediately after April collaboration meeting.