18 #ifndef LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_TVECTOR_H 19 #define LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_TVECTOR_H 25 #include "TLorentzVector.h" 41 template <
typename Vector>
44 return convertTo<TVector3>(v);
61 template <
typename Stream>
62 void Vector2(Stream&& out, TVector2
const& v)
64 out <<
"( " << v.X() <<
", " << v.Y() <<
" )";
68 template <
typename Stream>
69 void Vector3(Stream&& out, TVector3
const& v)
71 out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
" )";
75 template <
typename Stream>
78 out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
"; " << v.T() <<
" )";
82 inline std::ostream&
operator<<(std::ostream& out, TVector2
const& v)
89 inline std::ostream&
operator<<(std::ostream& out, TVector3
const& v)
96 inline std::ostream&
operator<<(std::ostream& out, TLorentzVector
const& v)
113 using geo::vect::dump::operator<<;
142 inline decltype(
auto)
begin(TVector2 const& v)
147 inline decltype(
auto)
cbegin(TVector2 const& v)
152 inline decltype(
auto)
end(TVector2 const& v)
157 inline decltype(
auto)
cend(TVector2 const& v)
165 inline decltype(
auto)
begin(TVector3 const& v)
170 inline decltype(
auto)
cbegin(TVector3 const& v)
175 inline decltype(
auto)
end(TVector3 const& v)
180 inline decltype(
auto)
cend(TVector3 const& v)
188 inline decltype(
auto)
begin(TLorentzVector const& v)
193 inline decltype(
auto)
cbegin(TLorentzVector const& v)
198 inline decltype(
auto)
end(TLorentzVector const& v)
203 inline decltype(
auto)
cend(TLorentzVector const& v)
214 #endif // LARCOREOBJ_SIMPLETYPESANDCONSTANTS_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.
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)