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>
59 template <
typename Stream>
60 void Vector2(Stream&& out, TVector2
const& v)
61 { out <<
"( " << v.X() <<
", " << v.Y() <<
" )"; }
64 template <
typename Stream>
65 void Vector3(Stream&& out, TVector3
const& v)
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<<;
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.
std::vector< float > Vector
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)