33 #include <boost/python.hpp>
36 #if G4VERSION_NUMBER >= 830
39 using namespace boost::python;
40 using namespace CLHEP;
47 namespace pyG4TwoVector {
55 using namespace pyG4TwoVector;
64 #if G4VERSION_NUMBER >= 830
66 class_<G4TwoVector>(
"G4TwoVector",
"general 2-vector")
68 .def(init<G4double>())
69 .def(init<G4double, G4double>())
70 .def(init<const XXX&>())
73 .add_property(
"x", &
XXX::x, &XXX::setX)
74 .add_property(
"y", &
XXX::y, &XXX::setY)
77 .def(
"set", &XXX::set)
78 .def(
"phi", &XXX::phi)
79 .def(
"mag", &XXX::mag)
80 .def(
"mag2", &XXX::mag2)
82 .def(
"setPhi", &XXX::setPhi)
83 .def(
"setMag", &XXX::setMag)
84 .def(
"setR", &XXX::setR)
85 .def(
"setPolar", &XXX::setPolar)
86 .def(
"howNear", &XXX::howNear)
87 .def(
"isNear", &XXX::isNear, f_isNear())
88 .def(
"howParallel", &XXX::howParallel)
89 .def(
"isParallel", &XXX::isParallel, f_isParallel())
90 .def(
"howOrthogonal", &XXX::howOrthogonal)
91 .def(
"isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
92 .def(
"unit", &XXX::unit)
93 .def(
"orthogonal", &XXX::orthogonal)
94 .def(
"dot", &XXX::dot)
95 .def(
"angle", &XXX::angle)
99 .def(self_ns::str(
self))