Skip to content

Commit d8bb677

Browse files
Event overhaul
1 parent 473523e commit d8bb677

35 files changed

+1213
-169
lines changed

source/digits_hits/pyG4VSDFilter.cc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,11 @@
99

1010
namespace py = pybind11;
1111

12-
class PyG4VSDFilter : public G4VSDFilter {
12+
class PyG4VSDFilter : public G4VSDFilter, public py::trampoline_self_life_support {
1313
public:
14-
PyG4VSDFilter(G4String name) : G4VSDFilter(name)
15-
{
16-
py::handle handle = py::cast(static_cast<const G4VSDFilter *>(this), py::return_value_policy::reference);
17-
if (handle) handle.inc_ref();
18-
}
14+
using G4VSDFilter::G4VSDFilter;
1915

2016
G4bool Accept(const G4Step *step) const override { PYBIND11_OVERRIDE_PURE(G4bool, G4VSDFilter, Accept, step); }
21-
22-
~PyG4VSDFilter()
23-
{
24-
py::handle pySelf = py::cast(static_cast<const G4VSDFilter *>(this), py::return_value_policy::reference);
25-
if (pySelf) pySelf.dec_ref();
26-
}
2717
};
2818

2919
void export_G4VSDFilter(py::module &m)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#include <pybind11/pybind11.h>
2+
#include <pybind11/stl.h>
3+
4+
#include <G4AdjointPosOnPhysVolGenerator.hh>
5+
#include <G4GeomSplitter.hh>
6+
#include <G4LogicalVolume.hh>
7+
#include <G4VPVParameterisation.hh>
8+
#include <G4VSolid.hh>
9+
10+
#include "typecast.hh"
11+
#include "opaques.hh"
12+
13+
namespace py = pybind11;
14+
15+
void export_G4AdjointPosOnPhysVolGenerator(py::module &m)
16+
{
17+
py::class_<G4AdjointPosOnPhysVolGenerator, py::nodelete>(m, "G4AdjointPosOnPhysVolGenerator")
18+
19+
.def(
20+
"__copy__",
21+
[](const G4AdjointPosOnPhysVolGenerator &self) { return new G4AdjointPosOnPhysVolGenerator(self); },
22+
py::return_value_policy::reference)
23+
24+
.def(
25+
"__deepcopy__",
26+
[](const G4AdjointPosOnPhysVolGenerator &self, py::dict) { return new G4AdjointPosOnPhysVolGenerator(self); },
27+
py::return_value_policy::reference)
28+
29+
.def("ComputeAreaOfExtSurface", py::overload_cast<>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface))
30+
.def("ComputeAreaOfExtSurface",
31+
py::overload_cast<G4int>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface), py::arg("NStat"))
32+
33+
.def("ComputeAreaOfExtSurface",
34+
py::overload_cast<G4double>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface), py::arg("epsilon"))
35+
36+
.def("ComputeAreaOfExtSurface",
37+
py::overload_cast<G4VSolid *>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface), py::arg("aSolid"))
38+
39+
.def("ComputeAreaOfExtSurface",
40+
py::overload_cast<G4VSolid *, G4int>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface),
41+
py::arg("aSolid"), py::arg("NStat"))
42+
43+
.def("ComputeAreaOfExtSurface",
44+
py::overload_cast<G4VSolid *, G4double>(&G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface),
45+
py::arg("aSolid"), py::arg("epsilon"))
46+
47+
.def("DefinePhysicalVolume", &G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume, py::arg("aName"),
48+
py::return_value_policy::reference)
49+
50+
.def("DefinePhysicalVolume1", &G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume1, py::arg("aName"))
51+
.def("GenerateAPositionOnTheExtSurfaceOfASolid",
52+
&G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfASolid, py::arg("aSolid"), py::arg("p"),
53+
py::arg("direction"))
54+
55+
.def("GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume",
56+
py::overload_cast<G4ThreeVector &, G4ThreeVector &>(
57+
&G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume),
58+
py::arg("p"), py::arg("direction"))
59+
60+
.def(
61+
"GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume",
62+
[](G4AdjointPosOnPhysVolGenerator &self, G4ThreeVector &p, G4ThreeVector &direction,
63+
G4double &costh_to_normal) {
64+
self.GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(p, direction, costh_to_normal);
65+
return costh_to_normal;
66+
},
67+
py::arg("p"), py::arg("direction"), py::arg("costh_to_normal"))
68+
69+
.def("GenerateAPositionOnTheExtSurfaceOfTheSolid",
70+
&G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfTheSolid, py::arg("p"),
71+
py::arg("direction"))
72+
73+
.def("GetAreaOfExtSurfaceOfThePhysicalVolume",
74+
&G4AdjointPosOnPhysVolGenerator::GetAreaOfExtSurfaceOfThePhysicalVolume)
75+
76+
.def("GetCosThDirComparedToNormal", &G4AdjointPosOnPhysVolGenerator::GetCosThDirComparedToNormal)
77+
.def_static("GetInstance", &G4AdjointPosOnPhysVolGenerator::GetInstance, py::return_value_policy::reference)
78+
.def("SetSolid", &G4AdjointPosOnPhysVolGenerator::SetSolid, py::arg("aSolid"));
79+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#include <pybind11/pybind11.h>
2+
#include <pybind11/stl.h>
3+
4+
#include <G4AdjointPrimaryGenerator.hh>
5+
#include <G4AdjointPosOnPhysVolGenerator.hh>
6+
#include <G4Event.hh>
7+
#include <G4SingleParticleSource.hh>
8+
#include <G4ParticleDefinition.hh>
9+
#include <G4Navigator.hh>
10+
11+
#include "typecast.hh"
12+
#include "opaques.hh"
13+
14+
namespace py = pybind11;
15+
16+
void export_G4AdjointPrimaryGenerator(py::module &m)
17+
{
18+
py::class_<G4AdjointPrimaryGenerator>(m, "G4AdjointPrimaryGenerator")
19+
20+
.def(py::init<>())
21+
.def("ComputeAccumulatedDepthVectorAlongBackRay",
22+
&G4AdjointPrimaryGenerator::ComputeAccumulatedDepthVectorAlongBackRay, py::arg("glob_pos"),
23+
py::arg("direction"), py::arg("ekin"), py::arg("aPDef"))
24+
25+
.def("GenerateAdjointPrimaryVertex", &G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex, py::arg("anEvt"),
26+
py::arg("adj_part"), py::arg("E1"), py::arg("E2"))
27+
28+
.def("GenerateFwdPrimaryVertex", &G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex, py::arg("anEvt"),
29+
py::arg("adj_part"), py::arg("E1"), py::arg("E2"))
30+
31+
.def(
32+
"SampleDistanceAlongBackRayAndComputeWeightCorrection",
33+
[](G4AdjointPrimaryGenerator &self, G4double &weight_corr) {
34+
return std::make_tuple(self.SampleDistanceAlongBackRayAndComputeWeightCorrection(weight_corr), weight_corr);
35+
},
36+
py::arg("weight_corr"))
37+
38+
.def("SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume",
39+
&G4AdjointPrimaryGenerator::SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume, py::arg("v_name"))
40+
41+
.def("SetSphericalAdjointPrimarySource", &G4AdjointPrimaryGenerator::SetSphericalAdjointPrimarySource,
42+
py::arg("radius"), py::arg("pos"))
43+
44+
;
45+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#include <pybind11/pybind11.h>
2+
#include <pybind11/stl.h>
3+
4+
#include <G4AdjointStackingAction.hh>
5+
#include <G4StackManager.hh>
6+
#include <G4Track.hh>
7+
#include <G4ParticleDefinition.hh>
8+
#include <G4AdjointTrackingAction.hh>
9+
10+
#include "typecast.hh"
11+
#include "opaques.hh"
12+
13+
namespace py = pybind11;
14+
15+
class PyG4AdjointStackingAction : public G4AdjointStackingAction, public py::trampoline_self_life_support {
16+
public:
17+
using G4AdjointStackingAction::G4AdjointStackingAction;
18+
19+
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack) override
20+
{
21+
PYBIND11_OVERRIDE(G4ClassificationOfNewTrack, G4AdjointStackingAction, ClassifyNewTrack, aTrack);
22+
}
23+
24+
void NewStage() override { PYBIND11_OVERRIDE(void, G4AdjointStackingAction, NewStage, ); }
25+
26+
void PrepareNewEvent() override { PYBIND11_OVERRIDE(void, G4AdjointStackingAction, PrepareNewEvent, ); }
27+
};
28+
29+
void export_G4AdjointStackingAction(py::module &m)
30+
{
31+
py::class_<G4AdjointStackingAction, PyG4AdjointStackingAction, G4UserStackingAction>(m, "G4AdjointStackingAction")
32+
33+
.def("__copy__", [](const PyG4AdjointStackingAction &self) { return new PyG4AdjointStackingAction(self); })
34+
.def("__deepcopy__",
35+
[](const PyG4AdjointStackingAction &self, py::dict) { return new PyG4AdjointStackingAction(self); })
36+
37+
.def("__copy__", [](const G4AdjointStackingAction &self) { return new G4AdjointStackingAction(self); })
38+
.def("__deepcopy__",
39+
[](const G4AdjointStackingAction &self, py::dict) { return new G4AdjointStackingAction(self); })
40+
41+
.def(py::init<G4AdjointTrackingAction *>(), py::arg("anAction"))
42+
.def("ClassifyNewTrack", &G4AdjointStackingAction::ClassifyNewTrack, py::arg("aTrack"))
43+
.def("NewStage", &G4AdjointStackingAction::NewStage)
44+
.def("PrepareNewEvent", &G4AdjointStackingAction::PrepareNewEvent)
45+
.def("SetAdjointMode", &G4AdjointStackingAction::SetAdjointMode, py::arg("aBool"))
46+
.def("SetKillTracks", &G4AdjointStackingAction::SetKillTracks, py::arg("aBool"))
47+
.def("SetUserAdjointStackingAction", &G4AdjointStackingAction::SetUserAdjointStackingAction, py::arg("anAction"))
48+
.def("SetUserFwdStackingAction", &G4AdjointStackingAction::SetUserFwdStackingAction, py::arg("anAction"));
49+
}

source/event/pyG4EvManMessenger.cc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#include <pybind11/pybind11.h>
2+
#include <pybind11/stl.h>
3+
4+
#include <G4EvManMessenger.hh>
5+
#include <G4EventManager.hh>
6+
#include <G4UIcmdWithoutParameter.hh>
7+
#include <G4UIcmdWithAnInteger.hh>
8+
9+
#include "typecast.hh"
10+
#include "opaques.hh"
11+
12+
namespace py = pybind11;
13+
14+
class PyG4EvManMessenger : public G4EvManMessenger, public py::trampoline_self_life_support {
15+
public:
16+
using G4EvManMessenger::G4EvManMessenger;
17+
18+
G4String GetCurrentValue(G4UIcommand *command) override
19+
{
20+
PYBIND11_OVERRIDE(G4String, G4EvManMessenger, GetCurrentValue, command);
21+
}
22+
23+
void SetNewValue(G4UIcommand *command, G4String newValues) override
24+
{
25+
PYBIND11_OVERRIDE(void, G4EvManMessenger, SetNewValue, command, newValues);
26+
}
27+
};
28+
29+
void export_G4EvManMessenger(py::module &m)
30+
{
31+
py::class_<G4EvManMessenger, PyG4EvManMessenger, G4UImessenger>(m, "G4EvManMessenger")
32+
33+
.def("__copy__", [](const PyG4EvManMessenger &self) { return new PyG4EvManMessenger(self); })
34+
.def("__deepcopy__", [](const PyG4EvManMessenger &self, py::dict) { return new PyG4EvManMessenger(self); })
35+
.def("__copy__", [](const G4EvManMessenger &self) { return new G4EvManMessenger(self); })
36+
.def("__deepcopy__", [](const G4EvManMessenger &self, py::dict) { return new G4EvManMessenger(self); })
37+
.def(py::init<G4EventManager *>(), py::arg("fEvMan"))
38+
.def("GetCurrentValue", &G4EvManMessenger::GetCurrentValue, py::arg("command"))
39+
.def("SetNewValue", &G4EvManMessenger::SetNewValue, py::arg("command"), py::arg("newValues"));
40+
}

source/event/pyG4Event.cc

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <pybind11/pybind11.h>
22
#include <pybind11/stl.h>
3+
#include <pybind11/operators.h>
34

45
#include <G4Event.hh>
56

@@ -10,40 +11,52 @@ namespace py = pybind11;
1011

1112
void export_G4Event(py::module &m)
1213
{
13-
py::class_<G4Event>(m, "G4Event", "event class")
14-
.def(py::init<>())
15-
.def(py::init<G4int>())
14+
py::class_<G4Event>(m, "G4Event")
1615

17-
.def("Print", &G4Event::Print)
16+
.def(py::init<>())
17+
.def(py::init<G4int>(), py::arg("evID"))
18+
.def("AddPrimaryVertex", &G4Event::AddPrimaryVertex, py::arg("aPrimaryVertex"))
1819
.def("Draw", &G4Event::Draw)
19-
20-
.def("SetEventID", &G4Event::SetEventID)
21-
.def("SetHCofThisEvent", &G4Event::SetHCofThisEvent)
22-
.def("SetDCofThisEvent", &G4Event::SetDCofThisEvent)
23-
.def("SetTrajectoryContainer", &G4Event::SetTrajectoryContainer)
24-
.def("SetEventAborted", &G4Event::SetEventAborted)
25-
.def("SetRandomNumberStatus", &G4Event::SetRandomNumberStatus)
26-
.def("SetRandomNumberStatusForProcessing", &G4Event::SetRandomNumberStatusForProcessing)
27-
.def("KeepTheEvent", &G4Event::KeepTheEvent, py::arg("vl") = true)
28-
29-
.def("ToBeKept", &G4Event::ToBeKept)
30-
.def("KeepForPostProcessing", &G4Event::KeepForPostProcessing)
31-
.def("PostProcessingFinished", &G4Event::PostProcessingFinished)
32-
.def("GetNumberOfGrips", &G4Event::GetNumberOfGrips)
20+
.def("GetDCofThisEvent", &G4Event::GetDCofThisEvent, py::return_value_policy::reference_internal)
3321
.def("GetEventID", &G4Event::GetEventID)
34-
.def("AddPrimaryVertex", &G4Event::AddPrimaryVertex)
22+
.def("GetHCofThisEvent", &G4Event::GetHCofThisEvent, py::return_value_policy::reference_internal)
23+
.def("GetNumberOfGrips", &G4Event::GetNumberOfGrips)
3524
.def("GetNumberOfPrimaryVertex", &G4Event::GetNumberOfPrimaryVertex)
3625
.def("GetPrimaryVertex", &G4Event::GetPrimaryVertex, py::arg("i") = 0,
3726
py::return_value_policy::reference_internal)
3827

39-
.def("GetHCofThisEvent", &G4Event::GetHCofThisEvent, py::return_value_policy::reference_internal)
40-
.def("GetDCofThisEvent", &G4Event::GetDCofThisEvent, py::return_value_policy::reference_internal)
28+
.def("GetRandomNumberStatus", &G4Event::GetRandomNumberStatus)
29+
.def("GetRandomNumberStatusForProcessing", &G4Event::GetRandomNumberStatusForProcessing)
4130
.def("GetTrajectoryContainer", &G4Event::GetTrajectoryContainer, py::return_value_policy::reference_internal)
42-
31+
.def("GetUserInformation", &G4Event::GetUserInformation, py::return_value_policy::reference_internal)
4332
.def("IsAborted", &G4Event::IsAborted)
33+
.def("KeepForPostProcessing", &G4Event::KeepForPostProcessing)
34+
.def("KeepTheEvent", &G4Event::KeepTheEvent, py::arg("vl") = true)
35+
.def("PostProcessingFinished", &G4Event::PostProcessingFinished)
36+
.def("Print", &G4Event::Print)
37+
.def(
38+
"SetDCofThisEvent", [](G4Event &self, py::disown_ptr<G4DCofThisEvent> value) { self.SetDCofThisEvent(value); },
39+
py::arg("value"))
4440

45-
.def("SetUserInformation", &G4Event::SetUserInformation, py::keep_alive<1, 2>())
46-
.def("GetUserInformation", &G4Event::GetUserInformation, py::return_value_policy::reference_internal)
47-
.def("GetRandomNumberStatus", &G4Event::GetRandomNumberStatus)
48-
.def("GetRandomNumberStatusForProcessing", &G4Event::GetRandomNumberStatusForProcessing);
41+
.def("SetEventAborted", &G4Event::SetEventAborted)
42+
.def("SetEventID", &G4Event::SetEventID, py::arg("i"))
43+
.def(
44+
"SetHCofThisEvent", [](G4Event &self, py::disown_ptr<G4HCofThisEvent> value) { self.SetHCofThisEvent(value); },
45+
py::arg("value"))
46+
47+
.def("SetRandomNumberStatus", &G4Event::SetRandomNumberStatus, py::arg("st"))
48+
.def("SetRandomNumberStatusForProcessing", &G4Event::SetRandomNumberStatusForProcessing, py::arg("st"))
49+
.def(
50+
"SetTrajectoryContainer",
51+
[](G4Event &self, py::disown_ptr<G4TrajectoryContainer> value) { self.SetTrajectoryContainer(value); },
52+
py::arg("value"))
53+
54+
.def(
55+
"SetUserInformation",
56+
[](G4Event &self, py::disown_ptr<G4VUserEventInformation> anInfo) { self.SetUserInformation(anInfo); },
57+
py::arg("anInfo"))
58+
59+
.def("ToBeKept", &G4Event::ToBeKept)
60+
.def(py::self != py::self)
61+
.def(py::self == py::self);
4962
}

source/event/pyG4EventManager.cc

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,30 @@ void export_G4EventManager(py::module &m)
1818
py::class_<G4EventManager, py::nodelete>(m, "G4EventManager", "event manager class")
1919

2020
.def(py::init<>())
21-
.def_static("GetEventManager", &G4EventManager::GetEventManager, py::return_value_policy::reference)
21+
.def(py::init<>())
22+
.def("AbortCurrentEvent", &G4EventManager::AbortCurrentEvent)
2223
.def("GetConstCurrentEvent", &G4EventManager::GetConstCurrentEvent, py::return_value_policy::reference)
24+
.def_static("GetEventManager", &G4EventManager::GetEventManager, py::return_value_policy::reference)
2325
.def("GetNonconstCurrentEvent", &G4EventManager::GetNonconstCurrentEvent, py::return_value_policy::reference)
24-
25-
.def("AbortCurrentEvent", &G4EventManager::AbortCurrentEvent)
26-
.def("SetNumberOfAdditionalWaitingStacks", &G4EventManager::SetNumberOfAdditionalWaitingStacks)
26+
.def("GetPrimaryTransformer", &G4EventManager::GetPrimaryTransformer, py::return_value_policy::reference)
2727
.def("GetStackManager", &G4EventManager::GetStackManager, py::return_value_policy::reference)
2828
.def("GetTrackingManager", &G4EventManager::GetTrackingManager, py::return_value_policy::reference)
29-
.def("GetVerboseLevel", &G4EventManager::GetVerboseLevel)
30-
.def("SetVerboseLevel", &G4EventManager::SetVerboseLevel)
31-
.def("SetUserInformation", &G4EventManager::SetUserInformation) // TODO pass ownership
29+
.def("GetUserEventAction", &G4EventManager::GetUserEventAction, py::return_value_policy::reference)
3230
.def("GetUserInformation", &G4EventManager::GetUserInformation, py::return_value_policy::reference)
33-
34-
.def("ProcessOneEvent", py::overload_cast<G4Event *>(&G4EventManager::ProcessOneEvent))
31+
.def("GetUserStackingAction", &G4EventManager::GetUserStackingAction, py::return_value_policy::reference)
32+
.def("GetUserSteppingAction", &G4EventManager::GetUserSteppingAction, py::return_value_policy::reference)
33+
.def("GetUserTrackingAction", &G4EventManager::GetUserTrackingAction, py::return_value_policy::reference)
34+
.def("GetVerboseLevel", &G4EventManager::GetVerboseLevel)
35+
.def("KeepTheCurrentEvent", &G4EventManager::KeepTheCurrentEvent)
36+
.def("ProcessOneEvent", py::overload_cast<G4Event *>(&G4EventManager::ProcessOneEvent), py::arg("anEvent"))
3537
.def("ProcessOneEvent", py::overload_cast<G4TrackVector *, G4Event *>(&G4EventManager::ProcessOneEvent),
36-
py::arg("trackVector"), py::arg("anEvent") = nullptr)
38+
py::arg("trackVector"), py::arg("anEvent") = static_cast<G4Event *>(nullptr))
3739

38-
.def("GetConstCurrentEvent", &G4EventManager::GetConstCurrentEvent, py::return_value_policy::reference)
39-
.def("GetNonconstCurrentEvent", &G4EventManager::GetNonconstCurrentEvent, py::return_value_policy::reference)
40+
.def("SetNumberOfAdditionalWaitingStacks", &G4EventManager::SetNumberOfAdditionalWaitingStacks, py::arg("iAdd"))
41+
.def(
42+
"SetPrimaryTransformer",
43+
[](G4EventManager &self, py::disown_ptr<G4PrimaryTransformer> tf) { self.SetPrimaryTransformer(tf); },
44+
py::arg("tf"))
4045

4146
.def("SetUserAction",
4247
[](G4EventManager &self, py::disown_ptr<G4UserEventAction> action) { self.SetUserAction(action); })
@@ -50,19 +55,12 @@ void export_G4EventManager(py::module &m)
5055
.def("SetUserAction",
5156
[](G4EventManager &self, py::disown_ptr<G4UserSteppingAction> action) { self.SetUserAction(action); })
5257

53-
.def("GetUserEventAction", &G4EventManager::GetUserEventAction, py::return_value_policy::reference)
54-
.def("GetUserStackingAction", &G4EventManager::GetUserStackingAction, py::return_value_policy::reference)
55-
56-
.def("GetUserTrackingAction", &G4EventManager::GetUserTrackingAction, py::return_value_policy::reference)
57-
.def("GetUserSteppingAction", &G4EventManager::GetUserSteppingAction, py::return_value_policy::reference)
58-
59-
.def("SetNumberOfAdditionalWaitingStacks", &G4EventManager::SetNumberOfAdditionalWaitingStacks)
58+
.def(
59+
"SetUserInformation",
60+
[](G4EventManager &self, py::disown_ptr<G4VUserEventInformation> anInfo) { self.SetUserInformation(anInfo); },
61+
py::arg("anInfo"))
6062

61-
.def("KeepTheCurrentEvent", &G4EventManager::KeepTheCurrentEvent)
62-
.def("GetStackManager", &G4EventManager::GetStackManager, py::return_value_policy::reference)
63-
.def("GetTrackingManager", &G4EventManager::GetTrackingManager, py::return_value_policy::reference)
64-
65-
.def("GetPrimaryTransformer", &G4EventManager::GetPrimaryTransformer, py::return_value_policy::reference)
66-
.def("SetPrimaryTransformer", &G4EventManager::SetPrimaryTransformer) // TODO pass ownership
67-
.def("StoreRandomNumberStatusToG4Event", &G4EventManager::StoreRandomNumberStatusToG4Event);
63+
.def("SetVerboseLevel", &G4EventManager::SetVerboseLevel, py::arg("value"))
64+
.def("StackTracks", &G4EventManager::StackTracks, py::arg("trackVector"), py::arg("IDhasAlreadySet") = false)
65+
.def("StoreRandomNumberStatusToG4Event", &G4EventManager::StoreRandomNumberStatusToG4Event, py::arg("vl"));
6866
}

0 commit comments

Comments
 (0)