69 if (transform == G4Transform3D::Identity)
72 G4ThreeVector originalPos = G4ThreeVector(x,y,z);
73 G4ThreeVector newPos = transform * (HepGeom::Point3D<G4double>)originalPos;
74 G4ThreeVector originalMom = G4ThreeVector(xp,yp,zp);
75 G4ThreeVector newMom = transform * (HepGeom::Vector3D<G4double>)originalMom;
77 newMom.x(), newMom.y(), newMom.z(),
A set of particle coordinates.
virtual void Print(std::ostream &out) const
Actual print out method so it can be called from a derived class.
void AddOffset(const G4ThreeVector &offset, G4double offsetT=0)
Apply an offset to the spatial and T coordinates only - assignment.
BDSParticleCoords ApplyTransform(const G4Transform3D &transform) const
Apply a transform to the coordinates and return a copy of them transformed.
BDSParticleCoords ApplyOffset(const G4ThreeVector &offset) const
Apply an offset to the spatial coordinates only and return a copy.