gphysics
Loading...
Searching...
No Matches
gphysics.h
Go to the documentation of this file.
1#pragma once
2
3// gemc
4#include "gbase.h"
5
6// geant4
7#include "G4VModularPhysicsList.hh"
8
27class GPhysics : public GBase<GPhysics> {
28public:
40 GPhysics(const std::shared_ptr<GOptions>& gopts);
41
48 [[nodiscard]] G4VModularPhysicsList* getPhysList() const { return physList; }
49
50private:
51 // Logs the available physics lists and constructors.
52 // This is a private helper; user-facing behavior is documented at class level.
53 void printAvailable() const;
54
61 G4VModularPhysicsList* physList;
62};
Builds and exposes a Geant4 modular physics list based on runtime options.
Definition gphysics.h:27
G4VModularPhysicsList * getPhysList() const
Returns the instantiated Geant4 modular physics list.
Definition gphysics.h:48
GPhysics(const std::shared_ptr< GOptions > &gopts)
Constructs the physics list builder and (unless requested otherwise) instantiates the physics list.
Definition gphysics.cc:33