This WIP implementation allows simulation of trapezoidal detectors with a radial geometry of strips by introducing a new class of detector models called the
A radial strip detector is defined using four parameters for each given strip row:
The local coordinate center is placed in the sensor focal point (center of the arcs that form the sensor edges), its position is calculated automatically based on the parameters above. The wrapper of the sensor is trapezoidal (
Detector model ctor (MR !531 (closed)): Currently every detector model configuration file must include the parameters
pixel_size, otherwise the base
DetectorModelctor throws a
MissingKeyErrorexception. For radial detectors such parameters are not used and their absense should not be a problem. I would propose two ways how this could be solved:
- The base
DetectorModelctor looks for the parameters using the
Configuration::getmethod and if it doesn't find them in the config file, it initializes the parameters with default values (zeros). The derived models
MonolithicPixelDetectorModelthen in their ctors check these parameters and throw an exception if they are still set to zero (signifying that the user should have supplied these but didn't). The radial detector model doesn't check these parameters in its ctor but later sets their values to something sensible in the context of radial detectors.
- A new class describing generic pixel detectors, say
PixelDetectorModel, inheriting from the base
DetectorModel. The base ctor only looks in the config file for truly generic parameters (
PixelDetectorModelctor looks for pixel-revelant parameters (such as
pixel_size) and the derived models
MonolithicPixelDetectorModel(now inheriting from
PixelDetectorModel) then handle the rest. The
RadialStripDetectorModelwould inherit directly from the base
DetectorModeland therefore the problem would be avoided.
- The base
Hit coordinate swap during charge deposition necessary (MR !532 (merged)): Because the sensor wrapper trapezoid is always built in Geant4 with the thickness being the y and not the z dimension (as is expected by Allpix), the y- and z- coordinates of the hits have to be swapped during the
SensitiveDetectorActionG4::ProcessHitsstage of charge deposition. While this works without issues, it leads to a decreased performance as the detector model type has to be checked in every step to decide whether the coordinate swap is necessary.