16 #ifndef LARCOREALG_GEOMETRY_GEO_VECTORS_UTILS_TVECTOR_H 17 #define LARCOREALG_GEOMETRY_GEO_VECTORS_UTILS_TVECTOR_H 23 #include "TLorentzVector.h" 39 template <
typename Vector>
42 return convertTo<TVector3>(v);
59 template <
typename Stream>
60 void Vector2(Stream&& out, TVector2
const& v)
62 out <<
"( " << v.X() <<
", " << v.Y() <<
" )";
66 template <
typename Stream>
67 void Vector3(Stream&& out, TVector3
const& v)
69 out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
" )";
73 template <
typename Stream>
76 out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
"; " << v.T() <<
" )";
80 inline std::ostream&
operator<<(std::ostream& out, TVector2
const& v)
87 inline std::ostream&
operator<<(std::ostream& out, TVector3
const& v)
94 inline std::ostream&
operator<<(std::ostream& out, TLorentzVector
const& v)
111 using geo::vect::dump::operator<<;
140 inline decltype(
auto)
begin(TVector2 const& v)
145 inline decltype(
auto)
cbegin(TVector2 const& v)
150 inline decltype(
auto)
end(TVector2 const& v)
155 inline decltype(
auto)
cend(TVector2 const& v)
163 inline decltype(
auto)
begin(TVector3 const& v)
168 inline decltype(
auto)
cbegin(TVector3 const& v)
173 inline decltype(
auto)
end(TVector3 const& v)
178 inline decltype(
auto)
cend(TVector3 const& v)
186 inline decltype(
auto)
begin(TLorentzVector const& v)
191 inline decltype(
auto)
cbegin(TLorentzVector const& v)
196 inline decltype(
auto)
end(TLorentzVector const& v)
201 inline decltype(
auto)
cend(TLorentzVector const& v)
212 #endif // LARCOREALG_GEOMETRY_GEO_VECTORS_UTILS_TVECTOR_H std::ostream & operator<<(std::ostream &out, TVector2 const &v)
Print a TVector2 to an output stream.
void Vector2(Stream &&out, TVector2 const &v)
Print a TVector2 to an output stream.
void Vector3(Stream &&out, TVector3 const &v)
Print a TVector3 to an output stream.
decltype(auto) begin(TVector2 const &v)
decltype(auto) cbegin(TVector2 const &v)
Utilities to manipulate geometry vectors.The utilities include generic vector interface facilities al...
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
Utilities to extend the interface of geometry vectors.This library provides facilities that can be us...
void LorentzVector(Stream &&out, TLorentzVector const &v)
Print a TLorentzVector to an output stream.
decltype(auto) cend(TVector2 const &v)
decltype(auto) end(TVector2 const &v)
Collection of utilities for dumping data on screen.
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
TVector3 toTVector3(Vector const &v)
Converts a vector into a TVector3.
auto mag2< TVector2 >(TVector2 const &v)