33 #include <boost/python.hpp>
37 using namespace boost::python;
38 using namespace CLHEP;
45 namespace pyG4ThreeVector {
95 using namespace pyG4ThreeVector;
102 class_<G4ThreeVector>(
"G4ThreeVector",
"general 3-vector")
104 .def(init<G4double>())
105 .def(init<G4double, G4double>())
106 .def(init<G4double, G4double, G4double>())
107 .def(init<const XXX&>())
110 .add_property(
"x", &
XXX::x, &XXX::setX)
111 .add_property(
"y", &
XXX::y, &XXX::setY)
112 .add_property(
"z", &
XXX::z, &XXX::setZ)
115 .def(
"set", &XXX::set)
116 .def(
"phi", &XXX::phi)
117 .def(
"mag", &XXX::mag)
118 .def(
"mag2", &XXX::mag2)
119 .def(
"setPhi", &XXX::setPhi)
120 .def(
"setTheta", &XXX::setTheta)
121 .def(
"setMag", &XXX::setMag)
122 .def(
"setPerp", &XXX::setPerp)
123 .def(
"setCylTheta", &XXX::setCylTheta)
124 .def(
"howNear", &XXX::howNear)
125 .def(
"deltaR", &XXX::deltaR)
126 .def(
"unit", &XXX::unit)
127 .def(
"orthogonal", &XXX::orthogonal)
128 .def(
"dot", &XXX::dot)
129 .def(
"cross", &XXX::cross)
130 .def(
"pseudoRapidity", &XXX::pseudoRapidity)
131 .def(
"setEta", &XXX::setEta)
132 .def(
"setCylEta",&XXX::setCylEta)
133 .def(
"setRThetaPhi", &XXX::setRThetaPhi)
134 .def(
"setREtaPhi", &XXX::setREtaPhi)
135 .def(
"setRhoPhiZ", &XXX::setRhoPhiZ)
136 .def(
"setRhoPhiEta", &XXX::setRhoPhiEta)
137 .def(
"getX", &XXX::getX)
138 .def(
"getY", &XXX::getY)
139 .def(
"getZ", &XXX::getZ)
140 .def(
"getR", &XXX::getR)
141 .def(
"getTheta", &XXX::getTheta)
142 .def(
"getPhi", &XXX::getPhi)
144 .def(
"rho", &XXX::rho)
145 .def(
"getRho", &XXX::getRho)
146 .def(
"getEta", &XXX::getEta)
147 .def(
"setR", &XXX::setR)
148 .def(
"setRho", &XXX::setRho)
149 .def(
"compare", &XXX::compare)
150 .def(
"diff2", &XXX::diff2)
151 .def(
"setTolerance", &XXX::setTolerance)
152 .staticmethod(
"setTolerance")
153 .def(
"getTolerance", &XXX::getTolerance)
154 .staticmethod(
"getTolerance")
155 .def(
"isNear", &XXX::isNear, f_isNear())
156 .def(
"isParallel", &XXX::isParallel, f_isParallel())
157 .def(
"isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
158 .def(
"howParallel", &XXX::howParallel)
159 .def(
"howOrthogonal", &XXX::howOrthogonal)
160 .def(
"beta", &XXX::beta)
161 .def(
"gamma", &XXX::gamma)
162 .def(
"deltaPhi", &XXX::deltaPhi)
163 .def(
"coLinearRapidity", &XXX::coLinearRapidity)
186 .def(
"rotateX", &XXX::rotateX,
187 return_value_policy<reference_existing_object>())
188 .def(
"rotateY", &XXX::rotateY,
189 return_value_policy<reference_existing_object>())
190 .def(
"rotateZ", &XXX::rotateZ,
191 return_value_policy<reference_existing_object>())
192 .def(
"rotateUz", &XXX::rotateUz,
193 return_value_policy<reference_existing_object>())
194 .def(
"transform",&XXX::transform,
195 return_value_policy<reference_existing_object>())
197 return_value_policy<reference_existing_object>())
199 return_value_policy<reference_existing_object>())
201 return_value_policy<reference_existing_object>())
204 .def(self_ns::str(
self))