Belle II Software development
KLMHit2d Class Reference

KLM 2d hit. More...

#include <KLMHit2d.h>

Inheritance diagram for KLMHit2d:
RelationsInterface< BASE >

Public Member Functions

 KLMHit2d ()
 Constructor.
 
 KLMHit2d (KLMDigit *digit1, KLMDigit *digit2)
 Constructor from two orthogonal KLMDigits (EKLM).
 
 KLMHit2d (const BKLMHit1d *hitPhi, const BKLMHit1d *hitZ, const CLHEP::Hep3Vector &globalPos, double time)
 Constructor with initial values (BKLM).
 
 ~KLMHit2d ()
 Destructor.
 
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 getSector () const
 Get sector number.
 
void setSector (int sector)
 Set sector number.
 
int getLayer () const
 Get layer number.
 
void setLayer (int layer)
 Set layer number.
 
void setXStripMin (int strip)
 Set first strip number for EKLM hit in the x-measuring plane.
 
void setXStripMax (int strip)
 Set last strip number for EKLM hit in the x-measuring plane.
 
void setYStripMin (int strip)
 Set first strip number for EKLM hit in the y-measuring plane.
 
void setYStripMax (int strip)
 Set last strip number for EKLM hit in y-measuring plane.
 
bool inRPC () const
 Determine whether this 2D hit is in RPC or scintillator.
 
int getZStripMin () const
 Get strip number for z plane.
 
int getZStripMax () const
 Get last strip number for z plane.
 
double getZStripAve () const
 Get average strip number for z plane.
 
int getPhiStripMin () const
 Get strip number for phi plane.
 
int getPhiStripMax () const
 Get last strip number for phi plane.
 
double getPhiStripAve () const
 Get average strip number for phi plane.
 
int getXStripMin () const
 Get first strip number for EKLM hit in the x-measuring plane.
 
int getXStripMax () const
 Get last strip number for EKLM hit in the x-measuring plane.
 
int getYStripMin () const
 Get first strip number for EKLM hit in the y-measuring plane.
 
int getYStripMax () const
 Get last strip number for EKLM hit in the y-measuring plane.
 
void setPosition (float x, float y, float z)
 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.
 
float getTime () const
 Get hit time.
 
void setTime (float time)
 Set hit time.
 
void setMCTime (float t)
 Set MC time.
 
float getMCTime () const
 Get MC time.
 
float getEnergyDeposit () const
 Get energy deposit.
 
void setEnergyDeposit (float energyDeposit)
 Set energy deposit.
 
float getChiSq () const
 Get Chi^2 of the crossing point.
 
void setChiSq (float chisq)
 Set Chi^2 of the crossing point.
 
bool isOutOfTime () const
 Determine whether this 2D hit is outside the trigger-coincidence window.
 
void isOutOfTime (bool outOfTime)
 Set whether this 2D hit is outside the trigger-coincidence window.
 
bool isOnTrack () const
 Determine whether this 2D hit is associated with a muid-extrapolated track.
 
void isOnTrack (bool onTrack)
 Set whether this 2D hit is associated with a muid-extrapolated track.
 
bool isOnStaTrack () const
 Determine whether this 2D hit is associated with a BKLM stand-alone track.
 
void isOnStaTrack (bool onStaTrack)
 Set whether this 2D hit is associated with a BKLM stand-alone track.
 
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

 ClassDef (Belle2::KLMHit2d, 1)
 Class version.
 

Private Attributes

int m_Subdetector = 0
 Number of subdetector.
 
int m_Section = 0
 Number of section.
 
int m_Sector = 0
 Number of sector.
 
int m_Layer = 0
 Number of layer.
 
int m_Strip [KLMElementNumbers::getMaximalPlaneNumber()] = {0}
 Number of strip in each plane.
 
int m_LastStrip [KLMElementNumbers::getMaximalPlaneNumber()] = {0}
 Number of last strip in each plane.
 
float m_GlobalX = 0.0
 Global position X coordinate.
 
float m_GlobalY = 0.0
 Global position Y coordinate.
 
float m_GlobalZ = 0.0
 Global position Z coordinate.
 
float m_Time = 0.0
 Time of the hit.
 
float m_MCTime = 0.0
 MC time.
 
float m_EnergyDeposit = 0.0
 Energy deposition.
 
float m_ChiSq = 0.0
 Chi^2 of the hit.
 
bool m_IsOutOfTime = false
 Whether this 2D hit is outside the trigger-coincidence window.
 
bool m_IsOnTrack = false
 Whether this 2D hit is associated with a muid-extrapolated track.
 
bool m_IsOnStaTrack = false
 Whether this 2D hit is associated with a BKLM stand-alone track.
 
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 2d hit.

Definition at line 33 of file KLMHit2d.h.

Constructor & Destructor Documentation

◆ KLMHit2d() [1/3]

KLMHit2d ( )

Constructor.

Definition at line 17 of file KLMHit2d.cc.

17 :
18 m_ChiSq(-1)
19{
20}
float m_ChiSq
Chi^2 of the hit.
Definition: KLMHit2d.h:483

◆ KLMHit2d() [2/3]

KLMHit2d ( KLMDigit digit1,
KLMDigit digit2 
)
explicit

Constructor from two orthogonal KLMDigits (EKLM).

Parameters
[in]digit1KLMDigit in plane 1.
[in]digit2KLMDigit in plane 2.

Definition at line 22 of file KLMHit2d.cc.

22 :
23 m_ChiSq(-1)
24{
26 B2FATAL("Trying to construct a KLMHit2d using KLMDigit from BKLM.");
28 setSection(digit1->getSection());
29 setLayer(digit1->getLayer());
30 setSector(digit1->getSector());
31 // multi-strip hit will have a range of struck scintillators => worse position resolution in ext/muid
32 // see docs.belle2.org/record/255 Figure 2 for strip orientations of planes 1 and 2 in each sector
33 if (getSector() <= 2) { // sectors 1 and 2
34 // digit1 (digit2) from EKLM plane 1 (2) measures global y (x) coordinate
35 setYStripMin(digit1->getStrip());
36 setYStripMax(std::max(digit1->getStrip(), digit1->getLastStrip()));
37 setXStripMin(digit2->getStrip());
38 setXStripMax(std::max(digit2->getStrip(), digit2->getLastStrip()));
39 } else { // sectors 3 and 4
40 // digit1 (digit2) from EKLM plane 1 (2) measures global x (y) coordinate
41 setXStripMin(digit1->getStrip());
42 setXStripMax(std::max(digit1->getStrip(), digit1->getLastStrip()));
43 setYStripMin(digit2->getStrip());
44 setYStripMax(std::max(digit2->getStrip(), digit2->getLastStrip()));
45 }
46}
int getSubdetector() const
Get subdetector number.
Definition: KLMDigit.h:72
int getLayer() const
Get layer number.
Definition: KLMDigit.h:126
int getSection() const
Get section number.
Definition: KLMDigit.h:90
int getStrip() const
Get strip number.
Definition: KLMDigit.h:162
int getSector() const
Get sector number.
Definition: KLMDigit.h:108
int getLastStrip() const
Get last strip number (for multi-strip digits).
Definition: KLMDigit.h:180
void setSection(int section)
Set section number.
Definition: KLMHit2d.h:105
void setXStripMin(int strip)
Set first strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:150
int getSector() const
Get sector number.
Definition: KLMHit2d.h:114
void setYStripMin(int strip)
Set first strip number for EKLM hit in the y-measuring plane.
Definition: KLMHit2d.h:168
void setSector(int sector)
Set sector number.
Definition: KLMHit2d.h:123
int m_Subdetector
Number of subdetector.
Definition: KLMHit2d.h:445
void setXStripMax(int strip)
Set last strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:159
void setYStripMax(int strip)
Set last strip number for EKLM hit in y-measuring plane.
Definition: KLMHit2d.h:177
void setLayer(int layer)
Set layer number.
Definition: KLMHit2d.h:141

◆ KLMHit2d() [3/3]

KLMHit2d ( const BKLMHit1d hitPhi,
const BKLMHit1d hitZ,
const CLHEP::Hep3Vector &  globalPos,
double  time 
)

Constructor with initial values (BKLM).

Parameters
[in]hitPhiReconstructed BKLMHit1d along the phi-measuring direction.
[in]hitZReconstructed BKLMHit1d along the z-measuring direction.
[in]globalPosReconstructed position in global coordinates.
[in]timeReconstructed time of the hit.

Definition at line 49 of file KLMHit2d.cc.

49 :
51{
53 hitZ->getModuleID()))
54 B2WARNING("Attempt to form a 2D hit from distinct-module 1D hits");
56 m_Section = hitPhi->getSection();
57 m_Sector = hitPhi->getSector();
58 m_Layer = hitPhi->getLayer();
63 m_GlobalX = globalPos.x();
64 m_GlobalY = globalPos.y();
65 m_GlobalZ = globalPos.z();
66 m_Time = time;
68 addRelationTo(hitPhi);
69 addRelationTo(hitZ);
70}
static bool hitsFromSameModule(int module1, int module2)
Check whether the hits are from the same module.
int getStripMin() const
Get lowest strip number of this 1D hit.
Definition: BKLMHit1d.h:97
int getLayer() const
Get layer number.
Definition: BKLMHit1d.h:75
int getSection() const
Get section number.
Definition: BKLMHit1d.h:61
int getSector() const
Get sector number.
Definition: BKLMHit1d.h:68
int getModuleID() const
Get detector-module identifier.
Definition: BKLMHit1d.h:119
float getEnergyDeposit() const
Get energy deposition.
Definition: BKLMHit1d.h:140
int getStripMax() const
Get highest strip number of this 1D hit.
Definition: BKLMHit1d.h:104
int m_LastStrip[KLMElementNumbers::getMaximalPlaneNumber()]
Number of last strip in each plane.
Definition: KLMHit2d.h:460
int m_Strip[KLMElementNumbers::getMaximalPlaneNumber()]
Number of strip in each plane.
Definition: KLMHit2d.h:457
float m_GlobalY
Global position Y coordinate.
Definition: KLMHit2d.h:466
float m_Time
Time of the hit.
Definition: KLMHit2d.h:472
int m_Section
Number of section.
Definition: KLMHit2d.h:448
float m_EnergyDeposit
Energy deposition.
Definition: KLMHit2d.h:478
float m_GlobalZ
Global position Z coordinate.
Definition: KLMHit2d.h:469
int m_Sector
Number of sector.
Definition: KLMHit2d.h:451
int m_Layer
Number of layer.
Definition: KLMHit2d.h:454
float m_GlobalX
Global position X coordinate.
Definition: KLMHit2d.h:463
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).
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.

◆ ~KLMHit2d()

~KLMHit2d ( )
inline

Destructor.

Definition at line 70 of file KLMHit2d.h.

71 {
72 }

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 }

◆ 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

◆ getChiSq()

float getChiSq ( ) const
inline

Get Chi^2 of the crossing point.

Returns
Chi^2.

Definition at line 378 of file KLMHit2d.h.

379 {
380 return m_ChiSq;
381 }

◆ getEnergyDeposit()

float getEnergyDeposit ( ) const
inline

Get energy deposit.

Returns
Energy deposit.

Definition at line 360 of file KLMHit2d.h.

361 {
362 return m_EnergyDeposit;
363 }

◆ 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 ""; }

◆ getLayer()

int getLayer ( ) const
inline

Get layer number.

Returns
Layer number.

Definition at line 132 of file KLMHit2d.h.

133 {
134 return m_Layer;
135 }

◆ getMCTime()

float getMCTime ( ) const
inline

Get MC time.

Returns
Time.

Definition at line 351 of file KLMHit2d.h.

352 {
353 return m_MCTime;
354 }
float m_MCTime
MC time.
Definition: KLMHit2d.h:475

◆ 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 ""; }

◆ getPhiStripAve()

double getPhiStripAve ( ) const
inline

Get average strip number for phi plane.

Definition at line 234 of file KLMHit2d.h.

235 {
236 return 0.5 * (getPhiStripMin() + getPhiStripMax());
237 }
int getPhiStripMin() const
Get strip number for phi plane.
Definition: KLMHit2d.h:218
int getPhiStripMax() const
Get last strip number for phi plane.
Definition: KLMHit2d.h:226

◆ getPhiStripMax()

int getPhiStripMax ( ) const
inline

Get last strip number for phi plane.

Definition at line 226 of file KLMHit2d.h.

227 {
229 }

◆ getPhiStripMin()

int getPhiStripMin ( ) const
inline

Get strip number for phi plane.

Definition at line 218 of file KLMHit2d.h.

219 {
221 }

◆ getPosition()

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

Get hit global position.

Returns
Hit coordinates.

Definition at line 315 of file KLMHit2d.h.

316 {
317 return ROOT::Math::XYZVector(m_GlobalX, m_GlobalY, m_GlobalZ);
318 }

◆ getPositionX()

float getPositionX ( ) const
inline

Get hit global position x coordinate.

Returns
Hit x coordinate.

Definition at line 288 of file KLMHit2d.h.

289 {
290 return m_GlobalX;
291 }

◆ getPositionY()

float getPositionY ( ) const
inline

Get hit global position y coordinate.

Returns
Hit y coordinate.

Definition at line 297 of file KLMHit2d.h.

298 {
299 return m_GlobalY;
300 }

◆ getPositionZ()

float getPositionZ ( ) const
inline

Get hit global position z coordinate.

Returns
Hit z coordinate.

Definition at line 306 of file KLMHit2d.h.

307 {
308 return m_GlobalZ;
309 }

◆ 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 96 of file KLMHit2d.h.

97 {
98 return m_Section;
99 }

◆ getSector()

int getSector ( ) const
inline

Get sector number.

Returns
Sector number.

Definition at line 114 of file KLMHit2d.h.

115 {
116 return m_Sector;
117 }

◆ getSubdetector()

int getSubdetector ( ) const
inline

Get subdetector number.

Returns
Subdetector number.

Definition at line 78 of file KLMHit2d.h.

79 {
80 return m_Subdetector;
81 }

◆ getTime()

float getTime ( ) const
inline

Get hit time.

Returns
Hit time.

Definition at line 324 of file KLMHit2d.h.

325 {
326 return m_Time;
327 }

◆ getXStripMax()

int getXStripMax ( ) const
inline

Get last strip number for EKLM hit in the x-measuring plane.

Definition at line 250 of file KLMHit2d.h.

251 {
252 return m_LastStrip[0];
253 }

◆ getXStripMin()

int getXStripMin ( ) const
inline

Get first strip number for EKLM hit in the x-measuring plane.

Definition at line 242 of file KLMHit2d.h.

243 {
244 return m_Strip[0];
245 }

◆ getYStripMax()

int getYStripMax ( ) const
inline

Get last strip number for EKLM hit in the y-measuring plane.

Definition at line 266 of file KLMHit2d.h.

267 {
268 return m_LastStrip[1];
269 }

◆ getYStripMin()

int getYStripMin ( ) const
inline

Get first strip number for EKLM hit in the y-measuring plane.

Definition at line 258 of file KLMHit2d.h.

259 {
260 return m_Strip[1];
261 }

◆ getZStripAve()

double getZStripAve ( ) const
inline

Get average strip number for z plane.

Definition at line 210 of file KLMHit2d.h.

211 {
212 return 0.5 * (getZStripMin() + getZStripMax());
213 }
int getZStripMax() const
Get last strip number for z plane.
Definition: KLMHit2d.h:202
int getZStripMin() const
Get strip number for z plane.
Definition: KLMHit2d.h:194

◆ getZStripMax()

int getZStripMax ( ) const
inline

Get last strip number for z plane.

Definition at line 202 of file KLMHit2d.h.

203 {
205 }

◆ getZStripMin()

int getZStripMin ( ) const
inline

Get strip number for z plane.

Definition at line 194 of file KLMHit2d.h.

195 {
197 }

◆ inRPC()

bool inRPC ( ) const
inline

Determine whether this 2D hit is in RPC or scintillator.

Definition at line 185 of file KLMHit2d.h.

◆ isOnStaTrack() [1/2]

bool isOnStaTrack ( ) const
inline

Determine whether this 2D hit is associated with a BKLM stand-alone track.

Definition at line 429 of file KLMHit2d.h.

430 {
431 return m_IsOnStaTrack;
432 }
bool m_IsOnStaTrack
Whether this 2D hit is associated with a BKLM stand-alone track.
Definition: KLMHit2d.h:494

◆ isOnStaTrack() [2/2]

void isOnStaTrack ( bool  onStaTrack)
inline

Set whether this 2D hit is associated with a BKLM stand-alone track.

Definition at line 437 of file KLMHit2d.h.

438 {
439 m_IsOnStaTrack = onStaTrack;
440 }

◆ isOnTrack() [1/2]

bool isOnTrack ( ) const
inline

Determine whether this 2D hit is associated with a muid-extrapolated track.

Definition at line 412 of file KLMHit2d.h.

413 {
414 return m_IsOnTrack;
415 }
bool m_IsOnTrack
Whether this 2D hit is associated with a muid-extrapolated track.
Definition: KLMHit2d.h:491

◆ isOnTrack() [2/2]

void isOnTrack ( bool  onTrack)
inline

Set whether this 2D hit is associated with a muid-extrapolated track.

Definition at line 420 of file KLMHit2d.h.

421 {
422 m_IsOnTrack = onTrack;
423 }

◆ isOutOfTime() [1/2]

bool isOutOfTime ( ) const
inline

Determine whether this 2D hit is outside the trigger-coincidence window.

Definition at line 395 of file KLMHit2d.h.

396 {
397 return m_IsOutOfTime;
398 }
bool m_IsOutOfTime
Whether this 2D hit is outside the trigger-coincidence window.
Definition: KLMHit2d.h:488

◆ isOutOfTime() [2/2]

void isOutOfTime ( bool  outOfTime)
inline

Set whether this 2D hit is outside the trigger-coincidence window.

Definition at line 403 of file KLMHit2d.h.

404 {
405 m_IsOutOfTime = outOfTime;
406 }

◆ setChiSq()

void setChiSq ( float  chisq)
inline

Set Chi^2 of the crossing point.

Parameters
[in]chisqChi^2.

Definition at line 387 of file KLMHit2d.h.

388 {
389 m_ChiSq = chisq;
390 }

◆ setEnergyDeposit()

void setEnergyDeposit ( float  energyDeposit)
inline

Set energy deposit.

Parameters
[in]energyDepositEnergy deposit.

Definition at line 369 of file KLMHit2d.h.

370 {
371 m_EnergyDeposit = energyDeposit;
372 }

◆ setLayer()

void setLayer ( int  layer)
inline

Set layer number.

Parameters
[in]layerLayer number.

Definition at line 141 of file KLMHit2d.h.

142 {
143 m_Layer = layer;
144 }

◆ setMCTime()

void setMCTime ( float  t)
inline

Set MC time.

Parameters
[in]tTIme.

Definition at line 342 of file KLMHit2d.h.

343 {
344 m_MCTime = t;
345 }

◆ setPosition()

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 277 of file KLMHit2d.h.

278 {
279 m_GlobalX = x;
280 m_GlobalY = y;
281 m_GlobalZ = z;
282 }

◆ setSection()

void setSection ( int  section)
inline

Set section number.

Parameters
[in]sectionSection number.

Definition at line 105 of file KLMHit2d.h.

106 {
107 m_Section = section;
108 }

◆ setSector()

void setSector ( int  sector)
inline

Set sector number.

Parameters
[in]sectorSector number.

Definition at line 123 of file KLMHit2d.h.

124 {
125 m_Sector = sector;
126 }

◆ setSubdetector()

void setSubdetector ( int  subdetector)
inline

Set subdetector number.

Parameters
[in]subdetectorSubdetector number.

Definition at line 87 of file KLMHit2d.h.

88 {
89 m_Subdetector = subdetector;
90 }

◆ setTime()

void setTime ( float  time)
inline

Set hit time.

Parameters
[in]timehit time.

Definition at line 333 of file KLMHit2d.h.

334 {
335 m_Time = time;
336 }

◆ setXStripMax()

void setXStripMax ( int  strip)
inline

Set last strip number for EKLM hit in the x-measuring plane.

Parameters
[in]stripStrip number.

Definition at line 159 of file KLMHit2d.h.

160 {
161 m_LastStrip[0] = strip;
162 }

◆ setXStripMin()

void setXStripMin ( int  strip)
inline

Set first strip number for EKLM hit in the x-measuring plane.

Parameters
[in]stripStrip number.

Definition at line 150 of file KLMHit2d.h.

151 {
152 m_Strip[0] = strip;
153 }

◆ setYStripMax()

void setYStripMax ( int  strip)
inline

Set last strip number for EKLM hit in y-measuring plane.

Parameters
[in]stripStrip number.

Definition at line 177 of file KLMHit2d.h.

178 {
179 m_LastStrip[1] = strip;
180 }

◆ setYStripMin()

void setYStripMin ( int  strip)
inline

Set first strip number for EKLM hit in the y-measuring plane.

Parameters
[in]stripStrip number.

Definition at line 168 of file KLMHit2d.h.

169 {
170 m_Strip[1] = strip;
171 }

Member Data Documentation

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

float m_ChiSq = 0.0
private

Chi^2 of the hit.

Definition at line 483 of file KLMHit2d.h.

◆ m_EnergyDeposit

float m_EnergyDeposit = 0.0
private

Energy deposition.

Definition at line 478 of file KLMHit2d.h.

◆ m_GlobalX

float m_GlobalX = 0.0
private

Global position X coordinate.

Definition at line 463 of file KLMHit2d.h.

◆ m_GlobalY

float m_GlobalY = 0.0
private

Global position Y coordinate.

Definition at line 466 of file KLMHit2d.h.

◆ m_GlobalZ

float m_GlobalZ = 0.0
private

Global position Z coordinate.

Definition at line 469 of file KLMHit2d.h.

◆ m_IsOnStaTrack

bool m_IsOnStaTrack = false
private

Whether this 2D hit is associated with a BKLM stand-alone track.

Definition at line 494 of file KLMHit2d.h.

◆ m_IsOnTrack

bool m_IsOnTrack = false
private

Whether this 2D hit is associated with a muid-extrapolated track.

Definition at line 491 of file KLMHit2d.h.

◆ m_IsOutOfTime

bool m_IsOutOfTime = false
private

Whether this 2D hit is outside the trigger-coincidence window.

Definition at line 488 of file KLMHit2d.h.

◆ m_LastStrip

int m_LastStrip[KLMElementNumbers::getMaximalPlaneNumber()] = {0}
private

Number of last strip in each plane.

Definition at line 460 of file KLMHit2d.h.

◆ m_Layer

int m_Layer = 0
private

Number of layer.

Definition at line 454 of file KLMHit2d.h.

◆ m_MCTime

float m_MCTime = 0.0
private

MC time.

Definition at line 475 of file KLMHit2d.h.

◆ m_Section

int m_Section = 0
private

Number of section.

Definition at line 448 of file KLMHit2d.h.

◆ m_Sector

int m_Sector = 0
private

Number of sector.

Definition at line 451 of file KLMHit2d.h.

◆ m_Strip

int m_Strip[KLMElementNumbers::getMaximalPlaneNumber()] = {0}
private

Number of strip in each plane.

Definition at line 457 of file KLMHit2d.h.

◆ m_Subdetector

int m_Subdetector = 0
private

Number of subdetector.

Definition at line 445 of file KLMHit2d.h.

◆ m_Time

float m_Time = 0.0
private

Time of the hit.

Definition at line 472 of file KLMHit2d.h.


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