CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::Trajectory< T > Class Template Reference

The class describes the particle's trajectory along its entire length. More...

#include <KfTrajectory.h>

Inheritance diagram for cbm::algo::kf::Trajectory< T >:
[legend]

Classes

class  Node
 The class represent a node on the trajectory. More...
 

Public Member Functions

 Trajectory ()=default
 Default constructor.
 
 Trajectory (std::shared_ptr< const Setup< T > > kfSetup)
 
 ~Trajectory ()=default
 Destructor.
 
 Trajectory (const Trajectory &other)=default
 Copy constructor.
 
Trajectoryoperator= (const Trajectory &other)=default
 Assignment operator.
 
 Trajectory (Trajectory &&other) noexcept=default
 Move constructor.
 
Trajectoryoperator= (Trajectory &&other) noexcept=default
 Move assignment operator.
 
void SetKfSetup (std::shared_ptr< const Setup< T > > kfSetup)
 Set Kalman Filter setup.
 
size_t GetNofNodes () const
 Get number of nodes on the trajectory.
 
const NodeGetNode (const size_t index) const
 Get const reference to the node by its index.
 
const std::vector< Node > & GetNodes () const
 Get reference to the vector of nodes.
 
const std::array< int, 10 > & GetNodeUserReferences (const size_t index) const
 Get user reference of the node by its index.
 
std::array< int, 10 > & GetNodeUserReferences (const size_t index)
 Get reference to the user references of the node by its index.
 
int GetFirstMeasurementNodeId () const
 Get index of the first node with measurement.
 
int GetLastMeasurementNodeId () const
 Get index of the last node with measurement.
 
const NodeGetFirstMeasurementNode () const
 Get reference to the first node with measurement.
 
const NodeGetLastMeasurementNode () const
 Get reference to the last node with measurement.
 
int GetNofMeasurements () const
 Get number of nodes with measurements.
 
bool IsFitted () const
 Check if the trajectory is fitted.
 
bool IsFullyExtrapolated () const
 Check if the trajectory is extrapolated beyond the first and last measurements.
 
double GetQaChi2Downstream () const
 Get chi2 from the downstream fit iteration, needed for QA.
 
void Clear ()
 Clear the trajectory.
 
void AddNode (const Node &node)
 Add a node to the trajectory.
 
void AddNodes (const std::vector< Node > &nodes)
 Add multiple nodes to the trajectory.
 
void DisableMeasurementAtNode (const size_t index)
 Disable measurement at the given node.
 
void ModifyNode (const size_t index, const Node &node)
 Modify node at the given index.
 

Protected Member Functions

void MakeConsistent ()
 sort the nodes in Z, add missing material layers and set fFirstMeasureNode and fLastMeasureNode
 
NodeGetNodeReference (const size_t index)
 Get reference to the node by its index.
 

Protected Attributes

std::shared_ptr< const Setup< T > > fKfSetup {}
 Kalman Filter setup.
 
std::vector< NodefNodes {}
 nodes on the trajectory
 
int fFirstMeasurementNodeId {-1}
 index of the first node with measurement
 
int fLastMeasurementNodeId {-1}
 index of the last node with measurement
 
int fNmeasurements {-1}
 number of nodes with measurements
 
bool fIsFitted
 true if the trajectory at all the nodes between the first and the last measurements are fitted
 
bool fIsFullyExtrapolated
 true if the trajectory is successfully extrapolated beyond the first and last measurements
 
fQaChi2Downstream {-1.}
 chi2 from the downstream fit iteration, needed for QA
 

Friends

template<cbm::algo::kf::DoFitTime>
class ::CbmKfTrackFitter
 
class ::CbmBbaAlignTask
 
class ::CbmBbaAlignmentMcbmTask
 

Detailed Description

template<typename T = double>
class cbm::algo::kf::Trajectory< T >

The class describes the particle's trajectory along its entire length.

The trajectory is split into continuous segments between breakpoints (nodes).

The nodes are points on the trajectory where the track parameters are:

a) measured and / or b) scattered in the material (breakpoints) and / or c) need to be estimated

Each node contains the fitted track parameters before and after the breakpoint, measurements, and material information.

The nodes are expected to be ordered by increasing Z.

It can be done via the OrderNodesInZ() method.

To be used together with the kf::TrajectoryFitter class

Definition at line 49 of file KfTrajectory.h.

Constructor & Destructor Documentation

◆ Trajectory() [1/4]

template<typename T = double>
cbm::algo::kf::Trajectory< T >::Trajectory ( )
default

Default constructor.

Referenced by operator=(), operator=(), Trajectory(), and Trajectory().

◆ Trajectory() [2/4]

template<typename T = double>
cbm::algo::kf::Trajectory< T >::Trajectory ( std::shared_ptr< const Setup< T > > kfSetup)
inline
Parameters
kfSetupKalman Filter setup

Definition at line 109 of file KfTrajectory.h.

References fKfSetup.

◆ ~Trajectory()

template<typename T = double>
cbm::algo::kf::Trajectory< T >::~Trajectory ( )
default

Destructor.

◆ Trajectory() [3/4]

template<typename T = double>
cbm::algo::kf::Trajectory< T >::Trajectory ( const Trajectory< T > & other)
default

Copy constructor.

References Trajectory().

◆ Trajectory() [4/4]

template<typename T = double>
cbm::algo::kf::Trajectory< T >::Trajectory ( Trajectory< T > && other)
defaultnoexcept

Move constructor.

References Trajectory().

Member Function Documentation

◆ AddNode()

template<typename T = double>
void cbm::algo::kf::Trajectory< T >::AddNode ( const Node & node)
inline

Add a node to the trajectory.

Definition at line 189 of file KfTrajectory.h.

References fNodes, and MakeConsistent().

◆ AddNodes()

template<typename T = double>
void cbm::algo::kf::Trajectory< T >::AddNodes ( const std::vector< Node > & nodes)
inline

Add multiple nodes to the trajectory.

Definition at line 196 of file KfTrajectory.h.

References fNodes, and MakeConsistent().

Referenced by CbmRecoQaTask::Exec().

◆ Clear()

◆ DisableMeasurementAtNode()

template<typename T = double>
void cbm::algo::kf::Trajectory< T >::DisableMeasurementAtNode ( const size_t index)
inline

Disable measurement at the given node.

Definition at line 206 of file KfTrajectory.h.

References fFirstMeasurementNodeId, fLastMeasurementNodeId, fNmeasurements, and fNodes.

Referenced by CbmRecoQaTask::Exec().

◆ GetFirstMeasurementNode()

template<typename T = double>
const Node & cbm::algo::kf::Trajectory< T >::GetFirstMeasurementNode ( ) const
inline

Get reference to the first node with measurement.

Definition at line 151 of file KfTrajectory.h.

References fFirstMeasurementNodeId, and fNodes.

Referenced by CbmBbaAlignmentMcbmTask::Exec().

◆ GetFirstMeasurementNodeId()

template<typename T = double>
int cbm::algo::kf::Trajectory< T >::GetFirstMeasurementNodeId ( ) const
inline

Get index of the first node with measurement.

Definition at line 145 of file KfTrajectory.h.

References fFirstMeasurementNodeId.

Referenced by CbmKfTrackFitter< FlagFitTime >::FitTrajectory().

◆ GetLastMeasurementNode()

template<typename T = double>
const Node & cbm::algo::kf::Trajectory< T >::GetLastMeasurementNode ( ) const
inline

Get reference to the last node with measurement.

Definition at line 158 of file KfTrajectory.h.

References fLastMeasurementNodeId, and fNodes.

◆ GetLastMeasurementNodeId()

template<typename T = double>
int cbm::algo::kf::Trajectory< T >::GetLastMeasurementNodeId ( ) const
inline

Get index of the last node with measurement.

Definition at line 148 of file KfTrajectory.h.

References fLastMeasurementNodeId.

Referenced by CbmKfTrackFitter< FlagFitTime >::FitTrajectory().

◆ GetNode()

template<typename T = double>
const Node & cbm::algo::kf::Trajectory< T >::GetNode ( const size_t index) const
inline

Get const reference to the node by its index.

Definition at line 133 of file KfTrajectory.h.

References fNodes.

Referenced by CbmBbaAlignmentMcbmTask::Exec(), CbmRecoQaTask::Exec(), and CbmBbaAlignTask::SelectTracks().

◆ GetNodeReference()

template<typename T = double>
Node & cbm::algo::kf::Trajectory< T >::GetNodeReference ( const size_t index)
inlineprotected

Get reference to the node by its index.

Definition at line 246 of file KfTrajectory.h.

References fNodes.

Referenced by CbmBbaAlignTask::SelectTracks().

◆ GetNodes()

template<typename T = double>
const std::vector< Node > & cbm::algo::kf::Trajectory< T >::GetNodes ( ) const
inline

Get reference to the vector of nodes.

Definition at line 136 of file KfTrajectory.h.

References fNodes.

Referenced by CbmRecoQaTask::FilterTrack().

◆ GetNodeUserReferences() [1/2]

template<typename T = double>
std::array< int, 10 > & cbm::algo::kf::Trajectory< T >::GetNodeUserReferences ( const size_t index)
inline

Get reference to the user references of the node by its index.

Definition at line 142 of file KfTrajectory.h.

References fNodes.

◆ GetNodeUserReferences() [2/2]

template<typename T = double>
const std::array< int, 10 > & cbm::algo::kf::Trajectory< T >::GetNodeUserReferences ( const size_t index) const
inline

Get user reference of the node by its index.

Definition at line 139 of file KfTrajectory.h.

References fNodes.

◆ GetNofMeasurements()

template<typename T = double>
int cbm::algo::kf::Trajectory< T >::GetNofMeasurements ( ) const
inline

◆ GetNofNodes()

template<typename T = double>
size_t cbm::algo::kf::Trajectory< T >::GetNofNodes ( ) const
inline

Get number of nodes on the trajectory.

Definition at line 130 of file KfTrajectory.h.

References fNodes.

Referenced by CbmBbaAlignmentMcbmTask::Exec(), CbmRecoQaTask::Exec(), and CbmBbaAlignTask::SelectTracks().

◆ GetQaChi2Downstream()

template<typename T = double>
double cbm::algo::kf::Trajectory< T >::GetQaChi2Downstream ( ) const
inline

Get chi2 from the downstream fit iteration, needed for QA.

Definition at line 174 of file KfTrajectory.h.

References fQaChi2Downstream.

◆ IsFitted()

template<typename T = double>
bool cbm::algo::kf::Trajectory< T >::IsFitted ( ) const
inline

◆ IsFullyExtrapolated()

template<typename T = double>
bool cbm::algo::kf::Trajectory< T >::IsFullyExtrapolated ( ) const
inline

Check if the trajectory is extrapolated beyond the first and last measurements.

Definition at line 171 of file KfTrajectory.h.

References fIsFullyExtrapolated.

Referenced by CbmKfTrackFitter< FlagFitTime >::FitTrajectory(), CbmKfTrackFitter< FlagFitTime >::FitTrajectoryDownstream(), and CbmKfTrackFitter< FlagFitTime >::FitTrajectoryUpstream().

◆ MakeConsistent()

template<typename T>
void Trajectory::MakeConsistent ( )
inlineprotected

◆ ModifyNode()

template<typename T = double>
void cbm::algo::kf::Trajectory< T >::ModifyNode ( const size_t index,
const Node & node )
inline

Modify node at the given index.

Definition at line 235 of file KfTrajectory.h.

References fNodes, and MakeConsistent().

Referenced by CbmBbaAlignmentMcbmTask::Exec().

◆ operator=() [1/2]

template<typename T = double>
Trajectory & cbm::algo::kf::Trajectory< T >::operator= ( const Trajectory< T > & other)
default

Assignment operator.

References Trajectory().

◆ operator=() [2/2]

template<typename T = double>
Trajectory & cbm::algo::kf::Trajectory< T >::operator= ( Trajectory< T > && other)
defaultnoexcept

Move assignment operator.

References Trajectory().

◆ SetKfSetup()

template<typename T = double>
void cbm::algo::kf::Trajectory< T >::SetKfSetup ( std::shared_ptr< const Setup< T > > kfSetup)
inline

Set Kalman Filter setup.

Definition at line 127 of file KfTrajectory.h.

References fKfSetup.

Friends And Related Symbol Documentation

◆ ::CbmBbaAlignmentMcbmTask

template<typename T = double>
friend class ::CbmBbaAlignmentMcbmTask
friend

Definition at line 56 of file KfTrajectory.h.

◆ ::CbmBbaAlignTask

template<typename T = double>
friend class ::CbmBbaAlignTask
friend

Definition at line 55 of file KfTrajectory.h.

◆ ::CbmKfTrackFitter

template<typename T = double>
friend class ::CbmKfTrackFitter
friend

Definition at line 53 of file KfTrajectory.h.

Member Data Documentation

◆ fFirstMeasurementNodeId

◆ fIsFitted

template<typename T = double>
bool cbm::algo::kf::Trajectory< T >::fIsFitted
protected
Initial value:
{
false}

true if the trajectory at all the nodes between the first and the last measurements are fitted

Definition at line 257 of file KfTrajectory.h.

Referenced by Clear(), CbmKfTrackFitter< FlagFitTime >::FitTrajectory(), IsFitted(), and MakeConsistent().

◆ fIsFullyExtrapolated

template<typename T = double>
bool cbm::algo::kf::Trajectory< T >::fIsFullyExtrapolated
protected
Initial value:
{
false}

true if the trajectory is successfully extrapolated beyond the first and last measurements

Definition at line 260 of file KfTrajectory.h.

Referenced by Clear(), CbmKfTrackFitter< FlagFitTime >::FitTrajectory(), IsFullyExtrapolated(), and MakeConsistent().

◆ fKfSetup

template<typename T = double>
std::shared_ptr<const Setup<T> > cbm::algo::kf::Trajectory< T >::fKfSetup {}
protected

Kalman Filter setup.

Definition at line 249 of file KfTrajectory.h.

Referenced by MakeConsistent(), SetKfSetup(), and Trajectory().

◆ fLastMeasurementNodeId

◆ fNmeasurements

template<typename T = double>
int cbm::algo::kf::Trajectory< T >::fNmeasurements {-1}
protected

number of nodes with measurements

Definition at line 255 of file KfTrajectory.h.

Referenced by Clear(), DisableMeasurementAtNode(), GetNofMeasurements(), and MakeConsistent().

◆ fNodes

◆ fQaChi2Downstream

template<typename T = double>
T cbm::algo::kf::Trajectory< T >::fQaChi2Downstream {-1.}
protected

chi2 from the downstream fit iteration, needed for QA

Definition at line 263 of file KfTrajectory.h.

Referenced by Clear(), CbmKfTrackFitter< FlagFitTime >::FitTrajectory(), GetQaChi2Downstream(), and MakeConsistent().


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