Belle II Software development
KLMSimHit Class Reference

KLM simulation hit. More...

#include <KLMSimHit.h>

Inheritance diagram for KLMSimHit:
SimHitBase RelationsInterface< BASE >

Public Member Functions

 KLMSimHit ()
 Constructor.
 
 ~KLMSimHit ()
 Destructor.
 
int getPDG () const
 Get the lund code of the (leading) particle.
 
void setPDG (int pdg)
 Set the lund code of the (leading) particle.
 
int getTrackID () const
 Get track ID.
 
void setTrackID (int track)
 Set track ID.
 
int getParentTrackID () const
 Get ID of parent track.
 
void setParentTrackID (int track)
 Set ID of parent track.
 
int getVolumeID () const
 Get volume identifier.
 
int getSubdetector () const
 Get subdetector number.
 
void setSubdetector (int subdetector)
 Set subdetector number.
 
int getSection () const
 Get section number.
 
void setSection (int Section)
 Set section number.
 
int getLayer () const
 Get layer number.
 
void setLayer (int layer)
 Set layer number.
 
int getSector () const
 Get sector number.
 
void setSector (int sector)
 Set sector number.
 
int getPlane () const
 Get plane number.
 
bool isPhiReadout () const
 Check whether the hit is from phi plane.
 
void setPlane (int plane)
 Set plane number.
 
int getStrip () const
 Get strip number.
 
void setStrip (int strip)
 Set strip number.
 
int getLastStrip () const
 Get last strip number.
 
void setLastStrip (int lastStrip)
 Set last strip number.
 
bool inRPC () const
 Determine whether the hit is in RPC or scintillator.
 
float getEnergyDeposit () const
 Get energy deposit.
 
void setEnergyDeposit (float eDep)
 Set EnergyDeposit.
 
float getTime () const
 Get hit time.
 
void setTime (float time)
 Set hit time.
 
float getPropagationTime () const
 Get signal propagation time.
 
void setPropagationTime (float propagationTime)
 Set signal propagation time.
 
void setLocalPosition (float x, float y, float z)
 Set hit local position.
 
float getLocalPositionX () const
 Get hit local position x coordinate.
 
float getLocalPositionY () const
 Get hit local position y coordinate.
 
float getLocalPositionZ () const
 Get hit local position z coordinate.
 
ROOT::Math::XYZVector getLocalPosition () const
 Get ihit local position.
 
void setPosition (float x, float y, float z)
 Set hit global position.
 
void setPosition (const ROOT::Math::XYZVector &pos)
 Set hit global position.
 
float getPositionX () const
 Get hit global position x coordinate.
 
float getPositionY () const
 Get hit global position y coordinate.
 
float getPositionZ () const
 Get hit global position z coordinate.
 
ROOT::Math::XYZVector getPosition () const
 Get hit global position.
 
void setMomentum (const ROOT::Math::PxPyPzEVector &p)
 Set momentum.
 
ROOT::Math::PxPyPzEVector getMomentum () const
 Get momentum.
 
void setVolumeID (int id)
 Set volume identifier.
 
float getGlobalTime () const override
 Get hit time (implementation of base class function)
 
void shiftInTime (float delta) override
 Shift SimHit in time (implementation of base class function)
 
virtual void setBackgroundTag (unsigned int backgroundTag)
 Set background tag.
 
virtual unsigned short getBackgroundTag () const
 Get background tag.
 
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).
 
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).
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
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.
 
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.
 
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.
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
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.
 
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.
 
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.
 
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.
 
virtual std::string getName () const
 Return a short name that describes this object, e.g.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format.
 
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.

Constructor & Destructor Documentation

◆ KLMSimHit()

KLMSimHit ( )
inline

Constructor.

Definition at line 38 of file KLMSimHit.h.

39 {
40 }

◆ ~KLMSimHit()

~KLMSimHit ( )
inline

Destructor.

Definition at line 45 of file KLMSimHit.h.

46 {
47 }

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.

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
DataStore::StoreEntry * m_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.

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

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

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

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
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).

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
inlineprotectedinherited

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

Definition at line 418 of file RelationsObject.h.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getBackgroundTag()

virtual unsigned short getBackgroundTag ( ) const
inlinevirtualinherited

Get background tag.

Returns
The background tag value.

Definition at line 46 of file SimHitBase.h.

46{ return m_backgroundTag; }
unsigned short m_backgroundTag
Background tag.
Definition: SimHitBase.h:68

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

454 {
455 return getTime();
456 }
float getTime() const
Get hit time.
Definition: KLMSimHit.h:278

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

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ 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 Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, TRGSummary, and RecoTrack.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getLastStrip()

int getLastStrip ( ) const
inline

Get last strip number.

Returns
Last strip number.

Definition at line 232 of file KLMSimHit.h.

233 {
234 return m_LastStrip;
235 }
int m_LastStrip
Number of last strip (for BKLM RPC hits).
Definition: KLMSimHit.h:500

◆ getLayer()

int getLayer ( ) const
inline

Get layer number.

Returns
Layer number.

Definition at line 152 of file KLMSimHit.h.

153 {
154 return m_Layer;
155 }
int m_Layer
Number of layer.
Definition: KLMSimHit.h:488

◆ getLocalPosition()

ROOT::Math::XYZVector getLocalPosition ( ) const
inline

Get ihit local position.

Returns
Hit coordinates.

Definition at line 354 of file KLMSimHit.h.

355 {
356 return ROOT::Math::XYZVector(m_localX, m_localY, m_localZ);
357 }
float m_localZ
Local position Z coordinate.
Definition: KLMSimHit.h:518
float m_localX
Local position X coordinate.
Definition: KLMSimHit.h:512
float m_localY
Local position Y coordinate.
Definition: KLMSimHit.h:515

◆ getLocalPositionX()

float getLocalPositionX ( ) const
inline

Get hit local position x coordinate.

Returns
Hit x coordinate.

Definition at line 327 of file KLMSimHit.h.

328 {
329 return m_localX;
330 }

◆ getLocalPositionY()

float getLocalPositionY ( ) const
inline

Get hit local position y coordinate.

Returns
Hit y coordinate.

Definition at line 336 of file KLMSimHit.h.

337 {
338 return m_localY;
339 }

◆ getLocalPositionZ()

float getLocalPositionZ ( ) const
inline

Get hit local position z coordinate.

Returns
Hit z coordinate.

Definition at line 345 of file KLMSimHit.h.

346 {
347 return m_localZ;
348 }

◆ getMomentum()

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

Get momentum.

Returns
Momentum.

Definition at line 435 of file KLMSimHit.h.

436 {
437 return ROOT::Math::PxPyPzEVector(m_pX, m_pY, m_pZ, m_e);
438 }
float m_e
Energy.
Definition: KLMSimHit.h:530
float m_pZ
Momentum Z component.
Definition: KLMSimHit.h:539
float m_pX
Momentum X component.
Definition: KLMSimHit.h:533
float m_pY
Momentum Y component.
Definition: KLMSimHit.h:536

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

◆ getParentTrackID()

int getParentTrackID ( ) const
inline

Get ID of parent track.

Returns
Track ID.

Definition at line 89 of file KLMSimHit.h.

90 {
91 return m_parentTrackID;
92 }
int m_parentTrackID
Parent track ID.
Definition: KLMSimHit.h:476

◆ getPDG()

int getPDG ( ) const
inline

Get the lund code of the (leading) particle.

Returns
Particle code.

Definition at line 53 of file KLMSimHit.h.

54 {
55 return m_PDG;
56 }
int m_PDG
PDG code of the (leading) particle.
Definition: KLMSimHit.h:470

◆ getPlane()

int getPlane ( ) const
inline

Get plane number.

Returns
Plane number.

Definition at line 188 of file KLMSimHit.h.

189 {
190 return m_Plane;
191 }
int m_Plane
Number of plane.
Definition: KLMSimHit.h:494

◆ getPosition()

ROOT::Math::XYZVector getPosition ( ) const
inline

Get hit global position.

Returns
Hit coordinates.

Definition at line 414 of file KLMSimHit.h.

415 {
416 return ROOT::Math::XYZVector(m_globalX, m_globalY, m_globalZ);
417 }
float m_globalX
Global position X coordinate.
Definition: KLMSimHit.h:521
float m_globalZ
Global position Z coordinate.
Definition: KLMSimHit.h:527
float m_globalY
Global position Y coordinate.
Definition: KLMSimHit.h:524

◆ getPositionX()

float getPositionX ( ) const
inline

Get hit global position x coordinate.

Returns
Hit x coordinate.

Definition at line 387 of file KLMSimHit.h.

388 {
389 return m_globalX;
390 }

◆ getPositionY()

float getPositionY ( ) const
inline

Get hit global position y coordinate.

Returns
Hit y coordinate.

Definition at line 396 of file KLMSimHit.h.

397 {
398 return m_globalY;
399 }

◆ getPositionZ()

float getPositionZ ( ) const
inline

Get hit global position z coordinate.

Returns
Hit z coordinate.

Definition at line 405 of file KLMSimHit.h.

406 {
407 return m_globalZ;
408 }

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

297 {
298 return m_PropagationTime;
299 }
float m_PropagationTime
Time of propagation (ns) from hit to sensor.
Definition: KLMSimHit.h:509

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

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

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

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

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

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

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

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

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

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

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

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

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

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

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

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

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

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getSection()

int getSection ( ) const
inline

Get section number.

Returns
Section number.

Definition at line 134 of file KLMSimHit.h.

135 {
136 return m_Section;
137 }
int m_Section
Number of section.
Definition: KLMSimHit.h:485

◆ getSector()

int getSector ( ) const
inline

Get sector number.

Returns
Sector number.

Definition at line 170 of file KLMSimHit.h.

171 {
172 return m_Sector;
173 }
int m_Sector
Number of sector.
Definition: KLMSimHit.h:491

◆ getStrip()

int getStrip ( ) const
inline

Get strip number.

Returns
Strip number.

Definition at line 214 of file KLMSimHit.h.

215 {
216 return m_Strip;
217 }
int m_Strip
Number of strip.
Definition: KLMSimHit.h:497

◆ getSubdetector()

int getSubdetector ( ) const
inline

Get subdetector number.

Returns
Subdetector number.

Definition at line 116 of file KLMSimHit.h.

117 {
118 return m_Subdetector;
119 }
int m_Subdetector
Number of subdetector.
Definition: KLMSimHit.h:482

◆ getTime()

float getTime ( ) const
inline

Get hit time.

Returns
Hit time.

Definition at line 278 of file KLMSimHit.h.

279 {
280 return m_Time;
281 }
float m_Time
Time of the hit.
Definition: KLMSimHit.h:503

◆ getTrackID()

int getTrackID ( ) const
inline

Get track ID.

Returns
Track ID.

Definition at line 71 of file KLMSimHit.h.

72 {
73 return m_trackID;
74 }
int m_trackID
Track ID.
Definition: KLMSimHit.h:473

◆ getVolumeID()

int getVolumeID ( ) const
inline

Get volume identifier.

Returns
Identifier.

Definition at line 107 of file KLMSimHit.h.

108 {
109 return m_volid;
110 }
int m_volid
Volume identifier.
Definition: KLMSimHit.h:479

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

◆ isPhiReadout()

bool isPhiReadout ( ) const
inline

Check whether the hit is from phi plane.

Definition at line 196 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.

40 { m_backgroundTag = static_cast<unsigned short>(backgroundTag); }

◆ setEnergyDeposit()

void setEnergyDeposit ( float  eDep)
inline

Set EnergyDeposit.

Parameters
[in]eDepEnergy deposit.

Definition at line 269 of file KLMSimHit.h.

270 {
271 m_EDep = eDep;
272 }

◆ setLastStrip()

void setLastStrip ( int  lastStrip)
inline

Set last strip number.

Parameters
[in]lastStripLast strip number.

Definition at line 241 of file KLMSimHit.h.

242 {
243 m_LastStrip = lastStrip;
244 }

◆ setLayer()

void setLayer ( int  layer)
inline

Set layer number.

Parameters
[in]layerLayer number.

Definition at line 161 of file KLMSimHit.h.

162 {
163 m_Layer = layer;
164 }

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

317 {
318 m_localX = x;
319 m_localY = y;
320 m_localZ = z;
321 }

◆ setMomentum()

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

Set momentum.

Parameters
[in]pmomentum

Definition at line 423 of file KLMSimHit.h.

424 {
425 m_e = p.E();
426 m_pX = p.Px();
427 m_pY = p.Py();
428 m_pZ = p.Pz();
429 }

◆ setParentTrackID()

void setParentTrackID ( int  track)
inline

Set ID of parent track.

Parameters
[in]tracktrack ID.

Definition at line 98 of file KLMSimHit.h.

99 {
100 m_parentTrackID = track;
101 }

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

63 {
64 m_PDG = pdg;
65 }

◆ setPlane()

void setPlane ( int  plane)
inline

Set plane number.

Parameters
[in]planePlane number.

Definition at line 205 of file KLMSimHit.h.

206 {
207 m_Plane = plane;
208 }

◆ setPosition() [1/2]

void setPosition ( const ROOT::Math::XYZVector &  pos)
inline

Set hit global position.

Parameters
[in]posPosition.

Definition at line 376 of file KLMSimHit.h.

377 {
378 m_globalX = pos.X();
379 m_globalY = pos.Y();
380 m_globalZ = pos.Z();
381 }

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

366 {
367 m_globalX = x;
368 m_globalY = y;
369 m_globalZ = z;
370 }

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

306 {
307 m_PropagationTime = propagationTime;
308 }

◆ setSection()

void setSection ( int  Section)
inline

Set section number.

Parameters
[in]SectionSection number.

Definition at line 143 of file KLMSimHit.h.

144 {
145 m_Section = Section;
146 }

◆ setSector()

void setSector ( int  sector)
inline

Set sector number.

Parameters
[in]sectorSector number.

Definition at line 179 of file KLMSimHit.h.

180 {
181 m_Sector = sector;
182 }

◆ setStrip()

void setStrip ( int  strip)
inline

Set strip number.

Parameters
[in]stripStrip number.

Definition at line 223 of file KLMSimHit.h.

224 {
225 m_Strip = strip;
226 }

◆ setSubdetector()

void setSubdetector ( int  subdetector)
inline

Set subdetector number.

Parameters
[in]subdetectorSubdetector number.

Definition at line 125 of file KLMSimHit.h.

126 {
127 m_Subdetector = subdetector;
128 }

◆ setTime()

void setTime ( float  time)
inline

Set hit time.

Parameters
[in]timehit time.

Definition at line 287 of file KLMSimHit.h.

288 {
289 m_Time = time;
290 }

◆ setTrackID()

void setTrackID ( int  track)
inline

Set track ID.

Parameters
[in]tracktrack ID.

Definition at line 80 of file KLMSimHit.h.

81 {
82 m_trackID = track;
83 }

◆ setVolumeID()

void setVolumeID ( int  id)
inline

Set volume identifier.

Parameters
[in]idIdentifier.

Definition at line 444 of file KLMSimHit.h.

445 {
446 m_volid = id;
447 }

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

463 {
464 setTime(getTime() + delta);
465 }
void setTime(float time)
Set hit time.
Definition: KLMSimHit.h:287

Member Data Documentation

◆ m_backgroundTag

unsigned short m_backgroundTag
privateinherited

Background tag.

Definition at line 68 of file SimHitBase.h.

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_e

float m_e = 0
private

Energy.

Definition at line 530 of file KLMSimHit.h.

◆ m_EDep

float m_EDep = -1
private

Energy deposition.

Definition at line 506 of file KLMSimHit.h.

◆ m_globalX

float m_globalX
private

Global position X coordinate.

Definition at line 521 of file KLMSimHit.h.

◆ m_globalY

float m_globalY
private

Global position Y coordinate.

Definition at line 524 of file KLMSimHit.h.

◆ m_globalZ

float m_globalZ
private

Global position Z coordinate.

Definition at line 527 of file KLMSimHit.h.

◆ m_LastStrip

int m_LastStrip
private

Number of last strip (for BKLM RPC hits).

Definition at line 500 of file KLMSimHit.h.

◆ m_Layer

int m_Layer = 0
private

Number of layer.

Definition at line 488 of file KLMSimHit.h.

◆ m_localX

float m_localX = 0
private

Local position X coordinate.

Definition at line 512 of file KLMSimHit.h.

◆ m_localY

float m_localY = 0
private

Local position Y coordinate.

Definition at line 515 of file KLMSimHit.h.

◆ m_localZ

float m_localZ = 0
private

Local position Z coordinate.

Definition at line 518 of file KLMSimHit.h.

◆ m_parentTrackID

int m_parentTrackID = -1
private

Parent track ID.

Definition at line 476 of file KLMSimHit.h.

◆ m_PDG

int m_PDG = -1
private

PDG code of the (leading) particle.

Definition at line 470 of file KLMSimHit.h.

◆ m_Plane

int m_Plane = 0
private

Number of plane.

Definition at line 494 of file KLMSimHit.h.

◆ m_PropagationTime

float m_PropagationTime = 0
private

Time of propagation (ns) from hit to sensor.

Definition at line 509 of file KLMSimHit.h.

◆ m_pX

float m_pX = 0
private

Momentum X component.

Definition at line 533 of file KLMSimHit.h.

◆ m_pY

float m_pY = 0
private

Momentum Y component.

Definition at line 536 of file KLMSimHit.h.

◆ m_pZ

float m_pZ = 0
private

Momentum Z component.

Definition at line 539 of file KLMSimHit.h.

◆ m_Section

int m_Section = 0
private

Number of section.

Definition at line 485 of file KLMSimHit.h.

◆ m_Sector

int m_Sector = 0
private

Number of sector.

Definition at line 491 of file KLMSimHit.h.

◆ m_Strip

int m_Strip = 0
private

Number of strip.

Definition at line 497 of file KLMSimHit.h.

◆ m_Subdetector

int m_Subdetector = 0
private

Number of subdetector.

Definition at line 482 of file KLMSimHit.h.

◆ m_Time

float m_Time = -1
private

Time of the hit.

Definition at line 503 of file KLMSimHit.h.

◆ m_trackID

int m_trackID = -1
private

Track ID.

Definition at line 473 of file KLMSimHit.h.

◆ m_volid

int m_volid = -1
private

Volume identifier.

Definition at line 479 of file KLMSimHit.h.


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