Belle II Software prerelease-10-00-00a
SecMapTrainerHit Class Reference

simple Hit class used for sectorMap-training. More...

#include <SecMapTrainerHit.h>

Inheritance diagram for SecMapTrainerHit:
Collaboration diagram for SecMapTrainerHit:

Public Member Functions

 SecMapTrainerHit (const FullSecID &fullSecID, const SpacePoint &sp)
 Constructor of class SecMapTrainerHit.
 
 SecMapTrainerHit (const FullSecID &fullSecID, const B2Vector3D &position)
 constructor needed for the Virtual IP
 
 SecMapTrainerHit (double x, double y, double z)
 another constructor needed for the Virtual IP... eccpp
 
std::string getSectorIDString () const
 returns global hit position of current hit.
 
FullSecID getSectorID () const
 returns secID of sector containing this hit.
 
bool operator== (const SpacePoint &b) const
 Compare, if two SpacePoints are the same one.
 
bool operator!= (const SpacePoint &b) const
 Comparison for inequality with another SpacePoint.
 
std::string getName () const override
 Print out some info for this SpacePoint.
 
double X () const
 return the x-value of the global position of the SpacePoint
 
double Y () const
 return the y-value of the global position of the SpacePoint
 
double Z () const
 return the z-value of the global position of the SpacePoint
 
double TimeU () const
 return the time in ns of the cluster on the U side
 
double TimeV () const
 return the time in ns of the cluster on the V side
 
const B2Vector3DgetPosition () const
 return the position vector in global coordinates
 
const B2Vector3DgetPositionError () const
 return the hitErrors in sigma of the global position
 
Belle2::VXD::SensorInfoBase::SensorType getType () const
 Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.
 
VxdID getVxdID () const
 Return the VxdID of the sensor on which the the cluster of the SpacePoint lives.
 
double getNormalizedLocalU () const
 Return normalized local coordinates of the cluster in u (0 <= posU <= 1).
 
double getNormalizedLocalV () const
 Return normalized local coordinates of the cluster in v (0 <= posV <= 1).
 
std::pair< bool, bool > getIfClustersAssigned () const
 Returns, if u(v)-coordinate is based on cluster information.
 
unsigned short getNClustersAssigned () const
 Returns the number of Clusters assigned to this SpacePoint.
 
void setAssignmentState (bool isAssigned) const
 Setter for association with a track.
 
bool isUOnly () const
 Returns true if the SP is single clustered and the cluster is a u cluster.
 
bool isVOnly () const
 Returns true if the SP is single clustered and the cluster is a v cluster.
 
bool isUAndV () const
 Returns true if the SP is not single clustered.
 
bool getAssignmentState () const
 Getter for status of assignment to a track.
 
void setQualityEstimation (float qualityIndicator)
 Setter for the quality of this SpacePoint.
 
float getQualityEstimation () const
 Getter for the quality of this SpacePoint.
 
void setQualityEstimationError (double qualityIndicatorError)
 Setter for the spacePoint quality index error.
 
float getQualityEstimationError () const
 Getter for the spacePoint quality index error.
 
virtual std::vector< genfit::PlanarMeasurement > getGenfitCompatible () const
 returns a vector of genfit::PlanarMeasurement, which is needed for genfit::track.
 
void addRelationTo (const RelationsInterface< TObject > *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 addRelationTo (const RelationsInterface< TObject > *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< TObject > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
void copyRelations (const RelationsInterface< TObject > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array.
 
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array.
 
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object.
 
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object.
 
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array.
 
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array.
 
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation.
 
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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 getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
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 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.
 
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.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Static Public Member Functions

static B2Vector3D getGlobalCoordinates (const std::pair< double, double > &hitLocal, VxdID vxdID, const VXD::SensorInfoBase *aSensorInfo=nullptr)
 converts a local hit on a given sensor into global coordinates.
 
static std::pair< double, double > convertLocalToNormalizedCoordinates (const std::pair< double, double > &hitLocal, VxdID vxdID, const VXD::SensorInfoBase *aSensorInfo=nullptr)
 converts a local hit into sensor-independent relative coordinates.
 
static std::pair< double, double > convertNormalizedToLocalCoordinates (const std::pair< double, double > &hitNormalized, Belle2::VxdID vxdID, const Belle2::VXD::SensorInfoBase *aSensorInfo=nullptr)
 converts a hit in sensor-independent relative coordinates into local coordinate of given sensor.
 
static double getUWedged (const std::pair< double, double > &hitLocalUnwedged, VxdID vxdID, const VXD::SensorInfoBase *aSensorInfo=nullptr)
 takes a general uCoordinate, and transforms it to corrected uCoordinate for wedged sensors.
 
static double getUUnwedged (const std::pair< double, double > &hitLocalWedged, VxdID::baseType vxdID, const VXD::SensorInfoBase *aSensorInfo=nullptr)
 takes a wedged uCoordinate, and transforms it to general uCoordinate.
 
static void boundaryEnforce (double &value, const double &otherValue, double lower=0, double higher=1, unsigned int side=0, VxdID vxdID=VxdID())
 Enforce 'value' in the range ['lower', 'higher'].
 

Protected Member Functions

void setPositionError (double uSigma, double vSigma, const VXD::SensorInfoBase *aSensorInfo)
 Setter for global position error from on-sensor sigmas.
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Protected Attributes

FullSecID m_secID
 ID of sector containing this hit.
 
B2Vector3D m_position
 Global position vector.
 
B2Vector3D m_positionError
 Global position error vector in sigma.
 
std::pair< double, double > m_normalizedLocal
 Local position vector normalized to sensor size (0 <= x <= 1).
 
double m_UClusterTime
 Time of the cluster on the U side in ns.
 
double m_VClusterTime
 Time of the cluster on the V side in ns.
 
float m_qualityIndicator {0.5}
 Stores a quality indicator.
 
float m_qualityIndicatorError {0.5}
 Stores the error on the quality indicator.
 
VXD::SensorInfoBase::SensorType m_sensorType
 Stores the SensorType using the scheme of SensorInfoBase.
 
VxdID::baseType m_vxdID
 Stores the VxdID.
 
std::pair< bool, bool > m_clustersAssigned {false, false}
 The bool value is true, when correct information of the coordinate exists.
 
bool m_isAssigned {false}
 Stores whether this SpacePoint is connected to a track.
 

Private Member Functions

 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 
 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.
 
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.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Detailed Description

simple Hit class used for sectorMap-training.

Definition at line 25 of file SecMapTrainerHit.h.

Constructor & Destructor Documentation

◆ SecMapTrainerHit() [1/3]

SecMapTrainerHit ( const FullSecID & fullSecID,
const SpacePoint & sp )
inline

Constructor of class SecMapTrainerHit.

Definition at line 28 of file SecMapTrainerHit.h.

28 :
29 SpacePoint(sp),
30 m_secID(fullSecID) {}

◆ SecMapTrainerHit() [2/3]

SecMapTrainerHit ( const FullSecID & fullSecID,
const B2Vector3D & position )
inline

constructor needed for the Virtual IP

Definition at line 33 of file SecMapTrainerHit.h.

33 :
34 SpacePoint(position, B2Vector3D(0., 0., 0.),
35 std::pair<double, double> (0., 0.),
36 std::pair<bool, bool>(), VxdID(),
38 m_secID(fullSecID) {}
SensorType
Enum specifying the type of sensor the SensorInfo represents.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition B2Vector3.h:516

◆ SecMapTrainerHit() [3/3]

SecMapTrainerHit ( double x,
double y,
double z )
inline

another constructor needed for the Virtual IP... eccpp

Definition at line 41 of file SecMapTrainerHit.h.

41 :
42 SpacePoint(B2Vector3D(x, y, z),
43 B2Vector3D(0., 0., 0.),
44 std::pair<double, double> (0., 0.),
45 std::pair<bool, bool>(), VxdID(),
47 m_secID() {}

Member Function Documentation

◆ addRelationTo() [1/4]

void addRelationTo ( const RelationsInterface< TObject > * 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)
145 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex,
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }

◆ addRelationTo() [2/4]

void addRelationTo ( const RelationsInterface< TObject > * 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)
145 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex,
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }

◆ addRelationTo() [3/4]

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 }

◆ addRelationTo() [4/4]

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 }

◆ boundaryEnforce()

static void boundaryEnforce ( double & value,
const double & otherValue,
double lower = 0,
double higher = 1,
unsigned int side = 0,
VxdID vxdID = VxdID() )
inlinestaticinherited

Enforce 'value' in the range ['lower', 'higher'].

param = min(max(param,lower),higher)

Parameters
valueis the coordinate that must be constrained in the range
otherValueis for debugging and logging purposes
loweris the lower limit of the prescribed range
higheris the upper limit of the prescribed range
sideis for debugging purposes: 0 for U side 1 for V side
vxdIDis for debugging purposes

Definition at line 296 of file SpacePoint.h.

298 {
299 // Times to times there are normalized coordinates that are out of the boundaries.
300 // We do apply a small sloppiness here
301
302 double sloppyTerm = 1e-3;
303 if (value < lower - sloppyTerm) {
304 B2WARNING("SpacePoint::boundaryEnforce: value had to be moved (lowerCheck)! old: " << value << ", new: " << lower);
305 B2WARNING("On sensor: " << vxdID << " side: " << (side == 0 ? " U " : " V") <<
306 " when the other coordinate is: " << otherValue);
307
308 value = lower;
309 }
310 if (value > higher + sloppyTerm) {
311 B2WARNING("SpacePoint::boundaryEnforce: value had to be moved (higherCheck)! old: " << value << ", new: " << higher);
312 B2WARNING("On sensor: " << vxdID << " side: " << (side == 0 ? " U " : " V") <<
313 " when the other coordinate is: " << otherValue);
314 value = higher;
315 }
316
317 }

◆ convertLocalToNormalizedCoordinates()

std::pair< double, double > convertLocalToNormalizedCoordinates ( const std::pair< double, double > & hitLocal,
VxdID vxdID,
const VXD::SensorInfoBase * aSensorInfo = nullptr )
staticinherited

converts a local hit into sensor-independent relative coordinates.

first parameter is the local hit (as provided by SpacePoint::getUWedged(...) and Cluster::getV!) stored as a pair of doubles. second parameter is the coded vxdID, which carries the sensorID. third parameter, a sensorInfo can be passed for testing purposes. If no sensorInfo is passed, the member gets its own pointer to it.

ATTENTION: this function assumes, that for wedged sensors, the uCoordinate is already adapted to the vCoordinate! The normalized coordinates are independent of wedged-sensor-issues

Definition at line 149 of file SpacePoint.cc.

152{
153 //We need some handle to translate IDs to local and global
154 // coordinates.
155 if (aSensorInfo == nullptr) {
156 aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(vxdID);
157 }
158
159 //As the 0 is in the middle of sensor in the geometry, and we want
160 // to normalize all positions to numbers between [0,1],
161 // where the middle will be 0.5,
162 // we need to do some calculation.
163 double sensorSizeU = aSensorInfo->getUSize(hitLocal.second); // this deals with the case of trapezoidal sensors too
164 double sensorSizeV = aSensorInfo->getVSize();
165
166 double normalizedUPosition = (hitLocal.first + 0.5 * sensorSizeU) /
167 sensorSizeU; // independent of the trapezoidal sensor-issue by definition
168 double normalizedVPosition = (hitLocal.second + 0.5 * sensorSizeV) / sensorSizeV;
169
170 boundaryEnforce(normalizedUPosition, normalizedVPosition, 0, 1, 0, vxdID);
171 boundaryEnforce(normalizedVPosition, normalizedUPosition, 0, 1, 1, vxdID);
172
173 return { normalizedUPosition, normalizedVPosition };
174}
static void boundaryEnforce(double &value, const double &otherValue, double lower=0, double higher=1, unsigned int side=0, VxdID vxdID=VxdID())
Enforce 'value' in the range ['lower', 'higher'].
Definition SpacePoint.h:296
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a reference 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
double getVSize() const
Return the length of the sensor.
double getUSize(double v=0) const
Return the width of the sensor.

◆ convertNormalizedToLocalCoordinates()

std::pair< double, double > convertNormalizedToLocalCoordinates ( const std::pair< double, double > & hitNormalized,
Belle2::VxdID vxdID,
const Belle2::VXD::SensorInfoBase * aSensorInfo = nullptr )
staticinherited

converts a hit in sensor-independent relative coordinates into local coordinate of given sensor.

first parameter is the hit in sensor-independent normalized ! coordinates stored as a pair of floats. second parameter is the coded vxdID, which carries the sensorID. third parameter, a sensorInfo can be passed for testing purposes. If no sensorInfo is passed, the member gets its own pointer to it.

Definition at line 178 of file SpacePoint.cc.

181{
182 //We need some handle to translate IDs to local and global
183 // coordinates.
184 if (aSensorInfo == nullptr) {
185 aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(vxdID);
186 }
187
188 // normalized coordinate range is from 0 to 1
189 // local coordinate range is from - halfSensorSize to + halfSensorSize
190 double localVPosition = (hitNormalized.second - 0.5) * aSensorInfo->getVSize();
191 double uSizeAtHit = aSensorInfo->getUSize(localVPosition);
192 double localUPosition = (hitNormalized.first - 0.5) * uSizeAtHit;
193
194 boundaryEnforce(localVPosition, localUPosition,
195 -0.5 * aSensorInfo->getVSize(), 0.5 * aSensorInfo->getVSize(), 1, vxdID); // restrain hits to sensor boundaries
196
197 boundaryEnforce(localUPosition, localVPosition, -0.5 * uSizeAtHit, 0.5 * uSizeAtHit,
198 0, vxdID); // restrain hits to sensor boundaries
199
200 return { localUPosition, localVPosition };
201}

◆ copyRelations() [1/2]

void copyRelations ( const RelationsInterface< TObject > * 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 }

◆ copyRelations() [2/2]

void copyRelations ( const RelationsInterface< TObject > * 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() [1/2]

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 {
387 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
388 return m_cacheArrayIndex;
389 }

◆ getArrayIndex() [2/2]

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 {
387 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
388 return m_cacheArrayIndex;
389 }

◆ getArrayName() [1/2]

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.

378 {
379 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
380 return m_cacheDataStoreEntry ? m_cacheDataStoreEntry->name : "";
381 }

◆ getArrayName() [2/2]

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.

378 {
379 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
380 return m_cacheDataStoreEntry ? m_cacheDataStoreEntry->name : "";
381 }

◆ getArrayPointer() [1/2]

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 {
420 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
421 if (!m_cacheDataStoreEntry)
422 return nullptr;
423 return m_cacheDataStoreEntry->getPtrAsArray();
424 }

◆ getArrayPointer() [2/2]

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 {
420 DataStore::Instance().findStoreEntry(this, m_cacheDataStoreEntry, m_cacheArrayIndex);
421 if (!m_cacheDataStoreEntry)
422 return nullptr;
423 return m_cacheDataStoreEntry->getPtrAsArray();
424 }

◆ getAssignmentState()

bool getAssignmentState ( ) const
inlineinherited

Getter for status of assignment to a track.

Definition at line 185 of file SpacePoint.h.

185{ return m_isAssigned; }

◆ getGenfitCompatible()

std::vector< genfit::PlanarMeasurement > getGenfitCompatible ( ) const
virtualinherited

returns a vector of genfit::PlanarMeasurement, which is needed for genfit::track.

This member ensures compatibility with genfit2. The return type is detector independent, but each entry will be of the same detector type, since a spacePoint can not contain clusters of different sensors and therefore of different detector types.

Definition at line 117 of file SpacePoint.cc.

118{
119 // XYRecoHit will be stored as their base-class, which is detector-independent.
120 std::vector< genfit::PlanarMeasurement > collectedMeasurements;
121
122
123 // get the related clusters to this spacePoint and create a genfit::PlanarMeasurement for each of them:
125
126 auto relatedClusters = this->getRelationsTo<SVDCluster>("ALL");
127 for (unsigned i = 0; i < relatedClusters.size(); i++) {
128 collectedMeasurements.push_back(SVDRecoHit(relatedClusters[i]));
129 }
130
132
133 // since we do not know the name of the attached PXDCluster, getRelatedTo does not work, however, getRelationsTo seems to be less sensible and therefore can be used, but in this case, one has to loop over the entries (which should be only one in this case)
134 auto relatedClusters = this->getRelationsTo<PXDCluster>("ALL");
135 for (unsigned i = 0; i < relatedClusters.size(); i++) {
136 collectedMeasurements.push_back(PXDRecoHit(relatedClusters[i]));
137 }
138
139 } else {
140 B2FATAL("unknown detector type");
141 }
142
143 B2DEBUG(20, "SpacePoint::getGenfitCompatible(): collected " << collectedMeasurements.size() << " meaturements");
144
145 return collectedMeasurements;
146}
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Belle2::VXD::SensorInfoBase::SensorType getType() const
Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.
Definition SpacePoint.h:145

◆ getGlobalCoordinates()

B2Vector3D getGlobalCoordinates ( const std::pair< double, double > & hitLocal,
VxdID vxdID,
const VXD::SensorInfoBase * aSensorInfo = nullptr )
staticinherited

converts a local hit on a given sensor into global coordinates.

so this practically does what sensorInfo::pointToGlobal is doing, the difference is, that you do not need to have the sensorInfo beforehand (it will be retrieved using the VxdID) first parameter is the local hit (as provided by getU and getV!) stored as a pair of doubles. second parameter is the coded vxdID, which carries the sensorID. third parameter, a sensorInfo can be passed for testing purposes. If no sensorInfo is passed, the member gets its own pointer to it.

ATTENTION: this function assumes, that for wedged sensors, the uCoordinate is already adapted to the vCoordinate!

Definition at line 204 of file SpacePoint.cc.

206{
207 //We need some handle to translate IDs to local and global coordinates.
208 if (aSensorInfo == nullptr) {
209 aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(vxdID);
210 }
211
212 // the second parameter set to true results in alignment constants being applied
213 return aSensorInfo->pointToGlobal(ROOT::Math::XYZVector(hitLocal.first, hitLocal.second, 0), true);
214}
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.

◆ getIfClustersAssigned()

std::pair< bool, bool > getIfClustersAssigned ( ) const
inlineinherited

Returns, if u(v)-coordinate is based on cluster information.

.first is true, if u-cluster information is present
.second is true, if v-cluster information is present.

Definition at line 162 of file SpacePoint.h.

162{ return m_clustersAssigned; }

◆ getInfo() [1/2]

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 {
372 return _RelationsInterfaceImpl::htmlToPlainText(getInfoHTML());
373 }

◆ getInfo() [2/2]

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 {
372 return _RelationsInterfaceImpl::htmlToPlainText(getInfoHTML());
373 }

◆ getInfoHTML() [1/2]

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

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getInfoHTML() [2/2]

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

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getName()

std::string getName ( ) const
inlineoverridevirtualinherited

Print out some info for this SpacePoint.

Reimplemented from RelationsInterface< TObject >.

Definition at line 115 of file SpacePoint.h.

116 {
117 return "SpacePoint with index: " + std::to_string(getArrayIndex()) +
118 "and VxdID: " + std::to_string(VxdID(m_vxdID));
119 }

◆ getNClustersAssigned()

unsigned short getNClustersAssigned ( ) const
inlineinherited

Returns the number of Clusters assigned to this SpacePoint.

Definition at line 165 of file SpacePoint.h.

166 {
167 if (m_sensorType == VXD::SensorInfoBase::SensorType::SVD &&
168 m_clustersAssigned.first && m_clustersAssigned.second) {
169 return 2;
170 }
171 return 1;
172 }

◆ getNormalizedLocalU()

double getNormalizedLocalU ( ) const
inlineinherited

Return normalized local coordinates of the cluster in u (0 <= posU <= 1).

Definition at line 151 of file SpacePoint.h.

151{ return m_normalizedLocal.first; }

◆ getNormalizedLocalV()

double getNormalizedLocalV ( ) const
inlineinherited

Return normalized local coordinates of the cluster in v (0 <= posV <= 1).

Definition at line 154 of file SpacePoint.h.

154{ return m_normalizedLocal.second; }

◆ getPosition()

const B2Vector3D & getPosition ( ) const
inlineinherited

return the position vector in global coordinates

Definition at line 138 of file SpacePoint.h.

138{ return m_position; }

◆ getPositionError()

const B2Vector3D & getPositionError ( ) const
inlineinherited

return the hitErrors in sigma of the global position

Definition at line 141 of file SpacePoint.h.

141{ return m_positionError; }

◆ getQualityEstimation()

float getQualityEstimation ( ) const
inlineinherited

Getter for the quality of this SpacePoint.

Definition at line 191 of file SpacePoint.h.

191{ return m_qualityIndicator; }

◆ getQualityEstimationError()

float getQualityEstimationError ( ) const
inlineinherited

Getter for the spacePoint quality index error.

Definition at line 197 of file SpacePoint.h.

197{return m_qualityIndicatorError;}

◆ getRelated() [1/2]

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 {
280 return static_cast<T*>(DataStore::Instance().getRelationWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
281 T::Class(), name, namedRelation).object);
282 }

◆ getRelated() [2/2]

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 {
280 return static_cast<T*>(DataStore::Instance().getRelationWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
281 T::Class(), name, namedRelation).object);
282 }

◆ getRelatedFrom() [1/2]

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 {
265 return static_cast<FROM*>(DataStore::Instance().getRelationWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry,
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }

◆ getRelatedFrom() [2/2]

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 {
265 return static_cast<FROM*>(DataStore::Instance().getRelationWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry,
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }

◆ getRelatedFromWithWeight() [1/2]

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 {
317 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ getRelatedFromWithWeight() [2/2]

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 {
317 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ getRelatedTo() [1/2]

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 {
250 return static_cast<TO*>(DataStore::Instance().getRelationWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
251 TO::Class(), name, namedRelation).object);
252 }

◆ getRelatedTo() [2/2]

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 {
250 return static_cast<TO*>(DataStore::Instance().getRelationWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
251 TO::Class(), name, namedRelation).object);
252 }

◆ getRelatedToWithWeight() [1/2]

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 {
300 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ getRelatedToWithWeight() [2/2]

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 {
300 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ getRelatedWithWeight() [1/2]

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 {
334 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ getRelatedWithWeight() [2/2]

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 {
334 RelationEntry entry = DataStore::Instance().getRelationWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry, m_cacheArrayIndex,
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ getRelationsFrom() [1/2]

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 {
215 return RelationVector<FROM>(DataStore::Instance().getRelationsWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry,
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }

◆ getRelationsFrom() [2/2]

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 {
215 return RelationVector<FROM>(DataStore::Instance().getRelationsWith(DataStore::c_FromSide, this, m_cacheDataStoreEntry,
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }

◆ getRelationsTo() [1/2]

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 {
199 return RelationVector<TO>(DataStore::Instance().getRelationsWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry,
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ getRelationsTo() [2/2]

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 {
199 return RelationVector<TO>(DataStore::Instance().getRelationsWith(DataStore::c_ToSide, this, m_cacheDataStoreEntry,
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ getRelationsWith() [1/2]

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 {
232 return RelationVector<T>(DataStore::Instance().getRelationsWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry,
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getRelationsWith() [2/2]

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 {
232 return RelationVector<T>(DataStore::Instance().getRelationsWith(DataStore::c_BothSides, this, m_cacheDataStoreEntry,
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getSectorID()

FullSecID getSectorID ( ) const
inline

returns secID of sector containing this hit.

Definition at line 65 of file SecMapTrainerHit.h.

65{ return m_secID; }

◆ getSectorIDString()

std::string getSectorIDString ( ) const
inline

returns global hit position of current hit.

returns global x-position. returns global y-position. returns global z-position. returns secID of sector containing this hit.

Definition at line 62 of file SecMapTrainerHit.h.

62{ return m_secID.getFullSecString(); }

◆ getType()

Belle2::VXD::SensorInfoBase::SensorType getType ( ) const
inlineinherited

Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.

Definition at line 145 of file SpacePoint.h.

145{ return m_sensorType; }

◆ getUUnwedged()

static double getUUnwedged ( const std::pair< double, double > & hitLocalWedged,
VxdID::baseType vxdID,
const VXD::SensorInfoBase * aSensorInfo = nullptr )
inlinestaticinherited

takes a wedged uCoordinate, and transforms it to general uCoordinate.

Use this if you want to "unwedge" your u-coordinate. The returned value shall be like the value delivered by a uCluster without information of v (== aCluster.getPosition() ). This is only relevant for wedged/slanted sensors because of their trapezoidal shape, for rectangular shapes, the value does not change

Definition at line 278 of file SpacePoint.h.

280 {
281 if (aSensorInfo == nullptr) { aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(vxdID); }
282 return (aSensorInfo->getWidth() / aSensorInfo->getWidth(hitLocalWedged.second)) * hitLocalWedged.first;
283 }

◆ getUWedged()

static double getUWedged ( const std::pair< double, double > & hitLocalUnwedged,
VxdID vxdID,
const VXD::SensorInfoBase * aSensorInfo = nullptr )
inlinestaticinherited

takes a general uCoordinate, and transforms it to corrected uCoordinate for wedged sensors.

Use this if you want to add the information of the vCluster to the local uPosition. The returned value is now dependent of vCluster and valid only for this cluster! This is only relevant for wedged/slanted sensors because of their trapezoidal shape, for rectangular shapes, the value does not change

function kept only for backward compatibility with VXDTF1

Definition at line 263 of file SpacePoint.h.

265 {
266 if (aSensorInfo == nullptr) { aSensorInfo = &VXD::GeoCache::getInstance().getSensorInfo(vxdID); }
267 return (aSensorInfo->getWidth(hitLocalUnwedged.second) / aSensorInfo->getWidth()) * hitLocalUnwedged.first;
268 }

◆ getVxdID()

VxdID getVxdID ( ) const
inlineinherited

Return the VxdID of the sensor on which the the cluster of the SpacePoint lives.

Definition at line 148 of file SpacePoint.h.

148{ return m_vxdID; }

◆ isUAndV()

bool isUAndV ( ) const
inlineinherited

Returns true if the SP is not single clustered.

Definition at line 182 of file SpacePoint.h.

182{ return m_clustersAssigned.first and m_clustersAssigned.second; }

◆ isUOnly()

bool isUOnly ( ) const
inlineinherited

Returns true if the SP is single clustered and the cluster is a u cluster.

Definition at line 178 of file SpacePoint.h.

178{ return m_clustersAssigned.first and not m_clustersAssigned.second; }

◆ isVOnly()

bool isVOnly ( ) const
inlineinherited

Returns true if the SP is single clustered and the cluster is a v cluster.

Definition at line 180 of file SpacePoint.h.

180{ return not m_clustersAssigned.first and m_clustersAssigned.second; }

◆ operator!=()

bool operator!= ( const SpacePoint & b) const
inlineinherited

Comparison for inequality with another SpacePoint.

Definition at line 109 of file SpacePoint.h.

110 {
111 return !(*this == b);
112 }

◆ operator==()

bool operator== ( const SpacePoint & b) const
inlineinherited

Compare, if two SpacePoints are the same one.

As SpacePoints should live in the DataStore and comparing positions doesn't guarantee, that different underlying clusters are used, we compare here only the indices of the SpacePoint within their StoreArray --> SpacePoints are equal, if the share the index.

Definition at line 103 of file SpacePoint.h.

104 {
105 return getArrayIndex() == b.getArrayIndex();
106 }

◆ setAssignmentState()

void setAssignmentState ( bool isAssigned) const
inlineinherited

Setter for association with a track.

Definition at line 175 of file SpacePoint.h.

175{ m_isAssigned = isAssigned; }

◆ setPositionError()

void setPositionError ( double uSigma,
double vSigma,
const VXD::SensorInfoBase * aSensorInfo )
inlineprotectedinherited

Setter for global position error from on-sensor sigmas.

Definition at line 322 of file SpacePoint.h.

323 {
324 //As only variances, but not the sigmas transform linearly, we need to use some acrobatics.
325 m_positionError = aSensorInfo->vectorToGlobal(ROOT::Math::XYZVector(uSigma * uSigma, vSigma * vSigma, 0),
326 true // use alignment in transformation
327 );
328 m_positionError.Sqrt();
329 }

◆ setQualityEstimation()

void setQualityEstimation ( float qualityIndicator)
inlineinherited

Setter for the quality of this SpacePoint.

Definition at line 188 of file SpacePoint.h.

188{m_qualityIndicator = qualityIndicator; }

◆ setQualityEstimationError()

void setQualityEstimationError ( double qualityIndicatorError)
inlineinherited

Setter for the spacePoint quality index error.

Definition at line 194 of file SpacePoint.h.

194{m_qualityIndicatorError = qualityIndicatorError;}

◆ TimeU()

double TimeU ( ) const
inlineinherited

return the time in ns of the cluster on the U side

Definition at line 132 of file SpacePoint.h.

132{ return m_UClusterTime; }

◆ TimeV()

double TimeV ( ) const
inlineinherited

return the time in ns of the cluster on the V side

Definition at line 135 of file SpacePoint.h.

135{ return m_VClusterTime; }

◆ X()

double X ( ) const
inlineinherited

return the x-value of the global position of the SpacePoint

Definition at line 123 of file SpacePoint.h.

123{ return m_position.X(); }

◆ Y()

double Y ( ) const
inlineinherited

return the y-value of the global position of the SpacePoint

Definition at line 126 of file SpacePoint.h.

126{ return m_position.Y(); }

◆ Z()

double Z ( ) const
inlineinherited

return the z-value of the global position of the SpacePoint

Definition at line 129 of file SpacePoint.h.

129{ return m_position.Z(); }

Member Data Documentation

◆ m_cacheArrayIndex [1/2]

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_cacheArrayIndex [2/2]

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 [1/2]

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_cacheDataStoreEntry [2/2]

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_clustersAssigned

std::pair<bool, bool> m_clustersAssigned {false, false}
protectedinherited

The bool value is true, when correct information of the coordinate exists.

.first is true, if this SpacePoint has a UCluster (only relevant for SVD, PXD always true), .second is true, if this SpacePoint has a VCluster (only relevant for SVD, PXD always true),

Definition at line 387 of file SpacePoint.h.

387{false, false};

◆ m_isAssigned

bool m_isAssigned {false}
mutableprotectedinherited

Stores whether this SpacePoint is connected to a track.

We assume, that const for SpacePoint means, things like position et cetera remain constant. The assignment status is therefore a mutable on purpose and SpacePoints can be const during tracking.

Definition at line 395 of file SpacePoint.h.

395{false};

◆ m_normalizedLocal

std::pair<double, double> m_normalizedLocal
protectedinherited

Local position vector normalized to sensor size (0 <= x <= 1).

.first: u, .second: v

Definition at line 349 of file SpacePoint.h.

◆ m_position

B2Vector3D m_position
protectedinherited

Global position vector.

[0]: x, [1] : y, [2] : z

Definition at line 336 of file SpacePoint.h.

◆ m_positionError

B2Vector3D m_positionError
protectedinherited

Global position error vector in sigma.

[0]: x-uncertainty, [1] : y-uncertainty, [2] : z-uncertainty

Definition at line 342 of file SpacePoint.h.

◆ m_qualityIndicator

float m_qualityIndicator {0.5}
protectedinherited

Stores a quality indicator.

The value shall be between 0. and 1., where 1. means "good" and 0. means "bad".

Definition at line 363 of file SpacePoint.h.

363{0.5};

◆ m_qualityIndicatorError

float m_qualityIndicatorError {0.5}
protectedinherited

Stores the error on the quality indicator.

The value comes from the binning error on the pdfs from which the QI is derived.

Definition at line 370 of file SpacePoint.h.

370{0.5};

◆ m_secID

FullSecID m_secID
protected

ID of sector containing this hit.

Definition at line 68 of file SecMapTrainerHit.h.

◆ m_sensorType

VXD::SensorInfoBase::SensorType m_sensorType
protectedinherited

Stores the SensorType using the scheme of SensorInfoBase.

Currently there are the following types possible:
PXD, SVD, TEL, VXD

Definition at line 377 of file SpacePoint.h.

◆ m_UClusterTime

double m_UClusterTime
protectedinherited

Time of the cluster on the U side in ns.

Definition at line 353 of file SpacePoint.h.

◆ m_VClusterTime

double m_VClusterTime
protectedinherited

Time of the cluster on the V side in ns.

Definition at line 357 of file SpacePoint.h.

◆ m_vxdID

VxdID::baseType m_vxdID
protectedinherited

Stores the VxdID.

Definition at line 380 of file SpacePoint.h.


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