CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::TrackKalmanFilter< DataT > Class Template Reference

#include <KfTrackKalmanFilter.h>

Inheritance diagram for cbm::algo::kf::TrackKalmanFilter< DataT >:
[legend]
Collaboration diagram for cbm::algo::kf::TrackKalmanFilter< DataT >:
[legend]

Public Types

using DataTscal = kf::utils::scaltype<DataT>
 
using DataTmask = kf::utils::masktype<DataT>
 

Public Member Functions

 TrackKalmanFilter ()=default
 
 TrackKalmanFilter (const kf::TrackParam< DataT > &t)
 
 TrackKalmanFilter (const DataTmask &m, bool fitV)
 
template<typename T >
 TrackKalmanFilter (const kf::TrackParam< T > &t)
 
void SetMask (const DataTmask &m)
 
template<typename T >
void SetTrack (const kf::TrackParam< T > &t)
 
void SetQp0 (DataT qp0)
 
kf::TrackParam< DataT > & Tr ()
 
DataT & Qp0 ()
 
void SetDoFitVelocity (bool v)
 
void SetOneEntry (const int i0, const TrackKalmanFilter &T1, const int i1)
 
std::string ToString (int i=-1)
 
void SetParticleMass (DataT mass)
 set particle mass for the fit
 
DataT GetParticleMass () const
 get the particle mass
 
DataT GetParticleMass2 () const
 get the particle mass squared
 
void SetMaxExtrapolationStep (double step)
 set max extrapolation step [cm]
 
DataT GetMaxExtrapolationStep () const
 get the particle mass
 
void Filter1d (const kf::MeasurementU< DataT > &m)
 filter the track with the 1d measurement
 
void FilterXY (const kf::MeasurementXy< DataT > &m, bool skipUnmeasuredCoordinates=false)
 filter the track with the XY measurement
 
void FilterTime (DataT t, DataT dt2, const DataTmask &m)
 filter the track with the time measurement
 
void FilterTime (kf::MeasurementTime< DataT > mt)
 filter the track with the time measurement
 
void FilterVi (DataT vi)
 filter the inverse speed
 
void MeasureVelocityWithQp ()
 measure the track velocity with the track Qp and the mass
 
void Extrapolate (DataT z, const kf::FieldRegion< DataT > &F)
 
void ExtrapolateStep (DataT z_out, const kf::FieldRegion< DataT > &F)
 
void ExtrapolateLine (DataT z_out, const kf::FieldRegion< DataT > &F)
 extrapolate the track to the given Z using linearization at the straight line
 
void ExtrapolateLineNoField (DataT z_out)
 extrapolate the track to the given Z assuming no magnetic field
 
void EnergyLossCorrection (DataT radThick, FitDirection direction)
 
void EnergyLossCorrection (int atomicZ, DataTscal atomicA, DataTscal rho, DataTscal radLen, DataT radThick, FitDirection direction)
 
void MultipleScattering (DataT radThick, DataT tx0, DataT ty0, DataT qp0)
 apply multiple scattering correction to the track with the given Qp0
 
void MultipleScattering (DataT radThick)
 apply multiple scattering correction to the track
 
void MultipleScatteringInThickMaterial (DataT radThick, DataT thickness, bool fDownstream)
 apply multiple scattering correction in thick material to the track
 
void GetExtrapolatedXYline (DataT z, const kf::FieldRegion< DataT > &F, DataT &extrX, DataT &extrY, std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > &Jx, std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > &Jy) const
 extrapolate track as a line, return the extrapolated X, Y and the Jacobians
 
void FilterExtrapolatedXY (const kf::MeasurementXy< DataT > &m, DataT extrX, DataT extrY, const std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > &Jx, const std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > &Jy)
 
std::pair< DataT, DataT > ExtrapolateLineXdX2 (DataT z_out) const
 
std::pair< DataT, DataT > ExtrapolateLineYdY2 (DataT z_out) const
 
DataT ExtrapolateLineDxy (DataT z_out) const
 
void FilterWithTargetAtLine (DataT targZ, const kf::MeasurementXy< DataT > &targXYInfo, const kf::FieldRegion< DataT > &F)
 add target measuremet to the track using linearisation at a straight line
 
void GuessTrack (const DataT &trackZ, const DataT hitX[], const DataT hitY[], const DataT hitZ[], const DataT hitT[], const DataT By[], const DataTmask hitW[], const DataTmask hitWtime[], int NHits)
 fast guess of track parameterts based on its hits
 

Static Public Member Functions

static DataT ApproximateBetheBloch (DataT bg2)
 Approximate mean energy loss with Bethe-Bloch formula.
 
static DataT ApproximateBetheBloch (DataT bg2, DataT kp0, DataT kp1, DataT kp2, DataT kp3, DataT kp4)
 Approximate mean energy loss with Bethe-Bloch formula.
 
static std::tuple< DataT, DataT > GetChi2XChi2U (kf::MeasurementXy< DataT > m, DataT x, DataT y, DataT C00, DataT C10, DataT C11)
 git two chi^2 components of the track fit to measurement
 

Private Types

typedef const DataT cnst
 

Private Attributes

DataTmask fMask {true}
 mask of active elements in simd vectors
 
kf::TrackParam< DataT > fTr {}
 track parameters
 
DataT fQp0 {0.}
 
DataT fMass {0.10565800}
 particle mass (muon mass by default)
 
DataT fMass2 {fMass * fMass}
 mass squared
 
DataT fMaxExtraplationStep {50.}
 max extrapolation step [cm]
 
bool fDoFitVelocity {0}
 

Detailed Description

template<typename DataT>
class cbm::algo::kf::TrackKalmanFilter< DataT >

Track fit utilities for the CA tracking based on the Kalman Filter

Definition at line 41 of file KfTrackKalmanFilter.h.

Member Typedef Documentation

◆ cnst

template<typename DataT >
const DataT cbm::algo::kf::TrackKalmanFilter< DataT >::cnst
private

Definition at line 240 of file KfTrackKalmanFilter.h.

◆ DataTmask

template<typename DataT >
using cbm::algo::kf::TrackKalmanFilter< DataT >::DataTmask = kf::utils::masktype<DataT>

Definition at line 45 of file KfTrackKalmanFilter.h.

◆ DataTscal

template<typename DataT >
using cbm::algo::kf::TrackKalmanFilter< DataT >::DataTscal = kf::utils::scaltype<DataT>

Definition at line 44 of file KfTrackKalmanFilter.h.

Constructor & Destructor Documentation

◆ TrackKalmanFilter() [1/4]

template<typename DataT >
cbm::algo::kf::TrackKalmanFilter< DataT >::TrackKalmanFilter ( )
default

◆ TrackKalmanFilter() [2/4]

template<typename DataT >
cbm::algo::kf::TrackKalmanFilter< DataT >::TrackKalmanFilter ( const kf::TrackParam< DataT > & t)
inline

◆ TrackKalmanFilter() [3/4]

template<typename DataT >
cbm::algo::kf::TrackKalmanFilter< DataT >::TrackKalmanFilter ( const DataTmask & m,
bool fitV )
inline

Definition at line 51 of file KfTrackKalmanFilter.h.

◆ TrackKalmanFilter() [4/4]

template<typename DataT >
template<typename T >
cbm::algo::kf::TrackKalmanFilter< DataT >::TrackKalmanFilter ( const kf::TrackParam< T > & t)
inline

Member Function Documentation

◆ ApproximateBetheBloch() [1/2]

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::ApproximateBetheBloch ( DataT bg2)
static

Approximate mean energy loss with Bethe-Bloch formula.

Parameters
bg2(beta*gamma)^2
Returns
mean energy loss

Definition at line 1229 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif(), log(), sqrt(), and x.

◆ ApproximateBetheBloch() [2/2]

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::ApproximateBetheBloch ( DataT bg2,
DataT kp0,
DataT kp1,
DataT kp2,
DataT kp3,
DataT kp4 )
static

Approximate mean energy loss with Bethe-Bloch formula.

Parameters
bg2(beta*gamma)^2
kp0density [g/cm^3]
kp1density effect first junction point
kp2density effect second junction point
kp3mean excitation energy [GeV]
kp4mean Z/A
Returns
mean energy loss

Definition at line 1276 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif(), log(), sqrt(), and x.

◆ EnergyLossCorrection() [1/2]

◆ EnergyLossCorrection() [2/2]

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::EnergyLossCorrection ( int atomicZ,
DataTscal atomicA,
DataTscal rho,
DataTscal radLen,
DataT radThick,
FitDirection direction )

apply energy loss correction to the track more accurate formula using material atomic numbers

Parameters
atomicZ- atomic number of the material
atomicA- atomic mass of the material
rho- density of the material
radLen- radiation length of the material
radThick- radiation length of the material
direction- direction of the track

Definition at line 1091 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::fabs(), cbm::algo::kf::utils::iif(), cbm::algo::kf::kDownstream, cbm::algo::kf::utils::max(), and sqrt().

◆ Extrapolate()

◆ ExtrapolateLine()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateLine ( DataT z_out,
const kf::FieldRegion< DataT > & F )

extrapolate the track to the given Z using linearization at the straight line

Definition at line 836 of file KfTrackKalmanFilter.cxx.

Referenced by cbm::algo::ca::TripletConstructor::CreateTripletsForHit().

◆ ExtrapolateLineDxy()

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateLineDxy ( DataT z_out) const
inline

extrapolate the track to the given Z using linearization at the straight line,

Parameters
z_out- Z coordinate to extrapolate to
Returns
extrapolated correlation cov<x,y>

Definition at line 290 of file KfTrackKalmanFilter.h.

Referenced by cbm::algo::ca::TripletConstructor::CollectHits().

◆ ExtrapolateLineNoField()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateLineNoField ( DataT z_out)

extrapolate the track to the given Z assuming no magnetic field

Definition at line 848 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif(), and sqrt().

Referenced by cbm::algo::ca::TripletConstructor::FindDoublets().

◆ ExtrapolateLineXdX2()

template<typename DataT >
std::pair< DataT, DataT > cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateLineXdX2 ( DataT z_out) const
inline

extrapolate the track to the given Z using linearization at the straight line,

Parameters
z_out- Z coordinate to extrapolate to
Returns
pair of the extrapolated X, and dX2 - the rms^2 of the extrapolated x

Definition at line 276 of file KfTrackKalmanFilter.h.

Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), and cbm::algo::ca::TrackExtender::FindMoreHits().

◆ ExtrapolateLineYdY2()

template<typename DataT >
std::pair< DataT, DataT > cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateLineYdY2 ( DataT z_out) const
inline

extrapolate the track to the given Z using linearization at the straight line,

Parameters
z_out- Z coordinate to extrapolate to
Returns
pair of the extrapolated Y, and dY2 - the rms^2 of the extrapolated y

Definition at line 283 of file KfTrackKalmanFilter.h.

Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), and cbm::algo::ca::TrackExtender::FindMoreHits().

◆ ExtrapolateStep()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::ExtrapolateStep ( DataT z_out,
const kf::FieldRegion< DataT > & F )

◆ Filter1d()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::Filter1d ( const kf::MeasurementU< DataT > & m)

filter the track with the 1d measurement

Definition at line 15 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif().

◆ FilterExtrapolatedXY()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::FilterExtrapolatedXY ( const kf::MeasurementXy< DataT > & m,
DataT extrX,
DataT extrY,
const std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > & Jx,
const std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > & Jy )

filter the track with the XY measurement placed at different Z

Parameters
m- measurement
extrX- extrapolated X of the track
extrY- extrapolated Y of the track
Jx- Jacobian of the extrapolated X
Jy- Jacobian of the extrapolated Y

Definition at line 330 of file KfTrackKalmanFilter.cxx.

◆ FilterTime() [1/2]

◆ FilterTime() [2/2]

◆ FilterVi()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::FilterVi ( DataT vi)

filter the inverse speed

Definition at line 510 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif().

◆ FilterWithTargetAtLine()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::FilterWithTargetAtLine ( DataT targZ,
const kf::MeasurementXy< DataT > & targXYInfo,
const kf::FieldRegion< DataT > & F )

add target measuremet to the track using linearisation at a straight line

Definition at line 1217 of file KfTrackKalmanFilter.cxx.

Referenced by cbm::algo::ca::TripletConstructor::CreateTripletsForHit(), and cbm::algo::ca::TripletConstructor::FindTriplets().

◆ FilterXY()

◆ GetChi2XChi2U()

template<typename DataT >
std::tuple< DataT, DataT > cbm::algo::kf::TrackKalmanFilter< DataT >::GetChi2XChi2U ( kf::MeasurementXy< DataT > m,
DataT x,
DataT y,
DataT C00,
DataT C10,
DataT C11 )
static

git two chi^2 components of the track fit to measurement

Parameters
m- measurement
x- track X
y- track Y
C00- track covariance C00
C10- track covariance C10
C11- track covariance C11
Returns
pair of (chi^2_x, chi^2_u) components of the chi^2. chi^2_u is calculated after track is fit to the X measurement

Definition at line 1325 of file KfTrackKalmanFilter.cxx.

References x, and y.

Referenced by cbm::algo::ca::TripletConstructor::CollectHits().

◆ GetExtrapolatedXYline()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::GetExtrapolatedXYline ( DataT z,
const kf::FieldRegion< DataT > & F,
DataT & extrX,
DataT & extrY,
std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > & Jx,
std::array< DataT, kf::TrackParam< DataT >::kNtrackParam > & Jy ) const

extrapolate track as a line, return the extrapolated X, Y and the Jacobians


special utilities needed by the combinatorial track finder

Definition at line 1163 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::FieldRegion< T >::GetDoubleIntegrals(), and sqrt().

◆ GetMaxExtrapolationStep()

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::GetMaxExtrapolationStep ( ) const
inline

get the particle mass

Definition at line 100 of file KfTrackKalmanFilter.h.

References cbm::algo::kf::TrackKalmanFilter< DataT >::fMaxExtraplationStep.

◆ GetParticleMass()

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::GetParticleMass ( ) const
inline

get the particle mass

Definition at line 91 of file KfTrackKalmanFilter.h.

References cbm::algo::kf::TrackKalmanFilter< DataT >::fMass.

◆ GetParticleMass2()

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::GetParticleMass2 ( ) const
inline

get the particle mass squared

Definition at line 94 of file KfTrackKalmanFilter.h.

References cbm::algo::kf::TrackKalmanFilter< DataT >::fMass2.

◆ GuessTrack()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::GuessTrack ( const DataT & trackZ,
const DataT hitX[],
const DataT hitY[],
const DataT hitZ[],
const DataT hitT[],
const DataT By[],
const DataTmask hitW[],
const DataTmask hitWtime[],
int NHits )

fast guess of track parameterts based on its hits

Parameters
trackZ- Z coordinate of the track
hitX- X coordinate of the hits
hitY- Y coordinate of the hits
hitZ- Z coordinate of the hits
hitT- Time coordinate of the hits
By- y component of the magnetic field
hitW- hit weight
hitWtime- hit weight for the time measurement
NHits- number of hits

Definition at line 1377 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::fabs(), cbm::algo::kf::utils::iif(), cbm::algo::kf::defs::SpeedOfLightInv, sqrt(), x, and y.

Referenced by cbm::algo::ca::TrackFitter::FitCaTracks().

◆ MeasureVelocityWithQp()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::MeasureVelocityWithQp ( )

measure the track velocity with the track Qp and the mass

Definition at line 415 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif(), cbm::algo::kf::defs::SpeedOfLightInv, and sqrt().

◆ MultipleScattering() [1/2]

◆ MultipleScattering() [2/2]

◆ MultipleScatteringInThickMaterial()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::MultipleScatteringInThickMaterial ( DataT radThick,
DataT thickness,
bool fDownstream )

apply multiple scattering correction in thick material to the track

Definition at line 1016 of file KfTrackKalmanFilter.cxx.

References cbm::algo::kf::utils::iif(), log(), and sqrt().

◆ Qp0()

◆ SetDoFitVelocity()

◆ SetMask()

◆ SetMaxExtrapolationStep()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::SetMaxExtrapolationStep ( double step)
inline

set max extrapolation step [cm]

Definition at line 97 of file KfTrackKalmanFilter.h.

References cbm::algo::kf::TrackKalmanFilter< DataT >::fMaxExtraplationStep.

Referenced by cbm::algo::ca::TrackFitter::FitCaTracks().

◆ SetOneEntry()

template<typename DataT >
void cbm::algo::kf::TrackKalmanFilter< DataT >::SetOneEntry ( const int i0,
const TrackKalmanFilter< DataT > & T1,
const int i1 )
inline

◆ SetParticleMass()

◆ SetQp0()

◆ SetTrack()

◆ ToString()

template<typename DataT >
std::string cbm::algo::kf::TrackKalmanFilter< DataT >::ToString ( int i = -1)
inline

◆ Tr()

Member Data Documentation

◆ fDoFitVelocity

template<typename DataT >
bool cbm::algo::kf::TrackKalmanFilter< DataT >::fDoFitVelocity {0}
private

◆ fMask

template<typename DataT >
DataTmask cbm::algo::kf::TrackKalmanFilter< DataT >::fMask {true}
private

mask of active elements in simd vectors


Data members

Definition at line 245 of file KfTrackKalmanFilter.h.

Referenced by cbm::algo::kf::TrackKalmanFilter< DataT >::SetMask().

◆ fMass

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::fMass {0.10565800}
private

◆ fMass2

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::fMass2 {fMass * fMass}
private

◆ fMaxExtraplationStep

template<typename DataT >
DataT cbm::algo::kf::TrackKalmanFilter< DataT >::fMaxExtraplationStep {50.}
private

◆ fQp0

◆ fTr


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