18 #ifndef LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_TVECTOR_H
19 #define LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_TVECTOR_H
27 #include "TLorentzVector.h"
42 template <
typename Vector>
43 TVector3
toTVector3(Vector
const& v) {
return convertTo<TVector3>(v); }
59 template <
typename Stream>
61 { out <<
"( " << v.X() <<
", " << v.Y() <<
" )"; }
64 template <
typename Stream>
66 { out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
" )"; }
69 template <
typename Stream>
72 <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
"; " << v.T()
77 inline std::ostream&
operator<< (std::ostream& out, TVector2
const& v)
78 {
Vector2(out, v);
return out; }
81 inline std::ostream&
operator<< (std::ostream& out, TVector3
const& v)
82 {
Vector3(out, v);
return out; }
85 inline std::ostream&
operator<<
86 (std::ostream& out, TLorentzVector
const& v)
102 using geo::vect::dump::operator<<;
108 namespace geo::vect {
175 #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.
auto cbegin(FixedBins< T, C > const &) noexcept
auto cend(FixedBins< T, C > const &) noexcept
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
auto end(FixedBins< T, C > const &) noexcept
Utilities to extend the interface of geometry vectors.
void LorentzVector(Stream &&out, TLorentzVector const &v)
Print a TLorentzVector to an output stream.
auto begin(FixedBins< T, C > const &) noexcept
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)