ATLAS Offline Software
Static Public Member Functions | List of all members
CLHEPHelpers Class Reference

#include <CLHEPHelpers.h>

Collaboration diagram for CLHEPHelpers:

Static Public Member Functions

template<class T >
static void hepTransform3DToVector (const HepGeom::Transform3D &trans, T &vec)
 Convert HepGeom::Transform3D to std :: vector<double> More...
 
template<class T >
static void vectorToHepTransform3D (const T &vec, HepGeom::Transform3D &trans)
 Convert std :: vector<double> to HepGeom::Transform3D. More...
 
template<class T >
static void basicVector3DToVector (const T &bvec, std ::vector< double > &vec)
 Convert HepGeom::BasicVector3D<double> to std :: vector<double> and vice versa. More...
 
template<class T >
static void vectorToBasicVector3D (const std ::vector< double > &vec, T &bvec)
 
static void hepVectorToVector (const CLHEP::HepVector &hvec, std ::vector< double > &vec)
 
static void vectorToHepVector (const std ::vector< double > &vec, CLHEP::HepVector &hvec)
 

Detailed Description

Definition at line 37 of file CLHEPHelpers.h.

Member Function Documentation

◆ basicVector3DToVector()

template<class T >
static void CLHEPHelpers::basicVector3DToVector ( const T &  bvec,
std ::vector< double > &  vec 
)
inlinestatic

Convert HepGeom::BasicVector3D<double> to std :: vector<double> and vice versa.

Definition at line 85 of file CLHEPHelpers.h.

87  {
88  vec.reserve(3);
89  vec.push_back( bvec.x() );
90  vec.push_back( bvec.y() );
91  vec.push_back( bvec.z() );
92  }

◆ hepTransform3DToVector()

template<class T >
static void CLHEPHelpers::hepTransform3DToVector ( const HepGeom::Transform3D &  trans,
T &  vec 
)
inlinestatic

Convert HepGeom::Transform3D to std :: vector<double>

Definition at line 43 of file CLHEPHelpers.h.

45  {
46  vec.reserve(12);
47  vec.push_back( trans.xx() );
48  vec.push_back( trans.xy() );
49  vec.push_back( trans.xz() );
50  vec.push_back( trans.dx() );
51 
52  vec.push_back( trans.yx() );
53  vec.push_back( trans.yy() );
54  vec.push_back( trans.yz() );
55  vec.push_back( trans.dy() );
56 
57  vec.push_back( trans.zx() );
58  vec.push_back( trans.zy() );
59  vec.push_back( trans.zz() );
60  vec.push_back( trans.dz() );
61  }

◆ hepVectorToVector()

static void CLHEPHelpers::hepVectorToVector ( const CLHEP::HepVector &  hvec,
std ::vector< double > &  vec 
)
inlinestatic

Definition at line 106 of file CLHEPHelpers.h.

108  {
109  vec.reserve(hvec.num_row());
110  for( int i = 0; i < hvec.num_row(); i++ )
111  vec.push_back( hvec[i] );
112  }

◆ vectorToBasicVector3D()

template<class T >
static void CLHEPHelpers::vectorToBasicVector3D ( const std ::vector< double > &  vec,
T &  bvec 
)
inlinestatic

Definition at line 95 of file CLHEPHelpers.h.

97  {
98  bvec.setX( vec[0] );
99  bvec.setY( vec[1] );
100  bvec.setZ( vec[2] );
101  }

◆ vectorToHepTransform3D()

template<class T >
static void CLHEPHelpers::vectorToHepTransform3D ( const T &  vec,
HepGeom::Transform3D &  trans 
)
inlinestatic

Convert std :: vector<double> to HepGeom::Transform3D.

Definition at line 65 of file CLHEPHelpers.h.

67  {
68  static_cast<SetTransform3D&> (trans).setTransform (
69  vec[0], // xx
70  vec[1], // xy
71  vec[2], // xz
72  vec[3], // dx
73  vec[4], // yx
74  vec[5], // yy
75  vec[6], // yz
76  vec[7], // dy
77  vec[8], // zx
78  vec[9], // zy
79  vec[10], // zz
80  vec[11] ); // dz
81  }

◆ vectorToHepVector()

static void CLHEPHelpers::vectorToHepVector ( const std ::vector< double > &  vec,
CLHEP::HepVector &  hvec 
)
inlinestatic

Definition at line 114 of file CLHEPHelpers.h.

116  {
117  for( unsigned i = 0; i < vec.size(); i++ )
118  hvec[i] = vec[i];
119  }

The documentation for this class was generated from the following file:
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
lumiFormat.i
int i
Definition: lumiFormat.py:92