LArSoft  v09_90_00
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.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov)
Date
December 2, 2017
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 142 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

143 {
144  return geo::vect::vector_cbegin(v);
145 }
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 165 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

166 {
167  return geo::vect::vector_cbegin(v);
168 }
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 188 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

189 {
190  return geo::vect::vector_cbegin(v);
191 }
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 147 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

148 {
149  return geo::vect::vector_cbegin(v);
150 }
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 170 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

171 {
172  return geo::vect::vector_cbegin(v);
173 }
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 193 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cbegin().

194 {
195  return geo::vect::vector_cbegin(v);
196 }
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 157 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

158 {
159  return geo::vect::vector_cend(v);
160 }
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 180 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

181 {
182  return geo::vect::vector_cend(v);
183 }
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 203 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

204 {
205  return geo::vect::vector_cend(v);
206 }
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 152 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

153 {
154  return geo::vect::vector_cend(v);
155 }
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 175 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

176 {
177  return geo::vect::vector_cend(v);
178 }
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 198 of file geo_vectors_utils_TVector.h.

References geo::vect::vector_cend().

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