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

feat: pull CAD generated service meshes into simulation #421

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
32 changes: 32 additions & 0 deletions compact/tracking/cable_services.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Wouter Deconinck, Whitney Armstrong -->

<lccdd>
<materials>
<material name="0.000000_0.000000_1.000000_0.000000_0.000000">
<D value="7.85" unit="g/cm3"/>
<fraction n="1" ref="Fe"/>
</material>
<material name="1.000000_0.000000_0.000000_0.000000_0.000000">
<D value="7.85" unit="g/cm3"/>
<fraction n="1" ref="Fe"/>
</material>
<material name="1.000000_0.501961_0.000000_0.000000_0.000000">
<D value="7.85" unit="g/cm3"/>
<fraction n="1" ref="Fe"/>
</material>
<material name="1.000000_0.501961_0.250980_0.000000_0.000000">
<D value="7.85" unit="g/cm3"/>
<fraction n="1" ref="Fe"/>
</material>
</materials>

<detectors>
<detector name="Services" type="DD4hep_TestShape_Creator">
<check>
<shape type="CAD_MultiVolume" ref="meshes/FullCableSpaceEstimate.obj" unit="m">
</shape>
</check>
</detector>
</detectors>
</lccdd>
12 changes: 12 additions & 0 deletions compact/tracking/get_meshes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Wouter Deconinck, Whitney Armstrong -->

<lccdd>
<plugins>
<plugin name="epic_FileLoader">
<arg value="cache:$DETECTOR_PATH:/opt/detector"/>
<arg value="file:meshes/FullCableSpaceEstimate.obj"/>
<arg value="url:https://github.com/eic/epic-data/raw/meshes/meshes/tracking/FullCableSpaceEstimate.obj"/>
</plugin>
</plugins>
</lccdd>
4 changes: 4 additions & 0 deletions configurations/services_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
features:
tracking:
get_meshes:
cable_services:
2 changes: 1 addition & 1 deletion src/FileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ long load_file(Detector& /* desc */, int argc, char** argv)
{
// argument parsing
std::string cache, file, url;
std::string cmd("curl --retry 5 -f {0} -o {1}");
std::string cmd("curl --location --retry 5 -f {0} -o {1}");
for (int i = 0; i < argc && argv[i]; ++i) {
if (0 == std::strncmp("cache:", argv[i], 6))
cache = (argv[i] + 6);
Expand Down