Skip to content

TRestGeant4AnalysisProcess Geant4 processes upgrade #66

@jgalan

Description

@jgalan

I have seen the following code inside TRestGeantAnalysis::ProcessEvent.

    // process names as named by Geant4
    // processes present here will be added to the list of observables which can be used to see if the event
    // contains the process of interest.
    vector<string> processNames = {"phot", "compt"};
    for (const auto& processName : processNames) {
        Int_t containsProcess = 0;
        if (fOutputG4Event->ContainsProcess(fG4Metadata->GetGeant4PhysicsInfo().GetProcessID(processName))) {
            containsProcess = 1;
        }
        SetObservableValue("ContainsProcess" + processName, containsProcess);
    }

Perhaps, the processNames vector could be initialized through a metadata parameter. The metadata parameter could be just a string with comma separated values, and by default being "phot,compt". Then, the user may create any new process observables through this metadata parameter.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions