Closed Zehvogel closed 1 month ago
I think one would need to implement a Geant4TVUserParticleHandler, where TV is for tracking_volume? (Or TR for tracking region?). Maybe I missed the use of the tracking_volume?
Aaah ok, the TC in Geant4TCUserParticleHandler stands for tracking cylinder... so there is no way yet to use this feature?
As far as I saw there isn't one yet. Do you want to give it a go to implement the new handler?
In principle that looks simple. I just don't know how I would retrieve that volume in ParticleHandler.py
to pass it to the handler... and I don't really know where to look to figure that out in this interesting c++ and python mixture :(
nvm. I think I found a way :) I will prepare a PR
I would like to have a non-cylindrical tracking region as introduced in https://github.com/AIDASoft/DD4hep/pull/384, particularly because in the naive cylindrical approach the lumi cal of my detector is inside the tracking volume.
When I add such a tracking region to my detector and remove the previous definition of the tracking region:
ddsim stops here:
https://github.com/AIDASoft/DD4hep/blob/7967bdfc64246f4d698616a9469e46ffbdad49c4/DDG4/python/DDSim/Helper/ParticleHandler.py#L129-L139
(If I don't remove it the cylinder is still used as the tracking region as far as I can tell.)
The
TrackingRegion
example in theexamples/ClientTests
seems to not use ddsim: https://github.com/AIDASoft/DD4hep/blob/master/examples/ClientTests/scripts/TrackingRegion.py