-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of std::strcmp at TGeo slows down DD4hep geometry construction #8
Comments
Edit: it turns out that the usage of |
We've encountered the same issue with implementing a detailed scintillating fiber detector (with over 100k fibers as daughter volumes). Any progress on this issue? |
Hi @Chao1009, unfortunately not as far as I know. I made a presentation to DD4hep developers meeting last year, but it seems there is no easy solution since this is FYI, a possible makeshift from the user's side for this problem (suggested at the meeting) is creating 'intermediate' volumes so that each volume does not contain a large number of daughter volumes. |
When placing volumes within DD4hep,
dd4hep::volume::placeVolume
(eventuallyTGeo
ofROOT
) usesstd::strcmp
to navigate around volumes. (dd4hep::Volume::placeVolume
→TGeoVolume::_addNode
→TGeoVolume::GetNode
→TObjArray::FindObject
→std::strcmp
)Usually, this does not cause any problem when the number of daughter volume is small. However, if the number of daughter volume exceeds around O(10000), it significantly slows down to O(h) of whole geometry contruction of DD4hep application.
There would be some way to improve this kind of behaviour since it does not happen in the standalone GEANT4.
The text was updated successfully, but these errors were encountered: