1 #ifndef TrackPropagation_ConvertFromToCLHEP_h 2 #define TrackPropagation_ConvertFromToCLHEP_h 5 #include "CLHEP/Geometry/Point3D.h" 6 #include "CLHEP/Geometry/Normal3D.h" 7 #include "CLHEP/Vector/ThreeVector.h" 8 #include "CLHEP/Vector/Rotation.h" 9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 18 #include "G4ErrorFreeTrajState.hh" 33 return HepGeom::Point3D<double>(r.
x() * cm, r.
y() * cm, r.
z() * cm);
42 return GlobalPoint(r.x() / cm, r.y() / cm, r.z() / cm);
59 return HepGeom::Normal3D<double>(p.
x(), p.
y(), p.
z());
66 const HepGeom::Normal3D<double> &
p)
75 return CLHEP::Hep3Vector(p.
x(), p.
y(), p.
z());
91 return CLHEP::Hep3Vector(r.
x() * cm, r.
y() * cm, r.
z() * cm);
100 return GlobalPoint(v.x() / cm, v.y() / cm, v.z() / cm);
107 return CLHEP::HepRotation(CLHEP::Hep3Vector(tkr.
xx(), tkr.
yx(), tkr.
zx()),
108 CLHEP::Hep3Vector(tkr.
xy(), tkr.
yy(), tkr.
zy()),
109 CLHEP::Hep3Vector(tkr.
xz(), tkr.
yz(), tkr.
zz()));
117 r.zx(), r.zy(), r.zz());
125 const G4ErrorTrajErr&
e,
const int q)
131 for (
unsigned int i = 0;
i < 5;
i++)
132 for (
unsigned int j = 0; j < 5; j++)
134 m55(
i, j) =
e(
i + 1, j + 1);
136 m55(
i, j) = double(q) * m55(
i, j);
138 m55(
i, j) = double(q) * m55(
i, j);
150 G4ErrorTrajErr g4err(5, 1);
151 for (
unsigned int i = 0;
i < 5;
i++)
152 for (
unsigned int j = 0; j < 5; j++)
154 g4err(
i + 1, j + 1) =
e(
i, j);
157 g4err(
i + 1, j + 1) = g4err(
i + 1, j + 1) * double(q);
159 g4err(
i + 1, j + 1) = g4err(
i + 1, j + 1) * double(q);
HepGeom::Normal3D< double > globalVectorToHepNormal3D(const GlobalVector &p)
TkRotation< float > hepRotationToTkRotationF(const CLHEP::HepRotation &r)
double g4doubleToCmsDouble(const G4double &d)
Global3DPoint GlobalPoint
GlobalVector hepNormal3DToGlobalVector(const HepGeom::Normal3D< double > &p)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
CLHEP::Hep3Vector globalVectorToHep3Vector(const GlobalVector &p)
CLHEP::HepRotation tkRotationFToHepRotation(const TkRotation< float > &tkr)
AlgebraicSymMatrix55 g4ErrorTrajErrToAlgebraicSymMatrix55(const G4ErrorTrajErr &e, const int q)
GlobalPoint hepPoint3DToGlobalPoint(const HepGeom::Point3D< double > &r)
HepGeom::Point3D< double > globalPointToHepPoint3D(const GlobalPoint &r)
GlobalVector hep3VectorToGlobalVector(const CLHEP::Hep3Vector &p)
G4ErrorTrajErr algebraicSymMatrix55ToG4ErrorTrajErr(const AlgebraicSymMatrix55 &e, const int q)
CLHEP::Hep3Vector globalPointToHep3Vector(const GlobalPoint &r)
GlobalPoint hep3VectorToGlobalPoint(const CLHEP::Hep3Vector &v)
Global3DVector GlobalVector