18 #ifndef GARSOFT_UTILITIES_GEO_VECTORS_UTILS_TVECTOR_H 19 #define GARSOFT_UTILITIES_GEO_VECTORS_UTILS_TVECTOR_H 26 #include "TLorentzVector.h" 42 template <
typename Vector>
57 template <
typename Stream>
58 void Vector2(Stream&& out, TVector2
const& v)
59 { out <<
"( " << v.X() <<
", " << v.Y() <<
" )"; }
62 template <
typename Stream>
63 void Vector3(Stream&& out, TVector3
const& v)
64 { out <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
" )"; }
67 template <
typename Stream>
70 <<
"( " << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
"; " << v.T()
75 inline std::ostream&
operator<< (std::ostream& out, TVector2
const& v)
76 {
Vector2(out, v);
return out; }
79 inline std::ostream&
operator<< (std::ostream& out, TVector3
const& v)
80 {
Vector3(out, v);
return out; }
83 inline std::ostream&
operator<<
84 (std::ostream& out, TLorentzVector
const& v)
103 using geo::vect::dump::operator<<;
124 #endif // GARSOFT_UTILITIES_GEO_VECTORS_UTILS_TVECTOR_H
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::ostream & operator<<(std::ostream &out, TVector2 const &v)
Print a TVector2 to an output stream.
Utilities to extend the interface of geometry vectors.
void LorentzVector(Stream &&out, TLorentzVector const &v)
Print a TLorentzVector to an output stream.
Collection of utilities for dumping data on screen.
TVector3 toTVector3(Vector const &v)
Converts a vector into a TVector3.
LArSoft geometry interface.
auto mag2< TVector2 >(TVector2 const &v)