LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
geo_vectors_utils_TVector.h File Reference

Specializations of geo_vectors_utils.h for ROOT old vector types. More...

#include "larcorealg/Geometry/geo_vectors_utils.h"
#include "TLorentzVector.h"
#include "TVector2.h"
#include "TVector3.h"
#include <ostream>

Go to the source code of this file.

Namespaces

 geo::vect
 Utilities to manipulate geometry vectors.The utilities include generic vector interface facilities allowing to use different vector types via templates.
 
 geo::vect::dump
 Utilities to print vector types.
 

Functions

template<>
auto geo::vect::mag2< TVector2 > (TVector2 const &v)
 
TVector3 conversions
template<typename Vector >
TVector3 geo::vect::toTVector3 (Vector const &v)
 Converts a vector into a TVector3. More...
 
Output of old-style ROOT vectors (TVector3 etc.)
template<typename Stream >
void geo::vect::dump::Vector2 (Stream &&out, TVector2 const &v)
 Print a TVector2 to an output stream. More...
 
template<typename Stream >
void geo::vect::dump::Vector3 (Stream &&out, TVector3 const &v)
 Print a TVector3 to an output stream. More...
 
template<typename Stream >
void geo::vect::dump::LorentzVector (Stream &&out, TLorentzVector const &v)
 Print a TLorentzVector to an output stream. More...
 
std::ostream & geo::vect::dump::operator<< (std::ostream &out, TVector2 const &v)
 Print a TVector2 to an output stream. More...
 
std::ostream & geo::vect::dump::operator<< (std::ostream &out, TVector3 const &v)
 Print a TVector3 to an output stream. More...
 
std::ostream & geo::vect::dump::operator<< (std::ostream &out, TLorentzVector const &v)
 Print a TLorentzVector to an output stream. More...
 
Overloads of STL C++ functions for ROOT vectors
decltype(auto) begin (TVector2 const &v)
 
decltype(auto) cbegin (TVector2 const &v)
 
decltype(auto) end (TVector2 const &v)
 
decltype(auto) cend (TVector2 const &v)
 
decltype(auto) begin (TVector3 const &v)
 
decltype(auto) cbegin (TVector3 const &v)
 
decltype(auto) end (TVector3 const &v)
 
decltype(auto) cend (TVector3 const &v)
 
decltype(auto) begin (TLorentzVector const &v)
 
decltype(auto) cbegin (TLorentzVector const &v)
 
decltype(auto) end (TLorentzVector const &v)
 
decltype(auto) cend (TLorentzVector const &v)
 

Detailed Description

Specializations of geo_vectors_utils.h for ROOT old vector types.

See also
larcorealg/Geometry/geo_vectors_utils.h

This library provides facilities that can be used for both LArSoft geometry vectors (geo_vectors.h) and ROOT TVector3 and related, with the same interface.

This library depends on ROOT GenVector. In the CET link list in CMakeLists.txt, link to ${ROOT_GENVECTOR}.

Definition in file geo_vectors_utils_TVector.h.

Function Documentation

decltype(auto) begin ( TVector2 const &  v)
inline

Definition at line 140 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

141 {
142  return geo::vect::vector_cbegin(v);
143 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) begin ( TVector3 const &  v)
inline

Definition at line 163 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

164 {
165  return geo::vect::vector_cbegin(v);
166 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) begin ( TLorentzVector const &  v)
inline

Definition at line 186 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

187 {
188  return geo::vect::vector_cbegin(v);
189 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) cbegin ( TVector2 const &  v)
inline

Definition at line 145 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

146 {
147  return geo::vect::vector_cbegin(v);
148 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) cbegin ( TVector3 const &  v)
inline

Definition at line 168 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

169 {
170  return geo::vect::vector_cbegin(v);
171 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) cbegin ( TLorentzVector const &  v)
inline

Definition at line 191 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

192 {
193  return geo::vect::vector_cbegin(v);
194 }
auto vector_cbegin(Vector const &v)
Returns a const-iterator pointing to the first coordinate of v.
decltype(auto) cend ( TVector2 const &  v)
inline

Definition at line 155 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

156 {
157  return geo::vect::vector_cend(v);
158 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
decltype(auto) cend ( TVector3 const &  v)
inline

Definition at line 178 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

179 {
180  return geo::vect::vector_cend(v);
181 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
decltype(auto) cend ( TLorentzVector const &  v)
inline

Definition at line 201 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

202 {
203  return geo::vect::vector_cend(v);
204 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
decltype(auto) end ( TVector2 const &  v)
inline

Definition at line 150 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

151 {
152  return geo::vect::vector_cend(v);
153 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
decltype(auto) end ( TVector3 const &  v)
inline

Definition at line 173 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

174 {
175  return geo::vect::vector_cend(v);
176 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.
decltype(auto) end ( TLorentzVector const &  v)
inline

Definition at line 196 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

197 {
198  return geo::vect::vector_cend(v);
199 }
auto vector_cend(Vector const &v)
Returns a const-iterator pointing after the last coordinate of v.