1#ifndef SIMCORE_PTRRETRIEVAL_H
2#define SIMCORE_PTRRETRIEVAL_H
13#include "G4LogicalVolume.hh"
14#include "G4LogicalVolumeStore.hh"
15#include "G4ParticleDefinition.hh"
16#include "G4PhysicalVolumeStore.hh"
17#include "G4ProcessManager.hh"
19#include "G4RegionStore.hh"
20#include "G4VPhysicalVolume.hh"
24namespace ptrretrieval {
32inline const G4VProcess* getProcess(
const G4ParticleDefinition* particle,
33 const std::string& processName) {
34 if (!particle)
return nullptr;
36 const auto manager = particle->GetProcessManager();
37 if (!manager)
return nullptr;
39 const auto processes = manager->GetProcessList();
40 for (
int i = 0; i < processes->size(); ++i) {
41 const auto process = (*processes)[i];
42 if (process->GetProcessName().find(processName) != std::string::npos) {
53inline const G4VProcess* getPhotonuclearProcess() {
54 return getProcess(G4Gamma::Definition(),
"photonNuclear");
72inline G4Region* getRegion(
const std::string& name) {
73 G4Region* region = G4RegionStore::GetInstance()->GetRegion(name);
85inline G4VPhysicalVolume* getPhysicalVolume(
const std::string& name) {
86 auto* volume = G4PhysicalVolumeStore::GetInstance()->GetVolume(name);
98inline G4LogicalVolume* getLogicalVolume(
const std::string& name) {
99 auto* volume = G4LogicalVolumeStore::GetInstance()->GetVolume(name);
114inline G4Material* getMaterial(
const std::string& name) {
115 auto* material = G4Material::GetMaterial(name);
This namespace is meant to contain all the standard user actions that allow a Geant4 user to interfac...
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...