LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 60 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().

61 {
81 }
void export_G4Version()
Definition: pyG4Version.cc:40
void export_G4Transform3D()
void export_G4String()
Definition: pyG4String.cc:48
void export_G4TwoVector()
void export_G4RandomDirection()
void export_geomdefs()
Definition: pygeomdefs.cc:40
void export_G4ExceptionSeverity()
void export_globals()
Definition: pyglobals.cc:78
void export_G4StateManager()
void export_G4Timer()
Definition: pyG4Timer.cc:40
void export_RandomEngines()
void export_G4ApplicationState()
void export_G4UserLimits()
void export_G4ThreeVector()
void export_G4Exception()
void export_Randomize()
Definition: pyRandomize.cc:177
void export_G4UnitsTable()
void export_G4RotationMatrix()
void export_G4ExceptionHandler()
void export_G4ApplicationState ( )

Definition at line 42 of file pyG4ApplicationState.cc.

References fhicl::detail::atom::value().

Referenced by BOOST_PYTHON_MODULE().

43 {
44  enum_<G4ApplicationState>("G4ApplicationState")
45  .value("G4State_PreInit", G4State_PreInit)
46  .value("G4State_Init", G4State_Init)
47  .value("G4State_Idle", G4State_Idle)
48  .value("G4State_GeomClosed", G4State_GeomClosed)
49  .value("G4State_EventProc", G4State_EventProc)
50  .value("G4State_Quit", G4State_Quit)
51  .value("G4State_Abort", G4State_Abort)
52  ;
53 }
std::string value(boost::any const &)
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 42 of file pyG4ExceptionSeverity.cc.

References fhicl::detail::atom::value().

Referenced by BOOST_PYTHON_MODULE().

43 {
44  enum_<G4ExceptionSeverity>("G4ExceptionSeverity")
45  .value("FatalException", FatalException)
46  .value("FatalErrorInArgument", FatalErrorInArgument)
47  .value("RunMustBeAborted", RunMustBeAborted)
48  .value("EventMustBeAborted", EventMustBeAborted)
49  .value("JustWarning", JustWarning)
50  ;
51 
52 }
std::string value(boost::any const &)
void export_G4RandomDirection ( )

Definition at line 40 of file pyG4RandomDirection.cc.

Referenced by BOOST_PYTHON_MODULE().

41 {
42  def("G4RandomDirection", G4RandomDirection);
43 }
void export_G4RotationMatrix ( )

Definition at line 54 of file pyG4RotationMatrix.cc.

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

Referenced by BOOST_PYTHON_MODULE().

55 {
56  class_<G4RotationMatrix>("G4RotationMatrix", "rotation matrix")
57  // constructors
58  .def(init<const XXX&>())
59 
60  // property
61  .add_property("xx", &XXX::xx)
62  .add_property("xy", &XXX::xy)
63  .add_property("xz", &XXX::xz)
64  .add_property("yx", &XXX::yx)
65  .add_property("yy", &XXX::yy)
66  .add_property("yz", &XXX::yz)
67  .add_property("zx", &XXX::zx)
68  .add_property("zy", &XXX::zy)
69  .add_property("zz", &XXX::zz)
70  .def_readonly("IDENTITY", &XXX::IDENTITY)
71 
72  // methods
73  .def("colX", &XXX::colX)
74  .def("colY", &XXX::colY)
75  .def("colZ", &XXX::colZ)
76  .def("rowX", &XXX::rowX)
77  .def("rowY", &XXX::rowY)
78  .def("rowZ", &XXX::rowZ)
79  .def("getPhi", &XXX::getPhi)
80  .def("getTheta", &XXX::getTheta)
81  .def("getPsi", &XXX::getPsi)
82  .def("phi", &XXX::phi)
83  .def("theta", &XXX::theta)
84  .def("psi", &XXX::psi)
85  .def("getDelta", &XXX::getDelta)
86  .def("getAxis", &XXX::getAxis)
87  .def("delta", &XXX::axis)
88  .def("axis", &XXX::delta)
89  .def("phiX", &XXX::phiX)
90  .def("phiY", &XXX::phiY)
91  .def("phiZ", &XXX::phiZ)
92  .def("thetaX", &XXX::thetaX)
93  .def("thetaY", &XXX::thetaY)
94  .def("thetaZ", &XXX::thetaZ)
95  .def("setPhi", &XXX::setPhi)
96  .def("setTheta", &XXX::setTheta)
97  .def("setPsi", &XXX::setPsi)
98  .def("setAxis", &XXX::setAxis)
99  .def("setDelta", &XXX::setDelta)
100  .def("isIdentity", &XXX::isIdentity)
101  .def("rotateX", &XXX::rotateX,
102  return_value_policy<reference_existing_object>())
103  .def("rotateY", &XXX::rotateY,
104  return_value_policy<reference_existing_object>())
105  .def("rotateZ", &XXX::rotateZ,
106  return_value_policy<reference_existing_object>())
107  .def("rotate", f1_rotate,
108  return_value_policy<reference_existing_object>())
109  .def("rotate", f2_rotate,
110  return_value_policy<reference_existing_object>())
111  .def("rotateAxes", &XXX::rotateAxes,
112  return_value_policy<reference_existing_object>())
113  .def("inverse", &XXX::inverse)
114  .def("invert", &XXX::invert,
115  return_value_policy<reference_existing_object>())
116 
117  // operators
118  .def(self_ns::str(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 * self)
126  .def(self * G4ThreeVector())
127  .def(self *= self)
128  ;
129 }
Double_t xx
Definition: macro.C:12
XXX &(XXX::* f2_rotate)(G4double, const G4ThreeVector *)
Double_t zz
Definition: plot.C:279
XXX &(XXX::* f1_rotate)(G4double, const G4ThreeVector &)
bool invert(ublas::matrix< T, L, A > &m)
void export_G4StateManager ( )

Definition at line 40 of file pyG4StateManager.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 48 of file pyG4String.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 99 of file pyG4ThreeVector.cc.

References beta, 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(), x, y, and z.

Referenced by BOOST_PYTHON_MODULE().

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

Referenced by BOOST_PYTHON_MODULE().

41 {
42  class_<G4Timer>("G4Timer", "Timer")
43  // ---
44  .def("Start", &G4Timer::Start)
45  .def("Stop", &G4Timer::Stop)
46  .def("IsValid", &G4Timer::IsValid)
47  .def("GetRealElapsed", &G4Timer::GetRealElapsed)
48  .def("GetSystemElapsed", &G4Timer::GetSystemElapsed)
49  .def("GetUserElapsed", &G4Timer::GetUserElapsed)
50  ;
51 }
void export_G4Transform3D ( )

Definition at line 44 of file pyG4Transform3D.cc.

References xx, and zz.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 61 of file pyG4TwoVector.cc.

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

Referenced by BOOST_PYTHON_MODULE().

62 {
63 #if G4VERSION_NUMBER >= 830
64 
65  class_<G4TwoVector>("G4TwoVector", "general 2-vector")
66  // constructors
67  .def(init<G4double>())
68  .def(init<G4double, G4double>())
69  .def(init<const XXX&>())
70 
71  // property
72  .add_property("x", &XXX::x, &XXX::setX)
73  .add_property("y", &XXX::y, &XXX::setY)
74 
75  // methods
76  .def("set", &XXX::set)
77  .def("phi", &XXX::phi)
78  .def("mag", &XXX::mag)
79  .def("mag2", &XXX::mag2)
80  .def("r", &XXX::r)
81  .def("setPhi", &XXX::setPhi)
82  .def("setMag", &XXX::setMag)
83  .def("setR", &XXX::setR)
84  .def("setPolar", &XXX::setPolar)
85  .def("howNear", &XXX::howNear)
86  .def("isNear", &XXX::isNear, f_isNear())
87  .def("howParallel", &XXX::howParallel)
88  .def("isParallel", &XXX::isParallel, f_isParallel())
89  .def("howOrthogonal", &XXX::howOrthogonal)
90  .def("isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
91  .def("unit", &XXX::unit)
92  .def("orthogonal", &XXX::orthogonal)
93  .def("dot", &XXX::dot)
94  .def("angle", &XXX::angle)
95  .def("rotate", &XXX::rotate)
96 
97  // operators
98  .def(self_ns::str(self))
99  .def(self == self)
100  .def(self != self)
101  .def(self += self)
102  .def(self -= self)
103  .def(self - self)
104  .def(self + self)
105  .def(self * self)
106  .def(self * G4double())
107  .def(self / G4double())
108  .def(G4double() * self)
109  .def(self *= G4double())
110  .def(self > self)
111  .def(self < self)
112  .def(self >= self)
113  .def(self <= self)
114  ;
115 #endif
116 
117 }
Float_t x
Definition: compare.C:6
constexpr auto dot(Vector const &a, Vector const &b)
Return cross product of two vectors.
Float_t y
Definition: compare.C:6
auto mag2(Vector const &v)
Return norm of the specified vector.
void export_G4UnitsTable ( )

Definition at line 41 of file pyG4UnitsTable.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 41 of file pyG4UserLimits.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 40 of file pyG4Version.cc.

Referenced by BOOST_PYTHON_MODULE().

41 {
42  scope current;
43  current.attr("G4VERSION_NUMBER")= G4VERSION_NUMBER;
44  current.attr("G4Version")= G4Version.c_str();
45  current.attr("G4Date")= G4Date.c_str();
46 }
void export_geomdefs ( )

Definition at line 40 of file pygeomdefs.cc.

References optdata::kUndefined, and fhicl::detail::atom::value().

Referenced by BOOST_PYTHON_MODULE().

41 {
42  enum_<EAxis>("EAxis")
43  .value("kXAxis", kXAxis)
44  .value("kYAxis", kYAxis)
45  .value("kZAxis", kZAxis)
46  .value("kRho", kRho)
47  .value("kRadial3D", kRadial3D)
48  .value("kPhi", kPhi)
49  .value("kUndefined", kUndefined)
50  ;
51 
52  enum_<EInside>("EInside")
53  .value("kOutside", kOutside)
54  .value("kSurface", kSurface)
55  .value("kInside", kInside)
56  ;
57 
58  enum_<EVolume>("EVolume")
59  .value("kNormal", kNormal)
60  .value("kReplica", kReplica)
61  .value("kParameterised", kParameterised)
62  ;
63 }
std::string value(boost::any const &)
void export_globals ( )

Definition at line 78 of file pyglobals.cc.

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

Referenced by BOOST_PYTHON_MODULE().

79 {
80  def("SetG4PyCoutDestination", SetG4PyCoutDestination);
81  def("ResetG4PyCoutDestination", ResetG4PyCoutDestination);
82 
83  class_<G4intVector> ("G4intVector", "int vector")
85  ;
86 
87  class_<G4doubleVector> ("G4doubleVector", "double vector")
89  ;
90 
91  class_<G4StringVector> ("G4StringVector", "string vector")
93  ;
94 
95  class_<G4ThreeVectorVector> ("G4ThreeVectorVector", "3-vector vector")
97  ;
98 
99 #if G4VERSION_NUMBER >= 830
100  class_<G4TwoVectorVector> ("G4StringVector", "2-vector vector")
102  ;
103 #endif
104 
105 }
void ResetG4PyCoutDestination()
Definition: pyglobals.cc:58
void SetG4PyCoutDestination()
Definition: pyglobals.cc:50
void export_RandomEngines ( )

Definition at line 45 of file pyRandomEngines.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 177 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().

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