CbmRoot
Loading...
Searching...
No Matches
CbmKfTrackFitter Class Reference

#include <CbmKfTrackFitter.h>

Collaboration diagram for CbmKfTrackFitter:
[legend]

Classes

struct  LinearizationAtNode
 
struct  Trajectory
 A trajectory to be fitted. More...
 
struct  TrajectoryNode
 

Public Member Functions

 CbmKfTrackFitter ()
 
 ~CbmKfTrackFitter ()
 
void Init ()
 
void SetParticleHypothesis (int pid)
 set particle hypothesis (mass and electron flag) via particle PDG
 
void SetMassHypothesis (double mass)
 set particle mass
 
void SetElectronFlag (bool isElectron)
 set electron flag (bremmstrallung will be applied)
 
void SetSkipUnmeasuredCoordinates (bool skip=true)
 skip unmeasured coordinates
 
void SetDefaultMomentumForMs (double p)
 set the default inverse momentum for the Multiple Scattering calculation
 
void SetDefaultInverseMomentumForMs (double invP)
 set the default inverse momentum for the Multiple Scattering calculation
 
void SetNoMultipleScattering ()
 set the default inverse momentum for the Multiple Scattering calculation
 
void FixMomentumForMs (bool fix=true)
 fix the inverse momentum for the Multiple Scattering calculation
 
bool CreateMvdStsTrack (Trajectory &kfTrack, int stsTrackIndex)
 set the input data arrays
 
bool CreateGlobalTrack (Trajectory &kfTrack, int globalTrackIndex)
 
bool CreateGlobalTrack (Trajectory &kfTrack, const CbmGlobalTrack &globalTrack)
 
bool FitTrajectory (CbmKfTrackFitter::Trajectory &t)
 fit the track
 
void SetDoSmooth (bool doSmooth)
 do the KF-smoothing to define track pars at all the nodes
 
void SetVerbosityLevel (int level)
 set verbosity level
 
void SetDebugInfo (const std::string &info)
 set information about the track for debug output
 

Private Member Functions

void FilterFirstMeasurement (const TrajectoryNode &n)
 
void AddMaterialEffects (TrajectoryNode &n, const LinearizationAtNode &l, cbm::algo::kf::FitDirection direction)
 
bool Smooth (cbm::algo::kf::TrackParamD &t1, const cbm::algo::kf::TrackParamD &t2)
 

Private Attributes

std::shared_ptr< const cbm::algo::kf::Setup< double > > fKfSetup
 
TClonesArray * fInputMvdHits {nullptr}
 
TClonesArray * fInputStsHits {nullptr}
 
TClonesArray * fInputMuchHits {nullptr}
 
TClonesArray * fInputTrdHits {nullptr}
 
TClonesArray * fInputTofHits {nullptr}
 
TClonesArray * fInputGlobalTracks {nullptr}
 
TClonesArray * fInputStsTracks {nullptr}
 
TClonesArray * fInputMuchTracks {nullptr}
 
TClonesArray * fInputTrdTracks {nullptr}
 
TClonesArray * fInputTofTracks {nullptr}
 
bool fIsInitialized = {false}
 
bool fSkipUnmeasuredCoordinates {false}
 
cbm::algo::kf::TrackKalmanFilter< double > fFit
 
double fDefaultQpForMs {1. / 0.1}
 
bool fIsQpForMsFixed {false}
 
double fMass {cbm::algo::kf::defs::PionMass<double>}
 
bool fIsElectron {false}
 
bool fDoSmooth {true}
 
int fVerbosityLevel {0}
 
std::string fDebugInfo {}
 

Detailed Description

A fitter for the Cbm tracks

Definition at line 33 of file CbmKfTrackFitter.h.

Constructor & Destructor Documentation

◆ CbmKfTrackFitter()

CbmKfTrackFitter::CbmKfTrackFitter ( )

Definition at line 44 of file CbmKfTrackFitter.cxx.

◆ ~CbmKfTrackFitter()

CbmKfTrackFitter::~CbmKfTrackFitter ( )

Definition at line 46 of file CbmKfTrackFitter.cxx.

Member Function Documentation

◆ AddMaterialEffects()

◆ CreateGlobalTrack() [1/2]

bool CbmKfTrackFitter::CreateGlobalTrack ( CbmKfTrackFitter::Trajectory & kfTrack,
const CbmGlobalTrack & globalTrack )

Definition at line 167 of file CbmKfTrackFitter.cxx.

References CbmKfTrackFitter::TrajectoryNode::fHitAddress, CbmKfTrackFitter::TrajectoryNode::fHitIndex, CbmKfTrackFitter::TrajectoryNode::fHitSystemId, fInputMuchHits, fInputMuchTracks, fInputMvdHits, fInputStsHits, fInputStsTracks, fInputTofHits, fInputTofTracks, fInputTrdHits, fInputTrdTracks, CbmKfTrackFitter::TrajectoryNode::fIsFitted, fIsInitialized, CbmKfTrackFitter::TrajectoryNode::fIsRadThickFixed, CbmKfTrackFitter::TrajectoryNode::fIsTimeSet, CbmKfTrackFitter::TrajectoryNode::fIsXySet, fKfSetup, CbmKfTrackFitter::TrajectoryNode::fMaterialLayer, CbmKfTrackFitter::TrajectoryNode::fMt, CbmKfTrackFitter::TrajectoryNode::fMxy, CbmKfTrackFitter::Trajectory::fNodes, CbmKfTrackFitter::TrajectoryNode::fRadThick, CbmKfTrackFitter::TrajectoryNode::fZ, CbmGlobalTrack::GetMuchTrackIndex(), CbmTrack::GetNofHits(), CbmStsTrack::GetNofMvdHits(), CbmGlobalTrack::GetStsTrackIndex(), CbmGlobalTrack::GetTofTrackIndex(), CbmGlobalTrack::GetTrdTrackIndex(), Init(), CbmMuchTrackingInterface::Instance(), CbmMvdTrackingInterface::Instance(), CbmStsTrackingInterface::Instance(), CbmTofTrackingInterface::Instance(), CbmTrdTrackingInterface::Instance(), kNotExist, kTrd2d, nStsHits, CbmKfTrackFitter::Trajectory::OrderNodesInZ(), cbm::algo::kf::MeasurementTime< DataT >::SetDt2(), cbm::algo::kf::MeasurementXy< DataT >::SetDx2(), cbm::algo::kf::MeasurementXy< DataT >::SetDxy(), cbm::algo::kf::MeasurementXy< DataT >::SetDy2(), cbm::algo::kf::MeasurementTime< DataT >::SetNdfT(), cbm::algo::kf::MeasurementXy< DataT >::SetNdfX(), cbm::algo::kf::MeasurementXy< DataT >::SetNdfY(), cbm::algo::kf::MeasurementTime< DataT >::SetT(), cbm::algo::kf::MeasurementXy< DataT >::SetX(), cbm::algo::kf::MeasurementXy< DataT >::SetY(), and cbm::algo::ca::ToCbmModuleId().

◆ CreateGlobalTrack() [2/2]

bool CbmKfTrackFitter::CreateGlobalTrack ( CbmKfTrackFitter::Trajectory & kfTrack,
int globalTrackIndex )

◆ CreateMvdStsTrack()

bool CbmKfTrackFitter::CreateMvdStsTrack ( CbmKfTrackFitter::Trajectory & kfTrack,
int stsTrackIndex )

◆ FilterFirstMeasurement()

◆ FitTrajectory()

bool CbmKfTrackFitter::FitTrajectory ( CbmKfTrackFitter::Trajectory & t)

fit the track

Definition at line 516 of file CbmKfTrackFitter.cxx.

References AddMaterialEffects(), cbm::algo::kf::TrackKalmanFilter< DataT >::Extrapolate(), fDebugInfo, fDoSmooth, fFit, cbm::algo::kf::GlobalField::fgOriginalField, cbm::algo::kf::GlobalField::fgOriginalFieldType, FilterFirstMeasurement(), cbm::algo::kf::TrackKalmanFilter< DataT >::FilterTime(), cbm::algo::kf::TrackKalmanFilter< DataT >::FilterXY(), CbmKfTrackFitter::Trajectory::fIsFitted, CbmKfTrackFitter::TrajectoryNode::fIsFitted, CbmKfTrackFitter::TrajectoryNode::fIsTimeSet, CbmKfTrackFitter::TrajectoryNode::fIsXySet, fMass, CbmKfTrackFitter::TrajectoryNode::fMt, CbmKfTrackFitter::TrajectoryNode::fMxy, CbmKfTrackFitter::Trajectory::fNodes, CbmKfTrackFitter::LinearizationAtNode::fParamDn, CbmKfTrackFitter::TrajectoryNode::fParamDn, CbmKfTrackFitter::LinearizationAtNode::fParamUp, CbmKfTrackFitter::TrajectoryNode::fParamUp, fSkipUnmeasuredCoordinates, fVerbosityLevel, CbmKfTrackFitter::TrajectoryNode::fZ, cbm::algo::kf::TrackParamBase< T >::GetChiSq(), cbm::algo::kf::TrackParamBase< T >::GetTx(), cbm::algo::kf::TrackParamBase< T >::GetTy(), cbm::algo::kf::TrackParamBase< T >::GetX(), cbm::algo::kf::TrackParamBase< T >::GetY(), cbm::algo::kf::TrackParamBase< T >::GetZ(), Init(), cbm::algo::kf::TrackParamBase< T >::SetChiSq(), cbm::algo::kf::TrackParamBase< T >::SetChiSqTime(), cbm::algo::kf::TrackParamBase< T >::SetNdf(), cbm::algo::kf::TrackParamBase< T >::SetNdfTime(), cbm::algo::kf::TrackKalmanFilter< DataT >::SetParticleMass(), cbm::algo::kf::TrackKalmanFilter< DataT >::SetQp0(), cbm::algo::kf::TrackKalmanFilter< DataT >::SetTrack(), Smooth(), cbm::algo::kf::defs::SpeedOfLightInv, cbm::algo::kf::TrackKalmanFilter< DataT >::Tr(), x, and y.

Referenced by CbmBbaAlignmentTask::CostFunction(), CbmBbaAlignmentTask::Exec(), CbmKfFitTracksTask::Exec(), CbmRecoQaTask::Exec(), and CbmBbaAlignmentTask::Finish().

◆ FixMomentumForMs()

void CbmKfTrackFitter::FixMomentumForMs ( bool fix = true)
inline

fix the inverse momentum for the Multiple Scattering calculation

Definition at line 126 of file CbmKfTrackFitter.h.

References fIsQpForMsFixed.

Referenced by CbmBbaAlignmentTask::Exec(), CbmKfFitTracksTask::Exec(), CbmRecoQaTask::Exec(), CbmRecoQaTask::InitMcbm22(), and CbmRecoQaTask::InitMcbm24().

◆ Init()

◆ SetDebugInfo()

void CbmKfTrackFitter::SetDebugInfo ( const std::string & info)
inline

set information about the track for debug output

Definition at line 143 of file CbmKfTrackFitter.h.

References fDebugInfo.

◆ SetDefaultInverseMomentumForMs()

void CbmKfTrackFitter::SetDefaultInverseMomentumForMs ( double invP)
inline

set the default inverse momentum for the Multiple Scattering calculation

Definition at line 120 of file CbmKfTrackFitter.h.

References fDefaultQpForMs.

◆ SetDefaultMomentumForMs()

void CbmKfTrackFitter::SetDefaultMomentumForMs ( double p)
inline

set the default inverse momentum for the Multiple Scattering calculation

Definition at line 117 of file CbmKfTrackFitter.h.

References fDefaultQpForMs.

Referenced by CbmBbaAlignmentTask::Exec(), CbmKfFitTracksTask::Exec(), CbmRecoQaTask::Exec(), CbmRecoQaTask::InitMcbm22(), and CbmRecoQaTask::InitMcbm24().

◆ SetDoSmooth()

void CbmKfTrackFitter::SetDoSmooth ( bool doSmooth)
inline

do the KF-smoothing to define track pars at all the nodes

Definition at line 137 of file CbmKfTrackFitter.h.

References fDoSmooth.

Referenced by CbmBbaAlignmentTask::CostFunction(), and CbmBbaAlignmentTask::Exec().

◆ SetElectronFlag()

void CbmKfTrackFitter::SetElectronFlag ( bool isElectron)

set electron flag (bremmstrallung will be applied)

Definition at line 108 of file CbmKfTrackFitter.cxx.

References fIsElectron.

◆ SetMassHypothesis()

void CbmKfTrackFitter::SetMassHypothesis ( double mass)

set particle mass

Definition at line 101 of file CbmKfTrackFitter.cxx.

References fMass.

◆ SetNoMultipleScattering()

void CbmKfTrackFitter::SetNoMultipleScattering ( )
inline

set the default inverse momentum for the Multiple Scattering calculation

Definition at line 123 of file CbmKfTrackFitter.h.

References fDefaultQpForMs.

Referenced by CbmBbaAlignmentTask::CostFunction().

◆ SetParticleHypothesis()

void CbmKfTrackFitter::SetParticleHypothesis ( int pid)

set particle hypothesis (mass and electron flag) via particle PDG

Definition at line 90 of file CbmKfTrackFitter.cxx.

References fIsElectron, and fMass.

◆ SetSkipUnmeasuredCoordinates()

void CbmKfTrackFitter::SetSkipUnmeasuredCoordinates ( bool skip = true)
inline

skip unmeasured coordinates

Definition at line 114 of file CbmKfTrackFitter.h.

References fSkipUnmeasuredCoordinates.

Referenced by CbmBbaAlignmentTask::Init(), and CbmRecoQaTask::Init().

◆ SetVerbosityLevel()

void CbmKfTrackFitter::SetVerbosityLevel ( int level)
inline

set verbosity level

Definition at line 140 of file CbmKfTrackFitter.h.

References fVerbosityLevel.

◆ Smooth()

Member Data Documentation

◆ fDebugInfo

std::string CbmKfTrackFitter::fDebugInfo {}
private

Definition at line 191 of file CbmKfTrackFitter.h.

Referenced by FitTrajectory(), and SetDebugInfo().

◆ fDefaultQpForMs

double CbmKfTrackFitter::fDefaultQpForMs {1. / 0.1}
private

externally defined inverse momentum for the Multiple Scattering calculation. It is used for the tracks in field-free regions. When the momentum can be fitted, the fitted value is used. the default value is set to 0.1 GeV/c

Definition at line 184 of file CbmKfTrackFitter.h.

Referenced by AddMaterialEffects(), SetDefaultInverseMomentumForMs(), SetDefaultMomentumForMs(), and SetNoMultipleScattering().

◆ fDoSmooth

bool CbmKfTrackFitter::fDoSmooth {true}
private

Definition at line 189 of file CbmKfTrackFitter.h.

Referenced by FitTrajectory(), and SetDoSmooth().

◆ fFit

cbm::algo::kf::TrackKalmanFilter<double> CbmKfTrackFitter::fFit
private

Definition at line 178 of file CbmKfTrackFitter.h.

Referenced by AddMaterialEffects(), FilterFirstMeasurement(), and FitTrajectory().

◆ fInputGlobalTracks

TClonesArray* CbmKfTrackFitter::fInputGlobalTracks {nullptr}
private

Definition at line 168 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputMuchHits

TClonesArray* CbmKfTrackFitter::fInputMuchHits {nullptr}
private

Definition at line 164 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputMuchTracks

TClonesArray* CbmKfTrackFitter::fInputMuchTracks {nullptr}
private

Definition at line 170 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputMvdHits

TClonesArray* CbmKfTrackFitter::fInputMvdHits {nullptr}
private

Definition at line 162 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputStsHits

TClonesArray* CbmKfTrackFitter::fInputStsHits {nullptr}
private

Definition at line 163 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputStsTracks

TClonesArray* CbmKfTrackFitter::fInputStsTracks {nullptr}
private

Definition at line 169 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), CreateMvdStsTrack(), and Init().

◆ fInputTofHits

TClonesArray* CbmKfTrackFitter::fInputTofHits {nullptr}
private

Definition at line 166 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputTofTracks

TClonesArray* CbmKfTrackFitter::fInputTofTracks {nullptr}
private

Definition at line 172 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputTrdHits

TClonesArray* CbmKfTrackFitter::fInputTrdHits {nullptr}
private

Definition at line 165 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fInputTrdTracks

TClonesArray* CbmKfTrackFitter::fInputTrdTracks {nullptr}
private

Definition at line 171 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), and Init().

◆ fIsElectron

bool CbmKfTrackFitter::fIsElectron {false}
private

Definition at line 188 of file CbmKfTrackFitter.h.

Referenced by SetElectronFlag(), and SetParticleHypothesis().

◆ fIsInitialized

bool CbmKfTrackFitter::fIsInitialized = {false}
private

Definition at line 176 of file CbmKfTrackFitter.h.

Referenced by CreateGlobalTrack(), CreateGlobalTrack(), CreateMvdStsTrack(), and Init().

◆ fIsQpForMsFixed

bool CbmKfTrackFitter::fIsQpForMsFixed {false}
private

Definition at line 185 of file CbmKfTrackFitter.h.

Referenced by AddMaterialEffects(), and FixMomentumForMs().

◆ fKfSetup

std::shared_ptr<const cbm::algo::kf::Setup<double> > CbmKfTrackFitter::fKfSetup
private

Definition at line 159 of file CbmKfTrackFitter.h.

Referenced by AddMaterialEffects(), CreateGlobalTrack(), and Init().

◆ fMass

double CbmKfTrackFitter::fMass {cbm::algo::kf::defs::PionMass<double>}
private

Definition at line 187 of file CbmKfTrackFitter.h.

Referenced by FitTrajectory(), SetMassHypothesis(), and SetParticleHypothesis().

◆ fSkipUnmeasuredCoordinates

bool CbmKfTrackFitter::fSkipUnmeasuredCoordinates {false}
private

◆ fVerbosityLevel

int CbmKfTrackFitter::fVerbosityLevel {0}
private

Definition at line 190 of file CbmKfTrackFitter.h.

Referenced by FitTrajectory(), and SetVerbosityLevel().


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