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
IMPL::ClusterImpl Class Reference

Implementation of Cluster. More...

#include <ClusterImpl.h>

+ Inheritance diagram for IMPL::ClusterImpl:

Public Member Functions

 ClusterImpl ()
 Default constructor, initializes values to 0. More...
 
virtual ~ClusterImpl ()
 Destructor. More...
 
virtual int id () const
 Returns an object id for internal (debugging) use in LCIO. More...
 
virtual int getType () const
 Flagword that defines the type of cluster. More...
 
virtual float getEnergy () const
 Energy of the cluster. More...
 
virtual float getEnergyError () const
 Returns the error on the energy of the cluster. More...
 
virtual const float * getPosition () const
 Position of the cluster. More...
 
virtual const EVENT::FloatVecgetPositionError () const
 Covariance matrix of the position (6 Parameters) More...
 
virtual float getITheta () const
 Intrinsic direction of cluster at position: Theta. More...
 
virtual float getIPhi () const
 Intrinsic direction of cluster at position: Phi. More...
 
virtual const EVENT::FloatVecgetDirectionError () const
 Covariance matrix of the direction (3 Parameters) More...
 
virtual const EVENT::FloatVecgetShape () const
 Shape parameters - check/set collection parameter ClusterShapeParameters for size and names of parameters. More...
 
virtual const
EVENT::ParticleIDVec
getParticleIDs () const
 Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster. More...
 
virtual const EVENT::ClusterVecgetClusters () const
 The clusters that have been combined to this cluster. More...
 
virtual const
EVENT::CalorimeterHitVec
getCalorimeterHits () const
 The hits that have been combined to this cluster. More...
 
virtual const EVENT::FloatVecgetHitContributions () const
 Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimeterHits() More...
 
virtual const EVENT::FloatVecgetSubdetectorEnergies () const
 A vector that holds the energy observed in a particular subdetectors. More...
 
void setTypeBit (int index, bool val=true)
 
void setEnergy (float energy)
 
void setEnergyError (float energyError)
 
void setPosition (const float *position)
 
void setPositionError (const EVENT::FloatVec &errpos)
 
void setPositionError (const float *errpos)
 
void setITheta (float theta)
 
void setIPhi (float phi)
 
void setDirectionError (const EVENT::FloatVec &errdir)
 
void setDirectionError (const float *errdir)
 
void setShape (const EVENT::FloatVec &shape)
 
void addParticleID (EVENT::ParticleID *pid)
 
void addCluster (EVENT::Cluster *cluster)
 
void addHit (EVENT::CalorimeterHit *hit, float contribution)
 
EVENT::FloatVecsubdetectorEnergies ()
 To be used for modifying the subdetector energies, e.g. More...
 
- Public Member Functions inherited from EVENT::Cluster
virtual ~Cluster ()
 Destructor. More...
 
- Public Member Functions inherited from EVENT::LCObject
virtual ~LCObject ()
 Destructor. More...
 
virtual LCObjectclone () const
 Returns an object id for internal (debugging) use in LCIO. More...
 
- Public Member Functions inherited from lcrtrel::LCRTRelations
template<class V >
V::ext_type ext ()
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
const V::ext_type ext () const
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
V::rel_type rel ()
 Provides read access to relations - the object types and their connectivity are defined by the class V which has to be a subtype of either LC1To1Relation, LC1ToNRelation or LCNToNRelation. More...
 
- Public Member Functions inherited from IMPL::AccessChecked
 AccessChecked ()
 
virtual ~AccessChecked ()
 
virtual int simpleUID () const
 

Protected Member Functions

void setType (int type)
 
- Protected Member Functions inherited from IMPL::AccessChecked
virtual void setReadOnly (bool readOnly)
 
void checkAccess ()
 
void checkAccess (const char *what)
 

Protected Attributes

std::bitset< 32 > _type {0}
 
float _energy {0}
 
float _energyError {0}
 
float _position [3] ={0,0,0}
 
EVENT::FloatVec _errpos
 
float _theta {0}
 
float _phi {0}
 
EVENT::FloatVec _errdir
 
EVENT::FloatVec _shape {}
 
EVENT::ParticleIDVec _pid {}
 
EVENT::ClusterVec _clusters {}
 
EVENT::CalorimeterHitVec _hits {}
 
EVENT::FloatVec _weights {}
 
EVENT::FloatVec _subdetectorEnergies {}
 
- Protected Attributes inherited from IMPL::AccessChecked
bool _readOnly {false}
 
int _id {-1}
 

Additional Inherited Members

- Public Types inherited from EVENT::Cluster
typedef Cluster lcobject_type
 Useful typedef for template programming with LCIO. More...
 
- Public Types inherited from lcrtrel::LCRTRelations
typedef std::type_index ext_index
 
typedef std::shared_ptr< void > ext_type
 
typedef std::map< ext_index,
ext_type
ext_map
 
- Static Protected Attributes inherited from IMPL::AccessChecked
static std::atomic_int _lCObjectId
 

Detailed Description

Implementation of Cluster.

See Also
Cluster
Author
gaede
Version
Id:
ClusterImpl.h,v 1.13 2006-08-04 16:52:46 gaede Exp

Definition at line 24 of file ClusterImpl.h.

Constructor & Destructor Documentation

IMPL::ClusterImpl::ClusterImpl ( )

Default constructor, initializes values to 0.

Definition at line 11 of file ClusterImpl.cc.

IMPL::ClusterImpl::~ClusterImpl ( )
virtual

Destructor.

Definition at line 16 of file ClusterImpl.cc.

References _pid, std::vector< T >::begin(), and std::vector< T >::end().

Member Function Documentation

void IMPL::ClusterImpl::addCluster ( EVENT::Cluster cluster)
void IMPL::ClusterImpl::addHit ( EVENT::CalorimeterHit hit,
float  contribution 
)

Definition at line 133 of file ClusterImpl.cc.

References _hits, _weights, and std::vector< T >::push_back().

void IMPL::ClusterImpl::addParticleID ( EVENT::ParticleID pid)
const EVENT::CalorimeterHitVec & IMPL::ClusterImpl::getCalorimeterHits ( ) const
virtual

The hits that have been combined to this cluster.

Implements EVENT::Cluster.

Definition at line 44 of file ClusterImpl.cc.

References _hits.

const ClusterVec & IMPL::ClusterImpl::getClusters ( ) const
virtual

The clusters that have been combined to this cluster.

Implements EVENT::Cluster.

Definition at line 41 of file ClusterImpl.cc.

References _clusters.

const FloatVec & IMPL::ClusterImpl::getDirectionError ( ) const
virtual

Covariance matrix of the direction (3 Parameters)

Implements EVENT::Cluster.

Definition at line 36 of file ClusterImpl.cc.

References _errdir.

float IMPL::ClusterImpl::getEnergy ( ) const
virtual

Energy of the cluster.

Implements EVENT::Cluster.

Definition at line 30 of file ClusterImpl.cc.

References _energy.

float IMPL::ClusterImpl::getEnergyError ( ) const
virtual

Returns the error on the energy of the cluster.

Implements EVENT::Cluster.

Definition at line 31 of file ClusterImpl.cc.

References _energyError.

const EVENT::FloatVec & IMPL::ClusterImpl::getHitContributions ( ) const
virtual

Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimeterHits()

Implements EVENT::Cluster.

Definition at line 47 of file ClusterImpl.cc.

References _weights.

float IMPL::ClusterImpl::getIPhi ( ) const
virtual

Intrinsic direction of cluster at position: Phi.

Implements EVENT::Cluster.

Definition at line 35 of file ClusterImpl.cc.

References _phi.

float IMPL::ClusterImpl::getITheta ( ) const
virtual

Intrinsic direction of cluster at position: Theta.

Implements EVENT::Cluster.

Definition at line 34 of file ClusterImpl.cc.

References _theta.

const EVENT::ParticleIDVec & IMPL::ClusterImpl::getParticleIDs ( ) const
virtual

Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster.

The particle Id's sorted by their probability.

See Also
ParticleID

Implements EVENT::Cluster.

Definition at line 39 of file ClusterImpl.cc.

References _pid.

const float * IMPL::ClusterImpl::getPosition ( ) const
virtual

Position of the cluster.

Implements EVENT::Cluster.

Definition at line 32 of file ClusterImpl.cc.

References _position.

const FloatVec & IMPL::ClusterImpl::getPositionError ( ) const
virtual

Covariance matrix of the position (6 Parameters)

Implements EVENT::Cluster.

Definition at line 33 of file ClusterImpl.cc.

References _errpos.

const FloatVec & IMPL::ClusterImpl::getShape ( ) const
virtual

Shape parameters - check/set collection parameter ClusterShapeParameters for size and names of parameters.

Implements EVENT::Cluster.

Definition at line 37 of file ClusterImpl.cc.

References _shape.

const EVENT::FloatVec & IMPL::ClusterImpl::getSubdetectorEnergies ( ) const
virtual

A vector that holds the energy observed in a particular subdetectors.

The mapping of indices to subdetectors is implementation dependent. To be used as convenient information or if hits are not stored in the data set, e.g. DST or FastMC. Check/set collection parameter ClusterSubdetectorNames for decoding the indices of the array.

Implements EVENT::Cluster.

Definition at line 50 of file ClusterImpl.cc.

References _subdetectorEnergies.

int IMPL::ClusterImpl::getType ( ) const
virtual

Flagword that defines the type of cluster.

Bits 0-15 can be used to denote the subdetectors that have contributed hits to the cluster. The definition of the bits has to be done elsewhere, e.g. in the run header. Bits 16-31 are used internally.

Implements EVENT::Cluster.

Definition at line 23 of file ClusterImpl.cc.

References _type, and std::bitset< Bits >::to_ulong().

virtual int IMPL::ClusterImpl::id ( ) const
inlinevirtual

Returns an object id for internal (debugging) use in LCIO.

Implements EVENT::LCObject.

Definition at line 35 of file ClusterImpl.h.

References IMPL::AccessChecked::simpleUID().

void IMPL::ClusterImpl::setDirectionError ( const EVENT::FloatVec errdir)

Definition at line 87 of file ClusterImpl.cc.

References _errdir, IMPL::AccessChecked::checkAccess(), and NERRDIR.

Referenced by SIO::SIOClusterHandler::read().

void IMPL::ClusterImpl::setDirectionError ( const float *  errdir)

Definition at line 91 of file ClusterImpl.cc.

References _errdir, IMPL::AccessChecked::checkAccess(), and NERRDIR.

void IMPL::ClusterImpl::setEnergy ( float  energy)

Definition at line 59 of file ClusterImpl.cc.

References _energy, and IMPL::AccessChecked::checkAccess().

void IMPL::ClusterImpl::setEnergyError ( float  energyError)

Definition at line 63 of file ClusterImpl.cc.

References _energyError, and IMPL::AccessChecked::checkAccess().

void IMPL::ClusterImpl::setIPhi ( float  phi)

Definition at line 83 of file ClusterImpl.cc.

References _phi, and IMPL::AccessChecked::checkAccess().

void IMPL::ClusterImpl::setITheta ( float  theta)

Definition at line 79 of file ClusterImpl.cc.

References _theta, and IMPL::AccessChecked::checkAccess().

void IMPL::ClusterImpl::setPosition ( const float *  position)

Definition at line 67 of file ClusterImpl.cc.

References _position, and IMPL::AccessChecked::checkAccess().

void IMPL::ClusterImpl::setPositionError ( const EVENT::FloatVec errpos)

Definition at line 71 of file ClusterImpl.cc.

References _errpos, IMPL::AccessChecked::checkAccess(), and NERRPOS.

Referenced by SIO::SIOClusterHandler::read().

void IMPL::ClusterImpl::setPositionError ( const float *  errpos)

Definition at line 75 of file ClusterImpl.cc.

References _errpos, IMPL::AccessChecked::checkAccess(), and NERRPOS.

void IMPL::ClusterImpl::setShape ( const EVENT::FloatVec shape)
void IMPL::ClusterImpl::setType ( int  type)
protected

Definition at line 55 of file ClusterImpl.cc.

References _type, and IMPL::AccessChecked::checkAccess().

Referenced by SIO::SIOClusterHandler::read().

void IMPL::ClusterImpl::setTypeBit ( int  index,
bool  val = true 
)
EVENT::FloatVec & IMPL::ClusterImpl::subdetectorEnergies ( )

To be used for modifying the subdetector energies, e.g.


clu->subdetectorEnergies().resize(3) ; clu->subdetectorEnergies()[0] = 123.4567 ; clu->subdetectorEnergies()[1] = 12.34567 ; clu->subdetectorEnergies()[2] = 1.234567 ;

Definition at line 143 of file ClusterImpl.cc.

References _subdetectorEnergies, and IMPL::AccessChecked::checkAccess().

Member Data Documentation

EVENT::ClusterVec IMPL::ClusterImpl::_clusters {}
protected

Definition at line 156 of file ClusterImpl.h.

Referenced by addCluster(), getClusters(), and SIO::SIOClusterHandler::read().

float IMPL::ClusterImpl::_energy {0}
protected

Definition at line 147 of file ClusterImpl.h.

Referenced by getEnergy(), SIO::SIOClusterHandler::read(), and setEnergy().

float IMPL::ClusterImpl::_energyError {0}
protected

Definition at line 148 of file ClusterImpl.h.

Referenced by getEnergyError(), SIO::SIOClusterHandler::read(), and setEnergyError().

EVENT::FloatVec IMPL::ClusterImpl::_errdir
protected

Definition at line 153 of file ClusterImpl.h.

Referenced by getDirectionError(), and setDirectionError().

EVENT::FloatVec IMPL::ClusterImpl::_errpos
protected

Definition at line 150 of file ClusterImpl.h.

Referenced by getPositionError(), and setPositionError().

EVENT::CalorimeterHitVec IMPL::ClusterImpl::_hits {}
protected

Definition at line 157 of file ClusterImpl.h.

Referenced by addHit(), getCalorimeterHits(), and SIO::SIOClusterHandler::read().

float IMPL::ClusterImpl::_phi {0}
protected

Definition at line 152 of file ClusterImpl.h.

Referenced by getIPhi(), SIO::SIOClusterHandler::read(), and setIPhi().

EVENT::ParticleIDVec IMPL::ClusterImpl::_pid {}
protected

Definition at line 155 of file ClusterImpl.h.

Referenced by addParticleID(), getParticleIDs(), and ~ClusterImpl().

float IMPL::ClusterImpl::_position[3] ={0,0,0}
protected

Definition at line 149 of file ClusterImpl.h.

Referenced by getPosition(), SIO::SIOClusterHandler::read(), and setPosition().

EVENT::FloatVec IMPL::ClusterImpl::_shape {}
protected

Definition at line 154 of file ClusterImpl.h.

Referenced by getShape(), SIO::SIOClusterHandler::read(), and setShape().

EVENT::FloatVec IMPL::ClusterImpl::_subdetectorEnergies {}
protected
float IMPL::ClusterImpl::_theta {0}
protected

Definition at line 151 of file ClusterImpl.h.

Referenced by getITheta(), SIO::SIOClusterHandler::read(), and setITheta().

std::bitset<32> IMPL::ClusterImpl::_type {0}
protected

Definition at line 146 of file ClusterImpl.h.

Referenced by getType(), setType(), and setTypeBit().

EVENT::FloatVec IMPL::ClusterImpl::_weights {}
protected

Definition at line 158 of file ClusterImpl.h.

Referenced by addHit(), getHitContributions(), and SIO::SIOClusterHandler::read().


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