Draft: Radial strip detector models
This WIP implementation allows simulation of trapezoidal detectors with a radial geometry of strips by introducing a new class of detector models called the RadialStripDetectorModel.
Radial strip detectors
A radial strip detector is defined using four parameters for each given strip row:
number_of_stripsinner_pitchangular_pitchstrip_length
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 (G4Trd object).
Issues
-
Detector model ctor (MR !531 (closed)): Currently every detector model configuration file must include the parameters
number_of_pixelsandpixel_size, otherwise the baseDetectorModelctor throws aMissingKeyErrorexception. 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 theConfiguration::getmethod and if it doesn't find them in the config file, it initializes the parameters with default values (zeros). The derived modelsHybridPixel-andMonolithicPixelDetectorModelthen 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 baseDetectorModel. The base ctor only looks in the config file for truly generic parameters (model_type,sensor_thickness), thePixelDetectorModelctor looks for pixel-revelant parameters (such asnumber_of_pixelsandpixel_size) and the derived modelsHybridPixel-andMonolithicPixelDetectorModel(now inheriting fromPixelDetectorModel) then handle the rest. TheRadialStripDetectorModelwould inherit directly from the baseDetectorModeland 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.
Edited by Radek Privara