Replies: 5 comments 2 replies
-
Hey @pavel532! In principle, the point of these name based selectors is that you don't want to convert the entire geometry to ACTS, but only the sensitive elements. Passive structures are treated differently, and are generally not modelled explicitly in the geometry. Unfortunately, there's no good way to determine automatically what the sensitive elements are in the TGeo hierarchy. If I remember correctly, Let me also add some people who have some experience with the TGeo conversion: @niermann999 @osbornjd. |
Beta Was this translation helpful? Give feedback.
-
If you want (and can) share your geometry file + a bit of description, we might be able to help you with the setup. |
Beta Was this translation helpful? Give feedback.
-
Thanks @paulgessinger! @asalzburger , Here is the root file with the geometry that I am trying to convert: To do this, I installed MpdRoot, linked it with Acts. GeometryContext tgContext = GeometryContext();
TGeoParser::Options tgpOptions;
std::string volumeName = "*";
tgpOptions.volumeNames = {volumeName};
tgpOptions.targetNames = {"TPC*", "tpc*"};
std::string axes = "XY*";
TGeoParser::State tgpState;
TFile f("tpc_v9.root", "READ");
TGeoVolumeAssembly *geoVolA;
f.GetObject("TOP", geoVolA);
TGeoVolume *vol = geoVolA->GetNode(0)->GetMotherVolume();
tgpState.volume = vol;
TGeoParser::select(tgpState, tgpOptions);
ObjVisualization3D objVis;
for (auto& snode : tgpState.selectedNodes) {
const auto& shape = *(snode.node->GetVolume()->GetShape());
const auto& transform = *(snode.transform.get());
auto surface =
TGeoSurfaceConverter::toSurface(shape, transform, axes, scale);
GeometryView3D::drawSurface(objVis, *surface, tgContext);
}
objVis.write("PixelActive"); |
Beta Was this translation helpful? Give feedback.
-
The pattern implementation is fairly simplistic. Maybe this wasn't implemented. We could expand the mechanism if needed. |
Beta Was this translation helpful? Give feedback.
-
I converted the Root geometry of the TPC into a sequence of ACTS::Surface-s using TGeoSurfaceConverter::toSurface(). How do I get TrackingGeometry from them? |
Beta Was this translation helpful? Give feedback.
-
Hello.
I'm new to Acts, and I have a question.
I need to convert the geometry of the detector, which is in the root file, to Acts.
To do this, I'm trying to use an example from
Tests/UnitTests/Plugins/TGeoParserTests.cpp
But it explicitly specifies the targetname list on line 42, as I understand it, this is a list of leaf TGeoVolume from the root geometry:
But in my geometry there are several hundred leaf TGeoVolume s , and specify them manually in TGeoParser::Options::targetNames is very inconvenient.
How do I convert the entire geometry from root to Acts?
What is the common way to do this?
What should I read about it.
Thanks for the answers!
Beta Was this translation helpful? Give feedback.
All reactions