Skip to content

Commit 1b6991f

Browse files
authored
Merge pull request #833 from OpenGATE/extend_available_dna_physics_lists
Extend available dna physics lists
2 parents 9aaefc7 + 57b29a8 commit 1b6991f

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

core/opengate_core/g4_bindings/pyPhysicsLists.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ namespace py = pybind11;
4141
#include "G4EmStandardPhysics_option4.hh"
4242

4343
#include "G4EmDNAPhysics.hh"
44+
#include "G4EmDNAPhysics_option1.hh"
45+
#include "G4EmDNAPhysics_option2.hh"
46+
#include "G4EmDNAPhysics_option3.hh"
47+
#include "G4EmDNAPhysics_option4.hh"
48+
#include "G4EmDNAPhysics_option5.hh"
49+
#include "G4EmDNAPhysics_option6.hh"
50+
#include "G4EmDNAPhysics_option7.hh"
51+
#include "G4EmDNAPhysics_option8.hh"
4452
#include "G4EmLivermorePhysics.hh"
4553
#include "G4EmLivermorePolarizedPhysics.hh"
4654
#include "G4EmLowEPPhysics.hh"
@@ -171,6 +179,14 @@ void init_G4PhysicsLists(py::module &m) {
171179
ADD_PHYSICS_CONSTRUCTOR(G4EmLivermorePolarizedPhysics)
172180
ADD_PHYSICS_CONSTRUCTOR(G4EmPenelopePhysics)
173181
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics)
182+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option1)
183+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option2)
184+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option3)
185+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option4)
186+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option5)
187+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option6)
188+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option7)
189+
ADD_PHYSICS_CONSTRUCTOR(G4EmDNAPhysics_option8)
174190
ADD_PHYSICS_CONSTRUCTOR(G4OpticalPhysics)
175191

176192
ADD_PHYSICS_CONSTRUCTOR(G4DecayPhysics)

opengate/managers.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -557,13 +557,20 @@ class PhysicsListManager(GateObject):
557557
"G4OpticalPhysics",
558558
]
559559

560-
special_physics_constructor_classes = {}
561-
special_physics_constructor_classes["G4DecayPhysics"] = g4.G4DecayPhysics
562-
special_physics_constructor_classes["G4RadioactiveDecayPhysics"] = (
563-
g4.G4RadioactiveDecayPhysics
564-
)
565-
special_physics_constructor_classes["G4OpticalPhysics"] = g4.G4OpticalPhysics
566-
special_physics_constructor_classes["G4EmDNAPhysics"] = g4.G4EmDNAPhysics
560+
special_physics_constructor_classes = {
561+
"G4DecayPhysics": g4.G4DecayPhysics,
562+
"G4RadioactiveDecayPhysics": g4.G4RadioactiveDecayPhysics,
563+
"G4OpticalPhysics": g4.G4OpticalPhysics,
564+
"G4EmDNAPhysics": g4.G4EmDNAPhysics,
565+
"G4EmDNAPhysics_option1": g4.G4EmDNAPhysics_option1,
566+
"G4EmDNAPhysics_option2": g4.G4EmDNAPhysics_option2,
567+
"G4EmDNAPhysics_option3": g4.G4EmDNAPhysics_option3,
568+
"G4EmDNAPhysics_option4": g4.G4EmDNAPhysics_option4,
569+
"G4EmDNAPhysics_option5": g4.G4EmDNAPhysics_option5,
570+
"G4EmDNAPhysics_option6": g4.G4EmDNAPhysics_option6,
571+
"G4EmDNAPhysics_option7": g4.G4EmDNAPhysics_option7,
572+
"G4EmDNAPhysics_option8": g4.G4EmDNAPhysics_option8,
573+
}
567574

568575
def __init__(self, *args, **kwargs):
569576
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)