Skip to content

Introducing Detector Roles

Simon Spannagel requested to merge detectortypes into master

This is the start of a major overhaul of the DUT/reference detector infrastructure and the way modules handle detectors. The main change is the introduction of detector roles, which are added to the geometry file like this:

[014_CP_PS]
number_of_pixels = 128,128
orientation = -0.000204,0.000491,-0.006396
pixel_pitch = 0.025000,0.025000
position = -0.905037,0.218971,106.000000
type = "CLICpix2"
role = "dut"

[W0013_G03]
number_of_pixels = 256,256
orientation = 0.157000,0.157000,0.000000
pixel_pitch = 0.055000,0.055000
position = 0.000000,0.000000,186.500000
type = "Timepix3"
role = "reference"

These roles replace the old DUT and reference parameters which had to be specified in the main configuration file. The detector object itself can now simply be asked if it's either of them:

if(detector->isDUT()) {
    // Do something
} else if(detector->isReference()) {
    // Do something else
}

All old calls in every module has been replaced with the new scheme.

I have further changes planned, which would be work towards #22 (closed) and at the same time simplify processing of data: I would like to introduce different types of modules which are automatically e.g. executed once for every DUT or once for every detector. I leave this merge request WIP for now, but maybe it would be worth merging it now and contunie the work independently.

This also affects #31 (closed) as a few modules have been removed.

Edited by Simon Spannagel

Merge request reports