BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMotherFitterPart Class Reference

Kalman filter mother particle fitter for the BM@N detector. More...

#include <BmnMotherFitterPart.h>

Inheritance diagram for BmnMotherFitterPart:
Collaboration diagram for BmnMotherFitterPart:

Public Member Functions

virtual void Exec (Option_t *option)
void Reset ()
void Register ()
Double_t BuildMother (BmnParticle *mother, vector< BmnParticle * > &vDaught)
Double_t FindVertex (vector< BmnParticle * > vDaught, TVector3 &vtx)
Bool_t ComputeAandB (const TMatrixD &xk0, const BmnParticle &part, TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag=kTRUE)
Double_t FieldConst () const
TMatrixD ComputeQmatr (vector< BmnParticle * > vDaught)
TMatrixD & GetCovariance ()
Double_t Chi2Vertex (BmnParticle *part, const CbmVertex *vtx)
 compute Chi2 w.r.t. vertex
virtual void Exec (Option_t *option)
void Reset ()
void Register ()
Double_t BuildMother (BmnParticle *mother, vector< BmnParticle * > &vDaught)
Double_t FindVertex (vector< BmnParticle * > vDaught, TVector3 &vtx)
Bool_t ComputeAandB (const TMatrixD &xk0, const BmnParticle &part, TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag=kTRUE)
Double_t FieldConst () const
TMatrixD ComputeQmatr (vector< BmnParticle * > vDaught)
TMatrixD & GetCovariance ()
Double_t Chi2Vertex (BmnParticle *part, const CbmVertex *vtx)
 compute Chi2 w.r.t. vertex

Static Public Member Functions

static BmnMotherFitterPart * Instance ()
 get singleton instance
static BmnMotherFitterPart * Instance (const char *name, const char *title="FAIR Task")
 get singleton instance
static BmnMotherFitterPart * Instance ()
 get singleton instance
static BmnMotherFitterPart * Instance (const char *name, const char *title="FAIR Task")
 get singleton instance

Protected Member Functions

virtual InitStatus Init ()
virtual InitStatus ReInit ()
virtual void Finish ()
virtual ~BmnMotherFitterPart ()
 Destructor.
virtual InitStatus Init ()
virtual InitStatus ReInit ()
virtual void Finish ()
virtual ~BmnMotherFitterPart ()
 Destructor.

Private Member Functions

 BmnMotherFitterPart ()
 Default ctor.
 BmnMotherFitterPart (const char *name, const char *title="FAIR Task")
 Ctor.
Bool_t EvalVertex (vector< BmnParticle * > vDaught)
Bool_t Smooth (vector< BmnParticle * > vDaught)
Bool_t ComputeAB0 (const TMatrixD &xk0, const BmnParticle &part, TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag)
TVector3 Parabola (TVector3 &pos0, TVector3 &pos1, TVector3 &pos2)
 BmnMotherFitterPart ()
 Default ctor.
 BmnMotherFitterPart (const char *name, const char *title="FAIR Task")
 Ctor.
Bool_t EvalVertex (vector< BmnParticle * > vDaught)
Bool_t Smooth (vector< BmnParticle * > vDaught)
Bool_t ComputeAB0 (const TMatrixD &xk0, const BmnParticle &part, TMatrixD &a, TMatrixD &b, TMatrixD &ck0, Bool_t flag)
TVector3 Parabola (TVector3 &pos0, TVector3 &pos1, TVector3 &pos2)

Static Private Member Functions

static void DestroyInstance ()
static void DestroyInstance ()

Private Attributes

Double_t fieldConst
 mag. field constant
Double_t fVtx [3]
 decay vertex position
TMatrixD fCovar
 covariance matrix
TH1D * fTestHist
 histogram for testing
CbmKF * fKF

Static Private Attributes

static BmnMotherFitterPart * fgMF = 0x0

Detailed Description

Kalman filter mother particle fitter for the BM@N detector (using BmnParticle).

(using BmnParticle)

Author
Alexander Zinchenko, LHEP JINR Dubna
Alexander Zinchenko (LHEP, JINR, Dubna) 03-07-2025

Definition at line 27 of file BmnMotherFitterPart.h.

Constructor & Destructor Documentation

◆ ~BmnMotherFitterPart() [1/2]

BmnMotherFitterPart::~BmnMotherFitterPart ( )
protectedvirtual

Destructor

Definition at line 85 of file BmnMotherFitterPart.cxx.

◆ BmnMotherFitterPart() [1/4]

BmnMotherFitterPart::BmnMotherFitterPart ( )
private

Default constructor

Definition at line 35 of file BmnMotherFitterPart.cxx.

References fCovar, fKF, and CbmKF::Instance().

Referenced by Instance(), Instance(), and Parabola().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BmnMotherFitterPart() [2/4]

BmnMotherFitterPart::BmnMotherFitterPart ( const char * name,
const char * title = "FAIR Task" )
private

Constructor

Definition at line 46 of file BmnMotherFitterPart.cxx.

References fCovar, fgMF, fKF, and CbmKF::Instance().

Here is the call graph for this function:

◆ ~BmnMotherFitterPart() [2/2]

virtual BmnMotherFitterPart::~BmnMotherFitterPart ( )
protectedvirtual

◆ BmnMotherFitterPart() [3/4]

BmnMotherFitterPart::BmnMotherFitterPart ( )
private

◆ BmnMotherFitterPart() [4/4]

BmnMotherFitterPart::BmnMotherFitterPart ( const char * name,
const char * title = "FAIR Task" )
private

Member Function Documentation

◆ BuildMother() [1/2]

Double_t BmnMotherFitterPart::BuildMother ( BmnParticle * mother,
vector< BmnParticle * > & vDaught )

Build mother particle from daughters which were smoothed according to the decay vertex constraint (after FindVertex)

Definition at line 150 of file BmnMotherFitterPart.cxx.

References BmnParticle::AddDaughter(), ComputeAandB(), ComputeQmatr(), BmnParticle::FillJ(), BmnParticle::FillJinv(), FindVertex(), BmnParticle::GetA(), BmnParticle::GetB(), BmnParticle::GetCharge(), GetCovariance(), BmnParticle::GetE(), BmnParticle::GetIndx(), BmnParticle::GetJ(), BmnParticle::GetJinv(), BmnParticle::GetMass(), BmnParticle::GetNDF(), BmnParticle::Getx(), i, Instance(), TMatrixT< class Element >::Invert(), TMatrixT< Double_t >::kMult, TMatrixT< Double_t >::kTransposed, TMatrixT< Double_t >::kTransposeMult, TVector3::Mag(), BmnParticle::Momentum3(), BmnParticle::ParamsAtDca(), BmnParticle::SetCharge(), BmnParticle::SetChi2(), BmnParticle::SetG(), BmnParticle::SetMass(), BmnParticle::SetNDF(), BmnParticle::Setq(), BmnParticle::Setx(), BmnParticle::SetZ(), TMath::Sqrt(), TVector3::X(), TVector3::Y(), and TVector3::Z().

Referenced by BmnParticle::BuildMother().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildMother() [2/2]

Double_t BmnMotherFitterPart::BuildMother ( BmnParticle * mother,
vector< BmnParticle * > & vDaught )

◆ Chi2Vertex() [1/2]

Double_t BmnMotherFitterPart::Chi2Vertex ( BmnParticle * part,
const CbmVertex * vtx )

Compute Chi2 w.r.t. vertex

Definition at line 1025 of file BmnMotherFitterPart.cxx.

References ComputeAandB(), CbmVertex::CovMatrix(), BmnParticle::GetG(), BmnParticle::GetMeas(), CbmVertex::GetX(), CbmVertex::GetY(), CbmVertex::GetZ(), TMatrixT< class Element >::Invert(), TMatrixTSym< class Element >::Invert(), TMatrixT< Double_t >::kMult, TMatrixT< Double_t >::kTransposeMult, m, and TMatrixTSym< class Element >::SetMatrixArray().

Referenced by BmnParticle::Chi2Vertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Chi2Vertex() [2/2]

Double_t BmnMotherFitterPart::Chi2Vertex ( BmnParticle * part,
const CbmVertex * vtx )

◆ ComputeAandB() [1/2]

Bool_t BmnMotherFitterPart::ComputeAandB ( const TMatrixD & xk0,
const BmnParticle & part,
TMatrixD & a,
TMatrixD & b,
TMatrixD & ck0,
Bool_t flag = kTRUE )

Compute matrices of derivatives w.r.t. vertex coordinates and particle momentum

Definition at line 695 of file BmnMotherFitterPart.cxx.

References TMath::Abs(), ComputeAB0(), CbmKFTrackInterface::Extrapolate(), BmnParticle::GetCharge(), CbmKFTrack::GetCovMatrix(), BmnParticle::GetKFTrack(), TMatrixT< class Element >::GetMatrixArray(), CbmKFTrack::GetTrack(), BmnParticle::GetZ0(), i, CbmKFMath::indexS(), TMatrixT< Double_t >::kMult, CbmKFTrackInterface::Propagate(), TMath::Sign(), and TMath::Sqrt().

Referenced by BuildMother(), Chi2Vertex(), FindVertex(), and Smooth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeAandB() [2/2]

Bool_t BmnMotherFitterPart::ComputeAandB ( const TMatrixD & xk0,
const BmnParticle & part,
TMatrixD & a,
TMatrixD & b,
TMatrixD & ck0,
Bool_t flag = kTRUE )

◆ ComputeAB0() [1/2]

Bool_t BmnMotherFitterPart::ComputeAB0 ( const TMatrixD & xk0,
const BmnParticle & part,
TMatrixD & a,
TMatrixD & b,
TMatrixD & ck0,
Bool_t flag )
private

Compute matrices of derivatives w.r.t. vertex coordinates and particle momentum (for neutrals)

Definition at line 812 of file BmnMotherFitterPart.cxx.

References TMath::Abs(), CbmKFTrackInterface::Extrapolate(), BmnParticle::GetKFTrack(), TMatrixT< class Element >::GetMatrixArray(), BmnParticle::GetMeas(), CbmKFTrack::GetTrack(), BmnParticle::GetZ0(), i, TMatrixT< Double_t >::kMult, TMath::Max(), CbmKFTrackInterface::Propagate(), and TMath::Sign().

Referenced by ComputeAandB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeAB0() [2/2]

Bool_t BmnMotherFitterPart::ComputeAB0 ( const TMatrixD & xk0,
const BmnParticle & part,
TMatrixD & a,
TMatrixD & b,
TMatrixD & ck0,
Bool_t flag )
private

◆ ComputeQmatr() [1/2]

TMatrixD BmnMotherFitterPart::ComputeQmatr ( vector< BmnParticle * > vDaught)

Compute matrix Q = covariance cov(qk,qj) Qkj = Wk*Bkt*Gk*Ak*C*Ajt*Gj*Bj*Wj = Wk*Bkt*Gk*Ak*(-E), k!=j Qii = D

Definition at line 946 of file BmnMotherFitterPart.cxx.

References BmnParticle::GetA(), BmnParticle::GetB(), BmnParticle::GetCharge(), BmnParticle::GetD(), BmnParticle::GetE(), BmnParticle::GetG(), BmnParticle::GetJ(), BmnParticle::GetW(), i, TMatrixT< Double_t >::kMult, TMatrixT< Double_t >::kTransposed, and TMatrixT< Double_t >::kTransposeMult.

Referenced by BuildMother().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeQmatr() [2/2]

TMatrixD BmnMotherFitterPart::ComputeQmatr ( vector< BmnParticle * > vDaught)

◆ DestroyInstance() [1/2]

void BmnMotherFitterPart::DestroyInstance ( )
inlinestaticprivate

Definition at line 68 of file BmnMotherFitterPart.h.

References fgMF.

Referenced by Instance(), and Instance().

Here is the caller graph for this function:

◆ DestroyInstance() [2/2]

void BmnMotherFitterPart::DestroyInstance ( )
inlinestaticprivate

Definition at line 68 of file BmnMotherFitterPart.h.

References fgMF.

◆ EvalVertex() [1/2]

Bool_t BmnMotherFitterPart::EvalVertex ( vector< BmnParticle * > vDaught)
private

Evaluate decay vertex as average value of PCAs of particle pair combinations. Distances between particles vs Z are approximated by parabolas.

Definition at line 340 of file BmnMotherFitterPart.cxx.

References TMath::Abs(), fTestHist, fVtx, BmnParticle::GetKFTrack(), CbmKFTrack::GetTrack(), CbmKFTrack::GetTrackParam(), BmnParticle::GetXY(), TMath::Max(), TMath::Min(), TPad::Modified(), CbmKFTrackInterface::Propagate(), TCanvas::Update(), and z.

Referenced by FindVertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EvalVertex() [2/2]

Bool_t BmnMotherFitterPart::EvalVertex ( vector< BmnParticle * > vDaught)
private

◆ Exec() [1/2]

void BmnMotherFitterPart::Exec ( Option_t * option)
virtual

Definition at line 143 of file BmnMotherFitterPart.cxx.

◆ Exec() [2/2]

virtual void BmnMotherFitterPart::Exec ( Option_t * option)
virtual

◆ FieldConst() [1/2]

Double_t BmnMotherFitterPart::FieldConst ( ) const
inline

Definition at line 54 of file BmnMotherFitterPart.h.

References fieldConst.

◆ FieldConst() [2/2]

Double_t BmnMotherFitterPart::FieldConst ( ) const
inline

Definition at line 54 of file BmnMotherFitterPart.h.

References fieldConst.

◆ FindVertex() [1/2]

Double_t BmnMotherFitterPart::FindVertex ( vector< BmnParticle * > vDaught,
TVector3 & vtx )

Kalman filter based secondary vertex fitter

Definition at line 454 of file BmnMotherFitterPart.cxx.

References ComputeAandB(), EvalVertex(), fCovar, fVtx, BmnParticle::GetG(), BmnParticle::GetMeas(), i, TMatrixT< class Element >::Invert(), TMatrixT< Double_t >::kInverted, TMatrixT< Double_t >::kMult, TMatrixT< Double_t >::kTransposeMult, m, and Smooth().

Referenced by BuildMother().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindVertex() [2/2]

Double_t BmnMotherFitterPart::FindVertex ( vector< BmnParticle * > vDaught,
TVector3 & vtx )

◆ Finish() [1/2]

void BmnMotherFitterPart::Finish ( )
protectedvirtual

Definition at line 137 of file BmnMotherFitterPart.cxx.

◆ Finish() [2/2]

virtual void BmnMotherFitterPart::Finish ( )
protectedvirtual

◆ GetCovariance() [1/2]

TMatrixD & BmnMotherFitterPart::GetCovariance ( )
inline

Definition at line 56 of file BmnMotherFitterPart.h.

References fCovar.

Referenced by BuildMother().

Here is the caller graph for this function:

◆ GetCovariance() [2/2]

TMatrixD & BmnMotherFitterPart::GetCovariance ( )
inline

Definition at line 56 of file BmnMotherFitterPart.h.

References fCovar.

◆ Init() [1/2]

InitStatus BmnMotherFitterPart::Init ( )
protectedvirtual

Definition at line 93 of file BmnMotherFitterPart.cxx.

References TMath::Abs(), fieldConst, and fTestHist.

Here is the call graph for this function:

◆ Init() [2/2]

virtual InitStatus BmnMotherFitterPart::Init ( )
protectedvirtual

◆ Instance() [1/4]

BmnMotherFitterPart * BmnMotherFitterPart::Instance ( )
static

Get pointer to the mother fitter singleton object

Definition at line 59 of file BmnMotherFitterPart.cxx.

References BmnMotherFitterPart(), DestroyInstance(), and fgMF.

Referenced by BuildMother(), BmnParticle::BuildMother(), and BmnParticle::Chi2Vertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Instance() [2/4]

BmnMotherFitterPart * BmnMotherFitterPart::Instance ( )
static

References BmnMotherFitterPart().

Here is the call graph for this function:

◆ Instance() [3/4]

BmnMotherFitterPart * BmnMotherFitterPart::Instance ( const char * name,
const char * title = "FAIR Task" )
static

Get pointer to the mother fitter singleton object

Definition at line 72 of file BmnMotherFitterPart.cxx.

References BmnMotherFitterPart(), DestroyInstance(), and fgMF.

Here is the call graph for this function:

◆ Instance() [4/4]

BmnMotherFitterPart * BmnMotherFitterPart::Instance ( const char * name,
const char * title = "FAIR Task" )
static

References BmnMotherFitterPart().

Here is the call graph for this function:

◆ Parabola() [1/2]

TVector3 BmnMotherFitterPart::Parabola ( TVector3 & pos0,
TVector3 & pos1,
TVector3 & pos2 )
private

Definition at line 1099 of file BmnMotherFitterPart.cxx.

References x, and y.

◆ Parabola() [2/2]

TVector3 BmnMotherFitterPart::Parabola ( TVector3 & pos0,
TVector3 & pos1,
TVector3 & pos2 )
private

References BmnMotherFitterPart(), fCovar, fgMF, fieldConst, fKF, fTestHist, and fVtx.

Here is the call graph for this function:

◆ Register() [1/2]

void BmnMotherFitterPart::Register ( )

Definition at line 129 of file BmnMotherFitterPart.cxx.

◆ Register() [2/2]

void BmnMotherFitterPart::Register ( )

◆ ReInit() [1/2]

InitStatus BmnMotherFitterPart::ReInit ( )
protectedvirtual

Definition at line 115 of file BmnMotherFitterPart.cxx.

◆ ReInit() [2/2]

virtual InitStatus BmnMotherFitterPart::ReInit ( )
protectedvirtual

◆ Reset() [1/2]

void BmnMotherFitterPart::Reset ( )

Definition at line 122 of file BmnMotherFitterPart.cxx.

◆ Reset() [2/2]

void BmnMotherFitterPart::Reset ( )

◆ Smooth() [1/2]

Bool_t BmnMotherFitterPart::Smooth ( vector< BmnParticle * > vDaught)
private

Smooth particle momentum and corresponding covariance matrices

Definition at line 609 of file BmnMotherFitterPart.cxx.

References ComputeAandB(), d, fCovar, fVtx, BmnParticle::GetG(), BmnParticle::GetMeas(), TMatrixT< class Element >::Invert(), TMatrixT< Double_t >::kMult, TMatrixT< Double_t >::kTransposeMult, m, BmnParticle::SetA(), BmnParticle::SetB(), BmnParticle::SetC(), BmnParticle::SetCovD(), BmnParticle::SetCovE(), BmnParticle::Setq(), BmnParticle::SetW(), and BmnParticle::Setx().

Referenced by FindVertex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Smooth() [2/2]

Bool_t BmnMotherFitterPart::Smooth ( vector< BmnParticle * > vDaught)
private

Member Data Documentation

◆ fCovar

TMatrixD BmnMotherFitterPart::fCovar
private

◆ fgMF

BmnMotherFitterPart * BmnMotherFitterPart::fgMF = 0x0
staticprivate

◆ fieldConst

Double_t BmnMotherFitterPart::fieldConst
private

Definition at line 85 of file BmnMotherFitterPart.h.

Referenced by FieldConst(), Init(), and Parabola().

◆ fKF

CbmKF * BmnMotherFitterPart::fKF
private

Definition at line 91 of file BmnMotherFitterPart.h.

Referenced by BmnMotherFitterPart(), BmnMotherFitterPart(), and Parabola().

◆ fTestHist

TH1D * BmnMotherFitterPart::fTestHist
private

Definition at line 88 of file BmnMotherFitterPart.h.

Referenced by EvalVertex(), Init(), and Parabola().

◆ fVtx

Double_t BmnMotherFitterPart::fVtx
private

Definition at line 86 of file BmnMotherFitterPart.h.

Referenced by EvalVertex(), FindVertex(), Parabola(), and Smooth().


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