LCIO
02.17
|
Implementation of Cluster. More...
#include <ClusterImpl.h>
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::FloatVec & | getPositionError () 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::FloatVec & | getDirectionError () const |
Covariance matrix of the direction (3 Parameters) More... | |
virtual const EVENT::FloatVec & | getShape () 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::ClusterVec & | getClusters () 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::FloatVec & | getHitContributions () const |
Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimeterHits() More... | |
virtual const EVENT::FloatVec & | getSubdetectorEnergies () 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::FloatVec & | subdetectorEnergies () |
To be used for modifying the subdetector energies, e.g. More... | |
![]() | |
virtual | ~Cluster () |
Destructor. More... | |
![]() | |
virtual | ~LCObject () |
Destructor. More... | |
virtual LCObject * | clone () const |
Returns an object id for internal (debugging) use in LCIO. More... | |
![]() | |
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... | |
![]() | |
AccessChecked () | |
virtual | ~AccessChecked () |
virtual int | simpleUID () const |
Protected Member Functions | |
void | setType (int type) |
![]() | |
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 {} |
![]() | |
bool | _readOnly {false} |
int | _id {-1} |
Additional Inherited Members | |
![]() | |
typedef Cluster | lcobject_type |
Useful typedef for template programming with LCIO. More... | |
![]() | |
typedef std::type_index | ext_index |
typedef std::shared_ptr< void > | ext_type |
typedef std::map< ext_index, ext_type > | ext_map |
![]() | |
static std::atomic_int | _lCObjectId |
Implementation of Cluster.
Definition at line 24 of file ClusterImpl.h.
IMPL::ClusterImpl::ClusterImpl | ( | ) |
Default constructor, initializes values to 0.
Definition at line 11 of file ClusterImpl.cc.
|
virtual |
Destructor.
Definition at line 16 of file ClusterImpl.cc.
References _pid, std::vector< T >::begin(), and std::vector< T >::end().
void IMPL::ClusterImpl::addCluster | ( | EVENT::Cluster * | cluster | ) |
Definition at line 127 of file ClusterImpl.cc.
References _clusters, IMPL::AccessChecked::checkAccess(), and std::vector< T >::push_back().
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 | ) |
Definition at line 120 of file ClusterImpl.cc.
References _pid, std::vector< T >::begin(), IMPL::AccessChecked::checkAccess(), std::vector< T >::end(), and std::vector< T >::push_back().
Referenced by SIO::SIOClusterHandler::read().
|
virtual |
The hits that have been combined to this cluster.
Implements EVENT::Cluster.
Definition at line 44 of file ClusterImpl.cc.
References _hits.
|
virtual |
The clusters that have been combined to this cluster.
Implements EVENT::Cluster.
Definition at line 41 of file ClusterImpl.cc.
References _clusters.
|
virtual |
Covariance matrix of the direction (3 Parameters)
Implements EVENT::Cluster.
Definition at line 36 of file ClusterImpl.cc.
References _errdir.
|
virtual |
Energy of the cluster.
Implements EVENT::Cluster.
Definition at line 30 of file ClusterImpl.cc.
References _energy.
|
virtual |
Returns the error on the energy of the cluster.
Implements EVENT::Cluster.
Definition at line 31 of file ClusterImpl.cc.
References _energyError.
|
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.
|
virtual |
Intrinsic direction of cluster at position: Phi.
Implements EVENT::Cluster.
Definition at line 35 of file ClusterImpl.cc.
References _phi.
|
virtual |
Intrinsic direction of cluster at position: Theta.
Implements EVENT::Cluster.
Definition at line 34 of file ClusterImpl.cc.
References _theta.
|
virtual |
Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster.
The particle Id's sorted by their probability.
Implements EVENT::Cluster.
Definition at line 39 of file ClusterImpl.cc.
References _pid.
|
virtual |
Position of the cluster.
Implements EVENT::Cluster.
Definition at line 32 of file ClusterImpl.cc.
References _position.
|
virtual |
Covariance matrix of the position (6 Parameters)
Implements EVENT::Cluster.
Definition at line 33 of file ClusterImpl.cc.
References _errpos.
|
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.
|
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.
|
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().
|
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 | ) |
Definition at line 99 of file ClusterImpl.cc.
References _shape, std::vector< T >::begin(), IMPL::AccessChecked::checkAccess(), and std::vector< T >::end().
|
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 |
||
) |
Definition at line 138 of file ClusterImpl.cc.
References _type, IMPL::AccessChecked::checkAccess(), and std::bitset< Bits >::set().
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().
|
protected |
Definition at line 156 of file ClusterImpl.h.
Referenced by addCluster(), getClusters(), and SIO::SIOClusterHandler::read().
|
protected |
Definition at line 147 of file ClusterImpl.h.
Referenced by getEnergy(), SIO::SIOClusterHandler::read(), and setEnergy().
|
protected |
Definition at line 148 of file ClusterImpl.h.
Referenced by getEnergyError(), SIO::SIOClusterHandler::read(), and setEnergyError().
|
protected |
Definition at line 153 of file ClusterImpl.h.
Referenced by getDirectionError(), and setDirectionError().
|
protected |
Definition at line 150 of file ClusterImpl.h.
Referenced by getPositionError(), and setPositionError().
|
protected |
Definition at line 157 of file ClusterImpl.h.
Referenced by addHit(), getCalorimeterHits(), and SIO::SIOClusterHandler::read().
|
protected |
Definition at line 152 of file ClusterImpl.h.
Referenced by getIPhi(), SIO::SIOClusterHandler::read(), and setIPhi().
|
protected |
Definition at line 155 of file ClusterImpl.h.
Referenced by addParticleID(), getParticleIDs(), and ~ClusterImpl().
|
protected |
Definition at line 149 of file ClusterImpl.h.
Referenced by getPosition(), SIO::SIOClusterHandler::read(), and setPosition().
|
protected |
Definition at line 154 of file ClusterImpl.h.
Referenced by getShape(), SIO::SIOClusterHandler::read(), and setShape().
|
protected |
Definition at line 159 of file ClusterImpl.h.
Referenced by getSubdetectorEnergies(), SIO::SIOClusterHandler::read(), and subdetectorEnergies().
|
protected |
Definition at line 151 of file ClusterImpl.h.
Referenced by getITheta(), SIO::SIOClusterHandler::read(), and setITheta().
|
protected |
Definition at line 146 of file ClusterImpl.h.
Referenced by getType(), setType(), and setTypeBit().
|
protected |
Definition at line 158 of file ClusterImpl.h.
Referenced by addHit(), getHitContributions(), and SIO::SIOClusterHandler::read().