framework icon indicating copy to clipboard operation
framework copied to clipboard

TRestMapGroup and TRestMapGroupProcess implementation

Open jgalan opened this issue 4 years ago • 0 comments

It would be good to design and implement a generic process that would allow to perform calculations on a selection of elements inside a std::map.

The most clear example right now is when I have a system of vetos covering the detector. Those vetos are registered as signals, analysed using TRestRawSignalAnalysisProcess and few observables written together into std::map variables at the analysis tree. Thats the validation pipeline introduced at rest-for-physics/rawlib#25.

Now, I want to be able to define groups of signals, so that I would be able to define a subset of signal ids over which I will perform some calculations. So TRestMapGroup would allow me to give a name to the group and define the elements from std::map.first that belong to that group. I would be able to define any number of groups. This is somehow done now at TRestRawVetoAnalysisProcess.

TRestMapGroupProcess would allow me to use a TRestMapGroup definition to perform calculations on the specific subsets. The user would define at the process level which operations wants to be performed on the subset, i.e. average, max value, deviation, etc.

Those calculated values would be written to the process as pcsName_groupName_average, pcsName_groupName_deviation, ...

jgalan avatar Jun 10 '21 04:06 jgalan