Hi,
Is there a reason why ROOT::Math::XYZVector
doesn’t have a constructor such as:
XYZVector(const double* arr)
?
TVector3
has it.
DD4hep Vector3D
has it.
And If I am not mistaken CLHEP Geom library also should have it.
Sure one can always do:
XYZVector(arr[0], arr[1], arr[2])
, but it way more uglier if it happens all over the code.
or in my particular case I am forced to do one of the following:
const double* arr = hit->getPosition();
XYZVector vec = XYZVector(arr[0], arr[1], arr[2])
or
XYZVector vec = XYZVector(hit->getPosition()[0], hit->getPosition()[1], hit->getPosition()[2])
which makes code even more uglier or creates a lot of temporary variables that are needed just to pass the array to the XYZVector.
cheers,
Bohdan