IMPL::SimCalorimeterHitImpl Class Reference

Implementation of the generic SimCalorimeterHit. More...

#include <IMPL/SimCalorimeterHitImpl.h>

Inheritance diagram for IMPL::SimCalorimeterHitImpl:
EVENT::SimCalorimeterHit IMPL::AccessChecked EVENT::LCObject lcrtrel::LCRTRelations IOIMPL::SimCalorimeterHitIOImpl

List of all members.

Public Member Functions

 SimCalorimeterHitImpl ()
 Default constructor, initializes values to 0.
 SimCalorimeterHitImpl (const EVENT::SimCalorimeterHit &hit)
 Copy constructor - shallow copy.
virtual ~SimCalorimeterHitImpl ()
 Destructor.
virtual int id () const
 Returns an object id for internal (debugging) use in LCIO.
virtual int getCellID0 () const
 Create a deep copy of itself.
virtual int getCellID1 () const
 Returns the second detector specific (geometrical) cell id.
virtual float getEnergy () const
 Returns the energy of the hit.
virtual const float * getPosition () const
 Returns the position of the hit in world coordinates.
virtual const float * getStepPosition (int i) const
 Returns the position where the energy deposited (step) occurred optional, only if bit LCIO::CHBIT_STEP is set.
virtual int getNMCParticles () const
 Returns the number of MC contributions to the hit.
virtual int getNMCContributions () const
 Returns the number of MC contributions to the hit.
virtual float getEnergyCont (int i) const
 Returns the energy in [GeV] of the i-th contribution to the hit.
virtual float getTimeCont (int i) const
 Returns the time of the i-th in [ns] contribution to the hit.
virtual float getLengthCont (int i) const
 Returns the step length of the i-th contribution to the hit.
virtual int getPDGCont (int i) const
 Returns the PDG code of the shower particle that caused this contribution.
virtual EVENT::MCParticlegetParticleCont (int i) const
 Returns the MCParticle that caused the shower responsible for this contribution to the hit.
void setCellID0 (int id0)
 Sets the first cell id;.
void setCellID1 (int id1)
 Sets the second cell id; Only store if the flag word (bit CHBIT_ID1) of the collection is set.
void setEnergy (float en)
 Sets the energy.
void setPosition (const float pos[3])
 Sets the position.
void addMCParticleContribution (EVENT::MCParticle *p, float en, float t)
 Adds an MCParticle contribution to the hit - contributions for the same MCParticle are combined into one, where the energy is accumulated and the time is the energy weighted mean time.
void addMCParticleContribution (EVENT::MCParticle *p, float en, float t, int pdg, float *stepPos=0)
 Adds a detailed MCParticle contribution to the hit.
void addMCParticleContribution (EVENT::MCParticle *p, float en, float t, float l, int pdg, float *stepPos=0)
 Adds a detailed MCParticle contribution to the hit.

Protected Attributes

int _cellID0
int _cellID1
float _energy
float _position [3]

Detailed Description

Implementation of the generic SimCalorimeterHit.

Author:
gaede
Version:
Mar 5, 2003

Member Function Documentation

void IMPL::SimCalorimeterHitImpl::addMCParticleContribution ( EVENT::MCParticle p,
float  en,
float  t,
float  l,
int  pdg,
float *  stepPos = 0 
)

Adds a detailed MCParticle contribution to the hit.

This method should be used for the detailed mode, where one MCParticleContribution is stored for every simulator step.
If stepPos==0, (0,0,0) will be stored. NB: The flag word bit LCIO::CHBIT_STEP (or LCIO::CHBIT_PDG) has to be set, in order for the PDG and step position to be stored.

void IMPL::SimCalorimeterHitImpl::addMCParticleContribution ( EVENT::MCParticle p,
float  en,
float  t,
int  pdg,
float *  stepPos = 0 
) [inline]

Adds a detailed MCParticle contribution to the hit.

This method should be used for the detailed mode, where one MCParticleContribution is stored for every simulator step.
If stepPos==0, (0,0,0) will be stored. NB: The flag word bit LCIO::CHBIT_STEP (or LCIO::CHBIT_PDG) has to be set, in order for the PDG and step position to be stored.

Deprecated:
use addMCParticleContribution() with step length

References addMCParticleContribution().

void IMPL::SimCalorimeterHitImpl::addMCParticleContribution ( EVENT::MCParticle p,
float  en,
float  t 
)

Adds an MCParticle contribution to the hit - contributions for the same MCParticle are combined into one, where the energy is accumulated and the time is the energy weighted mean time.

Use this method for the standard LCIO mode, where one energy contribution per primary particle entering the calorimeter is stored.

Referenced by addMCParticleContribution().

int IMPL::SimCalorimeterHitImpl::getCellID0 (  )  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 !Returns the detector specific (geometrical) cell id.

Implements EVENT::SimCalorimeterHit.

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.

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.

float IMPL::SimCalorimeterHitImpl::getLengthCont ( int  i  )  const [virtual]

Returns the step length of the i-th contribution to the hit.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

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_STEP==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.

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.

Deprecated:
See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

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.

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_STEP of the collection whether this information is available.

See also:
getNMCContributions()

Implements EVENT::SimCalorimeterHit.

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.

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.

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.

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

Sets the position.

Not stored if LCIO.CHBIT_LONG isn't set.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Friends

Generated on 6 Mar 2020 for LCIO by  doxygen 1.6.1