Geant4-11
Functions
pymodG4global.cc File Reference
#include <boost/python.hpp>

Go to the source code of this file.

Functions

 BOOST_PYTHON_MODULE (G4global)
 
void export_G4ApplicationState ()
 
void export_G4Exception ()
 
void export_G4ExceptionHandler ()
 
void export_G4ExceptionSeverity ()
 
void export_G4RandomDirection ()
 
void export_G4RotationMatrix ()
 
void export_G4StateManager ()
 
void export_G4String ()
 
void export_G4ThreeVector ()
 
void export_G4Timer ()
 
void export_G4Transform3D ()
 
void export_G4TwoVector ()
 
void export_G4UnitsTable ()
 
void export_G4UserLimits ()
 
void export_G4Version ()
 
void export_geomdefs ()
 
void export_globals ()
 
void export_RandomEngines ()
 
void export_Randomize ()
 

Function Documentation

◆ BOOST_PYTHON_MODULE()

BOOST_PYTHON_MODULE ( G4global  )

Definition at line 59 of file pymodG4global.cc.

60{
80}
void export_G4ExceptionHandler()
void export_G4RotationMatrix()
void export_geomdefs()
Definition: pygeomdefs.cc:39
void export_G4String()
Definition: pyG4String.cc:47
void export_G4TwoVector()
void export_G4ThreeVector()
void export_G4StateManager()
void export_G4Timer()
Definition: pyG4Timer.cc:39
void export_Randomize()
Definition: pyRandomize.cc:176
void export_G4UserLimits()
void export_G4Version()
Definition: pyG4Version.cc:39
void export_G4ExceptionSeverity()
void export_RandomEngines()
void export_G4RandomDirection()
void export_G4UnitsTable()
void export_G4ApplicationState()
void export_G4Exception()
void export_globals()
Definition: pyglobals.cc:76
void export_G4Transform3D()

References export_G4ApplicationState(), export_G4Exception(), export_G4ExceptionHandler(), export_G4ExceptionSeverity(), export_G4RandomDirection(), export_G4RotationMatrix(), export_G4StateManager(), export_G4String(), export_G4ThreeVector(), export_G4Timer(), export_G4Transform3D(), export_G4TwoVector(), export_G4UnitsTable(), export_G4UserLimits(), export_G4Version(), export_geomdefs(), export_globals(), export_RandomEngines(), and export_Randomize().

◆ export_G4ApplicationState()

void export_G4ApplicationState ( )

Definition at line 41 of file pyG4ApplicationState.cc.

42{
43 enum_<G4ApplicationState>("G4ApplicationState")
44 .value("G4State_PreInit", G4State_PreInit)
45 .value("G4State_Init", G4State_Init)
46 .value("G4State_Idle", G4State_Idle)
47 .value("G4State_GeomClosed", G4State_GeomClosed)
48 .value("G4State_EventProc", G4State_EventProc)
49 .value("G4State_Quit", G4State_Quit)
50 .value("G4State_Abort", G4State_Abort)
51 ;
52}
@ G4State_EventProc
@ G4State_Init
@ G4State_Idle
@ G4State_Quit
@ G4State_Abort
@ G4State_GeomClosed
@ G4State_PreInit

References G4State_Abort, G4State_EventProc, G4State_GeomClosed, G4State_Idle, G4State_Init, G4State_PreInit, and G4State_Quit.

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4Exception()

void export_G4Exception ( )

Definition at line 110 of file pyG4Exception.cc.

111{
112 def("G4Exception", f2_G4Exception);
113}
void f2_G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)

References pyG4Exception::f2_G4Exception().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4ExceptionHandler()

void export_G4ExceptionHandler ( )

Definition at line 104 of file pyG4ExceptionHandler.cc.

105{
106 class_<PyG4ExceptionHandler, boost::noncopyable>
107 ("G4ExceptionHandler", "exception handler")
108 ;
109}

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4ExceptionSeverity()

void export_G4ExceptionSeverity ( )

Definition at line 41 of file pyG4ExceptionSeverity.cc.

42{
43 enum_<G4ExceptionSeverity>("G4ExceptionSeverity")
44 .value("FatalException", FatalException)
45 .value("FatalErrorInArgument", FatalErrorInArgument)
46 .value("RunMustBeAborted", RunMustBeAborted)
47 .value("EventMustBeAborted", EventMustBeAborted)
48 .value("JustWarning", JustWarning)
49 ;
50
51}
@ JustWarning
@ FatalException
@ FatalErrorInArgument
@ RunMustBeAborted
@ EventMustBeAborted

References EventMustBeAborted, FatalErrorInArgument, FatalException, JustWarning, and RunMustBeAborted.

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4RandomDirection()

void export_G4RandomDirection ( )

Definition at line 51 of file pyG4RandomDirection.cc.

52{
53 def("G4RandomDirection", G4RandomDirection_1);
54 def("G4RandomDirection", G4RandomDirection_2);
55}
G4ThreeVector(* G4RandomDirection_2)(double)
G4ThreeVector(* G4RandomDirection_1)()

References pyG4RandomDirection::G4RandomDirection_1, and pyG4RandomDirection::G4RandomDirection_2.

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4RotationMatrix()

void export_G4RotationMatrix ( )

Definition at line 53 of file pyG4RotationMatrix.cc.

54{
55 class_<G4RotationMatrix>("G4RotationMatrix", "rotation matrix")
56 // constructors
57 .def(init<const XXX&>())
58
59 // property
60 .add_property("xx", &XXX::xx)
61 .add_property("xy", &XXX::xy)
62 .add_property("xz", &XXX::xz)
63 .add_property("yx", &XXX::yx)
64 .add_property("yy", &XXX::yy)
65 .add_property("yz", &XXX::yz)
66 .add_property("zx", &XXX::zx)
67 .add_property("zy", &XXX::zy)
68 .add_property("zz", &XXX::zz)
69 .def_readonly("IDENTITY", &XXX::IDENTITY)
70
71 // methods
72 .def("colX", &XXX::colX)
73 .def("colY", &XXX::colY)
74 .def("colZ", &XXX::colZ)
75 .def("rowX", &XXX::rowX)
76 .def("rowY", &XXX::rowY)
77 .def("rowZ", &XXX::rowZ)
78 .def("getPhi", &XXX::getPhi)
79 .def("getTheta", &XXX::getTheta)
80 .def("getPsi", &XXX::getPsi)
81 .def("phi", &XXX::phi)
82 .def("theta", &XXX::theta)
83 .def("psi", &XXX::psi)
84 .def("getDelta", &XXX::getDelta)
85 .def("getAxis", &XXX::getAxis)
86 .def("delta", &XXX::axis)
87 .def("axis", &XXX::delta)
88 .def("phiX", &XXX::phiX)
89 .def("phiY", &XXX::phiY)
90 .def("phiZ", &XXX::phiZ)
91 .def("thetaX", &XXX::thetaX)
92 .def("thetaY", &XXX::thetaY)
93 .def("thetaZ", &XXX::thetaZ)
94 .def("setPhi", &XXX::setPhi)
95 .def("setTheta", &XXX::setTheta)
96 .def("setPsi", &XXX::setPsi)
97 .def("setAxis", &XXX::setAxis)
98 .def("setDelta", &XXX::setDelta)
99 .def("isIdentity", &XXX::isIdentity)
100 .def("rotateX", &XXX::rotateX,
101 return_value_policy<reference_existing_object>())
102 .def("rotateY", &XXX::rotateY,
103 return_value_policy<reference_existing_object>())
104 .def("rotateZ", &XXX::rotateZ,
105 return_value_policy<reference_existing_object>())
106 .def("rotate", f1_rotate,
107 return_value_policy<reference_existing_object>())
108 .def("rotate", f2_rotate,
109 return_value_policy<reference_existing_object>())
110 .def("rotateAxes", &XXX::rotateAxes,
111 return_value_policy<reference_existing_object>())
112 .def("inverse", &XXX::inverse)
113 .def("invert", &XXX::invert,
114 return_value_policy<reference_existing_object>())
115
116 // operators
117 .def(self_ns::str(self))
118 .def(self == self)
119 .def(self != self)
120 .def(self > self)
121 .def(self < self)
122 .def(self >= self)
123 .def(self <= self)
124 .def(self * self)
125 .def(self * G4ThreeVector())
126 .def(self *= self)
127 ;
128}
CLHEP::Hep3Vector G4ThreeVector
double getPsi() const
double getPhi() const
double zz() const
double yz() const
Hep3Vector colX() const
HepRotation & rotateAxes(const Hep3Vector &newX, const Hep3Vector &newY, const Hep3Vector &newZ)
Definition: Rotation.cc:100
double zx() const
void setPsi(double psi)
Definition: RotationE.cc:267
Hep3Vector axis() const
Definition: RotationA.cc:75
double phi() const
Definition: RotationE.cc:67
double thetaY() const
Definition: Rotation.cc:140
HepRotation inverse() const
Hep3Vector rowY() const
Hep3Vector colY() const
Hep3Vector getAxis() const
bool isIdentity() const
Definition: Rotation.cc:167
double delta() const
Definition: RotationA.cc:62
double phiY() const
Definition: Rotation.cc:128
double yx() const
static DLL_API const HepRotation IDENTITY
Definition: Rotation.h:366
double zy() const
double thetaX() const
Definition: Rotation.cc:136
void setDelta(double delta)
Definition: RotationA.cc:131
Hep3Vector colZ() const
double xx() const
HepRotation & rotateX(double delta)
Definition: Rotation.cc:61
double psi() const
Definition: RotationE.cc:107
Hep3Vector rowX() const
double theta() const
Definition: RotationE.cc:101
double phiX() const
Definition: Rotation.cc:124
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:87
double yy() const
void setAxis(const Hep3Vector &axis)
Definition: RotationA.cc:127
double xz() const
void setPhi(double phi)
Definition: RotationE.cc:259
HepRotation & rotateY(double delta)
Definition: Rotation.cc:74
Hep3Vector rowZ() const
double getTheta() const
double thetaZ() const
Definition: Rotation.cc:144
HepRotation & invert()
double xy() const
double getDelta() const
void setTheta(double theta)
Definition: RotationE.cc:263
double phiZ() const
Definition: Rotation.cc:132
XXX &(XXX::* f2_rotate)(G4double, const G4ThreeVector *)
XXX &(XXX::* f1_rotate)(G4double, const G4ThreeVector &)

References CLHEP::HepRotation::axis(), CLHEP::HepRotation::colX(), CLHEP::HepRotation::colY(), CLHEP::HepRotation::colZ(), CLHEP::HepRotation::delta(), pyG4RotationMatrix::f1_rotate, pyG4RotationMatrix::f2_rotate, CLHEP::HepRotation::getAxis(), CLHEP::HepRotation::getDelta(), CLHEP::HepRotation::getPhi(), CLHEP::HepRotation::getPsi(), CLHEP::HepRotation::getTheta(), CLHEP::HepRotation::IDENTITY, CLHEP::HepRotation::inverse(), CLHEP::HepRotation::invert(), CLHEP::HepRotation::isIdentity(), CLHEP::HepRotation::phi(), CLHEP::HepRotation::phiX(), CLHEP::HepRotation::phiY(), CLHEP::HepRotation::phiZ(), CLHEP::HepRotation::psi(), CLHEP::HepRotation::rotateAxes(), CLHEP::HepRotation::rotateX(), CLHEP::HepRotation::rotateY(), CLHEP::HepRotation::rotateZ(), CLHEP::HepRotation::rowX(), CLHEP::HepRotation::rowY(), CLHEP::HepRotation::rowZ(), CLHEP::HepRotation::setAxis(), CLHEP::HepRotation::setDelta(), CLHEP::HepRotation::setPhi(), CLHEP::HepRotation::setPsi(), CLHEP::HepRotation::setTheta(), CLHEP::HepRotation::theta(), CLHEP::HepRotation::thetaX(), CLHEP::HepRotation::thetaY(), CLHEP::HepRotation::thetaZ(), CLHEP::HepRotation::xx(), CLHEP::HepRotation::xy(), CLHEP::HepRotation::xz(), CLHEP::HepRotation::yx(), CLHEP::HepRotation::yy(), CLHEP::HepRotation::yz(), CLHEP::HepRotation::zx(), CLHEP::HepRotation::zy(), and CLHEP::HepRotation::zz().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4StateManager()

void export_G4StateManager ( )

Definition at line 39 of file pyG4StateManager.cc.

40{
41 class_<G4StateManager, boost::noncopyable>
42 ("G4StateManager", "state manager", no_init)
43 .def("GetStateManager", &G4StateManager::GetStateManager,
44 "Get an instance of G4StateManager",
45 return_value_policy<reference_existing_object>())
46 .staticmethod("GetStateManager")
47 // ---
48 .def("GetCurrentState", &G4StateManager::GetCurrentState,
49 return_value_policy<copy_const_reference>())
50 .def("GetPreviousState", &G4StateManager::GetPreviousState,
51 return_value_policy<copy_const_reference>())
52 .def("GetStateString", &G4StateManager::GetStateString)
53 ;
54}
const G4ApplicationState & GetCurrentState() const
G4String GetStateString(const G4ApplicationState &aState) const
static G4StateManager * GetStateManager()
const G4ApplicationState & GetPreviousState() const

References G4StateManager::GetCurrentState(), G4StateManager::GetPreviousState(), G4StateManager::GetStateManager(), and G4StateManager::GetStateString().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4String()

void export_G4String ( )

Definition at line 47 of file pyG4String.cc.

48{
49 class_<G4String>("G4String", "string class")
50 .def(init<const G4String&>())
51 .def(init<const char*>())
52 .def(self_ns::str(self))
53 .def(self + self)
54 .def(self += self)
55 .def(self += other<const char*>())
56 .def(self == self)
57 .def(self == other<const char*>())
58 .def(self != self)
59 .def(self != other<const char*>())
60 ;
61
62 implicitly_convertible<G4String, const char*>();
63 implicitly_convertible<const char* ,G4String>();
64
65 implicitly_convertible<G4String, std::string>();
66 implicitly_convertible<std::string ,G4String>();
67}

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4ThreeVector()

void export_G4ThreeVector ( )

Definition at line 98 of file pyG4ThreeVector.cc.

99{
100 class_<G4ThreeVector>("G4ThreeVector", "general 3-vector")
101 // constructors
102 .def(init<G4double>())
103 .def(init<G4double, G4double>())
104 .def(init<G4double, G4double, G4double>())
105 .def(init<const XXX&>())
106
107 // property
108 .add_property("x", &XXX::x, &XXX::setX)
109 .add_property("y", &XXX::y, &XXX::setY)
110 .add_property("z", &XXX::z, &XXX::setZ)
111
112 // methods
113 .def("set", &XXX::set)
114 .def("phi", &XXX::phi)
115 .def("mag", &XXX::mag)
116 .def("mag2", &XXX::mag2)
117 .def("setPhi", &XXX::setPhi)
118 .def("setTheta", &XXX::setTheta)
119 .def("setMag", &XXX::setMag)
120 .def("setPerp", &XXX::setPerp)
121 .def("setCylTheta", &XXX::setCylTheta)
122 .def("howNear", &XXX::howNear)
123 .def("deltaR", &XXX::deltaR)
124 .def("unit", &XXX::unit)
125 .def("orthogonal", &XXX::orthogonal)
126 .def("dot", &XXX::dot)
127 .def("cross", &XXX::cross)
128 .def("pseudoRapidity", &XXX::pseudoRapidity)
129 .def("setEta", &XXX::setEta)
130 .def("setCylEta",&XXX::setCylEta)
131 .def("setRThetaPhi", &XXX::setRThetaPhi)
132 .def("setREtaPhi", &XXX::setREtaPhi)
133 .def("setRhoPhiZ", &XXX::setRhoPhiZ)
134 .def("setRhoPhiEta", &XXX::setRhoPhiEta)
135 .def("getX", &XXX::getX)
136 .def("getY", &XXX::getY)
137 .def("getZ", &XXX::getZ)
138 .def("getR", &XXX::getR)
139 .def("getTheta", &XXX::getTheta)
140 .def("getPhi", &XXX::getPhi)
141 .def("r", &XXX::r)
142 .def("rho", &XXX::rho)
143 .def("getRho", &XXX::getRho)
144 .def("getEta", &XXX::getEta)
145 .def("setR", &XXX::setR)
146 .def("setRho", &XXX::setRho)
147 .def("compare", &XXX::compare)
148 .def("diff2", &XXX::diff2)
149 .def("setTolerance", &XXX::setTolerance)
150 .staticmethod("setTolerance")
151 .def("getTolerance", &XXX::getTolerance)
152 .staticmethod("getTolerance")
153 .def("isNear", &XXX::isNear, f_isNear())
154 .def("isParallel", &XXX::isParallel, f_isParallel())
155 .def("isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
156 .def("howParallel", &XXX::howParallel)
157 .def("howOrthogonal", &XXX::howOrthogonal)
158 .def("beta", &XXX::beta)
159 .def("gamma", &XXX::gamma)
160 .def("deltaPhi", &XXX::deltaPhi)
161 .def("coLinearRapidity", &XXX::coLinearRapidity)
162 .def("theta", f1_theta)
163 .def("theta", f2_theta)
164 .def("cosTheta", f1_cosTheta)
165 .def("cosTheta", f2_cosTheta)
166 .def("cos2Theta", f1_cos2Theta)
167 .def("cos2Theta", f2_cos2Theta)
168 .def("perp2", f1_perp2)
169 .def("perp2", f2_perp2)
170 .def("angle", f1_angle)
171 .def("angle", f2_angle)
172 .def("eta", f1_eta)
173 .def("eta", f2_eta)
174 .def("project", f1_project)
175 .def("project", f2_project)
176 .def("perpPart", f1_perpPart)
177 .def("perpPart", f2_perpPart)
178 .def("rapidity", f1_rapidity)
179 .def("rapidity", f2_rapidity)
180 .def("polarAngle",f1_polarAngle)
181 .def("polarAngle",f2_polarAngle)
182 .def("azimAngle", f1_azimAngle)
183 .def("azimAngle", f2_azimAngle)
184 .def("rotateX", &XXX::rotateX,
185 return_value_policy<reference_existing_object>())
186 .def("rotateY", &XXX::rotateY,
187 return_value_policy<reference_existing_object>())
188 .def("rotateZ", &XXX::rotateZ,
189 return_value_policy<reference_existing_object>())
190 .def("rotateUz", &XXX::rotateUz,
191 return_value_policy<reference_existing_object>())
192 .def("transform",&XXX::transform,
193 return_value_policy<reference_existing_object>())
194 .def("rotate", f1_rotate,
195 return_value_policy<reference_existing_object>())
196 .def("rotate", f2_rotate,
197 return_value_policy<reference_existing_object>())
198 .def("rotate", f5_rotate,
199 return_value_policy<reference_existing_object>())
200
201 // operators
202 .def(self_ns::str(self))
203 .def(self == self)
204 .def(self != self)
205 .def(self += self)
206 .def(self -= self)
207 .def(self - self)
208 .def(self + self)
209 .def(self * self)
210 .def(self * G4double())
211 .def(self / G4double())
212 .def(G4double() * self)
213 .def(self *= G4double())
214 .def(self /= G4double())
215 .def(self > self)
216 .def(self < self)
217 .def(self >= self)
218 .def(self <= self)
219 ;
220}
double G4double
Definition: G4Types.hh:83
static double getTolerance()
static double setTolerance(double tol)
HepRotation & transform(const HepRotation &r)
HepRotation & set(const Hep3Vector &axis, double delta)
Definition: RotationA.cc:23
bool isNear(const HepRotation &r, double epsilon=Hep4RotationInterface::tolerance) const
Definition: RotationP.cc:41
double howNear(const HepRotation &r) const
Definition: RotationP.cc:37
int compare(const HepRotation &r) const
Definition: Rotation.cc:173
G4double(XXX::* f2_azimAngle)(const XXX &, const XXX &) const
XXX(XXX::* f1_perpPart)() const
G4double(XXX::* f1_polarAngle)(const XXX &) const
G4double(XXX::* f1_theta)() const
G4double(XXX::* f1_rapidity)() const
G4double(XXX::* f2_polarAngle)(const XXX &, const XXX &) const
G4double(XXX::* f2_theta)(const XXX &) const
XXX(XXX::* f2_project)(const XXX &) const
G4double(XXX::* f2_perp2)(const XXX &) const
XXX(XXX::* f1_project)() const
XXX &(XXX::* f1_rotate)(G4double, const XXX &)
G4double(XXX::* f1_cos2Theta)() const
XXX &(XXX::* f2_rotate)(const XXX &, G4double)
G4double(XXX::* f2_angle)(const XXX &) const
XXX(XXX::* f2_perpPart)(const XXX &) const
G4double(XXX::* f2_eta)(const XXX &) const
XXX &(XXX::* f5_rotate)(G4double, G4double, G4double)
G4double(XXX::* f1_eta)() const
G4double(XXX::* f1_perp2)() const
G4double(XXX::* f1_cosTheta)() const
G4double(XXX::* f1_azimAngle)(const XXX &) const
G4double(XXX::* f1_angle)() const
G4double(XXX::* f2_cosTheta)(const XXX &) const
G4double(XXX::* f2_rapidity)(const XXX &) const
G4double(XXX::* f2_cos2Theta)(const XXX &) const

References anonymous_namespace{G4PionRadiativeDecayChannel.cc}::beta, CLHEP::HepRotation::compare(), pyG4ThreeVector::f1_angle, pyG4ThreeVector::f1_azimAngle, pyG4ThreeVector::f1_cos2Theta, pyG4ThreeVector::f1_cosTheta, pyG4ThreeVector::f1_eta, pyG4ThreeVector::f1_perp2, pyG4ThreeVector::f1_perpPart, pyG4ThreeVector::f1_polarAngle, pyG4ThreeVector::f1_project, pyG4ThreeVector::f1_rapidity, pyG4ThreeVector::f1_rotate, pyG4ThreeVector::f1_theta, pyG4ThreeVector::f2_angle, pyG4ThreeVector::f2_azimAngle, pyG4ThreeVector::f2_cos2Theta, pyG4ThreeVector::f2_cosTheta, pyG4ThreeVector::f2_eta, pyG4ThreeVector::f2_perp2, pyG4ThreeVector::f2_perpPart, pyG4ThreeVector::f2_polarAngle, pyG4ThreeVector::f2_project, pyG4ThreeVector::f2_rapidity, pyG4ThreeVector::f2_rotate, pyG4ThreeVector::f2_theta, pyG4ThreeVector::f5_rotate, CLHEP::HepRotation::getPhi(), CLHEP::HepRotation::getTheta(), CLHEP::HepRotation::getTolerance(), CLHEP::HepRotation::howNear(), CLHEP::HepRotation::isNear(), CLHEP::HepRotation::phi(), CLHEP::HepRotation::rotateX(), CLHEP::HepRotation::rotateY(), CLHEP::HepRotation::rotateZ(), CLHEP::HepRotation::set(), CLHEP::HepRotation::setPhi(), CLHEP::HepRotation::setTheta(), CLHEP::HepRotation::setTolerance(), and CLHEP::HepRotation::transform().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4Timer()

void export_G4Timer ( )

Definition at line 39 of file pyG4Timer.cc.

40{
41 class_<G4Timer>("G4Timer", "Timer")
42 // ---
43 .def("Start", &G4Timer::Start)
44 .def("Stop", &G4Timer::Stop)
45 .def("IsValid", &G4Timer::IsValid)
46 .def("GetRealElapsed", &G4Timer::GetRealElapsed)
47 .def("GetSystemElapsed", &G4Timer::GetSystemElapsed)
48 .def("GetUserElapsed", &G4Timer::GetUserElapsed)
49 ;
50}
void Stop()
G4double GetSystemElapsed() const
Definition: G4Timer.cc:132
G4bool IsValid() const
G4double GetUserElapsed() const
Definition: G4Timer.cc:143
void Start()
G4double GetRealElapsed() const
Definition: G4Timer.cc:121

References G4Timer::GetRealElapsed(), G4Timer::GetSystemElapsed(), G4Timer::GetUserElapsed(), G4Timer::IsValid(), G4Timer::Start(), and G4Timer::Stop().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4Transform3D()

void export_G4Transform3D ( )

Definition at line 43 of file pyG4Transform3D.cc.

44{
45 class_<G4Transform3D>("G4Transform3D", "geometrical 3D transformation")
46 // constructors
47 .def(init<const G4RotationMatrix&, const G4ThreeVector&>())
48 .def(init<const XXX&>())
49
50 // property
51 .add_property("xx", &XXX::xx)
52 .add_property("xy", &XXX::xy)
53 .add_property("xz", &XXX::xz)
54 .add_property("yx", &XXX::yx)
55 .add_property("yy", &XXX::yy)
56 .add_property("yz", &XXX::yz)
57 .add_property("zx", &XXX::zx)
58 .add_property("zy", &XXX::zy)
59 .add_property("zz", &XXX::zz)
60 .add_property("dx", &XXX::dx)
61 .add_property("dy", &XXX::dy)
62 .add_property("dz", &XXX::dz)
63 .def_readonly("Identity", &XXX::Identity)
64
65 // methods
66 .def("inverse", &XXX::inverse)
67 .def("getRotation" , &XXX::getRotation)
68 .def("getTranslation", &XXX::getTranslation)
69
70 // operators
71 .def(self == self)
72 .def(self != self)
73 .def(self * self)
74 ;
75}

References CLHEP::HepRotation::inverse(), CLHEP::HepRotation::xx(), CLHEP::HepRotation::xy(), CLHEP::HepRotation::xz(), CLHEP::HepRotation::yx(), CLHEP::HepRotation::yy(), CLHEP::HepRotation::yz(), CLHEP::HepRotation::zx(), CLHEP::HepRotation::zy(), and CLHEP::HepRotation::zz().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4TwoVector()

void export_G4TwoVector ( )

Definition at line 56 of file pyG4TwoVector.cc.

57{
58 class_<G4TwoVector>("G4TwoVector", "general 2-vector")
59 // constructors
60 .def(init<G4double>())
61 .def(init<G4double, G4double>())
62 .def(init<const XXX&>())
63
64 // property
65 .add_property("x", &XXX::x, &XXX::setX)
66 .add_property("y", &XXX::y, &XXX::setY)
67
68 // methods
69 .def("set", &XXX::set)
70 .def("phi", &XXX::phi)
71 .def("mag", &XXX::mag)
72 .def("mag2", &XXX::mag2)
73 .def("r", &XXX::r)
74 .def("setPhi", &XXX::setPhi)
75 .def("setMag", &XXX::setMag)
76 .def("setR", &XXX::setR)
77 .def("setPolar", &XXX::setPolar)
78 .def("howNear", &XXX::howNear)
79 .def("isNear", &XXX::isNear, f_isNear())
80 .def("howParallel", &XXX::howParallel)
81 .def("isParallel", &XXX::isParallel, f_isParallel())
82 .def("howOrthogonal", &XXX::howOrthogonal)
83 .def("isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
84 .def("unit", &XXX::unit)
85 .def("orthogonal", &XXX::orthogonal)
86 .def("dot", &XXX::dot)
87 .def("angle", &XXX::angle)
88 .def("rotate", &XXX::rotate)
89
90 // operators
91 .def(self_ns::str(self))
92 .def(self == self)
93 .def(self != self)
94 .def(self += self)
95 .def(self -= self)
96 .def(self - self)
97 .def(self + self)
98 .def(self * self)
99 .def(self * G4double())
100 .def(self / G4double())
101 .def(G4double() * self)
102 .def(self *= G4double())
103 .def(self > self)
104 .def(self < self)
105 .def(self >= self)
106 .def(self <= self)
107 ;
108}
static const G4double angle[DIMMOTT]
HepRotation & rotate(double delta, const Hep3Vector &axis)
Definition: Rotation.cc:42

References angle, CLHEP::HepRotation::howNear(), CLHEP::HepRotation::isNear(), CLHEP::HepRotation::phi(), CLHEP::HepRotation::rotate(), CLHEP::HepRotation::set(), and CLHEP::HepRotation::setPhi().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4UnitsTable()

void export_G4UnitsTable ( )

Definition at line 40 of file pyG4UnitsTable.cc.

41{
42 class_<G4UnitsTable>("G4UnitsTable", "Units Table")
43 .def(vector_indexing_suite<G4UnitsTable>())
44 ;
45
46 class_<G4UnitsContainer>("G4UnitsContainer", "Units Container")
47 .def(vector_indexing_suite<G4UnitsContainer>())
48 ;
49
50 class_<G4UnitDefinition, boost::noncopyable>
51 ("G4UnitDefinition", "Unit Definition", no_init)
52 .def(init<const G4String&, const G4String&, const G4String&, G4double>())
53 // ---
54 .def("GetName", &G4UnitDefinition::GetName,
55 return_value_policy<return_by_value>())
56 .def("GetSymbol", &G4UnitDefinition::GetSymbol,
57 return_value_policy<return_by_value>())
58 .def("GetValue", &G4UnitDefinition::GetValue)
59 .def("PrintDefinition", &G4UnitDefinition::PrintDefinition)
60 // ---
61 .def("BuildUnitsTable", &G4UnitDefinition::BuildUnitsTable)
62 .staticmethod("BuildUnitsTable")
63 .def("PrintUnitsTable", &G4UnitDefinition::PrintUnitsTable)
64 .staticmethod("PrintUnitsTable")
65 .def("GetUnitsTable", &G4UnitDefinition::GetUnitsTable,
66 return_value_policy<reference_existing_object>())
67 .staticmethod("GetUnitsTable")
68 // ---
69 .def("GetValueOf", &G4UnitDefinition::GetValueOf)
70 .staticmethod("GetValueOf")
71 .def("GetCategory", &G4UnitDefinition::GetCategory)
72 .staticmethod("GetCategory")
73 ;
74
75 class_<G4UnitsCategory, boost::noncopyable>
76 ("G4UnitsCategory", "Units Category", no_init)
77 .def(init<const G4String&>())
78 // ---
79 .def("GetName", &G4UnitsCategory::GetName,
80 return_value_policy<return_by_value>())
81 .def("GetUnitsList", &G4UnitsCategory::GetUnitsList,
82 return_value_policy<reference_existing_object>())
83 .def("GetNameMxLen", &G4UnitsCategory::GetNameMxLen)
84 .def("GetSymbMxLen", &G4UnitsCategory::GetSymbMxLen)
85 .def("UpdateNameMxLen", &G4UnitsCategory::UpdateNameMxLen)
86 .def("UpdateSymbMxLen", &G4UnitsCategory::UpdateSymbMxLen)
87 .def("PrintCategory", &G4UnitsCategory::PrintCategory)
88 ;
89
90 class_<G4BestUnit>("G4BestUnit", "present best unit", no_init)
91 .def(init<G4double, const G4String&>())
92 .def(init<const G4ThreeVector&, const G4String&>())
93 // ---
94 .def("GetCategory", &G4BestUnit::GetCategory,
95 return_value_policy<return_by_value>())
96 .def("GetIndexOfCategory", &G4BestUnit::GetIndexOfCategory)
97 .def(self_ns::str(self))
98 ;
99
100}
const G4String & GetCategory() const
std::size_t GetIndexOfCategory() const
static void BuildUnitsTable()
G4double GetValue() const
static G4double GetValueOf(const G4String &)
static G4String GetCategory(const G4String &)
static void PrintUnitsTable()
const G4String & GetName() const
static G4UnitsTable & GetUnitsTable()
const G4String & GetSymbol() const
const G4String & GetName() const
void UpdateSymbMxLen(G4int len)
G4UnitsContainer & GetUnitsList()
void UpdateNameMxLen(G4int len)
G4int GetNameMxLen() const
G4int GetSymbMxLen() const

References G4UnitDefinition::BuildUnitsTable(), G4BestUnit::GetCategory(), G4UnitDefinition::GetCategory(), G4BestUnit::GetIndexOfCategory(), G4UnitDefinition::GetName(), G4UnitsCategory::GetName(), G4UnitsCategory::GetNameMxLen(), G4UnitsCategory::GetSymbMxLen(), G4UnitDefinition::GetSymbol(), G4UnitsCategory::GetUnitsList(), G4UnitDefinition::GetUnitsTable(), G4UnitDefinition::GetValue(), G4UnitDefinition::GetValueOf(), G4UnitsCategory::PrintCategory(), G4UnitDefinition::PrintDefinition(), G4UnitDefinition::PrintUnitsTable(), G4UnitsCategory::UpdateNameMxLen(), and G4UnitsCategory::UpdateSymbMxLen().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4UserLimits()

void export_G4UserLimits ( )

Definition at line 42 of file pyG4UserLimits.cc.

43{
44 class_<G4UserLimits, G4UserLimits*>
45 ("G4UserLimits", "user step limitations")
46 // ---
47 .def(init<G4double>())
48 .def(init<G4double, G4double>())
49 .def(init<G4double, G4double, G4double>())
50 .def(init<G4double, G4double, G4double, G4double>())
51 .def(init<G4double, G4double, G4double, G4double, G4double>())
52 // ---
53 .def(init<const G4String&>())
54 .def(init<const G4String&, G4double>())
55 .def(init<const G4String&, G4double, G4double>())
56 .def(init<const G4String&, G4double, G4double, G4double>())
57 .def(init<const G4String&, G4double, G4double, G4double, G4double>())
58 .def(init<const G4String&, G4double, G4double, G4double,
60 // ---
61 .def("GetUserMaxTrackLength", &G4UserLimits::GetUserMaxTrackLength)
62 .def("GetUserMaxTime", &G4UserLimits::GetUserMaxTime)
63 .def("GetUserMinEkine", &G4UserLimits::GetUserMinEkine)
64 .def("GetUserMinRange", &G4UserLimits::GetUserMinRange)
65 // ---
66 .def("SetMaxAllowedStep", &G4UserLimits::SetMaxAllowedStep)
67 .def("SetUserMaxTrackLength", &G4UserLimits::SetUserMaxTrackLength)
68 .def("SetUserMaxTime", &G4UserLimits::SetUserMaxTime)
69 .def("SetUserMinEkine", &G4UserLimits::SetUserMinEkine)
70 .def("SetUserMinRange", &G4UserLimits::SetUserMinRange)
71 // ---
72 .def("GetType", &G4UserLimits::GetType,
73 return_internal_reference<>())
74 .def("SetType", &G4UserLimits::SetType)
75 ;
76}
virtual G4double GetUserMinEkine(const G4Track &)
virtual void SetUserMinRange(G4double urangMin)
virtual G4double GetUserMinRange(const G4Track &)
void SetType(const G4String &type)
const G4String & GetType() const
virtual void SetMaxAllowedStep(G4double ustepMax)
virtual void SetUserMinEkine(G4double uekinMin)
virtual void SetUserMaxTime(G4double utimeMax)
virtual G4double GetUserMaxTrackLength(const G4Track &)
virtual G4double GetUserMaxTime(const G4Track &)
virtual void SetUserMaxTrackLength(G4double utrakMax)

References G4UserLimits::GetType(), G4UserLimits::GetUserMaxTime(), G4UserLimits::GetUserMaxTrackLength(), G4UserLimits::GetUserMinEkine(), G4UserLimits::GetUserMinRange(), G4UserLimits::SetMaxAllowedStep(), G4UserLimits::SetType(), G4UserLimits::SetUserMaxTime(), G4UserLimits::SetUserMaxTrackLength(), G4UserLimits::SetUserMinEkine(), and G4UserLimits::SetUserMinRange().

Referenced by BOOST_PYTHON_MODULE().

◆ export_G4Version()

void export_G4Version ( )

Definition at line 39 of file pyG4Version.cc.

40{
41 scope current;
42 current.attr("G4VERSION_NUMBER")= G4VERSION_NUMBER;
43 current.attr("G4Version")= G4Version.c_str();
44 current.attr("G4Date")= G4Date.c_str();
45}
#define G4VERSION_NUMBER
Definition: G4Version.hh:43
static const G4String G4Date
Definition: G4Version.hh:60
static const G4String G4Version
Definition: G4Version.hh:58

References G4Date, G4Version, and G4VERSION_NUMBER.

Referenced by BOOST_PYTHON_MODULE().

◆ export_geomdefs()

void export_geomdefs ( )

Definition at line 39 of file pygeomdefs.cc.

40{
41 enum_<EAxis>("EAxis")
42 .value("kXAxis", kXAxis)
43 .value("kYAxis", kYAxis)
44 .value("kZAxis", kZAxis)
45 .value("kRho", kRho)
46 .value("kRadial3D", kRadial3D)
47 .value("kPhi", kPhi)
48 .value("kUndefined", kUndefined)
49 ;
50
51 enum_<EInside>("EInside")
52 .value("kOutside", kOutside)
53 .value("kSurface", kSurface)
54 .value("kInside", kInside)
55 ;
56
57 enum_<EVolume>("EVolume")
58 .value("kNormal", kNormal)
59 .value("kReplica", kReplica)
60 .value("kParameterised", kParameterised)
61 ;
62}
@ kPhi
Definition: geomdefs.hh:60
@ kYAxis
Definition: geomdefs.hh:56
@ kRadial3D
Definition: geomdefs.hh:59
@ kXAxis
Definition: geomdefs.hh:55
@ kZAxis
Definition: geomdefs.hh:57
@ kUndefined
Definition: geomdefs.hh:61
@ kRho
Definition: geomdefs.hh:58
@ kInside
Definition: geomdefs.hh:70
@ kOutside
Definition: geomdefs.hh:68
@ kSurface
Definition: geomdefs.hh:69
@ kNormal
Definition: geomdefs.hh:84
@ kParameterised
Definition: geomdefs.hh:86
@ kReplica
Definition: geomdefs.hh:85

References kInside, kNormal, kOutside, kParameterised, kPhi, kRadial3D, kReplica, kRho, kSurface, kUndefined, kXAxis, kYAxis, and kZAxis.

Referenced by BOOST_PYTHON_MODULE().

◆ export_globals()

void export_globals ( )

Definition at line 76 of file pyglobals.cc.

77{
78 def("SetG4PyCoutDestination", SetG4PyCoutDestination);
79 def("ResetG4PyCoutDestination", ResetG4PyCoutDestination);
80
81 class_<G4intVector> ("G4intVector", "int vector")
82 .def(vector_indexing_suite<G4intVector>())
83 ;
84
85 class_<G4doubleVector> ("G4doubleVector", "double vector")
86 .def(vector_indexing_suite<G4doubleVector>())
87 ;
88
89 class_<G4StringVector> ("G4StringVector", "string vector")
90 .def(vector_indexing_suite<G4StringVector>())
91 ;
92
93 class_<G4ThreeVectorVector> ("G4ThreeVectorVector", "3-vector vector")
94 .def(vector_indexing_suite<G4ThreeVectorVector>())
95 ;
96
97 class_<G4TwoVectorVector> ("G4StringVector", "2-vector vector")
98 .def(vector_indexing_suite<G4TwoVectorVector>())
99 ;
100
101}
void ResetG4PyCoutDestination()
Definition: pyglobals.cc:57
void SetG4PyCoutDestination()
Definition: pyglobals.cc:49

References pyglobals::ResetG4PyCoutDestination(), and pyglobals::SetG4PyCoutDestination().

Referenced by BOOST_PYTHON_MODULE().

◆ export_RandomEngines()

void export_RandomEngines ( )

Definition at line 44 of file pyRandomEngines.cc.

45{
46 class_<HepRandomEngine, boost::noncopyable>
47 ("HepRandomEngine", "base class of random engine", no_init)
48 ;
49
50 class_<HepJamesRandom, bases<HepRandomEngine> >
51 ("HepJamesRandom", "HepJames random engine")
52 ;
53
54 class_<RanecuEngine, bases<HepRandomEngine> >
55 ("RanecuEngine", "Ranecu random engine")
56 ;
57
58 class_<RanluxEngine, bases<HepRandomEngine> >
59 ("RanluxEngine", "Ranlux random engine")
60 ;
61
62 class_<Ranlux64Engine, bases<HepRandomEngine> >
63 ("Ranlux64Engine", "Ranlux64 random engine")
64 ;
65
66}

Referenced by BOOST_PYTHON_MODULE().

◆ export_Randomize()

void export_Randomize ( )

Definition at line 176 of file pyRandomize.cc.

177{
178 class_<HepRandom>("HepRandom", "generate random number")
179 // ---
180 .def(init<long>())
181 .def(init<HepRandomEngine&>())
182 .def(init<HepRandomEngine*>())
183 // ---
184 .def("setTheSeed", f1_setTheSeed)
185 .def("setTheSeed", f2_setTheSeed)
186 .staticmethod("setTheSeed")
187 .def("getTheSeed", &HepRandom::getTheSeed)
188 .staticmethod("getTheSeed")
189 .def("setTheSeeds", f1_setTheSeeds)
190 .def("setTheSeeds", f2_setTheSeeds)
191 .staticmethod("setTheSeeds")
192 .def("getTheSeeds", f_getTheSeeds)
193 .staticmethod("getTheSeeds")
194 .def("getTheTableSeeds", f_getTheTableSeeds)
195 .staticmethod("getTheTableSeeds")
196 // ---
197 .def("getTheGenerator", &HepRandom::getTheGenerator,
198 return_value_policy<reference_existing_object>())
199 .staticmethod("getTheGenerator")
200 .def("setTheEngine", &HepRandom::setTheEngine)
201 .staticmethod("setTheEngine")
202 .def("getTheEngine", &HepRandom::getTheEngine,
203 return_value_policy<reference_existing_object>())
204 .staticmethod("getTheEngine")
205 .def("saveEngineStatus", f1_saveEngineStatus)
206 .def("saveEngineStatus", f2_saveEngineStatus)
207 .staticmethod("saveEngineStatus")
208 .def("restoreEngineStatus", f1_restoreEngineStatus)
209 .def("restoreEngineStatus", f2_restoreEngineStatus)
210 .staticmethod("restoreEngineStatus")
211 .def("showEngineStatus", &HepRandom::showEngineStatus)
212 .staticmethod("showEngineStatus")
213 .def("createInstance", &HepRandom::createInstance)
214 .staticmethod("createInstance")
215 ;
216
217 // ---
218 class_<RandBit, boost::noncopyable>
219 ("RandBit", "generate bit random number", no_init)
220 .def("shootBit", f1_RandBit_shootBit)
221 .staticmethod("shootBit")
222 ;
223
224 // ---
225 class_<G4RandGauss, boost::noncopyable>
226 ("G4RandGauss", "generate gaussian random number", no_init)
227 .def("shoot", f1_RandGaussQ_shoot)
228 .def("shoot", f2_RandGaussQ_shoot)
229 .staticmethod("shoot")
230 ;
231
232 // ---
233 def("G4UniformRand", f_G4UniformRand);
234
235}
double f2_RandGaussQ_shoot(double mean, double stdDev)
Definition: pyRandomize.cc:157
void f2_setTheSeed(long seed, int lux)
Definition: pyRandomize.cc:50
void f2_setTheSeeds(const list &seedList, int aux)
Definition: pyRandomize.cc:76
list f_getTheTableSeeds(int index)
Definition: pyRandomize.cc:110
void f1_setTheSeeds(const list &seedList)
Definition: pyRandomize.cc:56
void f2_saveEngineStatus(const char *filename)
Definition: pyRandomize.cc:129
list f_getTheSeeds()
Definition: pyRandomize.cc:96
double f1_RandGaussQ_shoot()
Definition: pyRandomize.cc:152
void f1_restoreEngineStatus()
Definition: pyRandomize.cc:135
void f2_restoreEngineStatus(const char *filename)
Definition: pyRandomize.cc:140
int f1_RandBit_shootBit()
Definition: pyRandomize.cc:146
void f1_setTheSeed(long seed)
Definition: pyRandomize.cc:45
void f1_saveEngineStatus()
Definition: pyRandomize.cc:124
double f_G4UniformRand()
Definition: pyRandomize.cc:164

References pyRandomize::f1_RandBit_shootBit(), pyRandomize::f1_RandGaussQ_shoot(), pyRandomize::f1_restoreEngineStatus(), pyRandomize::f1_saveEngineStatus(), pyRandomize::f1_setTheSeed(), pyRandomize::f1_setTheSeeds(), pyRandomize::f2_RandGaussQ_shoot(), pyRandomize::f2_restoreEngineStatus(), pyRandomize::f2_saveEngineStatus(), pyRandomize::f2_setTheSeed(), pyRandomize::f2_setTheSeeds(), pyRandomize::f_G4UniformRand(), pyRandomize::f_getTheSeeds(), and pyRandomize::f_getTheTableSeeds().

Referenced by BOOST_PYTHON_MODULE().