Belle II Software  release-06-01-15
EKLMSimHit Class Reference

Class EKLMSimHit stores information on particular Geant step; using information from TrackID and ParentTrackID it is possible to restore the hit tree and thus another type of hits. More...

#include <EKLMSimHit.h>

Inheritance diagram for EKLMSimHit:
Collaboration diagram for EKLMSimHit:

Public Member Functions

 EKLMSimHit ()
 Constructor.
 
 ~EKLMSimHit ()
 Destructor.
 
int getTrackID () const
 Get track ID. More...
 
void setTrackID (int track)
 Set track ID. More...
 
int getParentTrackID () const
 Get ID of parent track. More...
 
void setParentTrackID (int track)
 Set ID of parent track. More...
 
int getVolumeID () const
 Get volume identifier. More...
 
void setVolumeID (int id)
 Set volume identifier. More...
 
int getPlane () const
 Get plane number. More...
 
void setPlane (int plane)
 Set plane number. More...
 
int getStrip () const
 Get strip number. More...
 
void setStrip (int strip)
 Set strip number. More...
 
float getGlobalTime () const override
 Get hit time (implementation of base class function) More...
 
void shiftInTime (float delta) override
 Shift SimHit in time (implementation of base class function) More...
 
virtual void setBackgroundTag (unsigned int backgroundTag)
 Set background tag. More...
 
virtual unsigned short getBackgroundTag () const
 Get background tag. More...
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 
int getSection () const
 Get section number. More...
 
void setSection (int Section)
 Set section number. More...
 
int getLayer () const
 Get layer number. More...
 
void setLayer (int layer)
 Set layer number. More...
 
int getSector () const
 Get sector number. More...
 
void setSector (int sector)
 Set sector number. More...
 
float getEnergyDeposit () const
 Get energy deposit. More...
 
void setEnergyDeposit (float eDep)
 Set EnergyDeposit. More...
 
float getTime () const
 Get hit time. More...
 
void setTime (float time)
 Set hit time. More...
 
int getPDG () const
 Get the lund code of the (leading) particle. More...
 
void setPDG (int pdg)
 Set the lund code of the (leading) particle. More...
 
void setLocalPosition (float x, float y, float z)
 Set hit local position. More...
 
float getLocalPositionX () const
 Get hit local position x coordinate. More...
 
float getLocalPositionY () const
 Get hit local position y coordinate. More...
 
float getLocalPositionZ () const
 Get hit local position z coordinate. More...
 
TVector3 getLocalPosition () const
 Get ihit local position. More...
 
void setPosition (float x, float y, float z)
 Set hit global position. More...
 
void setPosition (const TVector3 &pos)
 Set hit global position. More...
 
float getPositionX () const
 Get hit global position x coordinate. More...
 
float getPositionY () const
 Get hit global position y coordinate. More...
 
float getPositionZ () const
 Get hit global position z coordinate. More...
 
TVector3 getPosition () const
 Get hit global position. More...
 
void setMomentum (const TLorentzVector &p)
 Set momentum. More...
 
TLorentzVector getMomentum () const
 Get momentum. More...
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Protected Attributes

int m_PDG = -1
 PDG code of the (leading) particle.
 
float m_Time = -1
 Time of the hit.
 
float m_EDep = -1
 Energy deposition.
 
int m_Section
 Number of section.
 
int m_Layer
 Number of layer.
 
int m_Sector
 Number of sector.
 
float m_localX
 Local position X coordinate.
 
float m_localY
 Local position Y coordinate.
 
float m_localZ
 Local position Z coordinate.
 
float m_globalX
 Global position X coordinate.
 
float m_globalY
 Global position Y coordinate.
 
float m_globalZ
 Global position Z coordinate.
 
float m_e
 Energy.
 
float m_pX
 Momentum X component.
 
float m_pY
 Momentum Y component.
 
float m_pZ
 Momentum Z component. More...
 

Private Member Functions

 ClassDefOverride (Belle2::EKLMSimHit, 2)
 Class version.
 
 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

Private Attributes

int m_trackID = -1
 Track ID.
 
int m_parentTrackID = -1
 Parent track ID.
 
int m_volid = -1
 Volume identifier.
 
int m_Plane = -1
 Number of plane.
 
int m_Strip = -1
 Number of strip.
 
unsigned short m_backgroundTag
 Background tag.
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Detailed Description

Class EKLMSimHit stores information on particular Geant step; using information from TrackID and ParentTrackID it is possible to restore the hit tree and thus another type of hits.

Definition at line 31 of file EKLMSimHit.h.

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ getBackgroundTag()

virtual unsigned short getBackgroundTag ( ) const
inlinevirtualinherited

Get background tag.

Returns
The background tag value.

Definition at line 46 of file SimHitBase.h.

◆ getEnergyDeposit()

float getEnergyDeposit ( ) const
inlineinherited

Get energy deposit.

Returns
Energy deposit.

Definition at line 100 of file EKLMHitBase.h.

◆ getGlobalTime()

float getGlobalTime ( ) const
inlineoverridevirtual

Get hit time (implementation of base class function)

Returns
hit time

Reimplemented from SimHitBase.

Definition at line 143 of file EKLMSimHit.h.

144  {
145  return getTime();
146  }
float getTime() const
Get hit time.
Definition: EKLMHitBase.h:118

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:25
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in RecoTrack, TRGSummary, TrackFitResult, Track, SoftwareTriggerResult, PIDLikelihood, MCParticle, Cluster, and Particle.

Definition at line 362 of file RelationsObject.h.

◆ getLayer()

int getLayer ( ) const
inlineinherited

Get layer number.

Returns
Layer number.

Definition at line 64 of file EKLMHitBase.h.

◆ getLocalPosition()

TVector3 getLocalPosition ( ) const
inlineinherited

Get ihit local position.

Returns
Hit coordinates.

Definition at line 79 of file EKLMHitCoord.h.

◆ getLocalPositionX()

float getLocalPositionX ( ) const
inlineinherited

Get hit local position x coordinate.

Returns
Hit x coordinate.

Definition at line 52 of file EKLMHitCoord.h.

◆ getLocalPositionY()

float getLocalPositionY ( ) const
inlineinherited

Get hit local position y coordinate.

Returns
Hit y coordinate.

Definition at line 61 of file EKLMHitCoord.h.

◆ getLocalPositionZ()

float getLocalPositionZ ( ) const
inlineinherited

Get hit local position z coordinate.

Returns
Hit z coordinate.

Definition at line 70 of file EKLMHitCoord.h.

◆ getMomentum()

TLorentzVector getMomentum ( ) const
inlineinherited

Get momentum.

Returns
Momentum.

Definition at line 47 of file EKLMHitMomentum.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getParentTrackID()

int getParentTrackID ( ) const
inline

Get ID of parent track.

Returns
Track ID.

Definition at line 71 of file EKLMSimHit.h.

◆ getPDG()

int getPDG ( ) const
inlineinherited

Get the lund code of the (leading) particle.

Returns
Particle code.

Definition at line 136 of file EKLMHitBase.h.

◆ getPlane()

int getPlane ( ) const
inline

Get plane number.

Returns
Plane number.

Definition at line 107 of file EKLMSimHit.h.

◆ getPosition()

TVector3 getPosition ( ) const
inlineinherited

Get hit global position.

Returns
Hit coordinates.

Definition at line 82 of file EKLMHitGlobalCoord.h.

◆ getPositionX()

float getPositionX ( ) const
inlineinherited

Get hit global position x coordinate.

Returns
Hit x coordinate.

Definition at line 55 of file EKLMHitGlobalCoord.h.

◆ getPositionY()

float getPositionY ( ) const
inlineinherited

Get hit global position y coordinate.

Returns
Hit y coordinate.

Definition at line 64 of file EKLMHitGlobalCoord.h.

◆ getPositionZ()

float getPositionZ ( ) const
inlineinherited

Get hit global position z coordinate.

Returns
Hit z coordinate.

Definition at line 73 of file EKLMHitGlobalCoord.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getSection()

int getSection ( ) const
inlineinherited

Get section number.

Returns
Section number.

Definition at line 46 of file EKLMHitBase.h.

◆ getSector()

int getSector ( ) const
inlineinherited

Get sector number.

Returns
Sector number.

Definition at line 82 of file EKLMHitBase.h.

◆ getStrip()

int getStrip ( ) const
inline

Get strip number.

Returns
Strip number.

Definition at line 125 of file EKLMSimHit.h.

◆ getTime()

float getTime ( ) const
inlineinherited

Get hit time.

Returns
Hit time.

Definition at line 118 of file EKLMHitBase.h.

◆ getTrackID()

int getTrackID ( ) const
inline

Get track ID.

Returns
Track ID.

Definition at line 53 of file EKLMSimHit.h.

◆ getVolumeID()

int getVolumeID ( ) const
inline

Get volume identifier.

Returns
Identifier.

Definition at line 89 of file EKLMSimHit.h.

◆ setBackgroundTag()

virtual void setBackgroundTag ( unsigned int  backgroundTag)
inlinevirtualinherited

Set background tag.

Parameters
backgroundTagThe desired setting of the background tag.

Definition at line 39 of file SimHitBase.h.

◆ setEnergyDeposit()

void setEnergyDeposit ( float  eDep)
inlineinherited

Set EnergyDeposit.

Parameters
[in]eDepEnergy deposit.

Definition at line 109 of file EKLMHitBase.h.

◆ setLayer()

void setLayer ( int  layer)
inlineinherited

Set layer number.

Parameters
[in]layerLayer number.

Definition at line 73 of file EKLMHitBase.h.

◆ setLocalPosition()

void setLocalPosition ( float  x,
float  y,
float  z 
)
inherited

Set hit local position.

Parameters
[in]xHit x coordinate.
[in]yHit y coordinate.
[in]zHit z coordinate.

Definition at line 25 of file EKLMHitCoord.cc.

◆ setMomentum()

void setMomentum ( const TLorentzVector &  p)
inherited

Set momentum.

Parameters
[in]pmomentum

Definition at line 26 of file EKLMHitMomentum.cc.

◆ setParentTrackID()

void setParentTrackID ( int  track)
inline

Set ID of parent track.

Parameters
[in]tracktrack ID.

Definition at line 80 of file EKLMSimHit.h.

◆ setPDG()

void setPDG ( int  pdg)
inlineinherited

Set the lund code of the (leading) particle.

Parameters
[in]pdgParticle code.

Definition at line 145 of file EKLMHitBase.h.

◆ setPlane()

void setPlane ( int  plane)
inline

Set plane number.

Parameters
[in]planePlane number.

Definition at line 116 of file EKLMSimHit.h.

◆ setPosition() [1/2]

void setPosition ( const TVector3 &  pos)
inherited

Set hit global position.

Parameters
[in]posPosition.

Definition at line 32 of file EKLMHitGlobalCoord.cc.

◆ setPosition() [2/2]

void setPosition ( float  x,
float  y,
float  z 
)
inherited

Set hit global position.

Parameters
[in]xHit x coordinate.
[in]yHit y coordinate.
[in]zHit z coordinate.

Definition at line 25 of file EKLMHitGlobalCoord.cc.

◆ setSection()

void setSection ( int  Section)
inlineinherited

Set section number.

Parameters
[in]SectionSection number.

Definition at line 55 of file EKLMHitBase.h.

◆ setSector()

void setSector ( int  sector)
inlineinherited

Set sector number.

Parameters
[in]sectorSector number.

Definition at line 91 of file EKLMHitBase.h.

◆ setStrip()

void setStrip ( int  strip)
inline

Set strip number.

Parameters
[in]stripStrip number.

Definition at line 134 of file EKLMSimHit.h.

◆ setTime()

void setTime ( float  time)
inlineinherited

Set hit time.

Parameters
[in]timehit time.

Definition at line 127 of file EKLMHitBase.h.

◆ setTrackID()

void setTrackID ( int  track)
inline

Set track ID.

Parameters
[in]tracktrack ID.

Definition at line 62 of file EKLMSimHit.h.

◆ setVolumeID()

void setVolumeID ( int  id)
inline

Set volume identifier.

Parameters
[in]idIdentifier.

Definition at line 98 of file EKLMSimHit.h.

◆ shiftInTime()

void shiftInTime ( float  delta)
inlineoverridevirtual

Shift SimHit in time (implementation of base class function)

Parameters
deltatime shift.

Reimplemented from SimHitBase.

Definition at line 152 of file EKLMSimHit.h.

Member Data Documentation

◆ m_pZ

float m_pZ
protectedinherited

Momentum Z component.

Definition at line 64 of file EKLMHitMomentum.h.


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