Skip to content

Avoid hard-coded parameters

A few parameters are hard-coded in CollimatorsGroup, in particular:

  • taper geometric impedance parameters,
  • name of collimators on which one should add the "TCTP mode",
  • the fact the TCDQ is a single-jaw collimator.

Whenever possible we should try to put them in input, or in data files that can be more easily modified.

As a first proposal, the various collimator taper geometries could be put into a json file. The collimator settings json file could then contain additional fields, e.g.:

  • the kind of geometry (as a string) which would specify the kind of taper, and maybe also the presence of the TCTP mode (this would refer to keys of the aforementioned json file describing the collimator taper geometries,
  • a second half-gap for the second jaw: if not present the collimator would be standard (symmetric), if =0 it is a single jaw (TCDQ-like), and for any other value we get an asymmetric collimator.

Ideas/comments welcome!