1#ifndef PlasmaMLPALLASPrimaryGeneratorAction_h
2#define PlasmaMLPALLASPrimaryGeneratorAction_h 1
16#include "G4VUserPrimaryGeneratorAction.hh"
19#include "G4ParticleGun.hh"
20#include "G4GeneralParticleSource.hh"
66 double GetdEkin()
const {
return dEkin * 100.; }
67 double GetQ()
const {
return Q * 1e12; }
68 double GetEPSB()
const {
return epsb * 1e6; }
74 std::unique_ptr<PlasmaMLPALLASOnnxInference> onnxInference;
75 G4ParticleGun* particleGun =
nullptr;
76 G4GeneralParticleSource* particleSource =
nullptr;
77 G4ParticleDefinition* particleDefinition =
nullptr;
84 static void ShowProgress(
double progress, std::chrono::high_resolution_clock::time_point startTime);
86 size_t NEventsGenerated = 0;
87 size_t currentEvent = 0;
88 size_t numThreads = 0;
93 std::chrono::duration<double> elapsedTime;
94 bool isStartTimeInitialized =
false;
95 std::chrono::high_resolution_clock::time_point startTime;
96 double progressRemaining = 0.;
97 double averageTimePerProgress = 0.;
98 double estimatedRemainingTime = 0.;
107 std::unique_ptr<Ort::Session> fSession;
108 const OrtMemoryInfo* fMemory_info =
nullptr;
109 std::vector<const char*> fInput_node_names = {
"input"};
110 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
Defines the primary generator action for the simulation.
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:29
double GetML_Xoff() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:57
double GetEPSB() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:68
double GetdEkin() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:66
void UpdateParticleDefinition()
Update the particle definition based on current parameters.
Definition PlasmaMLPALLASPrimaryGeneratorAction.cc:73
double GetML_CN2() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:59
double GetML_Pressure() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:60
double GetML_A0() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:58
~PlasmaMLPALLASPrimaryGeneratorAction()
Destructor.
Definition PlasmaMLPALLASPrimaryGeneratorAction.cc:67
double GetEkin() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:65
double GetQ() const
Definition PlasmaMLPALLASPrimaryGeneratorAction.hh:67
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