/usr/share/HepMC/examples/VectorConversion.h is in hepmc-examples 2.06.09-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #ifndef VECTOR_CONVERSION_H
#define VECTOR_CONVERSION_H
//////////////////////////////////////////////////////////////////////////
// garren@fnal.gov, January 2007
//
// This example converts from ThreeVector and FourVector to
// CLHEP::Hep3Vector and CLHEP::HepLorentzVector
// Similar (or perhaps templated) conversion methods could be added to
// any vector class.
//
//////////////////////////////////////////////////////////////////////////
#include "HepMC/SimpleVector.h"
#include "CLHEP/Vector/LorentzVector.h"
///
/// \namespace CLHEP
/// CLHEP Vector classes are used in one of the examples
///
/// Convert from HepMC::ThreeVector to CLHEP::Hep3Vector
inline CLHEP::Hep3Vector convertTo( const HepMC::ThreeVector& v )
{ return CLHEP::Hep3Vector( v.x(), v.y(), v.z() ); }
/// Convert from HepMC::FourVector to CLHEP::HepLorentzVector
inline CLHEP::HepLorentzVector convertTo( const HepMC::FourVector& v )
{ return CLHEP::HepLorentzVector( v.x(), v.y(), v.z(), v.t() ); }
#endif // VECTOR_CONVERSION_H
|