-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: pull CAD generated service meshes into simulation #421
base: main
Are you sure you want to change the base?
Conversation
Adjusted the material_scan script for the material map (X0) of the imported geometry over eta. |
FYI, AIDASoft/DD4hep#1105 has been backported into our environment so rotations should now be respected. |
That's nice! |
32be753
to
6b770e2
Compare
for more information, see https://pre-commit.ci
Is there a way we can cherry pick the material scan script into a separate PR and merge it independently? |
Yes, I was also thinking about a separate PR for this script. Will do it soon. |
Briefly, what does this PR introduce?
This merges the meshes at https://github.com/eic/epic-data/tree/meshes/meshes/tracking, generated from the EIC project's CAD model of ePIC, courtesy Roland Wimmer. The meshes are stored externally to the epic repository and pulled on-demand only.
Motivation
Because of the way the CAD model is developed (independently), we anticipate many overlaps with structures in the DD4hep geometry, for good reasons (as well as probably some for bad reasons which will have to get fixed). Instead of expecting this to work out of the box, it is a tool to run material scans on the support services only, which can then be turned into effective models of services materials.
This is intended as a way for someone else to generate some material maps or other interface based on these meshes, e.g.
g4MaterialScan -c ${DETECTOR_PATH}/epic_services_only.xml --position=0,0,0 --direction=0.2,0.01,1
This only produces 1 line of materials scans:
That's not like
materialScan
ormaterialBudget
which can produces eta histograms of stacked contributions or eta/phi histograms of integrated radiation lengths. So, this needs a bit more work to get into an effective model through some scripting (inside or outsideg4MaterialScan
, which is just a python tool and where we can likely read the geometry once and use it many times).Additional details on meshing
The CAD model is provided in STEP format, exported to the tessellated obj format (because it can handle multiple volumes), cleaned up interactively in meshlab or as a non-graphical batch job with pymeshlab:
The materials in the original file are essentially the colors in the STEP file, R_G_B_?_?. These correspond to materials names that can be defined in the xml reader in DD4hep, e.g. blue can be defined a iron:
Naturally this is not correct, but can be tweaked (meshlab annoyingly renames the materials...).