12 #include <Math/Vector3D.h>
24 static constexpr
auto XYZToTVector = [](
const ROOT::Math::XYZVector& a)
26 return TVector3(a.X(), a.Y(), a.Z());
29 namespace VectorUtil {
38 inline void setMagThetaPhi(ROOT::Math::XYZVector& vector,
39 double mag,
double theta,
double phi)
41 const double amag = std::abs(mag);
42 const double sinTheta = std::sin(theta);
43 const double x = amag * sinTheta * std::cos(phi);
44 const double y = amag * sinTheta * std::sin(phi);
45 const double z = amag * std::cos(theta);
46 vector.SetXYZ(x, y, z);
static constexpr auto XYZToTVector
Helper function to convert XYZVector to TVector3.
Abstract base class for different kinds of events.