16#ifndef _RMG_GEOMBENCH_HH_
17#define _RMG_GEOMBENCH_HH_
24#include "CLHEP/Units/SystemOfUnits.h"
25#include "G4AnalysisManager.hh"
26#include "G4GenericMessenger.hh"
27#include "G4LogicalVolume.hh"
28#include "G4ParticleGun.hh"
29#include "G4VPhysicalVolume.hh"
31#include "RMGGeomBenchOutputScheme.hh"
32#include "RMGVGenerator.hh"
43class RMGGeomBench :
public RMGVGenerator {
50 RMGGeomBench(RMGGeomBench
const&) =
delete;
51 RMGGeomBench& operator=(RMGGeomBench
const&) =
delete;
52 RMGGeomBench(RMGGeomBench&&) =
delete;
53 RMGGeomBench& operator=(RMGGeomBench&&) =
delete;
74 std::unique_ptr<G4ParticleGun> fGun =
nullptr;
76 std::unique_ptr<G4GenericMessenger> fMessenger =
nullptr;
77 void DefineCommands();
84 G4ThreeVector user_increment;
85 G4ThreeVector sampling_width;
95 double bunchstarttime;
98 std::vector<std::vector<double>> pixel_batch_times;
100 int total_batch_rounds;
101 int current_batch_event;
102 int current_pixel_index;
103 int current_batch_round;
105 G4ThreeVector origin;
107 G4ThreeVector increment;
Output scheme for geometry navigation benchmark data.
Definition RMGGeomBenchOutputScheme.hh:38
void GeneratePrimaries(G4Event *event) override
Shoot a geantino from the pixel currently being benchmarked.
Definition RMGGeomBench.cc:407
void RecordBatchTime(int pixel_idx, double batch_time)
Append a batch timing to the running median for the given pixel.
Definition RMGGeomBench.cc:298
void SaveAllPixels()
Flush per-pixel median timings to the benchmark output scheme.
Definition RMGGeomBench.cc:314
void EndOfRunAction(const G4Run *r) override
Save aggregated timings to the output scheme.
Definition RMGGeomBench.cc:284
void BeginOfRunAction(const G4Run *r) override
Compute the sampling grid from the user-specified increments and widths.
Definition RMGGeomBench.cc:106
void SetParticlePosition(G4ThreeVector) override
No-op: vertex sampling is driven by the benchmark grid.
Definition RMGGeomBench.hh:58