Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestGeant4AnalysisProcess Geant4 processes upgrade #66

Open
jgalan opened this issue Oct 7, 2022 · 0 comments
Open

TRestGeant4AnalysisProcess Geant4 processes upgrade #66

jgalan opened this issue Oct 7, 2022 · 0 comments
Assignees

Comments

@jgalan
Copy link
Member

jgalan commented Oct 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants