Belle II Software  release-08-01-10
SpacePointTrackCand Class Referencefinal

Storage for (VXD) SpacePoint-based track candidates. More...

#include <SpacePointTrackCand.h>

Inheritance diagram for SpacePointTrackCand:
Collaboration diagram for SpacePointTrackCand:

Public Types

enum  RefereeStatusBit {
  c_checkedByReferee = 1 ,
  c_checkedClean = 2 ,
  c_hitsOnSameSensor = 4 ,
  c_hitsLowDistance = 8 ,
  c_removedHits = 16 ,
  c_checkedTrueHits = 32 ,
  c_checkedSameSensors = 64 ,
  c_checkedMinDistance = 128 ,
  c_curlingTrack = 256 ,
  c_omittedClusters = 512 ,
  c_singleClustersSPs = 1024 ,
  c_isActive = 2048 ,
  c_isReserved = 4096 ,
  c_hasFittedRecoTrack = 1 << 13 ,
  c_initialState = 0 + c_isActive
}
 Status information that can be set to indicate several properties of the SpacePointTrackCand. More...
 

Public Member Functions

 BELLE2_DEFINE_EXCEPTION (UnsupportedDetType, "The Detector Type is not supported by this class. Supported are: PXD and SVD")
 Exception thrown, when an Unsupported Detector Type occurs. More...
 
 BELLE2_DEFINE_EXCEPTION (SPTCIndexOutOfBounds, "Trying to acces a SpacePoint from a SpacePointTrackCand via an" " index that is out of bounds!")
 Exception thrown, when trying to access SpacePoints by their index inside of SpacePointTrackCand, but index is out of bounds.
 
 BELLE2_DEFINE_EXCEPTION (SPTCSortingParameterSizeInvalid, "Trying to modify SortingParameters, but number of new SortingParameters differs from number of SpacePoints")
 Exception thrown, when the size of the vector containing the spacePoints has a different size than the vector containing the sorting parameters.
 
 SpacePointTrackCand ()=default
 Empty constructor with default values, including it to be active. More...
 
 SpacePointTrackCand (const std::vector< const Belle2::SpacePoint * > &spacePoints, int pdgCode=0, double charge=0, int mcTrackID=-1)
 Constructor from a vector<SpacePoint*> and some additional information. More...
 
bool operator== (const SpacePointTrackCand &rhs) const
 Checks the equality of the pointers to the contained SpacePoints (pdg-code and charge estimate are not compared!) NOTE: returns false if both TrackCands do not contain any SpacePoints.
 
const std::vector< const Belle2::SpacePoint * > & getHits () const
 get hits (space points) of track candidate
 
const std::vector< const Belle2::SpacePoint * > getSortedHits () const
 get hits (space points) sorted by their respective sorting parameter
 
std::vector< const Belle2::SpacePoint * >::const_iterator begin () const
 returns a const_iterator (begin()) for easily looping over hits of SpacePointTrackCand. More...
 
std::vector< const Belle2::SpacePoint * >::const_iterator end () const
 returns a const_iterator (end()) for easily looping over hits of SpacePointTrackCand. More...
 
const std::vector< const Belle2::SpacePoint * > getHitsInRange (int firstInd, int lastInd) const
 get hits (SpacePoints) in range (indices of SpacePoint inside SpacePointTrackCand) including first index and excluding last index (the SpacePoint on firstInd but not the one on lastIndex wil be returned!). More...
 
unsigned int getNHits () const
 get the number of hits (space points) in the track candidate
 
unsigned int size () const
 get the number of hits (space points) in the track candidate
 
int getPdgCode () const
 get pdg code
 
double getChargeSeed () const
 get charge
 
const TMatrixDSym & getCovSeed () const
 get the covariance matrix seed (6D). More...
 
const TVectorD & getStateSeed () const
 get state seed as 6D vector
 
const ROOT::Math::XYZVector getPosSeed () const
 get position seed as ROOT::Math::XYZVector
 
const ROOT::Math::XYZVector getMomSeed () const
 get momentum seed as ROOT::Math::XYZVector
 
const std::vector< double > & getSortingParameters () const
 get the sorting parameters
 
const std::vector< double > getSortingParametersInRange (int firstIndex, int lastIndex) const
 get the sorting parameters in range (indices of SpacePoints inside SpacePointTrackCand) including firstIndex and excluding lastIndex NOTE: for all hits range is from zero to getNHits(). More...
 
int getTrackStubIndex () const
 get TrackStub Index
 
int getMcTrackID () const
 get the MC Track ID
 
int getMcTrackId () const
 get the MC Track ID (same writing as in genfit::TrackCand)
 
unsigned short int getRefereeStatus (unsigned short int bitmask=USHRT_MAX) const
 Return the refere status code of the SpacePointTrackCand. More...
 
bool hasRefereeStatus (unsigned int short bitmask) const
 Check if the SpacePointTrackCand has the status characterized by the bitmask.
 
double getQualityIndicator () const
 returns the current status of the estimated quality of this track candidate.
 
bool hasHitsOnSameSensor () const
 Check if the SpacePointTrackCand contains consecutive SpacePoints that are on the same sensor WARNING: does not check if this has actually been assigned!
 
bool checkedSameSensors () const
 Check if the SpacePointTrackCand has been checked for consecutive hits on same sensor.
 
bool hasHitsLowDistance () const
 Check if consecutive SpacePoints are far enough apart throughout the SpacePointTrackCand WARNING: does not check if this has actually been assigned!
 
bool checkedMinDistance () const
 Check if the SpacePointTrackCand has been checked for consecutive hits being far enough apart.
 
bool hasRemovedHits () const
 Check if a SpacePointTrackCand has removed hits (i.e. More...
 
bool isOutgoing () const
 check if particle is outgoing (simply returns member m_flightDirection)!
 
bool isCurling () const
 get if the TrackCand is curling. More...
 
bool checkedForCurling () const
 check if the TrackCand has been checked for Curling.
 
bool isPartOfCurlingTrack () const
 check if the TrackCand is part of a curling TrackCand. More...
 
void print (int debuglevel=25, const Option_t *="") const
 print the Track Candidate in its "full beauty". More...
 
std::string getRefereeStatusString (std::string delimiter=" ") const
 get the refereeStatus as a string (easier to read than an unsigned short int) More...
 
short getFamily () const
 return family identifier
 
void setFamily (short family)
 assign family identifier
 
void setSortingParameters (const std::vector< double > &sortParams)
 set the sorting parameters
 
void setPdgCode (int pdgCode)
 set a hypothesis for the particle by setting a pdgcode (will also set the appropriate charge)
 
void setChargeSeed (double charge)
 Setter for assumed charge of tracked particle.
 
void set6DSeed (const TVectorD &state6D)
 set the 6D state seed
 
void setCovSeed (const TMatrixDSym &cov)
 set the covariance matrix seed
 
void setQualityIndicator (const double newIndicator)
 sets the new status of the estimated quality of this track candidate. More...
 
void addSpacePoint (const SpacePoint *newSP, double sortParam)
 add a new SpacePoint and its according sorting parameter to the track candidate
 
void setFlightDirection (bool direction)
 set the direction of flight (true is outgoing, false is ingoing). More...
 
void setTrackStubIndex (int trackStubInd)
 set TrackStub index
 
void setRefereeStatus (unsigned short int bitmask)
 set referee status (resets the complete to the passed status!)
 
void addRefereeStatus (unsigned short int bitmask)
 add a referee status
 
void removeRefereeStatus (unsigned short int bitmask)
 remove a referee status
 
void clearRefereeStatus ()
 clear the referee status. More...
 
void resetRefereeStatus ()
 resets the referee status to the initial value
 
void removeSpacePoint (int indexInTrackCand)
 remove a SpacePoint (and its sorting parameter) from the SpacePointTrackCand
 
bool operator< (const SpacePointTrackCand &rhs) const
 Overloading the less operator to compare SPTCs based on their quality index. More...
 
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.
 

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

std::vector< const SpacePoint * > m_trackSpacePoints
 pointers to SpacePoints in the datastore
 
std::vector< double > m_sortingParameters
 sorting Parameters, can be used to sort the SpacePoints.
 
short m_family = -1
 identifier for tracks that share at least two SpacePoints.
 
int m_pdg = 0
 PDG code of particle.
 
int m_MCTrackID = -1
 track ID from MC simulation
 
TVectorD m_state6D = TVectorD(6)
 global momentum plus position state (seed) vector
 
TMatrixDSym m_cov6D = TMatrixDSym(6)
 global momentum plus position state (seed) covariance matrix
 
double m_q = 0
 charge of the particle in units of elementary charge
 
bool m_flightDirection = true
 direction of flight. More...
 
int m_iTrackStub = -1
 Index of TrackStub in a curling Track Candidate. More...
 
unsigned short int m_refereeStatus = c_isActive
 bit-field to indicate different properties that are checked by the referee module
 
double m_qualityIndicator = 0.5
 An estimation for the quality of the track. More...
 

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

Storage for (VXD) SpacePoint-based track candidates.

Often abbreviated SPTC in other contexts. Design follows rather closely the one from genfit::TrackCand.

See also
SpacePoint

Definition at line 40 of file SpacePointTrackCand.h.

Member Enumeration Documentation

◆ RefereeStatusBit

Status information that can be set to indicate several properties of the SpacePointTrackCand.

NOTE: Some properties are at the moment stored in other members of the SpacePointTrackCand, can be moved here, if memory usage is an issue. NOTE: If you add something here, it should also be added in the 'getRefereeStatusString' method!

Enumerator
c_checkedByReferee 

bit 0: SPTC has been checked by a Referee (all possible tests).

c_checkedClean 

bit 1: SPTC shows no 'problematic' behaviour.

c_hitsOnSameSensor 

bit 2: SPTC has two (or more) SpacePoints on same sensor.

c_hitsLowDistance 

bit 3: SPTC has two (or more) SpacePoints that are not far enough apart.

NOTE: distance is judged by referee (and also set there).

c_removedHits 

bit 4: SpacePoints were removed from this SPTC.

c_checkedTrueHits 

bit 5: All SpacePoints of the SPTC have a relation to at least one TrueHit.

c_checkedSameSensors 

bit 6: It has been checked, if two consecutive SpacePoints are on the same sensor for this SPTC.

c_checkedMinDistance 

bit 7: It has been checked if two consecutive SpacePoints are far enough apart.

c_curlingTrack 

bit 8: SPTC is curling (resp.

is part of a curling SPTC).

c_omittedClusters 

bit 9: Not all Clusters of the genfit::TrackCand have been used to create this SPTC.

c_singleClustersSPs 

bit 10: SPTC contains single Cluster SpacePoints.

c_isActive 

bit 11: SPTC is active (i.e.

if false, some module rejected it for further use.

c_isReserved 

bit 12: SPTC is reserved (i.e.

should not be altered and should be treated with high priority).

c_hasFittedRecoTrack 

bit 13: SPTC is related to a RecoTrack which has a successful fit.

NOTE: this check is performed on the original SPTC, if the current one is a copy of that the relation may be lost

c_initialState 

This is the initialState, which will always be set in the beginning and at reset.

Definition at line 67 of file SpacePointTrackCand.h.

67  {
68  c_checkedByReferee = 1,
69  c_checkedClean = 2,
70  c_hitsOnSameSensor = 4,
74  c_removedHits = 16,
75  c_checkedTrueHits = 32,
80  c_curlingTrack = 256,
81  c_omittedClusters = 512,
82  c_singleClustersSPs = 1024,
83  c_isActive = 2048,
84  c_isReserved = 4096,
85  c_hasFittedRecoTrack = 1 << 13,
88  };
@ c_curlingTrack
bit 8: SPTC is curling (resp.
@ c_checkedTrueHits
bit 5: All SpacePoints of the SPTC have a relation to at least one TrueHit.
@ c_removedHits
bit 4: SpacePoints were removed from this SPTC.
@ c_omittedClusters
bit 9: Not all Clusters of the genfit::TrackCand have been used to create this SPTC.
@ c_hitsLowDistance
bit 3: SPTC has two (or more) SpacePoints that are not far enough apart.
@ c_checkedClean
bit 1: SPTC shows no 'problematic' behaviour.
@ c_singleClustersSPs
bit 10: SPTC contains single Cluster SpacePoints.
@ c_checkedMinDistance
bit 7: It has been checked if two consecutive SpacePoints are far enough apart.
@ c_initialState
This is the initialState, which will always be set in the beginning and at reset.
@ c_hasFittedRecoTrack
bit 13: SPTC is related to a RecoTrack which has a successful fit.
@ c_isActive
bit 11: SPTC is active (i.e.
@ c_checkedSameSensors
bit 6: It has been checked, if two consecutive SpacePoints are on the same sensor for this SPTC.
@ c_checkedByReferee
bit 0: SPTC has been checked by a Referee (all possible tests).
@ c_isReserved
bit 12: SPTC is reserved (i.e.
@ c_hitsOnSameSensor
bit 2: SPTC has two (or more) SpacePoints on same sensor.

Constructor & Destructor Documentation

◆ SpacePointTrackCand() [1/2]

SpacePointTrackCand ( )
default

Empty constructor with default values, including it to be active.

Sets pdg code to zero to make it possible to determine, whether a particle hyptohesis has been asigned to the track candidate or not.MCTrackID is initialized to -1.
Each SPTC is created in c_isActive-state and has to be deactivated manually, if need be.

◆ SpacePointTrackCand() [2/2]

SpacePointTrackCand ( const std::vector< const Belle2::SpacePoint * > &  spacePoints,
int  pdgCode = 0,
double  charge = 0,
int  mcTrackID = -1 
)
explicit

Constructor from a vector<SpacePoint*> and some additional information.

Parameters
spacePointslist of pointers to the SpacePoint for this track candidate
pdgCodeMass hypothesis to be used.
chargeCharge hypthesis for the tracked particle.
mcTrackID??? sortingParameters are generated from the order of the SpacePoints! Each SPTC is created in c_isActive-state and has to be deactivated manually, if need be.

< default sorting parameters

Definition at line 21 of file SpacePointTrackCand.cc.

23 {
24  m_pdg = pdgCode;
25  m_q = charge;
26  m_MCTrackID = mcTrackID;
27 
28  double index = 0;
29  for (const SpacePoint* spacePoint : spacePoints) {
30  m_trackSpacePoints.push_back(spacePoint);
31  m_sortingParameters.push_back(index);
32  index++;
33  }
34 }
double m_q
charge of the particle in units of elementary charge
std::vector< const SpacePoint * > m_trackSpacePoints
pointers to SpacePoints in the datastore
int m_pdg
PDG code of particle.
std::vector< double > m_sortingParameters
sorting Parameters, can be used to sort the SpacePoints.
int m_MCTrackID
track ID from MC simulation
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

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.

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

◆ begin()

std::vector<const Belle2::SpacePoint*>::const_iterator begin ( ) const
inline

returns a const_iterator (begin()) for easily looping over hits of SpacePointTrackCand.

Ignores sortingParameters!

Definition at line 128 of file SpacePointTrackCand.h.

◆ BELLE2_DEFINE_EXCEPTION()

BELLE2_DEFINE_EXCEPTION ( UnsupportedDetType  ,
"The Detector Type is not supported by this class. Supported are: PXD and SVD"   
)

Exception thrown, when an Unsupported Detector Type occurs.

Momentarily supported: PXD & SVD

◆ clearRefereeStatus()

void clearRefereeStatus ( )
inline

clear the referee status.

WARNING this does not set the value to standard, it completely clears all the states stored!

Definition at line 339 of file SpacePointTrackCand.h.

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

◆ end()

std::vector<const Belle2::SpacePoint*>::const_iterator end ( ) const
inline

returns a const_iterator (end()) for easily looping over hits of SpacePointTrackCand.

Ignores sortingParameters!

Definition at line 131 of file SpacePointTrackCand.h.

◆ getCovSeed()

const TMatrixDSym& getCovSeed ( ) const
inline

get the covariance matrix seed (6D).


Definition at line 161 of file SpacePointTrackCand.h.

◆ getHitsInRange()

const std::vector< const Belle2::SpacePoint * > getHitsInRange ( int  firstInd,
int  lastInd 
) const

get hits (SpacePoints) in range (indices of SpacePoint inside SpacePointTrackCand) including first index and excluding last index (the SpacePoint on firstInd but not the one on lastIndex wil be returned!).

NOTE: For all hits range is from 0 to getNHits(). throws an exception when trying to access hits outside the allowed range!

Definition at line 66 of file SpacePointTrackCand.cc.

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

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

Definition at line 362 of file RelationsObject.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getRefereeStatus()

unsigned short int getRefereeStatus ( unsigned short int  bitmask = USHRT_MAX) const
inline

Return the refere status code of the SpacePointTrackCand.

Parameters
bitmaskis an optional bitmask that is compared to the referee status of the SpacePointTrackCand

Definition at line 201 of file SpacePointTrackCand.h.

◆ getRefereeStatusString()

std::string getRefereeStatusString ( std::string  delimiter = " ") const

get the refereeStatus as a string (easier to read than an unsigned short int)

Parameters
delimiterdelimiter to be put inbetween the individual strings, defaults to whitespace (1 character) NOTE: mainly for easier readability of debug output!

Definition at line 207 of file SpacePointTrackCand.cc.

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

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

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

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

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

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

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

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

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

◆ getSortingParametersInRange()

const std::vector< double > getSortingParametersInRange ( int  firstIndex,
int  lastIndex 
) const

get the sorting parameters in range (indices of SpacePoints inside SpacePointTrackCand) including firstIndex and excluding lastIndex NOTE: for all hits range is from zero to getNHits().

throws an exception when trying to access hits outside the allowed range!

Definition at line 83 of file SpacePointTrackCand.cc.

◆ hasRemovedHits()

bool hasRemovedHits ( ) const
inline

Check if a SpacePointTrackCand has removed hits (i.e.

at some point it contained more hits than it does when this function is called, removal of hits e.g. by a referee module)

Definition at line 239 of file SpacePointTrackCand.h.

◆ isCurling()

bool isCurling ( ) const
inline

get if the TrackCand is curling.

WARNING: does not check if this has actually been assigned!

Definition at line 250 of file SpacePointTrackCand.h.

◆ isPartOfCurlingTrack()

bool isPartOfCurlingTrack ( ) const
inline

check if the TrackCand is part of a curling TrackCand.

NOTE: returns false if curling has not been checked

Definition at line 256 of file SpacePointTrackCand.h.

◆ operator<()

bool operator< ( const SpacePointTrackCand rhs) const
inline

Overloading the less operator to compare SPTCs based on their quality index.

This is used in in SPTCSelectorXBestPerFamily for instance.

Definition at line 349 of file SpacePointTrackCand.h.

◆ print()

void print ( int  debuglevel = 25,
const Option_t *  option = "" 
) const

print the Track Candidate in its "full beauty".

NOTE: prints some parts to stdout, since for printing the state seed the print method form TVectorD is invoked!

Definition at line 156 of file SpacePointTrackCand.cc.

◆ setFlightDirection()

void setFlightDirection ( bool  direction)
inline

set the direction of flight (true is outgoing, false is ingoing).

Initialized to true by default!

Definition at line 324 of file SpacePointTrackCand.h.

◆ setQualityIndicator()

void setQualityIndicator ( const double  newIndicator)
inline

sets the new status of the estimated quality of this track candidate.

valid are values in range [0;1] if value < 0, the track candidate is invalid and one should not use it anymore. 0.5 is the standard value if not been set otherwise

Definition at line 310 of file SpacePointTrackCand.h.

Member Data Documentation

◆ m_flightDirection

bool m_flightDirection = true
protected

direction of flight.

true is outgoing, false is ingoing

Definition at line 396 of file SpacePointTrackCand.h.

◆ m_iTrackStub

int m_iTrackStub = -1
protected

Index of TrackStub in a curling Track Candidate.

  • If the TrackCandidate is not curling this value is set to 0.
  • If it is not yet checked if the TrackCand is curling it is set to -1.
  • If it is a curling TrackCand the counter starts at 1, indicating that this is the first outgoing part of the TrackCand. COULDDO: implement such a feature via something like a linked list (would be much nicer, but for the moment this little workaround works)

Definition at line 405 of file SpacePointTrackCand.h.

◆ m_qualityIndicator

double m_qualityIndicator = 0.5
protected

An estimation for the quality of the track.

Normally defined between 0-1 to describe the propability that this track is real(istic). The quality of the track has to be determined by another function or module.

Definition at line 418 of file SpacePointTrackCand.h.


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