1#ifndef PlasmaMLPALLASPrimaryGeneratorAction_h
2#define PlasmaMLPALLASPrimaryGeneratorAction_h 1
16#include "G4VUserPrimaryGeneratorAction.hh"
19#include "G4ParticleGun.hh"
20#include "G4GeneralParticleSource.hh"
68 double GetdEkin()
const {
return dEkin * 100.; }
69 double GetQ()
const {
return Q * 1e12; }
70 double GetEPSB()
const {
return epsb * 1e6; }
77 std::unique_ptr<PlasmaMLPALLASOnnxInference> onnxInference;
78 G4ParticleGun* particleGun =
nullptr;
79 G4GeneralParticleSource* particleSource =
nullptr;
80 G4ParticleDefinition* particleDefinition =
nullptr;
87 static void ShowProgress(
double progress, std::chrono::high_resolution_clock::time_point startTime);
89 size_t NEventsGenerated = 0;
90 size_t currentEvent = 0;
91 size_t numThreads = 0;
96 std::chrono::duration<double> elapsedTime;
97 bool isStartTimeInitialized =
false;
98 std::chrono::high_resolution_clock::time_point startTime;
99 double progressRemaining = 0.;
100 double averageTimePerProgress = 0.;
101 double estimatedRemainingTime = 0.;
110 std::unique_ptr<Ort::Session> fSession;
111 const OrtMemoryInfo* fMemory_info =
nullptr;
112 std::vector<const char*> fInput_node_names = {
"input"};
113 std::vector<const char*> fOutput_node_names = {
"output"};
double GetPressure() const
Definition PlasmaMLPALLASOnnxParameters.hh:79
double GetXoff() const
Definition PlasmaMLPALLASOnnxParameters.hh:67
double GetCN2() const
Definition PlasmaMLPALLASOnnxParameters.hh:75
static OnnxParameters & Instance()
Access the singleton instance.
Definition PlasmaMLPALLASOnnxParameters.hh:23
double GetA0() const
Definition PlasmaMLPALLASOnnxParameters.hh:71
Interface for ONNX model inference for PALLAS plasma simulation beam generation.
Definition PlasmaMLPALLASOnnxInference.hh:37
Defines the primary generator action for the simulation.
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:29
PlasmaMLPALLASOnnxInference * GetOnnxInference() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:31
double GetML_Xoff() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:59
double GetEPSB() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:70
double GetdEkin() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:68
void UpdateParticleDefinition()
Update the particle definition based on current parameters.
Definition PlasmaMLPALLASPrimaryGeneratorAction.cc:73
double GetML_CN2() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:61
double GetML_Pressure() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:62
double GetML_A0() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:60
~PlasmaMLPALLASPrimaryGeneratorAction()
Destructor.
Definition PlasmaMLPALLASPrimaryGeneratorAction.cc:67
double GetEkin() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:67
double GetQ() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:69
void GeneratePrimaries(G4Event *anEvent) override
Generate primary particles for the event.
Definition PlasmaMLPALLASPrimaryGeneratorAction.cc:133
Provides UI commands to configure the primary generator.
Definition PlasmaMLPALLASPrimaryGeneratorMessenger.hh:32