Step by step instructions for importing the Muon Collider detector geometry into ACTS.
Reference: ACTS Material Mapping Tutorial
The geantino scan extracts the material (radiation lengths) from the detector geometry. There is an ACTS example program that can perform this scan on any DD4hep geometry. An explicit definition of the tracking volume is not required.
The ActsExampleGeantinoRecordingDD4hep
program depends on the Geant4, DD4hep and lcgeo libraries being present on your system. The lcgeo library is needed to load the XML DD4hep description.
The ACTSFun package contains some helpful tools for performing the geantino scan. It also includes ACTS. However it does not include the external libraries mentioned above.
To run the geantino scan:
${MYBUILD}/exts/acts/bin/ActsExampleGeantinoRecordingDD4hep --response-file ${MYWORKSPACE}/response/geantinoscan.response
The output geantiono scan will be stored in geant4-material-tracks.root
.
ACTS's DD4hep plugin requires the DD4hep detector tree to be structured in a specific way to correctly idenfity the logical components (ie: layers). The MCC DD4hep description does not follow this conversion. Thus the first step is to export the MCC DD4hep geometry into TGeo. ACTS's TGeo plugin is more "smart" about extracting the logical information.
General code for converting DD4hep to TGeo is available in the ACTSMCC package as the dd2tgeo
tool. The easiest way to use it is via the LBLMuCWorkspace workspace. The workspace also includes modifications to the logical structure of the geometry to make it usable inside ACTS.
The instructions for compiling the workspace and perfomring the conversion are in the README.
The MCC geometry can be validated by using the Fatras module to simulate hits in the tracking detector and visualize the results. The ACTSFun package should be used for it. It contains ACTS with a few modifications to correctly import the MCC TGeo geometry.
The tgeo-lctracker.response
response file contains all the code necessary to load the TGeo MCC detector into ACTS.
Run the following command to generate 1000 single muon events. The output will be stored in hits.root
.
${MYBUILD}/exts/acts/bin/ActsExampleFatrasTGeo --response-file ${MYBUILD}/response/tgeo-lctracker.response --output-root 1 --events 1000
The resulting hits file can be viewed using the study_geometry.py
script.
python ${MYWORKSPACE}/python/study_geometryid.py
It should look something like the following.
This steps maps the geantino scan onto the volumes/surfaces of the tracking geometry.
geometry-map.json
).${MYBUILD}/exts/acts/bin/ActsExampleGeometryTGeo -n1 -j1 --mat-output-file geometry-map --response-file ${MYBUILD}/response/tgeo-lctracker.response --output-json true --mat-output-allmaterial true --mat-output-sensitive false
config-map.json
).python3 ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/writeMapConfig.py geometry-map.json config-map.json
Edit the config-map.json
to choose which surfaces/volumes should have matterial mapped to them. This is done by changing the materialMap
value to true
.
Convert the updated config-map.json
back to geometry-map.json
.
python3 ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/configureMap.py geometry-map.json config-map.json
material-maps.root
.${MYBUILD}/exts/acts/bin/ActsExampleMaterialMappingTGeo -j1 --input-root true --input-files geant4-material-tracks.root --mat-input-type file --mat-input-file geometry-map.json --output-root true --output-json true --mat-mapping-collection material-tracks --mat-output-file material-maps --mat-mapping-surfaces true --mat-mapping-volumes true --mat-mapping-volume-stepsize 1 --response-file ${MYBUILD}/response/tgeo-lctracker.response
The validation step performs a geantino scan using the mapped material. The results are then compared against the scan done using Geant4. If the material map is correct, then the two should agree.
${MYBUILD}/exts/acts/bin/ActsExampleMaterialValidationTGeo -n 1000 --mat-output-file val-mat-map --output-root true --prop-stepper 0 --response-file ${MYBUILD}/response/tgeo-mat-lctracker.response
mkdir Validation
root -q -b ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/Mat_map.C'("propagation-material.root","material-maps_tracks.root","Validation")'
mkdir -p Surfaces/prop_plot
mkdir -p Surfaces/map_plot
mkdir -p Surfaces/ratio_plot
mkdir -p Surfaces/dist_plot
mkdir -p Surfaces/1D_plot
root -q -b ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/Mat_map_surface_plot_ratio.C'("propagation-material.root","material-maps_tracks.root","geometry-map.json",100000,"Surfaces/ratio_plot","Surfaces/prop_plot","Surfaces/map_plot")'
root -q -b ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/Mat_map_surface_plot_dist.C'("material-maps_tracks.root","geometry-map.json",-1,"Surfaces/dist_plot")'
root -q -b ${MYWORKSPACE}/exts/acts/Examples/Scripts/MaterialMaping/Mat_map_surface_plot_1D.C'("material-maps_tracks.root","geometry-map.json",100000,"Surfaces/1D_plot")'