LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pymodG4global.cc File Reference
#include <boost/python.hpp>

Go to the source code of this file.

Functions

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

Function Documentation

BOOST_PYTHON_MODULE ( G4global  )

Definition at line 59 of file pymodG4global.cc.

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().

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

Definition at line 41 of file pyG4ApplicationState.cc.

References value.

Referenced by BOOST_PYTHON_MODULE().

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 }
double value
Definition: spectrum.C:18
void export_G4Exception ( )

Definition at line 110 of file pyG4Exception.cc.

References pyG4Exception::f2_G4Exception().

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 104 of file pyG4ExceptionHandler.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 41 of file pyG4ExceptionSeverity.cc.

References value.

Referenced by BOOST_PYTHON_MODULE().

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 }
double value
Definition: spectrum.C:18
void export_G4RandomDirection ( )

Definition at line 51 of file pyG4RandomDirection.cc.

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

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 53 of file pyG4RotationMatrix.cc.

References pyG4RotationMatrix::f1_rotate, pyG4RotationMatrix::f2_rotate, trkf::invert(), xx, and zz.

Referenced by BOOST_PYTHON_MODULE().

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 }
Double_t xx
Definition: macro.C:12
XXX &(XXX::* f2_rotate)(G4double, const G4ThreeVector *)
Double_t zz
Definition: plot.C:276
XXX &(XXX::* f1_rotate)(G4double, const G4ThreeVector &)
bool invert(ublas::matrix< T, L, A > &m)
void export_G4StateManager ( )

Definition at line 39 of file pyG4StateManager.cc.

Referenced by BOOST_PYTHON_MODULE().

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 }
void export_G4String ( )

Definition at line 47 of file pyG4String.cc.

Referenced by BOOST_PYTHON_MODULE().

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 }
void export_G4ThreeVector ( )

Definition at line 98 of file pyG4ThreeVector.cc.

References geo::vect::cross(), geo::vect::dot(), 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, geo::vect::mag2(), r, x, y, and z.

Referenced by BOOST_PYTHON_MODULE().

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 }
Float_t x
Definition: compare.C:6
TRandom r
Definition: spectrum.C:23
G4double(XXX::* f2_polarAngle)(const XXX &, const XXX &) const
G4double(XXX::* f2_perp2)(const XXX &) const
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:276
G4double(XXX::* f2_cos2Theta)(const XXX &) const
XXX(XXX::* f2_perpPart)(const XXX &) const
G4double(XXX::* f2_theta)(const XXX &) const
G4double(XXX::* f2_azimAngle)(const XXX &, const XXX &) const
XXX &(XXX::* f2_rotate)(const XXX &, G4double)
G4double(XXX::* f1_cosTheta)() const
G4double(XXX::* f2_eta)(const XXX &) const
XXX(XXX::* f1_perpPart)() const
XXX(XXX::* f2_project)(const XXX &) const
G4double(XXX::* f2_rapidity)(const XXX &) const
constexpr auto dot(Vector const &a, OtherVector const &b)
Return cross product of two vectors.
XXX(XXX::* f1_project)() const
XXX &(XXX::* f1_rotate)(G4double, const XXX &)
auto mag2(Vector const &v)
Return norm of the specified vector.
G4double(XXX::* f1_cos2Theta)() const
G4double(XXX::* f1_angle)() const
G4double(XXX::* f1_polarAngle)(const XXX &) const
G4double(XXX::* f1_azimAngle)(const XXX &) const
G4double(XXX::* f1_rapidity)() const
XXX &(XXX::* f5_rotate)(G4double, G4double, G4double)
G4double(XXX::* f2_angle)(const XXX &) const
G4double(XXX::* f1_eta)() const
G4double(XXX::* f1_perp2)() const
G4double(XXX::* f1_theta)() const
Vector cross(Vector const &a, Vector const &b)
Return cross product of two vectors.
G4double(XXX::* f2_cosTheta)(const XXX &) const
void export_G4Timer ( )

Definition at line 39 of file pyG4Timer.cc.

Referenced by BOOST_PYTHON_MODULE().

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 export_G4Transform3D ( )

Definition at line 43 of file pyG4Transform3D.cc.

References xx, and zz.

Referenced by BOOST_PYTHON_MODULE().

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 }
Double_t xx
Definition: macro.C:12
Double_t zz
Definition: plot.C:276
void export_G4TwoVector ( )

Definition at line 56 of file pyG4TwoVector.cc.

References geo::vect::dot(), geo::vect::mag2(), r, x, and y.

Referenced by BOOST_PYTHON_MODULE().

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 }
Float_t x
Definition: compare.C:6
TRandom r
Definition: spectrum.C:23
Float_t y
Definition: compare.C:6
constexpr auto dot(Vector const &a, OtherVector const &b)
Return cross product of two vectors.
auto mag2(Vector const &v)
Return norm of the specified vector.
void export_G4UnitsTable ( )

Definition at line 40 of file pyG4UnitsTable.cc.

Referenced by BOOST_PYTHON_MODULE().

41 {
42  class_<G4UnitsTable>("G4UnitsTable", "Units Table")
44  ;
45 
46  class_<G4UnitsContainer>("G4UnitsContainer", "Units Container")
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 }
void export_G4UserLimits ( )

Definition at line 40 of file pyG4UserLimits.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 39 of file pyG4Version.cc.

Referenced by BOOST_PYTHON_MODULE().

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 }
void export_geomdefs ( )

Definition at line 39 of file pygeomdefs.cc.

References tca::kNormal, optdata::kUndefined, and value.

Referenced by BOOST_PYTHON_MODULE().

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 }
double value
Definition: spectrum.C:18
void export_globals ( )

Definition at line 76 of file pyglobals.cc.

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

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 44 of file pyRandomEngines.cc.

Referenced by BOOST_PYTHON_MODULE().

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 }
void export_Randomize ( )

Definition at line 176 of file pyRandomize.cc.

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().

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 }
void f1_setTheSeed(long seed)
Definition: pyRandomize.cc:45
void f1_setTheSeeds(const list &seedList)
Definition: pyRandomize.cc:56
void f1_saveEngineStatus()
Definition: pyRandomize.cc:124
list f_getTheSeeds()
Definition: pyRandomize.cc:96
void f2_setTheSeed(long seed, int lux)
Definition: pyRandomize.cc:50
list f_getTheTableSeeds(int index)
Definition: pyRandomize.cc:110
double f1_RandGaussQ_shoot()
Definition: pyRandomize.cc:152
void f2_saveEngineStatus(const char *filename)
Definition: pyRandomize.cc:129
void f1_restoreEngineStatus()
Definition: pyRandomize.cc:135
int f1_RandBit_shootBit()
Definition: pyRandomize.cc:146
void f2_restoreEngineStatus(const char *filename)
Definition: pyRandomize.cc:140
double f_G4UniformRand()
Definition: pyRandomize.cc:164
double f2_RandGaussQ_shoot(double mean, double stdDev)
Definition: pyRandomize.cc:157
void f2_setTheSeeds(const list &seedList, int aux)
Definition: pyRandomize.cc:76