Skip to content
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

How to define a limitset applicable to the whole world? #1064

Closed
wdconinc opened this issue Feb 24, 2023 · 7 comments
Closed

How to define a limitset applicable to the whole world? #1064

wdconinc opened this issue Feb 24, 2023 · 7 comments
Labels
Fixed Problem is solved question Testing Waiting for caller Waiting for issue opener to respond to question

Comments

@wdconinc
Copy link
Contributor

There are examples that demonstrate how to define limit sets, but they all are applicable to detectors only. Is there a way to define a limit set that applies to the entire world? Use case: suppressing low energy neutrons with min kinE.

@MarkusFrankATcernch
Copy link
Contributor

First of all, "Limitset" objects are applicable to regions.
Regions in G4 are defined by at least one volume (and AFAIK implicitly everything which is inside).

In the compact xml description limitsets are an attribute of the DetElement.
However, in the geometry constructor the limit-set is propagated to volumes
and in the Geant4Converter all volumes with the same limit-set are grouped to the same region.

Hence a single subdetector could also use multiple limit-sets.

Before there is activity coming up: If the volume is the "world_volume" will G4 be happy with this ?

Otherwise this could probably be relatively easily be implemented. "World" is nothing else than a DetElement with a placement (aka Volume). Wether this is done by some plugin or an extension to compact will have to be seen.

@wdconinc
Copy link
Contributor Author

If the volume is the "world_volume" will G4 be happy with this ?

In another simulation environment (without DD4hep), we have been successfully setting geant4 user limits on the world volume (https://github.com/JeffersonLab/remoll/blob/develop/src/remollDetectorConstruction.cc#L238 and call stack therein).

"World" is nothing else than a DetElement with a placement (aka Volume).

So, it may be possible to add the limit set to an explicit world definition at e.g. https://github.com/AIDASoft/DD4hep/blob/master/examples/ClientTests/compact/WorldVolume.xml#L41-L52 (with maybe some additional code in https://github.com/AIDASoft/DD4hep/blob/master/DDCore/src/DetectorImp.cpp#L786 to set the limits)?

@MarkusFrankATcernch
Copy link
Contributor

Will have to see how it will be technically done.
If G4 accepts it, dd4hep should not be the barrier.

@MarkusFrankATcernch
Copy link
Contributor

Please see #1071
Should be merged soon.

@MarkusFrankATcernch MarkusFrankATcernch added Testing Fixed Problem is solved Waiting for caller Waiting for issue opener to respond to question labels Mar 3, 2023
@MarkusFrankATcernch
Copy link
Contributor

I assume this to be fixed.

@wdconinc
Copy link
Contributor Author

Not had a chance to test yet, but will reopen if not fixed.

@MarkusFrankATcernch
Copy link
Contributor

Reopening is just fine. The aim is to maintain a "proper" worklist without too many already processed items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Problem is solved question Testing Waiting for caller Waiting for issue opener to respond to question
Projects
None yet
Development

No branches or pull requests

2 participants