Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

IMPL::SimCalorimeterHitImpl Class Reference

#include <SimCalorimeterHitImpl.h>

Inheritance diagram for IMPL::SimCalorimeterHitImpl:

EVENT::SimCalorimeterHit IMPL::AccessChecked EVENT::LCObject lcrtrel::LCRTRelations IOIMPL::SimCalorimeterHitIOImpl List of all members.

Public Types

typedef SimCalorimeterHit lcobject_type

Public Member Functions

 SimCalorimeterHitImpl ()
virtual ~SimCalorimeterHitImpl ()
 Destructor.
virtual int id () const
virtual LCObjectclone () const
virtual int getCellID0 () const
virtual int getCellID1 () const
virtual float getEnergy () const
virtual const float * getPosition () const
virtual int getNMCParticles () const
virtual int getNMCContributions () const
virtual float getEnergyCont (int i) const
virtual float getTimeCont (int i) const
virtual int getPDGCont (int i) const
virtual EVENT::MCParticlegetParticleCont (int i) const
void setCellID0 (int id0)
void setCellID1 (int id1)
void setEnergy (float en)
void setPosition (float pos[3])
void addMCParticleContribution (EVENT::MCParticle *p, float en, float t, int pdg=0)
template<class V>
V::ext_type ext ()
template<class V>
V::rel_type rel ()
virtual int simpleUID () const

Protected Member Functions

template<class V>
V::ptr & ptr ()
virtual void setReadOnly (bool readOnly)
void checkAccess () throw ( EVENT::ReadOnlyException )
void checkAccess (const char *what) throw ( EVENT::ReadOnlyException )

Protected Attributes

int _cellID0
int _cellID1
float _energy
float _position [3]
MCParticleContVec _vec
bool _readOnly
int _id

Detailed Description

Implementation of the generic SimCalorimeterHit.

Author:
gaede
Version:
Mar 5, 2003

Definition at line 28 of file SimCalorimeterHitImpl.h.


Member Typedef Documentation

typedef SimCalorimeterHit EVENT::SimCalorimeterHit::lcobject_type [inherited]
 

Useful typedef for template programming with LCIO

Definition at line 31 of file SimCalorimeterHit.h.


Constructor & Destructor Documentation

IMPL::SimCalorimeterHitImpl::SimCalorimeterHitImpl  ) 
 

Default constructor, initializes values to 0.

Definition at line 6 of file SimCalorimeterHitImpl.cc.

References _position.

Referenced by clone().

IMPL::SimCalorimeterHitImpl::~SimCalorimeterHitImpl  )  [virtual]
 

Destructor.

Copy constructor. Not yet - needs pointer chasing ...

Definition at line 48 of file SimCalorimeterHitImpl.cc.

References _vec.


Member Function Documentation

void IMPL::SimCalorimeterHitImpl::addMCParticleContribution EVENT::MCParticle p,
float  en,
float  t,
int  pdg = 0
 

Adds an MCParticle contribution to the hit. There are three different ways to use this method:

  1. p==0, just add the energy to the total energy - create no MCParticleContribution. Note: this results in non standard LCIO files - use one of the following:
  2. p!=0, pdg==0, add the energy contribution for this primary MCParticle if it exists, create a new contribution if it doesn't
  3. p!=0, pdg!=0, create a new MCParticleContribution in any case - this is used for the detailed mode, where every simulator step produces a contribution.
If you want to store the PDG of the secondary (case 3.) set the flag word bit LCIO::CHBIT_PDG.

Definition at line 135 of file SimCalorimeterHitImpl.cc.

References _energy, _vec, IMPL::AccessChecked::checkAccess(), IMPL::MCParticleCont_S::Energy, IMPL::MCParticleCont, IMPL::MCParticleCont_S::Particle, IMPL::MCParticleCont_S::PDG, and IMPL::MCParticleCont_S::Time.

void IMPL::AccessChecked::checkAccess const char *  what  )  throw ( EVENT::ReadOnlyException ) [protected, inherited]
 

Definition at line 20 of file AccessChecked.cc.

void IMPL::AccessChecked::checkAccess  )  throw ( EVENT::ReadOnlyException ) [protected, inherited]
 

Definition at line 16 of file AccessChecked.cc.

Referenced by IMPL::TrackerRawDataImpl::adcValues(), IMPL::ReconstructedParticleImpl::addCluster(), IMPL::ClusterImpl::addCluster(), IMPL::MCParticleImpl::addDaughter(), addMCParticleContribution(), IMPL::VertexImpl::addParameter(), IMPL::ParticleIDImpl::addParameter(), IMPL::MCParticleImpl::addParent(), IMPL::ReconstructedParticleImpl::addParticle(), IMPL::ReconstructedParticleImpl::addParticleID(), IMPL::ClusterImpl::addParticleID(), IMPL::TrackImpl::addTrack(), IMPL::ReconstructedParticleImpl::addTrack(), IMPL::TrackerDataImpl::chargeValues(), IMPL::TrackerHitImpl::rawHits(), IMPL::TrackerRawDataImpl::setADCValues(), IMPL::VertexImpl::setAlgorithmType(), IMPL::ParticleIDImpl::setAlgorithmType(), IMPL::RawCalorimeterHitImpl::setAmplitude(), IMPL::VertexImpl::setAssociatedParticle(), IMPL::TPCHitImpl::setCellID(), IMPL::SimTrackerHitImpl::setCellID(), IMPL::TrackerRawDataImpl::setCellID0(), IMPL::TrackerPulseImpl::setCellID0(), IMPL::TrackerDataImpl::setCellID0(), setCellID0(), IMPL::RawCalorimeterHitImpl::setCellID0(), IMPL::CalorimeterHitImpl::setCellID0(), IMPL::TrackerRawDataImpl::setCellID1(), IMPL::TrackerPulseImpl::setCellID1(), IMPL::TrackerDataImpl::setCellID1(), setCellID1(), IMPL::RawCalorimeterHitImpl::setCellID1(), IMPL::CalorimeterHitImpl::setCellID1(), IMPL::TrackerPulseImpl::setCharge(), IMPL::TPCHitImpl::setCharge(), IMPL::ReconstructedParticleImpl::setCharge(), IMPL::MCParticleImpl::setCharge(), IMPL::TrackerDataImpl::setChargeValues(), IMPL::VertexImpl::setChi2(), IMPL::TrackImpl::setChi2(), IMPL::VertexImpl::setCovMatrix(), IMPL::TrackImpl::setCovMatrix(), IMPL::TrackerHitImpl::setCovMatrix(), IMPL::ReconstructedParticleImpl::setCovMatrix(), IMPL::TrackImpl::setD0(), IMPL::TrackImpl::setdEdx(), IMPL::TrackerHitImpl::setdEdx(), IMPL::SimTrackerHitImpl::setdEdx(), IMPL::TrackImpl::setdEdxError(), IMPL::LCRunHeaderImpl::setDescription(), IMPL::LCRunHeaderImpl::setDetectorName(), IMPL::LCEventImpl::setDetectorName(), IMPL::ClusterImpl::setDirectionError(), IMPL::MCParticleImpl::setEndpoint(), setEnergy(), IMPL::ReconstructedParticleImpl::setEnergy(), IMPL::ClusterImpl::setEnergy(), IMPL::CalorimeterHitImpl::setEnergy(), IMPL::LCEventImpl::setEventNumber(), IMPL::MCParticleImpl::setGeneratorStatus(), IMPL::ReconstructedParticleImpl::setGoodnessOfPID(), IMPL::ClusterImpl::setIPhi(), IMPL::TrackImpl::setIsReferencePointPCA(), IMPL::ClusterImpl::setITheta(), IMPL::ParticleIDImpl::setLikelihood(), IMPL::ReconstructedParticleImpl::setMass(), IMPL::MCParticleImpl::setMass(), IMPL::SimTrackerHitImpl::setMCParticle(), IMPL::SimTrackerHitImpl::setMomentum(), IMPL::ReconstructedParticleImpl::setMomentum(), IMPL::MCParticleImpl::setMomentum(), IMPL::TrackImpl::setNdf(), IMPL::TrackImpl::setOmega(), IMPL::ReconstructedParticleImpl::setParticleIDUsed(), IMPL::SimTrackerHitImpl::setPathLength(), IMPL::ParticleIDImpl::setPDG(), IMPL::MCParticleImpl::setPDG(), IMPL::TrackImpl::setPhi(), IMPL::VertexImpl::setPosition(), IMPL::TrackerHitImpl::setPosition(), IMPL::SimTrackerHitImpl::setPosition(), setPosition(), IMPL::ClusterImpl::setPosition(), IMPL::CalorimeterHitImpl::setPosition(), IMPL::ClusterImpl::setPositionError(), IMPL::VertexImpl::setPrimary(), IMPL::VertexImpl::setProbability(), IMPL::TrackerPulseImpl::setQuality(), IMPL::TPCHitImpl::setQuality(), IMPL::TrackerPulseImpl::setQualityBit(), IMPL::TrackImpl::setRadiusOfInnermostHit(), IMPL::TPCHitImpl::setRawData(), IMPL::CalorimeterHitImpl::setRawHit(), IMPL::TrackImpl::setReferencePoint(), IMPL::ReconstructedParticleImpl::setReferencePoint(), IMPL::LCRunHeaderImpl::setRunNumber(), IMPL::LCEventImpl::setRunNumber(), IMPL::ClusterImpl::setShape(), IMPL::MCParticleImpl::setSimulatorStatus(), IMPL::ReconstructedParticleImpl::setStartVertex(), IMPL::TrackImpl::setTanLambda(), IMPL::TrackerRawDataImpl::setTime(), IMPL::TrackerPulseImpl::setTime(), IMPL::TrackerHitImpl::setTime(), IMPL::TrackerDataImpl::setTime(), IMPL::TPCHitImpl::setTime(), IMPL::SimTrackerHitImpl::setTime(), IMPL::MCParticleImpl::setTime(), IMPL::CalorimeterHitImpl::setTime(), IMPL::RawCalorimeterHitImpl::setTimeStamp(), IMPL::LCEventImpl::setTimeStamp(), IMPL::TrackerPulseImpl::setTrackerData(), IMPL::TrackImpl::setType(), IMPL::TrackerHitImpl::setType(), IMPL::ReconstructedParticleImpl::setType(), IMPL::ParticleIDImpl::setType(), IMPL::ClusterImpl::setType(), IMPL::CalorimeterHitImpl::setType(), IMPL::TrackImpl::setTypeBit(), IMPL::ClusterImpl::setTypeBit(), IMPL::LCParametersImpl::setValue(), IMPL::LCParametersImpl::setValues(), IMPL::MCParticleImpl::setVertex(), IMPL::TrackImpl::setZ0(), IMPL::ClusterImpl::subdetectorEnergies(), and IMPL::TrackImpl::subdetectorHitNumbers().

EVENT::LCObject * IMPL::SimCalorimeterHitImpl::clone  )  const [virtual]
 

Create a deep copy of itself. Overwrites return type in LCObject::clone(). Not yet - as AID genereates virtual inheritance and g++ doesn't support virtual constructors with virtual inheritance TODO - change org.freehep.aid.CPPHeaderGenerator !

Reimplemented from EVENT::LCObject.

Definition at line 42 of file SimCalorimeterHitImpl.cc.

References SimCalorimeterHitImpl().

template<class V>
V::ext_type lcrtrel::LCRTRelations::ext  )  [inline, inherited]
 

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

Definition at line 430 of file LCRTRelations.h.

int IMPL::SimCalorimeterHitImpl::getCellID0  )  const [virtual]
 

Returns the detector specific (geometrical) cell id.

Implements EVENT::SimCalorimeterHit.

Definition at line 58 of file SimCalorimeterHitImpl.cc.

int IMPL::SimCalorimeterHitImpl::getCellID1  )  const [virtual]
 

Returns the second detector specific (geometrical) cell id. 0 if information is not stored - check the flag word (bit CHBIT_ID1) of the collection. Default is to store only cellid0.

Implements EVENT::SimCalorimeterHit.

Definition at line 62 of file SimCalorimeterHitImpl.cc.

float IMPL::SimCalorimeterHitImpl::getEnergy  )  const [virtual]
 

Returns the energy of the hit.

Implements EVENT::SimCalorimeterHit.

Definition at line 66 of file SimCalorimeterHitImpl.cc.

float IMPL::SimCalorimeterHitImpl::getEnergyCont int  i  )  const [virtual]
 

Returns the energy in [GeV] of the i-th contribution to the hit.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

Definition at line 101 of file SimCalorimeterHitImpl.cc.

References _vec.

int IMPL::SimCalorimeterHitImpl::getNMCContributions  )  const [virtual]
 

Returns the number of MC contributions to the hit. 0 if information is not stored. There are two levels of detail: if collection flag bit LCIO.CHBIT_PDG==1 then all simulator steps' contributions to the hit are stored, otherwise there is only one contribution for every particle entering the calorimeter.

Implements EVENT::SimCalorimeterHit.

Definition at line 85 of file SimCalorimeterHitImpl.cc.

References _vec.

Referenced by getNMCParticles().

int IMPL::SimCalorimeterHitImpl::getNMCParticles  )  const [virtual]
 

Returns the number of MC contributions to the hit. 0 if information is not stored. Renamed to getNMCContributions.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

Definition at line 74 of file SimCalorimeterHitImpl.cc.

References getNMCContributions().

EVENT::MCParticle * IMPL::SimCalorimeterHitImpl::getParticleCont int  i  )  const [virtual]
 

Returns the MCParticle that caused the shower responsible for this contribution to the hit. This is the particle that flew into the calorimeter and not the shower particle that made the energy deposition.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

Definition at line 89 of file SimCalorimeterHitImpl.cc.

References _vec.

int IMPL::SimCalorimeterHitImpl::getPDGCont int  i  )  const [virtual]
 

Returns the PDG code of the shower particle that caused this contribution. Check the flag word bit LCIO.CHBIT_PDG of the collection whether this information is available.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

Definition at line 109 of file SimCalorimeterHitImpl.cc.

References _vec.

const float * IMPL::SimCalorimeterHitImpl::getPosition  )  const [virtual]
 

Returns the position of the hit in world coordinates. NULL if information is not stored. Ask collection for flag, only available if bit LCIO.CHBIT_LONG is set.

Implements EVENT::SimCalorimeterHit.

Definition at line 70 of file SimCalorimeterHitImpl.cc.

float IMPL::SimCalorimeterHitImpl::getTimeCont int  i  )  const [virtual]
 

Returns the time of the i-th in [ns] contribution to the hit.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

Definition at line 105 of file SimCalorimeterHitImpl.cc.

References _vec.

virtual int IMPL::SimCalorimeterHitImpl::id  )  const [inline, virtual]
 

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

Implements EVENT::LCObject.

Definition at line 44 of file SimCalorimeterHitImpl.h.

template<class V>
V::ptr& lcrtrel::LCRTRelations::ptr  )  [inline, protected, inherited]
 

Returns the reference to the pointer to the extension/relation object

Definition at line 508 of file LCRTRelations.h.

template<class V>
V::rel_type lcrtrel::LCRTRelations::rel  )  [inline, inherited]
 

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.

Definition at line 444 of file LCRTRelations.h.

void IMPL::SimCalorimeterHitImpl::setCellID0 int  id0  ) 
 

Sets the first cell id;

Definition at line 113 of file SimCalorimeterHitImpl.cc.

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

void IMPL::SimCalorimeterHitImpl::setCellID1 int  id1  ) 
 

Sets the second cell id; Only store if the flag word (bit CHBIT_ID1) of the collection is set. Default is to store only cellid0.

Definition at line 118 of file SimCalorimeterHitImpl.cc.

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

void IMPL::SimCalorimeterHitImpl::setEnergy float  en  ) 
 

Sets the energy.

Definition at line 123 of file SimCalorimeterHitImpl.cc.

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

void IMPL::SimCalorimeterHitImpl::setPosition float  pos[3]  ) 
 

Sets the position. Not stored if LCIO.CHBIT_LONG isn't set.

Definition at line 128 of file SimCalorimeterHitImpl.cc.

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

void IMPL::AccessChecked::setReadOnly bool  readOnly  )  [protected, virtual, inherited]
 

Reimplemented in IMPL::LCCollectionVec, and IMPL::LCRunHeaderImpl.

Definition at line 14 of file AccessChecked.cc.

References IMPL::AccessChecked::_readOnly.

Referenced by IMPL::LCEventImpl::setAccessMode(), and IMPL::LCCollectionVec::setReadOnly().

virtual int IMPL::AccessChecked::simpleUID  )  const [inline, virtual, inherited]
 

Definition at line 24 of file AccessChecked.h.


Member Data Documentation

int IMPL::SimCalorimeterHitImpl::_cellID0 [protected]
 

Definition at line 153 of file SimCalorimeterHitImpl.h.

Referenced by SIO::SIOSimCalHitHandler::read(), and setCellID0().

int IMPL::SimCalorimeterHitImpl::_cellID1 [protected]
 

Definition at line 154 of file SimCalorimeterHitImpl.h.

Referenced by SIO::SIOSimCalHitHandler::read(), and setCellID1().

float IMPL::SimCalorimeterHitImpl::_energy [protected]
 

Definition at line 155 of file SimCalorimeterHitImpl.h.

Referenced by addMCParticleContribution(), SIO::SIOSimCalHitHandler::read(), and setEnergy().

int IMPL::AccessChecked::_id [protected, inherited]
 

Definition at line 34 of file AccessChecked.h.

Referenced by IMPL::AccessChecked::AccessChecked().

float IMPL::SimCalorimeterHitImpl::_position[3] [protected]
 

Definition at line 156 of file SimCalorimeterHitImpl.h.

Referenced by SIO::SIOSimCalHitHandler::read(), setPosition(), and SimCalorimeterHitImpl().

bool IMPL::AccessChecked::_readOnly [protected, inherited]
 

Definition at line 33 of file AccessChecked.h.

Referenced by IMPL::AccessChecked::setReadOnly().

MCParticleContVec IMPL::SimCalorimeterHitImpl::_vec [protected]
 

Definition at line 158 of file SimCalorimeterHitImpl.h.

Referenced by addMCParticleContribution(), getEnergyCont(), getNMCContributions(), getParticleCont(), getPDGCont(), getTimeCont(), SIO::SIOSimCalHitHandler::read(), and ~SimCalorimeterHitImpl().


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:26 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1