CbmRoot
|
#include <CbmKfTrackFitter.h>
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 {} |
A fitter for the Cbm tracks
Definition at line 33 of file CbmKfTrackFitter.h.
CbmKfTrackFitter::CbmKfTrackFitter | ( | ) |
Definition at line 44 of file CbmKfTrackFitter.cxx.
CbmKfTrackFitter::~CbmKfTrackFitter | ( | ) |
Definition at line 46 of file CbmKfTrackFitter.cxx.
|
private |
Definition at line 480 of file CbmKfTrackFitter.cxx.
References cbm::algo::kf::TrackKalmanFilter< DataT >::EnergyLossCorrection(), fDefaultQpForMs, fFit, fIsQpForMsFixed, CbmKfTrackFitter::TrajectoryNode::fIsRadThickFixed, fKfSetup, CbmKfTrackFitter::TrajectoryNode::fMaterialLayer, CbmKfTrackFitter::LinearizationAtNode::fParamDn, CbmKfTrackFitter::LinearizationAtNode::fParamUp, CbmKfTrackFitter::TrajectoryNode::fRadThick, cbm::algo::kf::TrackParamBase< T >::GetQp(), 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::TrackKalmanFilter< DataT >::MultipleScattering(), and cbm::algo::kf::TrackKalmanFilter< DataT >::SetQp0().
Referenced by FitTrajectory().
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().
bool CbmKfTrackFitter::CreateGlobalTrack | ( | CbmKfTrackFitter::Trajectory & | kfTrack, |
int | globalTrackIndex ) |
Definition at line 140 of file CbmKfTrackFitter.cxx.
References CreateGlobalTrack(), fInputGlobalTracks, fIsInitialized, and Init().
Referenced by CreateGlobalTrack(), CreateMvdStsTrack(), CbmBbaAlignmentTask::Exec(), CbmKfFitTracksTask::Exec(), and CbmRecoQaTask::Exec().
bool CbmKfTrackFitter::CreateMvdStsTrack | ( | CbmKfTrackFitter::Trajectory & | kfTrack, |
int | stsTrackIndex ) |
set the input data arrays
Definition at line 111 of file CbmKfTrackFitter.cxx.
References CreateGlobalTrack(), fInputStsTracks, fIsInitialized, Init(), CbmGlobalTrack::SetParamFirst(), and CbmGlobalTrack::SetStsTrackIndex().
Referenced by CbmBbaAlignmentTask::Exec(), and CbmKfFitTracksTask::Exec().
|
private |
Definition at line 430 of file CbmKfTrackFitter.cxx.
References fFit, CbmKfTrackFitter::TrajectoryNode::fIsTimeSet, CbmKfTrackFitter::TrajectoryNode::fIsXySet, CbmKfTrackFitter::TrajectoryNode::fMt, CbmKfTrackFitter::TrajectoryNode::fMxy, CbmKfTrackFitter::TrajectoryNode::fParamDn, fSkipUnmeasuredCoordinates, CbmKfTrackFitter::TrajectoryNode::fZ, cbm::algo::kf::TrackParamBase< T >::GetX(), cbm::algo::kf::TrackParamBase< T >::GetY(), cbm::algo::kf::TrackParamBase< T >::ResetErrors(), cbm::algo::kf::defs::SpeedOfLightInv, and cbm::algo::kf::TrackKalmanFilter< DataT >::Tr().
Referenced by 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().
|
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().
void CbmKfTrackFitter::Init | ( | ) |
initialize the fitter. It must be called in the Init() of the user task. when called later, it sees track branches always empty for whatever reason
Definition at line 48 of file CbmKfTrackFitter.cxx.
References fInputGlobalTracks, fInputMuchHits, fInputMuchTracks, fInputMvdHits, fInputStsHits, fInputStsTracks, fInputTofHits, fInputTofTracks, fInputTrdHits, fInputTrdTracks, fIsInitialized, fKfSetup, cbm::kf::TrackingSetupBuilder::GetSharedGeoSetup(), cbm::kf::TrackingSetupBuilder::Instance(), CbmStsTrackingInterface::Instance(), CbmTofTrackingInterface::Instance(), and CbmTrdTrackingInterface::Instance().
Referenced by CreateGlobalTrack(), CreateGlobalTrack(), CreateMvdStsTrack(), FitTrajectory(), CbmBbaAlignmentTask::Init(), CbmKfFitTracksTask::Init(), and CbmRecoQaTask::Init().
|
inline |
set information about the track for debug output
Definition at line 143 of file CbmKfTrackFitter.h.
References fDebugInfo.
|
inline |
set the default inverse momentum for the Multiple Scattering calculation
Definition at line 120 of file CbmKfTrackFitter.h.
References fDefaultQpForMs.
|
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().
|
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().
void CbmKfTrackFitter::SetElectronFlag | ( | bool | isElectron | ) |
set electron flag (bremmstrallung will be applied)
Definition at line 108 of file CbmKfTrackFitter.cxx.
References fIsElectron.
void CbmKfTrackFitter::SetMassHypothesis | ( | double | mass | ) |
|
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().
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.
|
inline |
skip unmeasured coordinates
Definition at line 114 of file CbmKfTrackFitter.h.
References fSkipUnmeasuredCoordinates.
Referenced by CbmBbaAlignmentTask::Init(), and CbmRecoQaTask::Init().
|
inline |
|
private |
Definition at line 809 of file CbmKfTrackFitter.cxx.
References cbm::algo::kf::TrackParamBase< T >::CovMatrix(), cbm::algo::kf::TrackParamBase< T >::GetChiSq(), cbm::algo::kf::TrackParamBase< T >::GetChiSqTime(), cbm::algo::kf::TrackParamBase< T >::GetCovMatrix(), cbm::algo::kf::TrackParamBase< T >::GetNdf(), cbm::algo::kf::TrackParamBase< T >::GetNdfTime(), cbm::algo::kf::TrackParamBase< T >::Qp(), 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::utils::math::SymInv(), cbm::algo::kf::TrackParamBase< T >::Time(), cbm::algo::kf::TrackParamBase< T >::Tx(), cbm::algo::kf::TrackParamBase< T >::Ty(), cbm::algo::kf::TrackParamBase< T >::Vi(), cbm::algo::kf::TrackParamBase< T >::X(), and cbm::algo::kf::TrackParamBase< T >::Y().
Referenced by FitTrajectory().
|
private |
Definition at line 191 of file CbmKfTrackFitter.h.
Referenced by FitTrajectory(), and SetDebugInfo().
|
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().
|
private |
Definition at line 189 of file CbmKfTrackFitter.h.
Referenced by FitTrajectory(), and SetDoSmooth().
|
private |
Definition at line 178 of file CbmKfTrackFitter.h.
Referenced by AddMaterialEffects(), FilterFirstMeasurement(), and FitTrajectory().
|
private |
Definition at line 168 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 164 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 170 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 162 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 163 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 169 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), CreateMvdStsTrack(), and Init().
|
private |
Definition at line 166 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 172 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 165 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 171 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), and Init().
|
private |
Definition at line 188 of file CbmKfTrackFitter.h.
Referenced by SetElectronFlag(), and SetParticleHypothesis().
|
private |
Definition at line 176 of file CbmKfTrackFitter.h.
Referenced by CreateGlobalTrack(), CreateGlobalTrack(), CreateMvdStsTrack(), and Init().
|
private |
Definition at line 185 of file CbmKfTrackFitter.h.
Referenced by AddMaterialEffects(), and FixMomentumForMs().
|
private |
Definition at line 159 of file CbmKfTrackFitter.h.
Referenced by AddMaterialEffects(), CreateGlobalTrack(), and Init().
|
private |
Definition at line 187 of file CbmKfTrackFitter.h.
Referenced by FitTrajectory(), SetMassHypothesis(), and SetParticleHypothesis().
|
private |
Definition at line 177 of file CbmKfTrackFitter.h.
Referenced by FilterFirstMeasurement(), FitTrajectory(), and SetSkipUnmeasuredCoordinates().
|
private |
Definition at line 190 of file CbmKfTrackFitter.h.
Referenced by FitTrajectory(), and SetVerbosityLevel().