Belle II Software development
KLMDigit Class Reference

KLM digit (class representing a digitized hit in RPCs or scintillators). More...

#include <KLMDigit.h>

Inheritance diagram for KLMDigit:
DigitBase RelationsInterface< BASE >

Public Types

enum  EAppendStatus {
  c_DontAppend = 0 ,
  c_Append = 1
}
 Enum for return state of addBGDigit function. More...
 

Public Member Functions

 KLMDigit ()
 Constructor.
 
 KLMDigit (const KLMSimHit *simHit)
 Constructor for scintillator simulation.
 
 KLMDigit (const KLMSimHit *simHit, int strip)
 Constructor for RPC simulation.
 
 ~KLMDigit ()
 Destructor.
 
unsigned int getUniqueChannelID () const override
 Get unique channel identifier.
 
EAppendStatus addBGDigit (const DigitBase *bg) override
 The pile-up method.
 
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.
 
int getPlane () const
 Get plane number.
 
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 (for multi-strip digits).
 
void setLastStrip (int lastStrip)
 Set last strip number (for multi-strip digits).
 
bool isMultiStrip () const
 Determine whether this digit is a multi-strip one or not.
 
bool inRPC () const
 Determine whether the hit is in RPC or scintillator.
 
bool isPhiReadout () const
 Whether BKLM digit is in phi or z plane.
 
uint16_t getCharge () const
 Get charge.
 
void setCharge (uint16_t charge)
 Set charge.
 
uint16_t getCTime () const
 Get CTIME.
 
void setCTime (uint16_t ctime)
 Set CTIME.
 
uint16_t getTDC () const
 Get TDC.
 
void setTDC (uint16_t tdc)
 Set TDC.
 
float getTime () const
 Get hit time.
 
void setTime (float time)
 Set hit time.
 
float getEnergyDeposit () const
 Get energy deposit.
 
void setEnergyDeposit (float eDep)
 Set energy deposit.
 
float getNPhotoelectrons () const
 Get number of photoelectrons.
 
void setNPhotoelectrons (float nPhotoelectrons)
 Set number of photoelectrons.
 
int getNGeneratedPhotoelectrons () const
 Get generated number of photoelectrons.
 
void setNGeneratedPhotoelectrons (int nPhotoelectrons)
 Set generated number of photoelectrons.
 
bool isGood () const
 Whether hit could be used late (if it passed discriminator threshold)
 
int getFitStatus () const
 Get fit status.
 
void setFitStatus (int s)
 Set fit status.
 
float getMCTime () const
 Get MC time.
 
void setMCTime (float time)
 Set MC time.
 
float getSiPMMCTime () const
 Get SiPM MC time.
 
void setSiPMMCTime (float time)
 Set SiPM MC time.
 
virtual void adjustAppendedBGDigit ()
 Virtual method for possible modification of BG digit which is just appended to simulation store array.
 
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

 ClassDefOverride (Belle2::KLMDigit, 1)
 Class version.
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Protected Attributes

const KLMElementNumbersm_ElementNumbers
 Element numbers.
 
int m_Subdetector
 ROOT streamer.
 
int m_Section
 Number of section.
 
int m_Sector
 Number of sector.
 
int m_Layer
 Number of layer.
 
int m_Plane
 Number of plane.
 
int m_Strip
 Number of strip.
 
int m_LastStrip
 Number of last strip (for multi-strip digits).
 
uint16_t m_Charge
 Charge (integral of ADC signal).
 
uint16_t m_CTime
 CTIME (time provided by B2TT).
 
uint16_t m_TDC
 TDC (time provided by ASIC).
 
float m_Time
 Time of the hit.
 
float m_EnergyDeposit
 Energy deposition.
 
float m_NPhotoelectrons
 Number of photoelectrons.
 
int m_NGeneratedPhotoelectrons
 Generated number of photoelectrons (MC only).
 
int m_FitStatus
 Fit status.
 
float m_MCTime
 MC time.
 
float m_SiPMMCTime
 MC time at SiPM.
 

Private Member Functions

 ClassDef (DigitBase, 2)
 ClassDef.
 

Private Attributes

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 digit (class representing a digitized hit in RPCs or scintillators).

Definition at line 29 of file KLMDigit.h.

Member Enumeration Documentation

◆ EAppendStatus

enum EAppendStatus
inherited

Enum for return state of addBGDigit function.

Enumerator
c_DontAppend 

do not append BG digit to digits

c_Append 

append BG digit to digits

Definition at line 32 of file DigitBase.h.

32 {
33 c_DontAppend = 0,
34 c_Append = 1
35 };
@ c_DontAppend
do not append BG digit to digits
Definition: DigitBase.h:33
@ c_Append
append BG digit to digits
Definition: DigitBase.h:34

Constructor & Destructor Documentation

◆ KLMDigit() [1/3]

KLMDigit ( )

Constructor.

Definition at line 17 of file KLMDigit.cc.

17 :
20 m_Section(0),
21 m_Sector(0),
22 m_Layer(0),
23 m_Plane(0),
24 m_Strip(0),
25 m_LastStrip(0),
26 m_Charge(0),
27 m_CTime(0),
28 m_TDC(0),
29 m_Time(0),
33 m_FitStatus(0),
34 m_MCTime(0),
36{
37}
uint16_t m_Charge
Charge (integral of ADC signal).
Definition: KLMDigit.h:437
int m_NGeneratedPhotoelectrons
Generated number of photoelectrons (MC only).
Definition: KLMDigit.h:455
uint16_t m_TDC
TDC (time provided by ASIC).
Definition: KLMDigit.h:443
float m_Time
Time of the hit.
Definition: KLMDigit.h:446
float m_SiPMMCTime
MC time at SiPM.
Definition: KLMDigit.h:464
int m_Section
Number of section.
Definition: KLMDigit.h:416
const KLMElementNumbers * m_ElementNumbers
Element numbers.
Definition: KLMDigit.h:410
float m_MCTime
MC time.
Definition: KLMDigit.h:461
float m_EnergyDeposit
Energy deposition.
Definition: KLMDigit.h:449
int m_Sector
Number of sector.
Definition: KLMDigit.h:419
int m_LastStrip
Number of last strip (for multi-strip digits).
Definition: KLMDigit.h:434
int m_Plane
Number of plane.
Definition: KLMDigit.h:425
int m_FitStatus
Fit status.
Definition: KLMDigit.h:458
float m_NPhotoelectrons
Number of photoelectrons.
Definition: KLMDigit.h:452
int m_Layer
Number of layer.
Definition: KLMDigit.h:422
int m_Subdetector
ROOT streamer.
Definition: KLMDigit.h:413
uint16_t m_CTime
CTIME (time provided by B2TT).
Definition: KLMDigit.h:440
int m_Strip
Number of strip.
Definition: KLMDigit.h:428
static const KLMElementNumbers & Instance()
Instantiation.

◆ KLMDigit() [2/3]

KLMDigit ( const KLMSimHit simHit)
explicit

Constructor for scintillator simulation.

Parameters
[in]simHitSimulation hit.

Definition at line 39 of file KLMDigit.cc.

39 :
42 m_Section(simHit->getSection()),
43 m_Sector(simHit->getSector()),
44 m_Layer(simHit->getLayer()),
45 m_Plane(simHit->getPlane()),
46 m_Strip(simHit->getStrip()),
47 m_LastStrip(0),
48 m_Charge(0),
49 m_CTime(0),
50 m_TDC(0),
51 m_Time(simHit->getTime() + simHit->getPropagationTime()),
55 m_FitStatus(0),
56 m_MCTime(simHit->getTime()),
58{
59}
int getSubdetector() const
Get subdetector number.
Definition: KLMSimHit.h:116
int getLayer() const
Get layer number.
Definition: KLMSimHit.h:152
float getTime() const
Get hit time.
Definition: KLMSimHit.h:278
int getSection() const
Get section number.
Definition: KLMSimHit.h:134
int getPlane() const
Get plane number.
Definition: KLMSimHit.h:188
float getPropagationTime() const
Get signal propagation time.
Definition: KLMSimHit.h:296
int getStrip() const
Get strip number.
Definition: KLMSimHit.h:214
int getSector() const
Get sector number.
Definition: KLMSimHit.h:170
float getEnergyDeposit() const
Get energy deposit.
Definition: KLMSimHit.h:260

◆ KLMDigit() [3/3]

KLMDigit ( const KLMSimHit simHit,
int  strip 
)

Constructor for RPC simulation.

Parameters
[in]simHitSimulation hit.
[in]stripStrip.

Definition at line 61 of file KLMDigit.cc.

61 :
64 m_Section(simHit->getSection()),
65 m_Sector(simHit->getSector()),
66 m_Layer(simHit->getLayer()),
67 m_Plane(simHit->getPlane()),
68 m_Strip(strip),
69 m_LastStrip(0),
70 m_Charge(0),
71 m_CTime(0),
72 m_TDC(0),
73 m_Time(simHit->getTime() + simHit->getPropagationTime()),
77 m_FitStatus(0),
78 m_MCTime(simHit->getTime()),
80{
81}

◆ ~KLMDigit()

~KLMDigit ( )
inline

Destructor.

Definition at line 54 of file KLMDigit.h.

55 {
56 }

Member Function Documentation

◆ addBGDigit()

DigitBase::EAppendStatus addBGDigit ( const DigitBase bg)
overridevirtual

The pile-up method.

Implements DigitBase.

Definition at line 89 of file KLMDigit.cc.

90{
91 const KLMDigit* bgDigit = (KLMDigit*)bg;
92 if (!bgDigit->isGood())
94 if (!this->isGood())
96 /* MC data from digit with larger energy. */
97 if (this->getEnergyDeposit() < bgDigit->getEnergyDeposit())
98 this->setMCTime(bgDigit->getMCTime());
100 bgDigit->getEnergyDeposit());
101 if (this->getTime() > bgDigit->getTime())
102 this->setTime(bgDigit->getTime());
103 this->setCharge(std::min(this->getCharge(), bgDigit->getCharge()));
106 bgDigit->getNGeneratedPhotoelectrons());
108}
KLM digit (class representing a digitized hit in RPCs or scintillators).
Definition: KLMDigit.h:29
void setMCTime(float time)
Set MC time.
Definition: KLMDigit.h:384
void setNGeneratedPhotoelectrons(int nPhotoelectrons)
Set generated number of photoelectrons.
Definition: KLMDigit.h:339
bool isGood() const
Whether hit could be used late (if it passed discriminator threshold)
Definition: KLMDigit.h:348
float getTime() const
Get hit time.
Definition: KLMDigit.h:276
int getNGeneratedPhotoelectrons() const
Get generated number of photoelectrons.
Definition: KLMDigit.h:330
void setEnergyDeposit(float eDep)
Set energy deposit.
Definition: KLMDigit.h:303
void setTime(float time)
Set hit time.
Definition: KLMDigit.h:285
float getMCTime() const
Get MC time.
Definition: KLMDigit.h:375
uint16_t getCharge() const
Get charge.
Definition: KLMDigit.h:222
float getEnergyDeposit() const
Get energy deposit.
Definition: KLMDigit.h:294
void setCharge(uint16_t charge)
Set charge.
Definition: KLMDigit.h:231

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

◆ adjustAppendedBGDigit()

virtual void adjustAppendedBGDigit ( )
inlinevirtualinherited

Virtual method for possible modification of BG digit which is just appended to simulation store array.

Reimplemented in SVDShaperDigit.

Definition at line 62 of file DigitBase.h.

62{}

◆ 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

◆ getCharge()

uint16_t getCharge ( ) const
inline

Get charge.

Returns
Charge.

Definition at line 222 of file KLMDigit.h.

223 {
224 return m_Charge;
225 }

◆ getCTime()

uint16_t getCTime ( ) const
inline

Get CTIME.

Returns
CTIME.

Definition at line 240 of file KLMDigit.h.

241 {
242 return m_CTime;
243 }

◆ getEnergyDeposit()

float getEnergyDeposit ( ) const
inline

Get energy deposit.

Returns
Energy deposit.

Definition at line 294 of file KLMDigit.h.

295 {
296 return m_EnergyDeposit;
297 }

◆ getFitStatus()

int getFitStatus ( ) const
inline

Get fit status.

Returns
Fit status.

Definition at line 357 of file KLMDigit.h.

358 {
359 return m_FitStatus;
360 }

◆ 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 (for multi-strip digits).

Returns
Last strip number.

Definition at line 180 of file KLMDigit.h.

181 {
182 return m_LastStrip;
183 }

◆ getLayer()

int getLayer ( ) const
inline

Get layer number.

Returns
Layer number.

Definition at line 126 of file KLMDigit.h.

127 {
128 return m_Layer;
129 }

◆ getMCTime()

float getMCTime ( ) const
inline

Get MC time.

Returns
MC time.

Definition at line 375 of file KLMDigit.h.

376 {
377 return m_MCTime;
378 }

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

◆ getNGeneratedPhotoelectrons()

int getNGeneratedPhotoelectrons ( ) const
inline

Get generated number of photoelectrons.

Returns
Number of photoelectrons.

Definition at line 330 of file KLMDigit.h.

331 {
333 }

◆ getNPhotoelectrons()

float getNPhotoelectrons ( ) const
inline

Get number of photoelectrons.

Returns
Number of photoelectrons.

Definition at line 312 of file KLMDigit.h.

313 {
314 return m_NPhotoelectrons;
315 }

◆ getPlane()

int getPlane ( ) const
inline

Get plane number.

Returns
Plane number.

Definition at line 144 of file KLMDigit.h.

145 {
146 return m_Plane;
147 }

◆ 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 90 of file KLMDigit.h.

91 {
92 return m_Section;
93 }

◆ getSector()

int getSector ( ) const
inline

Get sector number.

Returns
Sector number.

Definition at line 108 of file KLMDigit.h.

109 {
110 return m_Sector;
111 }

◆ getSiPMMCTime()

float getSiPMMCTime ( ) const
inline

Get SiPM MC time.

Returns
SiPM MC yime.

Definition at line 393 of file KLMDigit.h.

394 {
395 return m_SiPMMCTime;
396 }

◆ getStrip()

int getStrip ( ) const
inline

Get strip number.

Returns
Strip number.

Definition at line 162 of file KLMDigit.h.

163 {
164 return m_Strip;
165 }

◆ getSubdetector()

int getSubdetector ( ) const
inline

Get subdetector number.

Returns
Subdetector number.

Definition at line 72 of file KLMDigit.h.

73 {
74 return m_Subdetector;
75 }

◆ getTDC()

uint16_t getTDC ( ) const
inline

Get TDC.

Returns
TDC.

Definition at line 258 of file KLMDigit.h.

259 {
260 return m_TDC;
261 }

◆ getTime()

float getTime ( ) const
inline

Get hit time.

Returns
Hit time.

Definition at line 276 of file KLMDigit.h.

277 {
278 return m_Time;
279 }

◆ getUniqueChannelID()

unsigned int getUniqueChannelID ( ) const
overridevirtual

Get unique channel identifier.

Implements DigitBase.

Definition at line 83 of file KLMDigit.cc.

84{
87}
KLMChannelNumber channelNumber(int subdetector, int section, int sector, int layer, int plane, int strip) const
Get channel number.

◆ 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 206 of file KLMDigit.h.

◆ isGood()

bool isGood ( ) const
inline

Whether hit could be used late (if it passed discriminator threshold)

Returns
True if could be used.

Definition at line 348 of file KLMDigit.h.

349 {
350 return m_FitStatus == KLM::c_ScintillatorFirmwareSuccessfulFit;
351 }

◆ isMultiStrip()

bool isMultiStrip ( ) const
inline

Determine whether this digit is a multi-strip one or not.

Definition at line 197 of file KLMDigit.h.

198 {
199 return (m_LastStrip != 0);
200 }

◆ isPhiReadout()

bool isPhiReadout ( ) const

Whether BKLM digit is in phi or z plane.

Returns
True if the digit is in phi plane, false otherwise.

Definition at line 110 of file KLMDigit.cc.

111{
113 B2FATAL("Function isPhiReadout() is called for EKLM digit.");
115}

◆ setCharge()

void setCharge ( uint16_t  charge)
inline

Set charge.

Parameters
[in]chargeCharge.

Definition at line 231 of file KLMDigit.h.

232 {
234 }
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

◆ setCTime()

void setCTime ( uint16_t  ctime)
inline

Set CTIME.

Parameters
[in]ctimeCTime

Definition at line 249 of file KLMDigit.h.

250 {
251 m_CTime = ctime;
252 }

◆ setEnergyDeposit()

void setEnergyDeposit ( float  eDep)
inline

Set energy deposit.

Parameters
[in]eDepEnergy deposit.

Definition at line 303 of file KLMDigit.h.

304 {
305 m_EnergyDeposit = eDep;
306 }

◆ setFitStatus()

void setFitStatus ( int  s)
inline

Set fit status.

Parameters
[in]sFit status.

Definition at line 366 of file KLMDigit.h.

367 {
368 m_FitStatus = s;
369 }

◆ setLastStrip()

void setLastStrip ( int  lastStrip)
inline

Set last strip number (for multi-strip digits).

Parameters
[in]lastStripLast strip number.

Definition at line 189 of file KLMDigit.h.

190 {
191 m_LastStrip = lastStrip;
192 }

◆ setLayer()

void setLayer ( int  layer)
inline

Set layer number.

Parameters
[in]layerLayer number.

Definition at line 135 of file KLMDigit.h.

136 {
137 m_Layer = layer;
138 }

◆ setMCTime()

void setMCTime ( float  time)
inline

Set MC time.

Parameters
[in]timeMC time.

Definition at line 384 of file KLMDigit.h.

385 {
386 m_MCTime = time;
387 }

◆ setNGeneratedPhotoelectrons()

void setNGeneratedPhotoelectrons ( int  nPhotoelectrons)
inline

Set generated number of photoelectrons.

Parameters
[in]nPhotoelectronsNumber of photoelectrons.

Definition at line 339 of file KLMDigit.h.

340 {
341 m_NGeneratedPhotoelectrons = nPhotoelectrons;
342 }

◆ setNPhotoelectrons()

void setNPhotoelectrons ( float  nPhotoelectrons)
inline

Set number of photoelectrons.

Parameters
[in]nPhotoelectronsNumber of photoelectrons.

Definition at line 321 of file KLMDigit.h.

322 {
323 m_NPhotoelectrons = nPhotoelectrons;
324 }

◆ setPlane()

void setPlane ( int  plane)
inline

Set plane number.

Parameters
[in]planePlane number.

Definition at line 153 of file KLMDigit.h.

154 {
155 m_Plane = plane;
156 }

◆ setSection()

void setSection ( int  section)
inline

Set section number.

Parameters
[in]sectionSection number.

Definition at line 99 of file KLMDigit.h.

100 {
101 m_Section = section;
102 }

◆ setSector()

void setSector ( int  sector)
inline

Set sector number.

Parameters
[in]sectorSector number.

Definition at line 117 of file KLMDigit.h.

118 {
119 m_Sector = sector;
120 }

◆ setSiPMMCTime()

void setSiPMMCTime ( float  time)
inline

Set SiPM MC time.

Parameters
[in]timeTime.

Definition at line 402 of file KLMDigit.h.

403 {
404 m_SiPMMCTime = time;
405 }

◆ setStrip()

void setStrip ( int  strip)
inline

Set strip number.

Parameters
[in]stripStrip number.

Definition at line 171 of file KLMDigit.h.

172 {
173 m_Strip = strip;
174 }

◆ setSubdetector()

void setSubdetector ( int  subdetector)
inline

Set subdetector number.

Parameters
[in]subdetectorSubdetector number.

Definition at line 81 of file KLMDigit.h.

82 {
83 m_Subdetector = subdetector;
84 }

◆ setTDC()

void setTDC ( uint16_t  tdc)
inline

Set TDC.

Parameters
[in]tdcTDC.

Definition at line 267 of file KLMDigit.h.

268 {
269 m_TDC = tdc;
270 }

◆ setTime()

void setTime ( float  time)
inline

Set hit time.

Parameters
[in]timehit time.

Definition at line 285 of file KLMDigit.h.

286 {
287 m_Time = time;
288 }

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_Charge

uint16_t m_Charge
protected

Charge (integral of ADC signal).

Definition at line 437 of file KLMDigit.h.

◆ m_CTime

uint16_t m_CTime
protected

CTIME (time provided by B2TT).

Definition at line 440 of file KLMDigit.h.

◆ m_ElementNumbers

const KLMElementNumbers* m_ElementNumbers
protected

Element numbers.

Definition at line 410 of file KLMDigit.h.

◆ m_EnergyDeposit

float m_EnergyDeposit
protected

Energy deposition.

Definition at line 449 of file KLMDigit.h.

◆ m_FitStatus

int m_FitStatus
protected

Fit status.

Definition at line 458 of file KLMDigit.h.

◆ m_LastStrip

int m_LastStrip
protected

Number of last strip (for multi-strip digits).

If m_LastStrip equals 0, then this is a single-strip digit.

Definition at line 434 of file KLMDigit.h.

◆ m_Layer

int m_Layer
protected

Number of layer.

Definition at line 422 of file KLMDigit.h.

◆ m_MCTime

float m_MCTime
protected

MC time.

Definition at line 461 of file KLMDigit.h.

◆ m_NGeneratedPhotoelectrons

int m_NGeneratedPhotoelectrons
protected

Generated number of photoelectrons (MC only).

Definition at line 455 of file KLMDigit.h.

◆ m_NPhotoelectrons

float m_NPhotoelectrons
protected

Number of photoelectrons.

Definition at line 452 of file KLMDigit.h.

◆ m_Plane

int m_Plane
protected

Number of plane.

Definition at line 425 of file KLMDigit.h.

◆ m_Section

int m_Section
protected

Number of section.

Definition at line 416 of file KLMDigit.h.

◆ m_Sector

int m_Sector
protected

Number of sector.

Definition at line 419 of file KLMDigit.h.

◆ m_SiPMMCTime

float m_SiPMMCTime
protected

MC time at SiPM.

Definition at line 464 of file KLMDigit.h.

◆ m_Strip

int m_Strip
protected

Number of strip.

Definition at line 428 of file KLMDigit.h.

◆ m_Subdetector

int m_Subdetector
protected

ROOT streamer.

Number of subdetector.

Definition at line 413 of file KLMDigit.h.

◆ m_TDC

uint16_t m_TDC
protected

TDC (time provided by ASIC).

Definition at line 443 of file KLMDigit.h.

◆ m_Time

float m_Time
protected

Time of the hit.

Definition at line 446 of file KLMDigit.h.


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