Belle II Software  release-08-01-10
KLMSimHit Class Reference

KLM simulation hit. More...

#include <KLMSimHit.h>

Inheritance diagram for KLMSimHit:
Collaboration diagram for KLMSimHit:

Public Member Functions

 KLMSimHit ()
 Constructor.
 
 ~KLMSimHit ()
 Destructor.
 
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...
 
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...
 
int getSubdetector () const
 Get subdetector number. More...
 
void setSubdetector (int subdetector)
 Set subdetector number. More...
 
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...
 
int getPlane () const
 Get plane number. More...
 
bool isPhiReadout () const
 Check whether the hit is from phi plane.
 
void setPlane (int plane)
 Set plane number. More...
 
int getStrip () const
 Get strip number. More...
 
void setStrip (int strip)
 Set strip number. More...
 
int getLastStrip () const
 Get last strip number. More...
 
void setLastStrip (int lastStrip)
 Set last strip number. More...
 
bool inRPC () const
 Determine whether the hit is in RPC or scintillator. 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...
 
float getPropagationTime () const
 Get signal propagation time. More...
 
void setPropagationTime (float propagationTime)
 Set signal propagation time. 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 ROOT::Math::PxPyPzEVector &p)
 Set momentum. More...
 
ROOT::Math::PxPyPzEVector getMomentum () const
 Get momentum. More...
 
void setVolumeID (int id)
 Set volume identifier. 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.
 

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

Private Member Functions

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

Private Attributes

int m_PDG = -1
 PDG code of the (leading) particle.
 
int m_trackID = -1
 Track ID.
 
int m_parentTrackID = -1
 Parent track ID.
 
int m_volid = -1
 Volume identifier.
 
int m_Subdetector = 0
 Number of subdetector.
 
int m_Section = 0
 Number of section.
 
int m_Layer = 0
 Number of layer.
 
int m_Sector = 0
 Number of sector.
 
int m_Plane = 0
 Number of plane.
 
int m_Strip = 0
 Number of strip.
 
int m_LastStrip
 Number of last strip (for BKLM RPC hits).
 
float m_Time = -1
 Time of the hit.
 
float m_EDep = -1
 Energy deposition.
 
float m_PropagationTime = 0
 Time of propagation (ns) from hit to sensor.
 
float m_localX = 0
 Local position X coordinate.
 
float m_localY = 0
 Local position Y coordinate.
 
float m_localZ = 0
 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 = 0
 Energy.
 
float m_pX = 0
 Momentum X component.
 
float m_pY = 0
 Momentum Y component.
 
float m_pZ = 0
 Momentum Z component.
 
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

KLM simulation hit.

Definition at line 31 of file KLMSimHit.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
inline

Get energy deposit.

Returns
Energy deposit.

Definition at line 260 of file KLMSimHit.h.

261  {
262  return m_EDep;
263  }
float m_EDep
Energy deposition.
Definition: KLMSimHit.h:506

◆ getGlobalTime()

float getGlobalTime ( ) const
inlineoverridevirtual

Get hit time (implementation of base class function)

Returns
hit time

Reimplemented from SimHitBase.

Definition at line 453 of file KLMSimHit.h.

◆ 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:24
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.

◆ getLastStrip()

int getLastStrip ( ) const
inline

Get last strip number.

Returns
Last strip number.

Definition at line 232 of file KLMSimHit.h.

◆ getLayer()

int getLayer ( ) const
inline

Get layer number.

Returns
Layer number.

Definition at line 152 of file KLMSimHit.h.

◆ getLocalPosition()

TVector3 getLocalPosition ( ) const
inline

Get ihit local position.

Returns
Hit coordinates.

Definition at line 354 of file KLMSimHit.h.

◆ getLocalPositionX()

float getLocalPositionX ( ) const
inline

Get hit local position x coordinate.

Returns
Hit x coordinate.

Definition at line 327 of file KLMSimHit.h.

◆ getLocalPositionY()

float getLocalPositionY ( ) const
inline

Get hit local position y coordinate.

Returns
Hit y coordinate.

Definition at line 336 of file KLMSimHit.h.

◆ getLocalPositionZ()

float getLocalPositionZ ( ) const
inline

Get hit local position z coordinate.

Returns
Hit z coordinate.

Definition at line 345 of file KLMSimHit.h.

◆ getMomentum()

ROOT::Math::PxPyPzEVector getMomentum ( ) const
inline

Get momentum.

Returns
Momentum.

Definition at line 435 of file KLMSimHit.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 89 of file KLMSimHit.h.

◆ getPDG()

int getPDG ( ) const
inline

Get the lund code of the (leading) particle.

Returns
Particle code.

Definition at line 53 of file KLMSimHit.h.

◆ getPlane()

int getPlane ( ) const
inline

Get plane number.

Returns
Plane number.

Definition at line 188 of file KLMSimHit.h.

◆ getPosition()

TVector3 getPosition ( ) const
inline

Get hit global position.

Returns
Hit coordinates.

Definition at line 414 of file KLMSimHit.h.

◆ getPositionX()

float getPositionX ( ) const
inline

Get hit global position x coordinate.

Returns
Hit x coordinate.

Definition at line 387 of file KLMSimHit.h.

◆ getPositionY()

float getPositionY ( ) const
inline

Get hit global position y coordinate.

Returns
Hit y coordinate.

Definition at line 396 of file KLMSimHit.h.

◆ getPositionZ()

float getPositionZ ( ) const
inline

Get hit global position z coordinate.

Returns
Hit z coordinate.

Definition at line 405 of file KLMSimHit.h.

◆ getPropagationTime()

float getPropagationTime ( ) const
inline

Get signal propagation time.

Returns
Time of propagation (ns) from strip to sensor.

Definition at line 296 of file KLMSimHit.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
inline

Get section number.

Returns
Section number.

Definition at line 134 of file KLMSimHit.h.

◆ getSector()

int getSector ( ) const
inline

Get sector number.

Returns
Sector number.

Definition at line 170 of file KLMSimHit.h.

◆ getStrip()

int getStrip ( ) const
inline

Get strip number.

Returns
Strip number.

Definition at line 214 of file KLMSimHit.h.

◆ getSubdetector()

int getSubdetector ( ) const
inline

Get subdetector number.

Returns
Subdetector number.

Definition at line 116 of file KLMSimHit.h.

◆ getTime()

float getTime ( ) const
inline

Get hit time.

Returns
Hit time.

Definition at line 278 of file KLMSimHit.h.

◆ getTrackID()

int getTrackID ( ) const
inline

Get track ID.

Returns
Track ID.

Definition at line 71 of file KLMSimHit.h.

◆ getVolumeID()

int getVolumeID ( ) const
inline

Get volume identifier.

Returns
Identifier.

Definition at line 107 of file KLMSimHit.h.

◆ inRPC()

bool inRPC ( ) const
inline

Determine whether the hit is in RPC or scintillator.

Returns
Whether hit is in RPC (true) or scintillator (false).

Definition at line 250 of file KLMSimHit.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)
inline

Set EnergyDeposit.

Parameters
[in]eDepEnergy deposit.

Definition at line 269 of file KLMSimHit.h.

◆ setLastStrip()

void setLastStrip ( int  lastStrip)
inline

Set last strip number.

Parameters
[in]lastStripLast strip number.

Definition at line 241 of file KLMSimHit.h.

◆ setLayer()

void setLayer ( int  layer)
inline

Set layer number.

Parameters
[in]layerLayer number.

Definition at line 161 of file KLMSimHit.h.

◆ setLocalPosition()

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

Set hit local position.

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

Definition at line 316 of file KLMSimHit.h.

◆ setMomentum()

void setMomentum ( const ROOT::Math::PxPyPzEVector &  p)
inline

Set momentum.

Parameters
[in]pmomentum

Definition at line 423 of file KLMSimHit.h.

◆ setParentTrackID()

void setParentTrackID ( int  track)
inline

Set ID of parent track.

Parameters
[in]tracktrack ID.

Definition at line 98 of file KLMSimHit.h.

◆ setPDG()

void setPDG ( int  pdg)
inline

Set the lund code of the (leading) particle.

Parameters
[in]pdgParticle code.

Definition at line 62 of file KLMSimHit.h.

◆ setPlane()

void setPlane ( int  plane)
inline

Set plane number.

Parameters
[in]planePlane number.

Definition at line 205 of file KLMSimHit.h.

◆ setPosition() [1/2]

void setPosition ( const TVector3 &  pos)
inline

Set hit global position.

Parameters
[in]posPosition.

Definition at line 376 of file KLMSimHit.h.

◆ setPosition() [2/2]

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

Set hit global position.

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

Definition at line 365 of file KLMSimHit.h.

◆ setPropagationTime()

void setPropagationTime ( float  propagationTime)
inline

Set signal propagation time.

Parameters
[in]propagationTimeTime of propagation (ns) from strip to sensor.

Definition at line 305 of file KLMSimHit.h.

◆ setSection()

void setSection ( int  Section)
inline

Set section number.

Parameters
[in]SectionSection number.

Definition at line 143 of file KLMSimHit.h.

◆ setSector()

void setSector ( int  sector)
inline

Set sector number.

Parameters
[in]sectorSector number.

Definition at line 179 of file KLMSimHit.h.

◆ setStrip()

void setStrip ( int  strip)
inline

Set strip number.

Parameters
[in]stripStrip number.

Definition at line 223 of file KLMSimHit.h.

◆ setSubdetector()

void setSubdetector ( int  subdetector)
inline

Set subdetector number.

Parameters
[in]subdetectorSubdetector number.

Definition at line 125 of file KLMSimHit.h.

◆ setTime()

void setTime ( float  time)
inline

Set hit time.

Parameters
[in]timehit time.

Definition at line 287 of file KLMSimHit.h.

◆ setTrackID()

void setTrackID ( int  track)
inline

Set track ID.

Parameters
[in]tracktrack ID.

Definition at line 80 of file KLMSimHit.h.

◆ setVolumeID()

void setVolumeID ( int  id)
inline

Set volume identifier.

Parameters
[in]idIdentifier.

Definition at line 444 of file KLMSimHit.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 462 of file KLMSimHit.h.


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