Belle II Software development
RecoHitInformation Class Reference

This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack. More...

#include <RecoHitInformation.h>

Inheritance diagram for RecoHitInformation:
RelationsInterface< BASE >

Public Types

enum  RightLeftInformation {
  c_undefinedRightLeftInformation ,
  c_invalidRightLeftInformation ,
  c_right ,
  c_left
}
 The RightLeft information of the hit which is only valid for CDC hits. More...
 
enum  OriginTrackFinder {
  c_undefinedTrackFinder ,
  c_MCTrackFinderPriorityHit ,
  c_MCTrackFinderAuxiliaryHit ,
  c_invalidTrackFinder ,
  c_CDCTrackFinder ,
  c_LocalTrackFinder ,
  c_SegmentTrackCombiner ,
  c_VXDTrackFinder ,
  c_SVDtoCDCCKF ,
  c_ECLtoCDCCKF ,
  c_CDCtoSVDCKF ,
  c_SVDtoPXDCKF ,
  c_SVDHough ,
  c_ReattachCDCWireHitsToRecoTracks ,
  c_Trasan ,
  c_other
}
 The TrackFinder which has added the hit to the track. More...
 
enum  RecoHitFlag {
  c_undefinedRecoHitFlag ,
  c_dismissedByFit ,
  c_pruned
}
 Another flag to be used (currently unused) More...
 
enum  RecoHitDetector {
  c_undefinedTrackingDetector ,
  c_invalidTrackingDetector ,
  c_SVD ,
  c_PXD ,
  c_CDC ,
  c_EKLM ,
  c_BKLM
}
 The detector this hit comes from (which is of course also visible in the hit type) More...
 
typedef SVDCluster UsedSVDHit
 Define, use of clusters or true hits for SVD.
 
typedef PXDCluster UsedPXDHit
 Define, use of clusters or true hits for PXD.
 
typedef CDCHit UsedCDCHit
 Define, use of CDC hits as CDC hits (for symmetry).
 
typedef KLMHit2d UsedBKLMHit
 Define, use of KLMHit2d as BKLM hits.
 
typedef EKLMAlignmentHit UsedEKLMHit
 Define, use of EKLMHit2d as EKLM hits.
 

Public Member Functions

 RecoHitInformation ()
 Empty constructor for root.
 
 RecoHitInformation (const UsedCDCHit *cdcHit, RightLeftInformation rightLeftInformation, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a CDC hit with the given information.
 
 RecoHitInformation (const UsedPXDHit *pxdHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a PXD hit with the given information.
 
 RecoHitInformation (const UsedSVDHit *svdHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a SVD hit with the given information.
 
 RecoHitInformation (const UsedEKLMHit *eklmHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a EKLM hit with the given information.
 
 RecoHitInformation (const UsedBKLMHit *bklmHit, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a BKLM hit with the given information.
 
RecoHitFlag getFlag () const
 Get the additional flag.
 
void setFlag (RecoHitFlag flag)
 Set the additional flag.
 
OriginTrackFinder getFoundByTrackFinder () const
 Get which track finder has found the track.
 
void setFoundByTrackFinder (OriginTrackFinder foundByTrackFinder)
 Set which track finder has found the track.
 
unsigned int getSortingParameter () const
 Get the sorting parameter.
 
void setSortingParameter (unsigned int sortingParameter)
 Set the sorting parameter.
 
RightLeftInformation getRightLeftInformation () const
 Get the right-left-information.
 
void setRightLeftInformation (RightLeftInformation rightLeftInformation)
 Set the right-left-information.
 
RecoHitDetector getTrackingDetector () const
 Get the detector this hit comes from.
 
bool useInFit () const
 Get the flag, whether this his should be used in a fit or not.
 
void setUseInFit (const bool useInFit=true)
 Set the hit to be used (default) or not in the next fit.
 
void setCreatedTrackPointID (int trackPointID)
 Set the id of the created track point to the one from the genfit::Track.
 
int getCreatedTrackPointID () const
 Get the id of the TrackPoint related to this reco hit information in the genfit::Track.
 
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).
 

Private Member Functions

template<class HitType >
 RecoHitInformation (const HitType *hit, RecoHitDetector trackingDetector, RightLeftInformation rightLeftInformation, OriginTrackFinder foundByTrackFinder, unsigned int sortingParameter)
 Create hit information for a generic hit with the given information.
 
 ClassDef (RecoHitInformation, 6)
 This class implements additional information for hits.
 

Private Attributes

RecoHitDetector m_trackingDetector = RecoHitDetector::c_undefinedTrackingDetector
 The tracking detector this hit comes from (can not be changed once created)
 
RightLeftInformation m_rightLeftInformation = RightLeftInformation::c_undefinedRightLeftInformation
 The right-left-information of the hit. Can be invalid (for VXD hits) or unknown.
 
unsigned int m_sortingParameter = 0
 The sorting parameter as an index.
 
OriginTrackFinder m_foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder
 Which track finder has found this hit and added it to the reco track.
 
RecoHitFlag m_flag = RecoHitFlag::c_undefinedRecoHitFlag
 An additional flag to be used.
 
bool m_useInFit = true
 Set this flag to false to not create a measurement out of this hit.
 
int m_createdTrackPointID = -1
 The index for the created TrackPoint in the genfit::Track of the related RecoTrack.
 
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

This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.

Every hit information belongs to a single hit and a single RecoTrack (stored with relation). If one hit should belong to more than one track, you have to create more than one RecoHitInformation.

The RecoHitInformation stores information on:

  • the TrackFinder that added the hit to the track
  • RL information (valid for for CDC hits only)
  • the sorting parameter of the hit. This is the index of this hit in the reco track.
  • additional flags

The stored information can be used when transforming a RecoTrack into a genfit::Track or genfit::TrackCand

Definition at line 38 of file RecoHitInformation.h.

Member Typedef Documentation

◆ UsedBKLMHit

Define, use of KLMHit2d as BKLM hits.

Definition at line 56 of file RecoHitInformation.h.

◆ UsedCDCHit

typedef CDCHit UsedCDCHit

Define, use of CDC hits as CDC hits (for symmetry).

Definition at line 53 of file RecoHitInformation.h.

◆ UsedEKLMHit

Define, use of EKLMHit2d as EKLM hits.

Definition at line 59 of file RecoHitInformation.h.

◆ UsedPXDHit

Define, use of clusters or true hits for PXD.

Definition at line 50 of file RecoHitInformation.h.

◆ UsedSVDHit

Define, use of clusters or true hits for SVD.

You have to decide, if you want to use Clusters or true hits at compile-time. In the real experiment, we want to use clusters without overhead from checking every time, if we should use true hits instead.

Definition at line 47 of file RecoHitInformation.h.

Member Enumeration Documentation

◆ OriginTrackFinder

The TrackFinder which has added the hit to the track.

Definition at line 70 of file RecoHitInformation.h.

70 {
71 c_undefinedTrackFinder,
72 // the Hit has been generated by the MCTrackFinder and its considered important
73 // to find this hit by PR. Which hits get marked as priority and auxiliary solely
74 // depends on the configuration of the TrackFinderMCRTruh
75 c_MCTrackFinderPriorityHit,
76 // the Hit has been generated by the MCTrackFinder and is considered to be of minor
77 // importance to find, for example because it is in one of the downstream loops.
78 // Which hits get marked as priority and auxiliary solely depends on the configuration
79 // of the TrackFinderMCRTruh
80 c_MCTrackFinderAuxiliaryHit,
81 c_invalidTrackFinder,
82 // non CKF-based track finders
83 c_CDCTrackFinder,
84 c_LocalTrackFinder,
85 c_SegmentTrackCombiner,
86 c_VXDTrackFinder,
87 // track finders based on CKF
88 c_SVDtoCDCCKF,
89 c_ECLtoCDCCKF,
90 c_CDCtoSVDCKF,
91 c_SVDtoPXDCKF,
92 // SVDHough track finder
93 c_SVDHough,
94 // CDC hit finder implemented in the ReattachCDCWireHitsToRecoTracks module:
95 // looks for CDC hits that are close to RecTracks, but that were rejected by the ADC/TOT based filter.
96 c_ReattachCDCWireHitsToRecoTracks,
97 // Belle I's track finder
98 c_Trasan,
99 c_other
100 };

◆ RecoHitDetector

The detector this hit comes from (which is of course also visible in the hit type)

Definition at line 110 of file RecoHitInformation.h.

110 {
111 c_undefinedTrackingDetector,
112 c_invalidTrackingDetector,
113 c_SVD,
114 c_PXD,
115 c_CDC,
116 c_EKLM,
117 c_BKLM
118 };

◆ RecoHitFlag

Another flag to be used (currently unused)

Definition at line 103 of file RecoHitInformation.h.

103 {
104 c_undefinedRecoHitFlag,
105 c_dismissedByFit,
106 c_pruned,
107 };

◆ RightLeftInformation

The RightLeft information of the hit which is only valid for CDC hits.

Definition at line 62 of file RecoHitInformation.h.

62 {
63 c_undefinedRightLeftInformation,
64 c_invalidRightLeftInformation,
65 c_right,
66 c_left
67 };

Constructor & Destructor Documentation

◆ RecoHitInformation() [1/7]

RecoHitInformation ( )
inline

Empty constructor for root.

Definition at line 124 of file RecoHitInformation.h.

124{}

◆ RecoHitInformation() [2/7]

RecoHitInformation ( const UsedCDCHit cdcHit,
RightLeftInformation  rightLeftInformation,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inline

Create hit information for a CDC hit with the given information.

Adds the relation to the hit automatically.

Parameters
cdcHitThe hit to create this information for.
rightLeftInformationThe RL-information.
foundByTrackFinderWhich track finder has found this hit?
sortingParameterThe sorting parameter of this hit.

Definition at line 133 of file RecoHitInformation.h.

134 :
135 RecoHitInformation(cdcHit, RecoHitDetector::c_CDC, rightLeftInformation, foundByTrackFinder, sortingParameter)
136 {
137 }
RecoHitInformation()
Empty constructor for root.

◆ RecoHitInformation() [3/7]

RecoHitInformation ( const UsedPXDHit pxdHit,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inline

Create hit information for a PXD hit with the given information.

Adds the relation to the hit automatically.

Parameters
pxdHitThe hit to create this information for.
foundByTrackFinderWhich track finder has found this hit?
sortingParameterThe sorting parameter of this hit.

Definition at line 145 of file RecoHitInformation.h.

146 :
147 RecoHitInformation(pxdHit, RecoHitDetector::c_PXD, RightLeftInformation::c_invalidRightLeftInformation,
148 foundByTrackFinder, sortingParameter)
149 {
150 }

◆ RecoHitInformation() [4/7]

RecoHitInformation ( const UsedSVDHit svdHit,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inline

Create hit information for a SVD hit with the given information.

Adds the relation to the hit automatically.

Parameters
svdHitThe hit to create this information for.
foundByTrackFinderWhich track finder has found this hit?
sortingParameterThe sorting parameter of this hit.

Definition at line 158 of file RecoHitInformation.h.

159 :
160 RecoHitInformation(svdHit, RecoHitDetector::c_SVD, RightLeftInformation::c_invalidRightLeftInformation,
161 foundByTrackFinder, sortingParameter)
162 {
163 }

◆ RecoHitInformation() [5/7]

RecoHitInformation ( const UsedEKLMHit eklmHit,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inline

Create hit information for a EKLM hit with the given information.

Adds the relation to the hit automatically.

Parameters
eklmHitThe hit to create this information for.
foundByTrackFinderWhich track finder has found this hit?
sortingParameterThe sorting parameter of this hit.

Definition at line 171 of file RecoHitInformation.h.

172 :
173 RecoHitInformation(eklmHit, RecoHitDetector::c_EKLM, RightLeftInformation::c_invalidRightLeftInformation,
174 foundByTrackFinder, sortingParameter)
175 {
176 }

◆ RecoHitInformation() [6/7]

RecoHitInformation ( const UsedBKLMHit bklmHit,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inline

Create hit information for a BKLM hit with the given information.

Adds the relation to the hit automatically.

Parameters
bklmHitThe hit to create this information for.
foundByTrackFinderWhich track finder has found this hit?
sortingParameterThe sorting parameter of this hit.

Definition at line 184 of file RecoHitInformation.h.

185 :
186 RecoHitInformation(bklmHit, RecoHitDetector::c_BKLM, RightLeftInformation::c_invalidRightLeftInformation,
187 foundByTrackFinder, sortingParameter)
188 {
189 }

◆ RecoHitInformation() [7/7]

RecoHitInformation ( const HitType *  hit,
RecoHitDetector  trackingDetector,
RightLeftInformation  rightLeftInformation,
OriginTrackFinder  foundByTrackFinder,
unsigned int  sortingParameter 
)
inlineprivate

Create hit information for a generic hit with the given information.

Adds the relation to the hit automatically.

Parameters
hitthe hit to create a reco hit information for.
trackingDetectorThe detector the hit comes from.
rightLeftInformationThe right left information (can be invalid)
foundByTrackFinderWhich track finder has found the hit.
sortingParameterThe sorting parameter of the hit.

Definition at line 309 of file RecoHitInformation.h.

313 :
314 m_trackingDetector(trackingDetector),
315 m_rightLeftInformation(rightLeftInformation),
316 m_sortingParameter(sortingParameter),
317 m_foundByTrackFinder(foundByTrackFinder),
318 m_flag(RecoHitFlag::c_undefinedRecoHitFlag)
319 {
320 addRelationTo(hit);
321 }
RecoHitDetector m_trackingDetector
The tracking detector this hit comes from (can not be changed once created)
RightLeftInformation m_rightLeftInformation
The right-left-information of the hit. Can be invalid (for VXD hits) or unknown.
RecoHitFlag m_flag
An additional flag to be used.
unsigned int m_sortingParameter
The sorting parameter as an index.
OriginTrackFinder m_foundByTrackFinder
Which track finder has found this hit and added it to the reco track.
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).

Member Function Documentation

◆ addRelationTo() [1/2]

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

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

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

Definition at line 142 of file RelationsObject.h.

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

◆ addRelationTo() [2/2]

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

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

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

Definition at line 155 of file RelationsObject.h.

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

◆ copyRelations()

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

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

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

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

Definition at line 170 of file RelationsObject.h.

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }

◆ 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

◆ getCreatedTrackPointID()

int getCreatedTrackPointID ( ) const
inline

Get the id of the TrackPoint related to this reco hit information in the genfit::Track.

Do not use this method unless you really know what you are doing. Better, use the methods of the RecoTrack itself to retrieve the TrackPoint directly.

Definition at line 273 of file RecoHitInformation.h.

274 {
276 }
int m_createdTrackPointID
The index for the created TrackPoint in the genfit::Track of the related RecoTrack.

◆ getFlag()

RecoHitFlag getFlag ( ) const
inline

Get the additional flag.

Definition at line 192 of file RecoHitInformation.h.

193 {
194 return m_flag;
195 }

◆ getFoundByTrackFinder()

OriginTrackFinder getFoundByTrackFinder ( ) const
inline

Get which track finder has found the track.

Definition at line 204 of file RecoHitInformation.h.

205 {
207 }

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

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

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

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

Definition at line 370 of file RelationsObject.h.

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

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

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

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

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

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

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

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

◆ getRightLeftInformation()

RightLeftInformation getRightLeftInformation ( ) const
inline

Get the right-left-information.

Definition at line 228 of file RecoHitInformation.h.

229 {
231 }

◆ getSortingParameter()

unsigned int getSortingParameter ( ) const
inline

Get the sorting parameter.

Definition at line 216 of file RecoHitInformation.h.

217 {
218 return m_sortingParameter;
219 }

◆ getTrackingDetector()

RecoHitDetector getTrackingDetector ( ) const
inline

Get the detector this hit comes from.

(can not be changed once created)

Definition at line 240 of file RecoHitInformation.h.

241 {
242 return m_trackingDetector;
243 }

◆ setCreatedTrackPointID()

void setCreatedTrackPointID ( int  trackPointID)
inline

Set the id of the created track point to the one from the genfit::Track.

This should only be used, if you really know what you are doing.

Definition at line 261 of file RecoHitInformation.h.

262 {
263 m_createdTrackPointID = trackPointID;
264 }

◆ setFlag()

void setFlag ( RecoHitFlag  flag)
inline

Set the additional flag.

Definition at line 198 of file RecoHitInformation.h.

199 {
200 m_flag = flag;
201 }

◆ setFoundByTrackFinder()

void setFoundByTrackFinder ( OriginTrackFinder  foundByTrackFinder)
inline

Set which track finder has found the track.

Definition at line 210 of file RecoHitInformation.h.

211 {
212 m_foundByTrackFinder = foundByTrackFinder;
213 }

◆ setRightLeftInformation()

void setRightLeftInformation ( RightLeftInformation  rightLeftInformation)
inline

Set the right-left-information.

Definition at line 234 of file RecoHitInformation.h.

235 {
236 m_rightLeftInformation = rightLeftInformation;
237 }

◆ setSortingParameter()

void setSortingParameter ( unsigned int  sortingParameter)
inline

Set the sorting parameter.

Definition at line 222 of file RecoHitInformation.h.

223 {
224 m_sortingParameter = sortingParameter;
225 }

◆ setUseInFit()

void setUseInFit ( const bool  useInFit = true)
inline

Set the hit to be used (default) or not in the next fit.

Definition at line 252 of file RecoHitInformation.h.

253 {
255 }
bool useInFit() const
Get the flag, whether this his should be used in a fit or not.
bool m_useInFit
Set this flag to false to not create a measurement out of this hit.

◆ useInFit()

bool useInFit ( ) const
inline

Get the flag, whether this his should be used in a fit or not.

Definition at line 246 of file RecoHitInformation.h.

247 {
248 return m_useInFit;
249 }

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_createdTrackPointID

int m_createdTrackPointID = -1
private

The index for the created TrackPoint in the genfit::Track of the related RecoTrack.

Do not use this id, if you do not really know the consequences, but let the RecoTrack handle the internals.

Definition at line 298 of file RecoHitInformation.h.

◆ m_flag

RecoHitFlag m_flag = RecoHitFlag::c_undefinedRecoHitFlag
private

An additional flag to be used.

Definition at line 290 of file RecoHitInformation.h.

◆ m_foundByTrackFinder

OriginTrackFinder m_foundByTrackFinder = OriginTrackFinder::c_undefinedTrackFinder
private

Which track finder has found this hit and added it to the reco track.

Can only be used if creating the RecoTrack in the track finder.

Definition at line 288 of file RecoHitInformation.h.

◆ m_rightLeftInformation

RightLeftInformation m_rightLeftInformation = RightLeftInformation::c_undefinedRightLeftInformation
private

The right-left-information of the hit. Can be invalid (for VXD hits) or unknown.

Definition at line 282 of file RecoHitInformation.h.

◆ m_sortingParameter

unsigned int m_sortingParameter = 0
private

The sorting parameter as an index.

Definition at line 285 of file RecoHitInformation.h.

◆ m_trackingDetector

RecoHitDetector m_trackingDetector = RecoHitDetector::c_undefinedTrackingDetector
private

The tracking detector this hit comes from (can not be changed once created)

Definition at line 280 of file RecoHitInformation.h.

◆ m_useInFit

bool m_useInFit = true
private

Set this flag to false to not create a measurement out of this hit.

Definition at line 292 of file RecoHitInformation.h.


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