Implement a tracking region volume to support Geant4TVUserParticleHandler#1081
Implement a tracking region volume to support Geant4TVUserParticleHandler#1081
Conversation
|
It could use some guidance on what will be the extent of the region. It's currently 10 m in both directions with 1 cm radius. |
a1a8f07 to
5815d67
Compare
|
I have this rationale to be challenged for the tracking volume
Steps I am doing now:
|
|
Updated parameters based on suggestions from @ajentsch |
|
Thank you! I will now Simul8 |
Capybara summary for PR 1081
|
|
And we see this on z decay plot above. The plot captures decay Z only of lambda with daughters. You can see like initially the histogram is identical with the histogram where everything is saved. But then differences increase with Z. So on the plot we see how more and more lambdas start decaying outside of the tracking volume, not being saved and vanish from the histogram. Finally there is no peak corresponding to ZDC as ZDC is completely outside of the tracking volume. I believe the best solution would be to add yet another tracking volume arm, so there are 2 arms - one going straight to zdc and the second one going along ion beam. The rules for saving particles are:
So if we leave just one arm going straight to ZDC we should be fine in general as charged particles going into ion pipe will be saved as there are trackers. But with only one hand we may miss rare something (doesn't come to mind instantly what). But if we still want to be careful two arms are optimal physics wise. I will now run simulations of the TW without rotation going directly to ZDC and post here how it compares. |
|
If this is working, we should merge ASAP to allow for some grace period before rolling out the npsim change that depends on this. |
There was a problem hiding this comment.
Pull request overview
Adds a dedicated “tracking region” parallel-world volume to support Geant4TVUserParticleHandler usage (needed by npsim integration), and relocates the legacy tracker-region constants into a dedicated compact include.
Changes:
- Include
compact/tracking_region.xmlfrom the mastertemplates/epic.xml.jinja2geometry template. - Add
compact/tracking_region.xmldefining tracker-region constants and aparallelworld_volume(tracking_volume) with an ion-beamline extrusion. - Remove the legacy
tracker_region_*constants fromcompact/definitions.xml(now provided bytracking_region.xml).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| templates/epic.xml.jinja2 | Adds an include for the new tracking-region compact file. |
| compact/tracking_region.xml | New compact fragment defining tracker-region constants and the tracking parallel-world volume. |
| compact/definitions.xml | Removes tracker-region constants that were moved into the new tracking-region file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Not fully fixed yet. I am working on understanding where is our ZDC peak. Will give the update later today. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Lets merge this to main (as appropriate). It is much better than was before and we'll create a separate issue as we have a better understanding what else needs to be changed |
|
I agree. Let's merge to get some version of epic with TV to the users ASAP. Not having TV is a fatal error in Geant4TVUserParticleHandler, so once we enable it by default users will have to take actions. Hence I'd like to separate those changes in time as much as possible. Do you have any estimate on file size impact? |
No significant impact. It is only MCParticles change but the hits and associations stay the same (maybe pointing to another particles but the number is the same). |






To be used with eic/npsim#44
This is needed to resolve eic/npsim#43