Skip to content

Commit 0db6a66

Browse files
sawenzelclaude
andauthored
Document how to combine a CAD module with built-in detectors (#15889)
This explains in the CAD tutorial that a custom --detectorList replaces the official list, and how to put CAD modules and built-in detectors into one list. - The tutorial page "Add passive geometry" gets a section with an ALICE 3 example. - The limits page gets a row for the behaviour. - The README gets a short paragraph. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 42e4fdf commit 0db6a66

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

‎Detectors/CADSupport/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ volume; `barrel` sits at (0, −30, 0) in the cave. `placement` is given in cm a
188188
anchor's frame. Several modules, each from its own `geom.C`, can be listed together: the loader compiles
189189
each macro into its own namespace, so their identical function names do not collide.
190190

191+
A custom `--detectorList` replaces the official list. To combine a CAD module with built-in
192+
detectors, list them all in the same file, for example
193+
`{ "EXTCAD": ["A3IP", "TRK", "FT3", "TF3", "EOS"] }`, and do not pass `-m`. Entries can be copied from
194+
`$O2_ROOT/share/config/o2simdefaultdetectorlist.json`.
195+
191196
## Sensitive external detectors
192197

193198
Use an `externalDetectors` array. It takes the same fields as a module, plus `detID` and at least

‎Detectors/CADSupport/doc/tutorial/docs/limits.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rediscover in a result.
99
| One `geom.C` per hooked thing | The macro exports a single builder hook, and that hook is what the JSON refers to. | Run the converter once per subsystem, into its own folder. They coexist happily in one JSON. |
1010
| Media, cuts and field default to zero | A CAD file carries a material, never a medium, and the emitter uses a three-argument `TGeoMedium` which zeroes every parameter. | Pass `--in-field`. Accept transport defaults for step control, and treat production cuts as unset until you write a real detector. |
1111
| The anchor volume must already exist | Placement is expressed inside the frame of an existing O2 volume. | Use `barrel` unless you have a reason not to, and remember it sits at cave `(0, -30, 0)`. |
12+
| A custom detector list does not extend an official one | `--detectorList NAME:file.json` takes the modules from that file alone, and `-m` can only select from it. | Copy the built-in entries you want into the same list as your CAD module, see [Add passive geometry](passive.md#combine-it-with-the-built-in-detectors). |
1213
| Free-form surfaces stay tessellated | Genuine B-spline *surfaces* are not supported by the exact tier at all. | Check the surface report. Recognition already recovers quadrics written as NURBS, which is the large majority of them. |
1314
| Illegal overlaps in the CAD model | Engineering assemblies are not drawn as legal transport worlds, and parts routinely interpenetrate. | Read `CheckOverlaps`, then fix in CAD or clip the offending region. |
1415
| Degenerate facets at coarse precision | `O2Tessellated` drops triangles that collapse to a line. | Treat it as a mesh-quality signal: lower `--mesh-prec`, or move the part onto an exact tier. |

‎Detectors/CADSupport/doc/tutorial/docs/passive.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,30 @@ Setting special cuts for passive module EXCV
5656

5757
Those three lines mean your CAD geometry is in the simulation and particles are being transported
5858
through it. You can list as many modules in the same array as you like.
59+
60+
## Combine it with the built-in detectors
61+
62+
A custom `--detectorList` replaces the official list, it does not extend it. `o2-sim` takes the
63+
module set from the one list you name, and `-m` may only select from that set. To simulate your CAD
64+
module together with, say, the ALICE 3 detectors, put all of them in the same list:
65+
66+
`detectorlist.json`
67+
68+
```json
69+
{ "EXTCAD": ["A3IP", "TRK", "FT3", "TF3", "EOS"] }
70+
```
71+
72+
```bash
73+
o2-sim-serial-run5 -n 1 -g boxgen \
74+
--detectorList EXTCAD:detectorlist.json \
75+
--extGeomFile externalGeometry.json
76+
```
77+
78+
Here `EOS` is the `name` of the module in `externalGeometry.json`. Leave `-m` out, so that every
79+
module in the list is active. If you pass `-m A3IP TRK` together with a list that does not contain
80+
them, you get `Modules specified that are not present in detector list`.
81+
82+
- Copy the entries of the official list you want from `$O2_ROOT/share/config/o2simdefaultdetectorlist.json`.
83+
- Use `o2-sim-serial-run5` (or `o2-sim-run5`) for ALICE 3 modules, and `o2-sim-serial` for Run 3 ones.
84+
- Switch a module off by removing it from the list, or with `--skipModules`.
85+
- The cave is always built, so `barrel` stays a valid anchor.

0 commit comments

Comments
 (0)