![]() |
Belle II Software
release-05-02-19
|
DATCONSVDSpacePoint typically is build from 1-2 DATCONSimpleSVDClusters. More...
#include <DATCONSVDSpacePoint.h>
Public Member Functions | |
DATCONSVDSpacePoint (std::vector< SVDCluster const * > &clusters, VXD::SensorInfoBase const *aSensorInfo=nullptr) | |
Constructor DATCONSVDSpacePoint from ONE or TWO DATCONSimpleSVDClusters. More... | |
DATCONSVDSpacePoint () | |
Default constructor for the ROOT IO. | |
DATCONSVDSpacePoint (B2Vector3< double > &pos, const std::pair< double, double > &normalizedLocal, std::pair< bool, bool > clustersAssigned, VxdID sensorID, Belle2::VXD::SensorInfoBase::SensorType detID) | |
Constructor for debugging or other special purposes. More... | |
bool | operator== (const DATCONSVDSpacePoint &b) const |
Compare, if two DATCONSVDSpacePoints are the same one. More... | |
bool | operator!= (const DATCONSVDSpacePoint &b) const |
Comparison for inequality with another DATCONSVDSpacePoint. | |
double | X () const |
return the x-value of the global position of the DATCONSVDSpacePoint | |
double | Y () const |
return the y-value of the global position of the DATCONSVDSpacePoint | |
double | Z () const |
return the z-value of the global position of the DATCONSVDSpacePoint | |
const B2Vector3< double > & | getPosition () const |
return the position vector in global coordinates | |
Belle2::VXD::SensorInfoBase::SensorType | getType () const |
Return SensorType (PXD, SVD, ...) on which the DATCONSVDSpacePoint lives. | |
VxdID | getVxdID () const |
Return the VxdID of the sensor on which the the cluster of the DATCONSVDSpacePoint 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. More... | |
unsigned short | getNClustersAssigned () const |
Returns the number of Clusters assigned to this DATCONSVDSpacePoint. | |
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. | |
std::vector< SVDCluster > | getAssignedDATCONSVDClusters () |
Getter function for the DATCONSVDClusters assigned to this DATCONSVDSpacePoint. | |
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). More... | |
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). More... | |
void | copyRelations (const RelationsInterface< BASE > *sourceObj) |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More... | |
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. More... | |
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. More... | |
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. More... | |
template<class TO > | |
TO * | getRelatedTo (const std::string &name="", const std::string &namedRelation="") const |
Get the object to which this object has a relation. More... | |
template<class FROM > | |
FROM * | getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const |
Get the object from which this object has a relation. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual std::string | getName () const |
Return a short name that describes this object, e.g. More... | |
virtual std::string | getInfoHTML () const |
Return a short summary of this object's contents in HTML format. More... | |
std::string | getInfo () const |
Return a short summary of this object's contents in raw text format. More... | |
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. | |
Static Public Member Functions | |
static B2Vector3< double > | 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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static void | boundaryEnforce (double &value, const double &otherValue, double lower=0, double higher=1, unsigned int side=0, VxdID vxdID=VxdID()) |
Enforce. More... | |
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 | |
B2Vector3< double > | m_position |
Global position vector. More... | |
std::pair< double, double > | m_normalizedLocal |
Local position vector normalized to sensor size (0 <= x <= 1). More... | |
std::pair< bool, bool > | m_clustersAssigned {false, false} |
The bool value is true, when correct information of the coordinate exists. More... | |
std::vector< SVDCluster > | m_assignedDATCONSVDClusters |
Vector containing the DATCONSVDClusters assigned to this DATCONSVDSpacePoint. | |
VxdID::baseType | m_vxdID |
Stores the VxdID. | |
VXD::SensorInfoBase::SensorType | m_sensorType |
Stores the SensorType using the scheme of SensorInfoBase. More... | |
bool | m_isAssigned {false} |
Stores whether this DATCONSVDSpacePoint is connected to a track. More... | |
Private Member Functions | |
ClassDef (RelationsInterface, 0) | |
defines interface for accessing relations of objects in StoreArray. | |
Private Attributes | |
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. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const DATCONSVDSpacePoint &aSP) |
overloaded '<<' stream operator. More... | |
DATCONSVDSpacePoint typically is build from 1-2 DATCONSimpleSVDClusters.
It stores a global space point and some extra infos, such as a flag if it is already assigned.
For SVD only:
If relations to its attached Clusters are set, these have got the following meaning:
Definition at line 51 of file DATCONSVDSpacePoint.h.
|
explicit |
Constructor DATCONSVDSpacePoint from ONE or TWO DATCONSimpleSVDClusters.
clusters | container carrying pointers to DATCONSVDCluster (1 or 2 (u+v), must not be nullptr). |
aSensorInfo | SensorInfoBase for testing purposes, usually derived from first cluster. |
Definition at line 17 of file DATCONSVDSpacePoint.cc.
|
inline |
Constructor for debugging or other special purposes.
pos | global DATCONSVDSpacePoint position. |
normalizedLocal | coordinates (element: [0;1]) of SP on given sensorID (.first "=" u, .second "=" v). |
clustersAssigned | states, if u (.first) or v (.second) is assigned. |
sensorID | VxdID of sensor the DATCONSVDSpacePoint shall be on. |
detID | SensorType detector-type (PXD, SVD, ...) to be used. |
Definition at line 76 of file DATCONSVDSpacePoint.h.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 144 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 157 of file RelationsObject.h.
|
static |
converts a local hit into sensor-independent relative coordinates.
first parameter is the local hit (as provided by DATCONSVDSpacePoint::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 75 of file DATCONSVDSpacePoint.cc.
|
static |
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 104 of file DATCONSVDSpacePoint.cc.
|
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 172 of file RelationsObject.h.
|
static |
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 130 of file DATCONSVDSpacePoint.cc.
|
inline |
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 138 of file DATCONSVDSpacePoint.h.
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 372 of file RelationsObject.h.
|
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:
Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.
Definition at line 364 of file RelationsObject.h.
|
inlinevirtualinherited |
Return a short name that describes this object, e.g.
pi+ for an MCParticle.
Reimplemented in SpacePoint, Particle, and MCParticle.
Definition at line 346 of file RelationsObject.h.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 280 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 265 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 316 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 250 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 299 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 333 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 214 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 199 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 232 of file RelationsObject.h.
|
inlinestatic |
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 225 of file DATCONSVDSpacePoint.h.
|
inlinestatic |
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 212 of file DATCONSVDSpacePoint.h.
|
inline |
Compare, if two DATCONSVDSpacePoints are the same one.
As DATCONSVDSpacePoints 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 DATCONSVDSpacePoint within their StoreArray --> DATCONSVDSpacePoints are equal, if the share the index.
Definition at line 95 of file DATCONSVDSpacePoint.h.
|
friend |
overloaded '<<' stream operator.
Print secID to stream by converting it to string
Definition at line 87 of file DATCONSVDSpacePoint.h.
|
protected |
The bool value is true, when correct information of the coordinate exists.
.first is true, if this DATCONSVDSpacePoint has a UCluster (only relevant for SVD, PXD always true), .second is true, if this DATCONSVDSpacePoint has a VCluster (only relevant for SVD, PXD always true),
Definition at line 287 of file DATCONSVDSpacePoint.h.
|
mutableprotected |
Stores whether this DATCONSVDSpacePoint is connected to a track.
We assume, that const for DATCONSVDSpacePoint means, things like position et cetera remain constant. The assignment status is therefore a mutable on purpose and DATCONSVDSpacePoints can be const during tracking.
Definition at line 308 of file DATCONSVDSpacePoint.h.
|
protected |
Local position vector normalized to sensor size (0 <= x <= 1).
.first: u, .second: v
Definition at line 280 of file DATCONSVDSpacePoint.h.
|
protected |
Global position vector.
[0]: x, [1] : y, [2] : z
Definition at line 274 of file DATCONSVDSpacePoint.h.
|
protected |
Stores the SensorType using the scheme of SensorInfoBase.
Currently there are the following types possible:
PXD, SVD, TEL, VXD
Definition at line 300 of file DATCONSVDSpacePoint.h.