UTIL::LCFourVector< TT > Class Template Reference

Four vector used in LCIO. More...

#include <UTIL/LCFourVector.h>

List of all members.

Public Member Functions

 LCFourVector (const LCFourVector &)
LCFourVectoroperator= (const LCFourVector &)
 LCFourVector (const TT *lcObj)
 Constructor for templated type,e.g.
 LCFourVector (const EVENT::LCObject *lcObj)
 Constructor for LCObject.
const TT * operator-> () const
 Instances of LCFourVector serve as a handle to the templated type.
const TT * lcObj () const
 Pointer to the LCObject that has been used to create the four vector.

Protected Attributes

const TT * _lcObj = nullptr

Detailed Description

template<class TT>
class UTIL::LCFourVector< TT >

Four vector used in LCIO.

The cpp implementation is a CLHEP::HepLorentzVector. Instances of this class can be used as CLHEP::HepLorentzVector AND pointers to the corresponding LCIO class.

Currently available are:

Author:
gaede
Version:
Mar 12, 2004

Constructor & Destructor Documentation

template<class TT>
UTIL::LCFourVector< TT >::LCFourVector ( const TT *  lcObj  )  [inline]

Constructor for templated type,e.g.

LCFourVector<MCParticle>( myMCParticle ).

template<class TT>
UTIL::LCFourVector< TT >::LCFourVector ( const EVENT::LCObject lcObj  )  [inline]

Constructor for LCObject.

Can be used to save the dynamic_cast to the explicit type from an LCCollection element, e.g. LCFourVector<MCParticle>( col->getElement(i) ).


Member Function Documentation

template<class TT>
const TT* UTIL::LCFourVector< TT >::lcObj (  )  const [inline]

Pointer to the LCObject that has been used to create the four vector.

To be used when the object is needed as a function argument or optionally to call methods of the object, e.g. particle4V.lcObj()->getMomentum() ;

template<class TT>
const TT* UTIL::LCFourVector< TT >::operator-> (  )  const [inline]

Instances of LCFourVector serve as a handle to the templated type.

Methods of the original type, e.g. MCParticle can be accessed via the '->' operator. Methods of the four vector implementation (HepLorentzvector) are accessed via the '.' operator.
For Example:
LCFourVector<MCParticle> particle4V( col->getElementAt(i) )
particle4V->getMomentum() // LCIO object
particle4V.m() // mass from HepLorentzVector


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Friends

Generated on 6 Mar 2020 for LCIO by  doxygen 1.6.1