Belle II Software development
SVDCluster Class Reference

The SVD Cluster class This class stores all information about reconstructed SVD clusters. More...

#include <SVDCluster.h>

Inheritance diagram for SVDCluster:
RelationsInterface< BASE >

Public Member Functions

 SVDCluster (VxdID sensorID, bool isU, float position, float positionSigma, double clsTime, double clsTimeSigma, float clsCharge, float seedCharge, unsigned short clsSize, float clsSN, float clsChi2, int firstFrame=0)
 Constructor.
 
 SVDCluster ()
 Default constructor for the ROOT IO.
 
 SVDCluster (VxdID sensorID, bool isU, float position, double clsTime, double clsTimeSigma, float clsCharge, float seedCharge, unsigned short clsSize)
 OLD STYLE 8-params constructor, just for backward compatibility.
 
 SVDCluster (VxdID sensorID, bool isU, float position, float positionSigma, double clsTime, double clsTimeSigma, float clsCharge, float seedCharge, unsigned short clsSize, float clsSN)
 OLD STYLE Constructor, just for backward compatibility.
 
VxdID getSensorID () const
 Get the sensor ID.
 
unsigned short getRawSensorID () const
 Get raw sensor ID.
 
bool isUCluster () const
 Get the direction of strips.
 
float getPosition (double v=0) const
 Get the coordinate of reconstructed hit.
 
float getPositionSigma () const
 Get the error of the reconstructed hit coordinate.
 
float getClsTime () const
 Get average of waveform maximum times of cluster strip signals.
 
float getClsTimeSigma () const
 Get the error of the reconstructed hit time.
 
float getCharge () const
 Get collected charge.
 
float getSeedCharge () const
 Get seed charge.
 
unsigned short getSize () const
 Get cluster size.
 
float getSNR () const
 Get cluster SNR.
 
float getChi2 () const
 Get chi2 of the time/amplitude fit.
 
int getFirstFrame () const
 Get firstFrame of the MaxSum algorithm.
 
double getQuality () const
 Get cluster quality indicator.
 
double getQualityError () const
 Get cluster quality indicator error.
 
const std::vector< int > & getTimeGroupId () const
 Get ID of the time-group.
 
const std::vector< std::tuple< float, float, float > > & getTimeGroupInfo () const
 Get time-group parameters.
 
void setPosition (const double position)
 Set position of the cluster.
 
void setClsTime (const double time)
 Set time of the cluster.
 
void setQualityIndicator (const double qualityIndicator)
 Add quality indicator to object.
 
void setQualityIndicatorError (double qualityIndicatorError)
 Add quality indicator error to object.
 
std::vector< int > & setTimeGroupId ()
 Set ID of the time-group.
 
std::vector< std::tuple< float, float, float > > & setTimeGroupInfo ()
 Set time-group parameters.
 
std::string print () const
 Get a string representation of the cluster.
 
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).
 

Protected Attributes

unsigned short m_sensorID
 Compressed sensor identifier.
 
bool m_isU
 True if clusters of u-strips, otherwise false.
 
float m_position
 Reconstructed hit position in r-phi or z.
 
float m_positionSigma
 Standard deviation of hit position in r-phi or z.
 
double m_clsTime
 Average waveform maximum time.
 
double m_clsTimeSigma
 Standard deviation of waveform maximum times.
 
float m_clsCharge
 Deposited charge in electrons.
 
float m_seedCharge
 Cluster seed charge in electrons.
 
unsigned short m_clsSize
 Cluster size in pixels.
 
float m_clsSN
 Cluster S/N ratio.
 
float m_clsChi2
 Chi2 for time/amplitude fit.
 
int m_firstFrame
 firstFrame computed with the MaxSum algorithm
 
std::vector< int > m_timeGroupId
 Grouping of clusters in time.
 
std::vector< std::tuple< float, float, float > > m_timeGroupInfo
 TimeGroup Gaussian Parameters, (integral, center, sigma)
 
double m_qualityIndicator = {0.}
 Probability of signal cluster.
 
double m_qualityIndicatorError = {0.}
 Error associated with probability calcualtion.
 

Private Member Functions

 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

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

The SVD Cluster class This class stores all information about reconstructed SVD clusters.

Definition at line 29 of file SVDCluster.h.

Constructor & Destructor Documentation

◆ SVDCluster() [1/4]

SVDCluster ( VxdID  sensorID,
bool  isU,
float  position,
float  positionSigma,
double  clsTime,
double  clsTimeSigma,
float  clsCharge,
float  seedCharge,
unsigned short  clsSize,
float  clsSN,
float  clsChi2,
int  firstFrame = 0 
)
inline

Constructor.

Parameters
sensorIDSensor compact ID.
isUtrue if u strips, otherwise false.
positionHit position estimate.
positionSigmaError of hit postion estimate.
clsTimeHit time stimate.
clsTimeSigmaError of hit time estimate.
clsChargeThe cluster charge in ADC units.
seedChargeThe charge of the seed strip in ADC units.
clsSizeCluster size, number of fired strips that form the cluster.
clsSNSignal-to-noise ratio for the cluster
clsChi2value for cluster fit
firstFrame

Definition at line 46 of file SVDCluster.h.

48 :
49 m_sensorID(sensorID), m_isU(isU),
50 m_position(position), m_positionSigma(positionSigma),
51 m_clsTime(clsTime), m_clsTimeSigma(clsTimeSigma), m_clsCharge(clsCharge),
52 m_seedCharge(seedCharge), m_clsSize(clsSize), m_clsSN(clsSN),
53 m_clsChi2(clsChi2), m_firstFrame(firstFrame)
54 {}
float m_clsChi2
Chi2 for time/amplitude fit.
Definition: SVDCluster.h:259
float m_position
Reconstructed hit position in r-phi or z.
Definition: SVDCluster.h:251
int m_firstFrame
firstFrame computed with the MaxSum algorithm
Definition: SVDCluster.h:260
unsigned short m_clsSize
Cluster size in pixels.
Definition: SVDCluster.h:257
bool m_isU
True if clusters of u-strips, otherwise false.
Definition: SVDCluster.h:250
unsigned short m_sensorID
Compressed sensor identifier.
Definition: SVDCluster.h:249
float m_clsCharge
Deposited charge in electrons.
Definition: SVDCluster.h:255
float m_positionSigma
Standard deviation of hit position in r-phi or z.
Definition: SVDCluster.h:252
double m_clsTime
Average waveform maximum time.
Definition: SVDCluster.h:253
float m_clsSN
Cluster S/N ratio.
Definition: SVDCluster.h:258
double m_clsTimeSigma
Standard deviation of waveform maximum times.
Definition: SVDCluster.h:254
float m_seedCharge
Cluster seed charge in electrons.
Definition: SVDCluster.h:256

◆ SVDCluster() [2/4]

SVDCluster ( )
inline

Default constructor for the ROOT IO.

Definition at line 57 of file SVDCluster.h.

57 : SVDCluster(0, false, 0.0, 1.0, 0.0, 100.0, 0.0, 0.0, 0, 1.0,
58 100.0)
59 {}
SVDCluster()
Default constructor for the ROOT IO.
Definition: SVDCluster.h:57

◆ SVDCluster() [3/4]

SVDCluster ( VxdID  sensorID,
bool  isU,
float  position,
double  clsTime,
double  clsTimeSigma,
float  clsCharge,
float  seedCharge,
unsigned short  clsSize 
)
inline

OLD STYLE 8-params constructor, just for backward compatibility.

Will be removed in future.

Parameters
sensorIDSensor compact ID.
isUtrue if u strips, otherwise false.
positionHit position estimate.
clsTimeHit time stimate.
clsTimeSigmaError of hit time estimate.
clsChargeThe cluster charge in ADC units.
seedChargeThe charge of the seed strip in ADC units.
clsSizeCluster size, number of fired strips that form the cluster.

Definition at line 72 of file SVDCluster.h.

74 :
75 SVDCluster(sensorID, isU, position, 1.0, clsTime, clsTimeSigma,
76 clsCharge, seedCharge, clsSize, 1.0, 100.0)
77 {}

◆ SVDCluster() [4/4]

SVDCluster ( VxdID  sensorID,
bool  isU,
float  position,
float  positionSigma,
double  clsTime,
double  clsTimeSigma,
float  clsCharge,
float  seedCharge,
unsigned short  clsSize,
float  clsSN 
)
inline

OLD STYLE Constructor, just for backward compatibility.

Parameters
sensorIDSensor compact ID.
isUtrue if u strips, otherwise false.
positionHit position estimate.
positionSigmaError of hit postion estimate.
clsTimeHit time stimate.
clsTimeSigmaError of hit time estimate.
clsChargeThe cluster charge in ADC units.
seedChargeThe charge of the seed strip in ADC units.
clsSizeCluster size, number of fired strips that form the cluster.
clsSNSignal-to-noise ratio for the cluster Will be removed in future.

Definition at line 92 of file SVDCluster.h.

94 :
95 SVDCluster(sensorID, isU, position, positionSigma, clsTime, clsTimeSigma,
96 clsCharge, seedCharge, clsSize, clsSN, 100.0)
97 {}

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

◆ getCharge()

float getCharge ( ) const
inline

Get collected charge.

Returns
charge collected in the cluster in e-.

Definition at line 144 of file SVDCluster.h.

144{ return m_clsCharge; }

◆ getChi2()

float getChi2 ( ) const
inline

Get chi2 of the time/amplitude fit.

Returns
Chi2/ndf for the fit

Definition at line 164 of file SVDCluster.h.

164{ return m_clsChi2; }

◆ getClsTime()

float getClsTime ( ) const
inline

Get average of waveform maximum times of cluster strip signals.

Returns
average waveform maximum times.

Definition at line 134 of file SVDCluster.h.

134{ return m_clsTime; }

◆ getClsTimeSigma()

float getClsTimeSigma ( ) const
inline

Get the error of the reconstructed hit time.

Returns
error of the reconstructed hit time.

Definition at line 139 of file SVDCluster.h.

139{ return m_clsTimeSigma; }

◆ getFirstFrame()

int getFirstFrame ( ) const
inline

Get firstFrame of the MaxSum algorithm.

Returns
firstFrame of the MaxSum algorithm

Definition at line 169 of file SVDCluster.h.

169{ return m_firstFrame; }

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

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

◆ getPosition()

float getPosition ( double  v = 0) const
inline

Get the coordinate of reconstructed hit.

The returned value is now dependent of vCluster and valid only and it is only relevant for wedged/slanted sensors because of their trapezoidal shape, for rectangular shapes, the value does not change

Returns
coordinate of the reconstructed hit.

Definition at line 117 of file SVDCluster.h.

118 {
119 if (v == 0) return m_position;
120 else {
121 const VXD::SensorInfoBase* aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(m_sensorID);
122 return (aSensorInfo->getWidth(v) / aSensorInfo->getWidth()) * m_position;
123 }
124 }
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

◆ getPositionSigma()

float getPositionSigma ( ) const
inline

Get the error of the reconstructed hit coordinate.

Returns
error of the reconstructed hit coordinate.

Definition at line 129 of file SVDCluster.h.

129{ return m_positionSigma; }

◆ getQuality()

double getQuality ( ) const
inline

Get cluster quality indicator.

Returns
probability that cluster is generated from signal hit.

Definition at line 174 of file SVDCluster.h.

174{ return m_qualityIndicator; }
double m_qualityIndicator
Probability of signal cluster.
Definition: SVDCluster.h:264

◆ getQualityError()

double getQualityError ( ) const
inline

Get cluster quality indicator error.

Returns
error in probability that cluster is generated from signal hit.

Definition at line 179 of file SVDCluster.h.

179{ return m_qualityIndicatorError; }
double m_qualityIndicatorError
Error associated with probability calcualtion.
Definition: SVDCluster.h:265

◆ getRawSensorID()

unsigned short getRawSensorID ( ) const
inline

Get raw sensor ID.

Definition at line 105 of file SVDCluster.h.

105{ return m_sensorID; }

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

◆ getSeedCharge()

float getSeedCharge ( ) const
inline

Get seed charge.

Returns
charge of the seed strip in e-.

Definition at line 149 of file SVDCluster.h.

149{ return m_seedCharge; }

◆ getSensorID()

VxdID getSensorID ( ) const
inline

Get the sensor ID.

Returns
ID of the sensor.

Definition at line 102 of file SVDCluster.h.

102{ return m_sensorID; }

◆ getSize()

unsigned short getSize ( ) const
inline

Get cluster size.

Returns
number of strips contributing to the cluster.

Definition at line 154 of file SVDCluster.h.

154{ return m_clsSize; }

◆ getSNR()

float getSNR ( ) const
inline

Get cluster SNR.

Returns
cluster charge / std error of cluster charge

Definition at line 159 of file SVDCluster.h.

159{ return m_clsSN; }

◆ getTimeGroupId()

const std::vector< int > & getTimeGroupId ( ) const
inline

Get ID of the time-group.

Returns
time-group ID

Definition at line 184 of file SVDCluster.h.

184{ return m_timeGroupId; }
std::vector< int > m_timeGroupId
Grouping of clusters in time.
Definition: SVDCluster.h:261

◆ getTimeGroupInfo()

const std::vector< std::tuple< float, float, float > > & getTimeGroupInfo ( ) const
inline

Get time-group parameters.

Returns
time-group parameters (integral, center, sigma)

Definition at line 189 of file SVDCluster.h.

189{ return m_timeGroupInfo; }
std::vector< std::tuple< float, float, float > > m_timeGroupInfo
TimeGroup Gaussian Parameters, (integral, center, sigma)
Definition: SVDCluster.h:262

◆ isUCluster()

bool isUCluster ( ) const
inline

Get the direction of strips.

Returns
true if u-strips, otherwise false.

Definition at line 110 of file SVDCluster.h.

110{ return m_isU; }

◆ print()

std::string print ( ) const
inline

Get a string representation of the cluster.

Definition at line 234 of file SVDCluster.h.

235 {
236 VxdID thisSensorID(m_sensorID);
237 std::ostringstream os;
238 os << "VXDID : " << m_sensorID << " = " << std::string(thisSensorID)
239 << " side: " << ((m_isU) ? "U" : "V") << " position: " << m_position
240 << " +/- " << m_positionSigma << " time: " << m_clsTime << " +/- "
241 << m_clsTimeSigma << " charge: " << m_clsCharge << " seed charge: "
242 << m_seedCharge << " size: " << m_clsSize << " S/N: " << m_clsSN
243 << " Fit Chi2: " << m_clsChi2 << " Signal Prob.: " << m_qualityIndicator
244 << " Signal Prob. Error " << m_qualityIndicatorError << std::endl;
245 return os.str();
246 }

◆ setClsTime()

void setClsTime ( const double  time)
inline

Set time of the cluster.

Definition at line 202 of file SVDCluster.h.

203 {
204 m_clsTime = time;
205 }

◆ setPosition()

void setPosition ( const double  position)
inline

Set position of the cluster.

Definition at line 194 of file SVDCluster.h.

195 {
196 m_position = position;
197 }

◆ setQualityIndicator()

void setQualityIndicator ( const double  qualityIndicator)
inline

Add quality indicator to object.

Definition at line 210 of file SVDCluster.h.

211 {
212 m_qualityIndicator = qualityIndicator;
213 }

◆ setQualityIndicatorError()

void setQualityIndicatorError ( double  qualityIndicatorError)
inline

Add quality indicator error to object.

Definition at line 218 of file SVDCluster.h.

219 {
220 m_qualityIndicatorError = qualityIndicatorError;
221 }

◆ setTimeGroupId()

std::vector< int > & setTimeGroupId ( )
inline

Set ID of the time-group.

Returns
reference to time-group ID

Definition at line 226 of file SVDCluster.h.

226{ return m_timeGroupId; }

◆ setTimeGroupInfo()

std::vector< std::tuple< float, float, float > > & setTimeGroupInfo ( )
inline

Set time-group parameters.

Returns
reference to the time-group parameters (integral, center, sigma)

Definition at line 231 of file SVDCluster.h.

231{ return m_timeGroupInfo; }

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_clsCharge

float m_clsCharge
protected

Deposited charge in electrons.

Definition at line 255 of file SVDCluster.h.

◆ m_clsChi2

float m_clsChi2
protected

Chi2 for time/amplitude fit.

Definition at line 259 of file SVDCluster.h.

◆ m_clsSize

unsigned short m_clsSize
protected

Cluster size in pixels.

Definition at line 257 of file SVDCluster.h.

◆ m_clsSN

float m_clsSN
protected

Cluster S/N ratio.

Definition at line 258 of file SVDCluster.h.

◆ m_clsTime

double m_clsTime
protected

Average waveform maximum time.

Definition at line 253 of file SVDCluster.h.

◆ m_clsTimeSigma

double m_clsTimeSigma
protected

Standard deviation of waveform maximum times.

Definition at line 254 of file SVDCluster.h.

◆ m_firstFrame

int m_firstFrame
protected

firstFrame computed with the MaxSum algorithm

Definition at line 260 of file SVDCluster.h.

◆ m_isU

bool m_isU
protected

True if clusters of u-strips, otherwise false.

Definition at line 250 of file SVDCluster.h.

◆ m_position

float m_position
protected

Reconstructed hit position in r-phi or z.

Definition at line 251 of file SVDCluster.h.

◆ m_positionSigma

float m_positionSigma
protected

Standard deviation of hit position in r-phi or z.

Definition at line 252 of file SVDCluster.h.

◆ m_qualityIndicator

double m_qualityIndicator = {0.}
protected

Probability of signal cluster.

Definition at line 264 of file SVDCluster.h.

◆ m_qualityIndicatorError

double m_qualityIndicatorError = {0.}
protected

Error associated with probability calcualtion.

Definition at line 265 of file SVDCluster.h.

◆ m_seedCharge

float m_seedCharge
protected

Cluster seed charge in electrons.

Definition at line 256 of file SVDCluster.h.

◆ m_sensorID

unsigned short m_sensorID
protected

Compressed sensor identifier.

Definition at line 249 of file SVDCluster.h.

◆ m_timeGroupId

std::vector<int> m_timeGroupId
protected

Grouping of clusters in time.

Definition at line 261 of file SVDCluster.h.

◆ m_timeGroupInfo

std::vector<std::tuple<float, float, float> > m_timeGroupInfo
protected

TimeGroup Gaussian Parameters, (integral, center, sigma)

Definition at line 262 of file SVDCluster.h.


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