PlasmaMLPALLAS
Loading...
Searching...
No Matches
PlasmaMLPALLASOnnxInference.hh
Go to the documentation of this file.
1#ifndef PlasmaMLPALLASOnnxInference_H
2#define PlasmaMLPALLASOnnxInference_H
3
12#include <onnxruntime_cxx_api.h>
13#include "globals.hh"
14
20 G4double Ekin;
21 G4double dEkin;
22 G4double Q;
23 G4double epsb;
24 G4double x;
25 G4double xp;
26 G4double z;
27 G4double zp;
28};
29
38public:
45 PlasmaMLPALLASOnnxInference(const std::string& modelPath);
46
55 BeamParameters GenerateBeam(G4double fXof, G4double fA0, G4double fCN2, G4double fPressure);
56
57private:
58 Ort::Env env;
59 Ort::SessionOptions sessionOptions;
60 std::unique_ptr<Ort::Session> session;
61 Ort::MemoryInfo memoryInfo;
62 std::vector<const char*> inputNodeNames;
63 std::vector<const char*> outputNodeNames;
64};
65
66#endif
Interface for ONNX model inference for PALLAS plasma simulation beam generation.
Definition PlasmaMLPALLASOnnxInference.hh:37
BeamParameters GenerateBeam(G4double fXof, G4double fA0, G4double fCN2, G4double fPressure)
Generate beam parameters using the ONNX model.
Definition PlasmaMLPALLASOnnxInference.cc:75
Structure storing the physical parameters of a generated beam.
Definition PlasmaMLPALLASOnnxInference.hh:19
G4double x
X position.
Definition PlasmaMLPALLASOnnxInference.hh:24
G4double z
Z position.
Definition PlasmaMLPALLASOnnxInference.hh:26
G4double xp
X momentum component.
Definition PlasmaMLPALLASOnnxInference.hh:25
G4double zp
Z momentum component.
Definition PlasmaMLPALLASOnnxInference.hh:27
G4double epsb
Beam emittance.
Definition PlasmaMLPALLASOnnxInference.hh:23
G4double Ekin
Kinetic energy of the beam particle.
Definition PlasmaMLPALLASOnnxInference.hh:20
G4double dEkin
Energy spread.
Definition PlasmaMLPALLASOnnxInference.hh:21
G4double Q
Beam charge.
Definition PlasmaMLPALLASOnnxInference.hh:22