8 #include "Math/GenVector/Rotation3D.h" 9 #include "Math/GenVector/AxisAngle.h" 10 #include "Math/SMatrix.h" 26 using Point_t = ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<Coord_t>, ROOT::Math::GlobalCoordinateSystemTag>;
29 using Vector_t = ROOT::Math::DisplacementVector3D <ROOT::Math::Cartesian3D<Coord_t>, ROOT::Math::GlobalCoordinateSystemTag>;
42 template <
typename To,
typename From> std::vector<To>
convertVec(std::vector<From>
const& in) {
44 out.reserve(in.size());
45 for (
auto& i : in) out.push_back(To(i));
49 std::vector<TVector3> out;
50 out.reserve(in.size());
51 for (
auto& i : in) out.push_back(TVector3(i.X(),i.Y(),i.Z()));
55 template <
typename Po
int> std::vector<Point_t>
convertCollToPoint (std::vector<Point>
const& coll)
56 {
return geo::vect::convertCollTo<Point_t>(coll); }
58 template <
typename Vector> std::vector<Vector_t>
convertCollToVector (std::vector<Vector>
const& coll)
59 {
return geo::vect::convertCollTo<Vector_t>(coll); }
73 : position(pos), momentum(mom) {}
77 {
return momentum.Unit(); }
83 using SMatrixSym22 = ROOT::Math::SMatrix<Double32_t,2,2,ROOT::Math::MatRepSym<Double32_t,2> >;
84 using SMatrixSym33 = ROOT::Math::SMatrix<Double32_t,3,3,ROOT::Math::MatRepSym<Double32_t,3> >;
85 using SMatrixSym55 = ROOT::Math::SMatrix<Double32_t,5,5,ROOT::Math::MatRepSym<Double32_t,5> >;
86 using SMatrixSym66 = ROOT::Math::SMatrix<Double32_t,6,6,ROOT::Math::MatRepSym<Double32_t,6> >;
87 using SMatrix65 = ROOT::Math::SMatrix<Double32_t,6,5>;
88 using SMatrix56 = ROOT::Math::SMatrix<Double32_t,5,6>;
89 using SMatrix55 = ROOT::Math::SMatrix<Double32_t,5,5>;
90 using SMatrix66 = ROOT::Math::SMatrix<Double32_t,6,6>;
91 using SVector6 = ROOT::Math::SVector<Double32_t,6>;
92 using SVector5 = ROOT::Math::SVector<Double32_t,5>;
93 using SVector3 = ROOT::Math::SVector<Double32_t,3>;
94 using SVector2 = ROOT::Math::SVector<Double32_t,2>;
Utilities to extend the interface of geometry vectors.
A point in the trajectory, with position and momentum.
ROOT::Math::SMatrix< Double32_t, 5, 5 > SMatrix55
Reconstruction base classes.
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
std::vector< Vector_t > convertCollToVector(std::vector< Vector > const &coll)
TrajectoryPoint_t(Point_t pos, Vector_t mom)
Constructor: assigns position and momentum.
Point_t toPoint(Point const &p)
ROOT::Math::SMatrix< Double32_t, 6, 6 > SMatrix66
ROOT::Math::SMatrix< Double32_t, 3, 3, ROOT::Math::MatRepSym< Double32_t, 3 > > SMatrixSym33
ROOT::Math::SVector< Double32_t, 3 > SVector3
ROOT::Math::SMatrix< Double32_t, 5, 6 > SMatrix56
ROOT::Math::SVector< Double32_t, 5 > SVector5
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
ROOT::Math::SVector< Double32_t, 2 > SVector2
Vector_t momentum
momentum at the trajectory [GeV/c].
std::vector< Vector_t > Momenta_t
Type of momentum list.
std::vector< Point_t > convertCollToPoint(std::vector< Point > const &coll)
std::vector< To > convertVec(std::vector< From > const &in)
std::vector< TVector3 > convertVecPointToTVec3(std::vector< From > const &in)
TrajectoryPoint_t()=default
Default constructor: sets at origin with no momentum.
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
Vector_t direction() const
Returns the direction of the trajectory (unit vector of the momentum).
ROOT::Math::SMatrix< Double32_t, 6, 6, ROOT::Math::MatRepSym< Double32_t, 6 > > SMatrixSym66
std::vector< Point_t > Positions_t
Type of trajectory point list.
ROOT::Math::SMatrix< Double32_t, 2, 2, ROOT::Math::MatRepSym< Double32_t, 2 > > SMatrixSym22
ROOT::Math::SVector< Double32_t, 6 > SVector6
Vector_t toVector(Vector const &p)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
ROOT::Math::SMatrix< Double32_t, 6, 5 > SMatrix65
Point_t position
position in the trajectory [cm].