Skip to content

Avoid invoking hardcoded process names when accessing analysis tree observables #47

@jgalan

Description

@jgalan

As it was pointed out at rest-for-physics/tracklib#13 the process TRestDetectorSingleChannelAnalysisProcess access the analysis tree this way:

    map<int, Double_t> sAna_max_amplitude_map =
        fAnalysisTree->GetObservableValue<map<int, Double_t>>("sAna_max_amplitude_map");
    map<int, Double_t> sAna_thr_integral_map =
        fAnalysisTree->GetObservableValue<map<int, Double_t>>("sAna_thr_integral_map");
    Double_t sAna_PeakAmplitudeIntegral =
        fAnalysisTree->GetObservableValue<Double_t>("sAna_PeakAmplitudeIntegral");
    Double_t sAna_ThresholdIntegral = fAnalysisTree->GetObservableValue<Double_t>("sAna_ThresholdIntegral");
    Double_t sAna_NumberOfGoodSignals = fAnalysisTree->GetObservableValue<int>("sAna_NumberOfGoodSignals");

The process name sAna_ could be eventually changed by the user, or even the data processing chain could evolve and get more complex, implementing more than one TRestRawSignalAnalysisProcess.

I am not sure why this needs to be done at this process, however, being the input event a TRestDetectorSignalEvent (which still keeps the daqId value) it seems that all those map values could be directly extracted/calculated from the input event itself. Isn't? The threshold integral should usually be the same as the total integral, and the number of good signals the total number of signals at TRestDetectorSignalEvent.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions