Skip to content

WIP: scoring manager detecting particles passing through defined plane

Tobias Bisanz requested to merge tbisanz/allpix-squared:scoring into master

All here is WIP

What?

We're currently investigating slabs ob diodes sandwiched between absorbers and want to understand how (many) particles leak out/how secondaries behave.

How?

The idea was to log if particles cross a certain plane, then write them out as MCParticles and allow later (re)processing. Ideally, there should be no need to interfere in any way with the existing geometry. The implementation allows to define planes and a G4 stepping action hook is used to write out the data. This does slow down the simulation a bit, numbers still need to be put on this; however, it should not change any of the charge deposition/interaction process.

The ugly

We're abusing some things in AP2 here. I don't like this, but at the same time, adding more very basic components might also create more noise.

Abusing Detector

In order to reuse the facilities which allow to process the geometry file and attach MCParticle messages to Detectors, the Detector class is used. However, the detectors here don't have a model, no pixellisation, and are also not really properly implementing some other required fields. The GeometryManager has been taught that there are things called scorers ... which are Detector but are not linked to any G4SensitiveDetector.

Abusing MCParticle

MCParticle are short tracklets passing through a SensitiveDetector ... up to now. Now they also represent a particle crossing the plane. This makes start/end position a bit useless. However, the start position marks the point on the plane and then the stop position is once step along the trajectory. I have a gut feeling, that this is not tragic.

Blowing up the ModuleManager

Since the new "scoring" detectors also need to have modules to process the hits and fill histogramms, they were partially added to the ModuleManager. However, only for modules which specify a name and in addition, since multiple instances with different options might be used, an instance keyword was added to allow multiple instances of this same module with different options.

Edited by Tobias Bisanz

Merge request reports