LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Protected Attributes | List of all members
UTIL::LCFourVector< TT > Class Template Reference

Four vector used in LCIO. More...

#include <UTIL/LCFourVector.h>

Inheritance diagram for UTIL::LCFourVector< TT >:

Public Member Functions

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

Protected Attributes

const TT * _lcObj
 

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: