I am trying to access the matrix elements of a G4RotationMatrix.
The G4RotationMatrix is typedef'd to HepRotation as follows
typedef CLHEP::HepRotation G4RotationMatrix
One of the functions of HepRotation is defined as
double HepRotation::operator() (int i, int j) const {
if (i == 0) {
if (j == 0) { return xx(); }
if (j == 1) { return xy(); }
if (j == 2) { return xz(); }
} else if (i == 1) {
if (j == 0) { return yx(); }
if (j == 1) { return yy(); }
if (j == 2) { return yz(); }
} else if (i == 2) {
if (j == 0) { return zx(); }
if (j == 1) { return zy(); }
if (j == 2) { return zz(); }
}
std::cerr << "HepRotation subscripting: bad indices "
<< "(" << i << "," << j << ")" << std::endl;
return 0.0;
Assuming it has been correctly defined to boost how and what do I code in Python to access the elements of the matrix which in my case is called rot ?