Belle II Software development
SpacePointTrackCand Class Referencefinal

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

#include <SpacePointTrackCand.h>

Inheritance diagram for SpacePointTrackCand:
RelationsInterface< BASE >

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.
 
 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.
 
 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.
 
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< constBelle2::SpacePoint * >::const_iterator begin () const
 returns a const_iterator (begin()) for easily looping over hits of SpacePointTrackCand.
 
std::vector< constBelle2::SpacePoint * >::const_iterator end () const
 returns a const_iterator (end()) for easily looping over hits of SpacePointTrackCand.
 
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!).
 
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).
 
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().
 
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.
 
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.
 
bool isOutgoing () const
 check if particle is outgoing (simply returns member m_flightDirection)!
 
bool isCurling () const
 get if the TrackCand is curling.
 
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.
 
void print (int debuglevel=25, const Option_t *="") const
 print the Track Candidate in its "full beauty".
 
std::string getRefereeStatusString (std::string delimiter=" ") const
 get the refereeStatus as a string (easier to read than an unsigned short int)
 
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.
 
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).
 
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.
 
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.
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching).
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow).
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array.
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object.
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array.
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation.
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array.
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array.
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array.
 
virtual std::string getName () const
 Return a short name that describes this object, e.g.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format.
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Protected Attributes

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.
 
int m_iTrackStub = -1
 Index of TrackStub in a curling Track Candidate.
 
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.
 

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 {
69 c_checkedClean = 2,
74 c_removedHits = 16,
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

◆ addRefereeStatus()

void addRefereeStatus ( unsigned short int  bitmask)
inline

add a referee status

Definition at line 333 of file SpacePointTrackCand.h.

333{ m_refereeStatus |= bitmask; }
unsigned short int m_refereeStatus
bit-field to indicate different properties that are checked by the referee module

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
DataStore::StoreEntry * m_cacheDataStoreEntry
Cache of the data store entry to which this object belongs.
int m_cacheArrayIndex
Cache of the index in the TClonesArray to which this object belongs.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

◆ addSpacePoint()

void addSpacePoint ( const SpacePoint newSP,
double  sortParam 
)
inline

add a new SpacePoint and its according sorting parameter to the track candidate

Definition at line 315 of file SpacePointTrackCand.h.

316 {
317 m_trackSpacePoints.push_back(newSP);
318 m_sortingParameters.push_back(sortParam);
319 }

◆ begin()

std::vector< constBelle2::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.

128{ return m_trackSpacePoints.begin(); }

◆ 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

◆ checkedForCurling()

bool checkedForCurling ( ) const
inline

check if the TrackCand has been checked for Curling.

Definition at line 253 of file SpacePointTrackCand.h.

253{ return m_iTrackStub != -1; }
int m_iTrackStub
Index of TrackStub in a curling Track Candidate.

◆ checkedMinDistance()

bool checkedMinDistance ( ) const
inline

Check if the SpacePointTrackCand has been checked for consecutive hits being far enough apart.

Definition at line 233 of file SpacePointTrackCand.h.

bool hasRefereeStatus(unsigned int short bitmask) const
Check if the SpacePointTrackCand has the status characterized by the bitmask.

◆ checkedSameSensors()

bool checkedSameSensors ( ) const
inline

Check if the SpacePointTrackCand has been checked for consecutive hits on same sensor.

Definition at line 222 of file SpacePointTrackCand.h.

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

339{ m_refereeStatus = 0; }

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).

◆ end()

std::vector< constBelle2::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.

131{ return m_trackSpacePoints.end(); }

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
inlineprotectedinherited

Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).

Definition at line 418 of file RelationsObject.h.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getChargeSeed()

double getChargeSeed ( ) const
inline

get charge

Definition at line 158 of file SpacePointTrackCand.h.

158{ return m_q; }

◆ getCovSeed()

const TMatrixDSym & getCovSeed ( ) const
inline

get the covariance matrix seed (6D).


Definition at line 161 of file SpacePointTrackCand.h.

161{ return m_cov6D; }
TMatrixDSym m_cov6D
global momentum plus position state (seed) covariance matrix

◆ getFamily()

short getFamily ( ) const
inline

return family identifier

Definition at line 274 of file SpacePointTrackCand.h.

274{ return m_family; }
short m_family
identifier for tracks that share at least two SpacePoints.

◆ getHits()

const std::vector< const Belle2::SpacePoint * > & getHits ( ) const
inline

get hits (space points) of track candidate

Definition at line 120 of file SpacePointTrackCand.h.

120{ return m_trackSpacePoints; }

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

67{
68 if (lastIndex < firstIndex) { // exchange ranges if they are in wrong order
69 int tmp = firstIndex;
70 firstIndex = lastIndex;
71 lastIndex = tmp;
72 }
73 // check if the indices are in range!
74 if (firstIndex < 0 || uint(lastIndex) > m_trackSpacePoints.size() || uint(firstIndex) > m_trackSpacePoints.size()
75 || lastIndex < 0) {
76 throw SPTCIndexOutOfBounds();
77 }
78 const std::vector<const SpacePoint*> spacePoints(m_trackSpacePoints.begin() + firstIndex, m_trackSpacePoints.begin() + lastIndex);
79 return spacePoints;
80}

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:24
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, TRGSummary, and RecoTrack.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getMcTrackID()

int getMcTrackID ( ) const
inline

get the MC Track ID

Definition at line 190 of file SpacePointTrackCand.h.

190{ return m_MCTrackID; }

◆ getMcTrackId()

int getMcTrackId ( ) const
inline

get the MC Track ID (same writing as in genfit::TrackCand)

Definition at line 195 of file SpacePointTrackCand.h.

195{ return m_MCTrackID; }

◆ getMomSeed()

const ROOT::Math::XYZVector getMomSeed ( ) const
inline

get momentum seed as ROOT::Math::XYZVector

Definition at line 170 of file SpacePointTrackCand.h.

170{ return ROOT::Math::XYZVector(m_state6D[3], m_state6D[4], m_state6D[5]); }
TVectorD m_state6D
global momentum plus position state (seed) vector

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

◆ getNHits()

unsigned int getNHits ( ) const
inline

get the number of hits (space points) in the track candidate

Definition at line 143 of file SpacePointTrackCand.h.

143{ return m_trackSpacePoints.size(); }

◆ getPdgCode()

int getPdgCode ( ) const
inline

get pdg code

Definition at line 153 of file SpacePointTrackCand.h.

153{ return m_pdg; }

◆ getPosSeed()

const ROOT::Math::XYZVector getPosSeed ( ) const
inline

get position seed as ROOT::Math::XYZVector

Definition at line 167 of file SpacePointTrackCand.h.

167{ return ROOT::Math::XYZVector(m_state6D[0], m_state6D[1], m_state6D[2]); }

◆ getQualityIndicator()

double getQualityIndicator ( ) const
inline

returns the current status of the estimated quality of this track candidate.

Definition at line 211 of file SpacePointTrackCand.h.

211{ return m_qualityIndicator; }
double m_qualityIndicator
An estimation for the quality of the track.

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

201{ return m_refereeStatus & bitmask; }

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

208{
209 std::string statusString;
210 if (getRefereeStatus() == 0) return statusString; // return empty std::string if there is no status
211 if (hasRefereeStatus(c_checkedByReferee)) statusString += "checkedByReferee" + delimiter;
212 if (hasRefereeStatus(c_checkedClean)) statusString += "checkedClean" + delimiter;
213 if (hasRefereeStatus(c_hitsOnSameSensor)) statusString += "hitsOnSameSensor" + delimiter;
214 if (hasRefereeStatus(c_hitsLowDistance)) statusString += "hitsLowDistance" + delimiter;
215 if (hasRefereeStatus(c_removedHits)) statusString += "removedHits" + delimiter;
216 if (hasRefereeStatus(c_checkedTrueHits)) statusString += "checkedTrueHits" + delimiter;
217 if (hasRefereeStatus(c_checkedSameSensors)) statusString += "checkedSameSensors" + delimiter;
218 if (hasRefereeStatus(c_checkedMinDistance)) statusString += "checkedMinDistance" + delimiter;
219 if (hasRefereeStatus(c_curlingTrack)) statusString += "curlingTrack" + delimiter;
220 if (hasRefereeStatus(c_omittedClusters)) statusString += "omittedClusters" + delimiter;
221 if (hasRefereeStatus(c_singleClustersSPs)) statusString += "singleClusterSPs" + delimiter;
222 if (hasRefereeStatus(c_isActive)) statusString += "isActive" + delimiter;
223 if (hasRefereeStatus(c_isReserved)) statusString += "isReserved" + delimiter;
224
225 statusString.erase(statusString.end() - delimiter.size(),
226 statusString.end()); // remove last delimiter -> no error catching SHOULD be neccessary since the case of an empty (==0) refereeStatus is already dealt with above!
227 return statusString;
228}
unsigned short int getRefereeStatus(unsigned short int bitmask=USHRT_MAX) const
Return the refere status code of the SpacePointTrackCand.

◆ getRelated()

T * getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

◆ getRelatedFrom()

FROM * getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

◆ getRelatedFromWithWeight()

std::pair< FROM *, float > getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ getRelatedTo()

TO * getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

◆ getRelatedToWithWeight()

std::pair< TO *, float > getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ getRelatedWithWeight()

std::pair< T *, float > getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ getRelationsFrom()

RelationVector< FROM > getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

◆ getRelationsTo()

RelationVector< TO > getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ getRelationsWith()

RelationVector< T > getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getSortedHits()

const std::vector< const SpacePoint * > getSortedHits ( ) const

get hits (space points) sorted by their respective sorting parameter

Definition at line 100 of file SpacePointTrackCand.cc.

101{
102 std::vector<std::pair<const SpacePoint*, double>> sortVector;
103 sortVector.reserve(m_trackSpacePoints.size());
104 for (unsigned int index = 0; index < m_trackSpacePoints.size(); ++index) {
105 sortVector.push_back(std::make_pair(m_trackSpacePoints.at(index), m_sortingParameters.at(index)));
106 }
107
108 std::sort(sortVector.begin(), sortVector.end(), [](const std::pair<const SpacePoint*, double>& a,
109 const std::pair<const SpacePoint*, double>& b) {
110 return a.second < b.second;
111 });
112
113
114 std::vector<const SpacePoint*> sortedSpacePoints;
115 //sortedSpacePoints.reserve(m_trackSpacePoints.size());
116 for (auto pair : sortVector) {
117 sortedSpacePoints.push_back(pair.first);
118 }
119
120 return sortedSpacePoints;
121}

◆ getSortingParameters()

const std::vector< double > & getSortingParameters ( ) const
inline

get the sorting parameters

Definition at line 175 of file SpacePointTrackCand.h.

175{ return m_sortingParameters; }

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

84{
85 if (lastIndex < firstIndex) { // exchange ranges if they are in wrong order
86 int tmp = firstIndex;
87 firstIndex = lastIndex;
88 lastIndex = tmp;
89 }
90 // check if the indices are in range!
91 if (firstIndex < 0 || uint(lastIndex) > m_sortingParameters.size() || uint(firstIndex) > m_sortingParameters.size()
92 || lastIndex < 0) {
93 throw SPTCIndexOutOfBounds();
94 }
95 const std::vector<double> sortingParams(m_sortingParameters.begin() + firstIndex, m_sortingParameters.begin() + lastIndex);
96 return sortingParams;
97}

◆ getStateSeed()

const TVectorD & getStateSeed ( ) const
inline

get state seed as 6D vector

Definition at line 164 of file SpacePointTrackCand.h.

164{ return m_state6D; }

◆ getTrackStubIndex()

int getTrackStubIndex ( ) const
inline

get TrackStub Index

Definition at line 185 of file SpacePointTrackCand.h.

185{ return m_iTrackStub; }

◆ hasHitsLowDistance()

bool hasHitsLowDistance ( ) const
inline

Check if consecutive SpacePoints are far enough apart throughout the SpacePointTrackCand WARNING: does not check if this has actually been assigned!

Definition at line 228 of file SpacePointTrackCand.h.

◆ hasHitsOnSameSensor()

bool hasHitsOnSameSensor ( ) const
inline

Check if the SpacePointTrackCand contains consecutive SpacePoints that are on the same sensor WARNING: does not check if this has actually been assigned!

Definition at line 217 of file SpacePointTrackCand.h.

◆ hasRefereeStatus()

bool hasRefereeStatus ( unsigned int short  bitmask) const
inline

Check if the SpacePointTrackCand has the status characterized by the bitmask.

Definition at line 206 of file SpacePointTrackCand.h.

206{ return (m_refereeStatus & bitmask) == bitmask; }

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

◆ isOutgoing()

bool isOutgoing ( ) const
inline

check if particle is outgoing (simply returns member m_flightDirection)!

Definition at line 244 of file SpacePointTrackCand.h.

244{ return m_flightDirection; }
bool m_flightDirection
direction of flight.

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

256{ return m_iTrackStub > 0; }

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

349{ return m_qualityIndicator < rhs.m_qualityIndicator; }

◆ operator==()

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.

Definition at line 38 of file SpacePointTrackCand.cc.

39{
40 const auto& lhsHits = this->getHits();
41 const auto& rhsHits = rhs.getHits();
42
43 // if one TrackCand has no SpacePoint, equality is not possible and further comparing is not needed
44 if (lhsHits.size() == 0 || rhsHits.size() == 0) {
45 B2DEBUG(28, "At least one of the SpacePointTrackCands does not contain any SpacePoints");
46 return false;
47 }
48
49 // compare number of SpacePoints in TrackCandidate, return false if not equal
50 if (lhsHits.size() != rhsHits.size()) {
51 B2DEBUG(28, "Numbers of SpacePoints in SpacePointTrackCands do not match");
52 return false;
53 }
54
55 // compare pointers to SpacePoint, if one is not equal, return false
56 for (unsigned int iSP = 0; iSP < lhsHits.size(); ++iSP) {
57 if (lhsHits[iSP] != rhsHits[iSP]) {
58 B2DEBUG(28, "SpacePoints " << iSP << " do not match");
59 return false;
60 }
61 }
62 return true;
63}
const std::vector< const Belle2::SpacePoint * > & getHits() const
get hits (space points) of track candidate

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

157{
158 std::stringstream output;
159 output << " ======= SpacePointTrackCand::print() ======= \n";
160 output << "This track candidate has " << m_trackSpacePoints.size() << " SpacePoints\n";
161 output << "mcTrackId: " << m_MCTrackID << "\n";
162 output << "seed values for 6D state : \n";
163 B2DEBUG(debuglevel, output.str());
164
165 // reset the output stream
166 output.str(std::string(""));
167 output.clear();
168
169 // Only print this if the debuglevel is high enough
170 if (LogSystem::Instance().isLevelEnabled(LogConfig::c_Debug, debuglevel, PACKAGENAME())) { m_state6D.Print(option); }
171
172 output << "estimates of Track Candidate: \n";
173 output << "q = " << m_q << "\n";
174 output << "pdgCode = " << m_pdg << "\n";
175 output << ", QI = " << m_qualityIndicator << "\n";
176
177 unsigned nSP = 0;
178 for (const SpacePoint* spacePoint : getHits()) {
179 // COULDDO: implement a print method for SpacePoints
180 output << "SpacePoint " << nSP << " has Index " << spacePoint->getArrayIndex() << " in StoreArray " << spacePoint->getArrayName() <<
181 "." << "\n";
182 nSP++;
183 }
184
185 B2DEBUG(debuglevel, output.str());
186
187 // reset the output stream
188 output.str(std::string(""));
189 output.clear();
190
191 output << "referee properties of this SPTC:\n";
192 output << "checked for SPs on same sensors: " << this->hasRefereeStatus(c_checkedSameSensors) << " -> result: " <<
194 output << "checked for min distance between SPs: " << this->hasRefereeStatus(c_checkedMinDistance) << " -> result: " <<
195 this->hasRefereeStatus(c_hitsLowDistance) << "\n";
196 output << "checked for curling: " << this->checkedForCurling() << " -> result: " << this->isCurling() <<
197 ", part of a curling SPTC: " << this->isPartOfCurlingTrack() << "\n";
198 output << "direction of flight: " << m_flightDirection << ", removed SpacePoints: " << this->hasRefereeStatus(
199 c_removedHits) << "\n";
200 output << "omitted Clusters: " << hasRefereeStatus(c_omittedClusters) << ", single Cluster SPs: " << hasRefereeStatus(
201 c_singleClustersSPs) << "\n";
202 B2DEBUG(debuglevel, output.str());
203}
@ c_Debug
Debug: for code development.
Definition: LogConfig.h:26
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
bool checkedForCurling() const
check if the TrackCand has been checked for Curling.
bool isCurling() const
get if the TrackCand is curling.
bool isPartOfCurlingTrack() const
check if the TrackCand is part of a curling TrackCand.

◆ removeRefereeStatus()

void removeRefereeStatus ( unsigned short int  bitmask)
inline

remove a referee status

Definition at line 336 of file SpacePointTrackCand.h.

336{ m_refereeStatus &= (~bitmask); }

◆ removeSpacePoint()

void removeSpacePoint ( int  indexInTrackCand)

remove a SpacePoint (and its sorting parameter) from the SpacePointTrackCand

Definition at line 142 of file SpacePointTrackCand.cc.

143{
144 // check if the index is in bounds
145 if (uint(indexInTrackCand) >= m_trackSpacePoints.size()) { throw SPTCIndexOutOfBounds(); }
146
147 // erase the entry from vector
148 m_trackSpacePoints.erase(m_trackSpacePoints.begin() + indexInTrackCand);
149 m_sortingParameters.erase(m_sortingParameters.begin() + indexInTrackCand);
150}

◆ resetRefereeStatus()

void resetRefereeStatus ( )
inline

resets the referee status to the initial value

Definition at line 342 of file SpacePointTrackCand.h.

◆ set6DSeed()

void set6DSeed ( const TVectorD &  state6D)
inline

set the 6D state seed

Definition at line 297 of file SpacePointTrackCand.h.

297{ m_state6D = state6D; }

◆ setChargeSeed()

void setChargeSeed ( double  charge)
inline

Setter for assumed charge of tracked particle.

Definition at line 292 of file SpacePointTrackCand.h.

292{ m_q = charge; }

◆ setCovSeed()

void setCovSeed ( const TMatrixDSym &  cov)
inline

set the covariance matrix seed

Definition at line 302 of file SpacePointTrackCand.h.

302{ m_cov6D = cov; }

◆ setFamily()

void setFamily ( short  family)
inline

assign family identifier

Definition at line 279 of file SpacePointTrackCand.h.

279{ m_family = family; }

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

324{ m_flightDirection = direction; }

◆ setPdgCode()

void setPdgCode ( int  pdgCode)

set a hypothesis for the particle by setting a pdgcode (will also set the appropriate charge)

Definition at line 124 of file SpacePointTrackCand.cc.

125{
126 m_pdg = pdgCode;
127 TParticlePDG* part = TDatabasePDG::Instance()->GetParticle(m_pdg);
128 m_q = part->Charge() / (3.); // charge returned in units of |e|/3 by TParticlePDG -> Charge()
129}

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

310{ m_qualityIndicator = newIndicator; }

◆ setRefereeStatus()

void setRefereeStatus ( unsigned short int  bitmask)
inline

set referee status (resets the complete to the passed status!)

Definition at line 330 of file SpacePointTrackCand.h.

330{ m_refereeStatus = bitmask; }

◆ setSortingParameters()

void setSortingParameters ( const std::vector< double > &  sortParams)

set the sorting parameters

Definition at line 132 of file SpacePointTrackCand.cc.

133{
134 if (sortParams.size() != m_sortingParameters.size())
135 throw SPTCSortingParameterSizeInvalid();
136 for (size_t iSP = 0; iSP < sortParams.size(); ++iSP) {
137 m_sortingParameters.at(iSP) = sortParams.at(iSP);
138 }
139}

◆ setTrackStubIndex()

void setTrackStubIndex ( int  trackStubInd)
inline

set TrackStub index

Definition at line 327 of file SpacePointTrackCand.h.

327{ m_iTrackStub = trackStubInd; }

◆ size()

unsigned int size ( ) const
inline

get the number of hits (space points) in the track candidate

Definition at line 148 of file SpacePointTrackCand.h.

148{ return m_trackSpacePoints.size(); }

Member Data Documentation

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_cov6D

TMatrixDSym m_cov6D = TMatrixDSym(6)
protected

global momentum plus position state (seed) covariance matrix

Definition at line 386 of file SpacePointTrackCand.h.

◆ m_family

short m_family = -1
protected

identifier for tracks that share at least two SpacePoints.

Definition at line 366 of file SpacePointTrackCand.h.

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

int m_MCTrackID = -1
protected

track ID from MC simulation

Definition at line 376 of file SpacePointTrackCand.h.

◆ m_pdg

int m_pdg = 0
protected

PDG code of particle.

Definition at line 371 of file SpacePointTrackCand.h.

◆ m_q

double m_q = 0
protected

charge of the particle in units of elementary charge

Definition at line 391 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.

◆ m_refereeStatus

unsigned short int m_refereeStatus = c_isActive
protected

bit-field to indicate different properties that are checked by the referee module

Definition at line 410 of file SpacePointTrackCand.h.

◆ m_sortingParameters

std::vector<double> m_sortingParameters
protected

sorting Parameters, can be used to sort the SpacePoints.

Definition at line 360 of file SpacePointTrackCand.h.

◆ m_state6D

TVectorD m_state6D = TVectorD(6)
protected

global momentum plus position state (seed) vector

Definition at line 381 of file SpacePointTrackCand.h.

◆ m_trackSpacePoints

std::vector<const SpacePoint*> m_trackSpacePoints
protected

pointers to SpacePoints in the datastore

Definition at line 355 of file SpacePointTrackCand.h.


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