Four vector used in LCIO. More...
#include <UTIL/LCFourVector.h>
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 |
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:
|
inline |
Constructor for templated type,e.g.
LCFourVector<MCParticle>( myMCParticle ).
|
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) ).
|
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() ;
|
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