Belle II Software  release-08-01-10
TrackPoint Class Reference

Object containing AbsMeasurement and AbsFitterInfo objects. More...

#include <TrackPoint.h>

Inheritance diagram for TrackPoint:
Collaboration diagram for TrackPoint:

Public Member Functions

 TrackPoint (Track *track)
 
 TrackPoint (const std::vector< genfit::AbsMeasurement * > &rawMeasurements, Track *track)
 Contructor taking list of measurements. More...
 
 TrackPoint (genfit::AbsMeasurement *rawMeasurement, Track *track)
 Contructor taking one measurement. More...
 
 TrackPoint (const TrackPoint &)
 
TrackPointoperator= (TrackPoint)
 
void swap (TrackPoint &other)
 
 TrackPoint (const TrackPoint &rhs, const std::map< const genfit::AbsTrackRep *, genfit::AbsTrackRep * > &map, const std::vector< const genfit::AbsTrackRep * > *repsToIgnore=nullptr)
 custom copy constructor where all TrackRep pointers are exchanged according to the map. More...
 
double getSortingParameter () const
 
TrackgetTrack () const
 
void setTrack (Track *track)
 
const std::vector< genfit::AbsMeasurement * > & getRawMeasurements () const
 
AbsMeasurementgetRawMeasurement (int i=0) const
 
unsigned int getNumRawMeasurements () const
 
bool hasRawMeasurements () const
 
std::vector< genfit::AbsFitterInfo * > getFitterInfos () const
 Get list of all fitterInfos.
 
AbsFitterInfogetFitterInfo (const AbsTrackRep *rep=nullptr) const
 Get fitterInfo for rep. Per default, use cardinal rep.
 
KalmanFitterInfogetKalmanFitterInfo (const AbsTrackRep *rep=nullptr) const
 Helper to avoid casting.
 
bool hasFitterInfo (const AbsTrackRep *rep) const
 
ThinScatterergetMaterialInfo () const
 
bool hasThinScatterer () const
 
void setSortingParameter (double sortingParameter)
 
void addRawMeasurement (genfit::AbsMeasurement *rawMeasurement)
 Takes ownership and sets this as measurement's trackPoint.
 
void deleteRawMeasurements ()
 
void setFitterInfo (genfit::AbsFitterInfo *fitterInfo)
 Takes Ownership.
 
void deleteFitterInfo (const AbsTrackRep *rep)
 
void setScatterer (ThinScatterer *scatterer)
 
void Print (const Option_t *="") const
 
void fixupRepsForReading ()
 This function is used when reading the TrackPoint and is called by the owner in order to build fitterInfos_ from vFitterInfos_. More...
 

Private Attributes

double sortingParameter_
 
Tracktrack_
 Pointer to Track where TrackPoint belongs to.
 
std::vector< AbsMeasurement * > rawMeasurements_
 No ownership. More...
 
std::map< const AbsTrackRep *, AbsFitterInfo * > fitterInfos_
 
std::map< unsigned int, AbsFitterInfo * > vFitterInfos_
 Ownership over FitterInfos. More...
 
std::unique_ptr< ThinScattererthinScatterer_
 

Detailed Description

Object containing AbsMeasurement and AbsFitterInfo objects.

Definition at line 46 of file TrackPoint.h.

Constructor & Destructor Documentation

◆ TrackPoint() [1/3]

TrackPoint ( const std::vector< genfit::AbsMeasurement * > &  rawMeasurements,
Track track 
)

Contructor taking list of measurements.

AbsMeasurement::setTrackPoint() of each measurement will be called. TrackPoint takes ownership over rawMeasurements.

Definition at line 44 of file TrackPoint.cc.

44  :
45  sortingParameter_(0), track_(track), thinScatterer_(nullptr)
46 {
47  rawMeasurements_.reserve(rawMeasurements.size());
48 
49  for (std::vector<AbsMeasurement*>::const_iterator m = rawMeasurements.begin(); m != rawMeasurements.end(); ++m) {
51  }
52 }
void addRawMeasurement(genfit::AbsMeasurement *rawMeasurement)
Takes ownership and sets this as measurement's trackPoint.
Definition: TrackPoint.h:109
std::vector< AbsMeasurement * > rawMeasurements_
No ownership.
Definition: TrackPoint.h:135
Track * track_
Pointer to Track where TrackPoint belongs to.
Definition: TrackPoint.h:132

◆ TrackPoint() [2/3]

TrackPoint ( genfit::AbsMeasurement rawMeasurement,
Track track 
)

Contructor taking one measurement.

AbsMeasurement::setTrackPoint() of the measurement will be called. TrackPoint takes ownership over the rawMeasurement.

Definition at line 54 of file TrackPoint.cc.

◆ TrackPoint() [3/3]

TrackPoint ( const TrackPoint rhs,
const std::map< const genfit::AbsTrackRep *, genfit::AbsTrackRep * > &  map,
const std::vector< const genfit::AbsTrackRep * > *  repsToIgnore = nullptr 
)

custom copy constructor where all TrackRep pointers are exchanged according to the map.

FitterInfos with a rep in repsToIgnore will NOT be copied.

Definition at line 82 of file TrackPoint.cc.

Member Function Documentation

◆ fixupRepsForReading()

void fixupRepsForReading ( )

This function is used when reading the TrackPoint and is called by the owner in order to build fitterInfos_ from vFitterInfos_.

This requires that the track_ be set. It also empties vFitterInfos_ which has served its purpose after this function is called.

Definition at line 319 of file TrackPoint.cc.

Member Data Documentation

◆ rawMeasurements_

std::vector<AbsMeasurement*> rawMeasurements_
private

No ownership.

Can be more than one, e.g. multiple measurements in the same Si detector, left and right measurements of a wire detector etc.

Definition at line 135 of file TrackPoint.h.

◆ vFitterInfos_

std::map<unsigned int, AbsFitterInfo*> vFitterInfos_
private

Ownership over FitterInfos.

The following map is read while streaming. After reading the TrackPoint, the Track's streamer will call fixupRepsForReading, and this map will be translated into the map fitterInfos. The map is indexed by the ids of the corresponding TrackReps.

Definition at line 145 of file TrackPoint.h.


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