Hello,

This might be an elementary question but I have a `G4ThreeVector PositionOfBall`

How can I read x,y,z co-ordinates of `PositionOfBall`

?

I tried `PositionOfBall.GetX()`

and `PositionOfBall.X()`

but neither of them worked.

Hello,

This might be an elementary question but I have a `G4ThreeVector PositionOfBall`

How can I read x,y,z co-ordinates of `PositionOfBall`

?

I tried `PositionOfBall.GetX()`

and `PositionOfBall.X()`

but neither of them worked.

`G4ThreeVector`

is an alias to `Hep3Vector`

from CLHEP, please see CLHEP/Vector/ThreeVector.h:

```
inline double operator () (int) const;
// Get components by index -- 0-based (Geant4)
inline double operator [] (int) const;
// Get components by index -- 0-based (Geant4)
inline double & operator () (int);
// Set components by index. 0-based.
inline double & operator [] (int);
// Set components by index. 0-based.
inline double x() const;
inline double y() const;
inline double z() const;
// The components in cartesian coordinate system. Same as getX() etc.
inline void setX(double);
inline void setY(double);
inline void setZ(double);
// Set the components in cartesian coordinate system.
inline void set( double x, double y, double z);
// Set all three components in cartesian coordinate system.
```