LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
UTIL::LCFourVector< TT > Class Template Reference

Four vector used in LCIO. More...

#include <LCFourVector.h>

+ Inheritance diagram for UTIL::LCFourVector< TT >:

Public Member Functions

virtual ~LCFourVector ()
 
 LCFourVector (const LCFourVector &)=default
 
LCFourVectoroperator= (const LCFourVector &)=default
 
 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 Member Functions

 LCFourVector ()
 

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

Definition at line 30 of file LCFourVector.h.

Constructor & Destructor Documentation

template<class TT >
virtual UTIL::LCFourVector< TT >::~LCFourVector ( )
inlinevirtual

Definition at line 36 of file LCFourVector.h.

template<class TT >
UTIL::LCFourVector< TT >::LCFourVector ( const LCFourVector< TT > &  )
default
template<class TT >
UTIL::LCFourVector< TT >::LCFourVector ( const TT *  lcObj)
inline

Constructor for templated type,e.g.

LCFourVector<MCParticle>( myMCParticle ).

Definition at line 43 of file LCFourVector.h.

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) ).

Definition at line 51 of file LCFourVector.h.

template<class TT >
UTIL::LCFourVector< TT >::LCFourVector ( )
inlineprotected

Definition at line 80 of file LCFourVector.h.

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() ;

Definition at line 75 of file LCFourVector.h.

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

Definition at line 68 of file LCFourVector.h.

template<class TT >
LCFourVector& UTIL::LCFourVector< TT >::operator= ( const LCFourVector< TT > &  )
default

Member Data Documentation

template<class TT >
const TT* UTIL::LCFourVector< TT >::_lcObj = nullptr
protected

Definition at line 33 of file LCFourVector.h.


The documentation for this class was generated from the following file: