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
refactor!: Build DD4hep geometry from hierarchy, use VariantParameters #1257
refactor!: Build DD4hep geometry from hierarchy, use VariantParameters #1257
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1257 +/- ##
==========================================
- Coverage 47.49% 47.46% -0.03%
==========================================
Files 375 375
Lines 19824 19842 +18
Branches 9282 9293 +11
==========================================
+ Hits 9415 9418 +3
- Misses 4035 4045 +10
- Partials 6374 6379 +5
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Ok, so the python level tests and ROOT hashes seem to be happy, as is the physmon job. I think this means that the geometry is identical with this PR to main at least as far as the test jobs can tell. The remaining failing jobs are compilation failures because the DD4hep version in them doesn't have the required changes. |
DD4hep tag |
Plugins/DD4hep/include/Acts/Plugins/DD4hep/DD4hepConversionHelpers.hpp
Outdated
Show resolved
Hide resolved
In preparation for #1257, this PR removes the old DD4hep detector examples that we don't plan to maintain going forward.
Ok, in the standalone ODD CI I get histogram differences. Marking this WIP again until I've investigated. |
Differences are understood to have been related to #1298. |
https://gitlab.cern.ch/acts/OpenDataDetector/-/merge_requests/31 should be merged first. |
Paul, there are conflicts here, can you update - otherwise you addressed my comments. |
@asalzburger this now points at ODD |
Updated branch, and will approve when done. |
This PR changes the DD4hep integration model. Instead of the DD4hep factory code having to depend on ACTS or the ActsDD4hep glue lib, they now use a mechanism we merged into DD4hep (as of
1.21
):MapStringVariantStruct
, which is wrapped into a detector element extension asVariantParameters
.This extension is independent of ACTS and encodes key value pairs, with the keys being strings and the values being any of string, int, float or bool. ACTS will use information attached to detector elements via this mechanism to identify layers, surface axes and material properties (layer and boundary).
This PR also removes the need to active subdetectors to be marked up using a specific extension: using the DD4hep
DetType
enum, ACTS will look for detector elements flaggedTRACKER
andBARREL
,ENDCAP
orBEAMPIPE
and handle them accordingly. Passive structures that cannot be flagged with the above use a variant parameterpassive_layer
to tell ACTS to translate them.Possible parameters ACTS will interpret
ACTS geometry translation uses parameters attached to DD4hep detector elements via the
VariantParameters
extension. You can set this extension from your factory code, or use DD4hep's plugin mechanism to set parameters on detector elements via name. Here's an excerpt from the Open Data Detector on how to use this to mark a passive structure as a passive layer:Layer
envelope_{r,z}_{min,max}
: explicit envelope for a layerlayer_material
: mark a layer as passive (use this if you want to add a passive layer that is not a beampipe)Surface binning:
surface_binning
: set to true to indicate that explicit surface binning is set.surface_binning_n_{phi,r}
: surface binning for a layerLayer material:
layer_material
: set to true to indicate that the layer has layer material configurationlayer_material_representing
: set to true to indicate representing layer materiallayer_material_inner
: set to true to indicate inner layer materiallayer_material_outer
: set to true to indicate outer layer materiallayer_material_{representing,inner,outer}_bin{X,Y,Z,R,Phi,RPhi,H,Eta,Mag}
to give the number of bins in a directionSensor
axis_definitions
: local axis definitions for a sensor. Default:XYZ
. See {class}Acts::DD4hepDetectorElement
for detailsVolume / subdetector
boundary_material
: set to true to indicate boundary material is setboundary_material_{negative,positive,inner,outer}
to indicate which boundary material surfaces should be setboundary_material_{negative,positive,inner,outer}_bin{X,Y,Z,R,Phi,RPhi,H,Eta,Mag}
to give the number of bins in a direction