BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMath.cxx File Reference
#include "BmnMath.h"
#include "BmnFieldMap.h"
#include "CbmGlobalTrack.h"
#include "CbmHit.h"
#include "CbmStripHit.h"
#include "FairRunAna.h"
#include "FairTrackParam.h"
#include "Math/BrentRootFinder.h"
#include "Math/WrappedTF1.h"
#include "TArc.h"
#include "TCanvas.h"
#include "TClonesArray.h"
#include "TF1.h"
#include "TFitResult.h"
#include "TGraph.h"
#include "TH2F.h"
#include "TLine.h"
#include "TMath.h"
#include <cmath>
#include <iostream>
Include dependency graph for BmnMath.cxx:

Go to the source code of this file.

Namespaces

namespace  lit

Functions

Float_t lit::ChiSq (const FairTrackParam *par, const BmnHit *hit)
Int_t lit::NDF (const BmnTrack *track)
Bool_t IsParCorrect (const FairTrackParam *par, const Bool_t isField)
Bool_t IsParCorrect (const FairTrackParam *par)
Float_t NumericalRootFinder (TF1 f, Float_t left, Float_t right)
TVector3 LineFit (BmnTrack *track, const TClonesArray *arr, TString type)
TVector3 LineFitBy3Hits (const BmnHit *h0, const BmnHit *h1, const BmnHit *h2)
void LineFit (Double_t &par1, Double_t &par2, BmnTrack *track, TClonesArray *arr, Int_t type, Int_t idSkip)
TVector3 CircleFit (BmnTrack *track, const TClonesArray *arr, Double_t &chi2)
TVector3 CircleFit (vector< BmnHit * > hits, Int_t idSkip)
Double_t CalcTx (const BmnHit *h0, const BmnHit *h1, const BmnHit *h2)
Float_t Dist (Float_t x1, Float_t y1, Float_t x2, Float_t y2)
Float_t NewtonSolver (Float_t A0, Float_t A1, Float_t A2, Float_t A22)
TVector3 CircleBy3Hit (BmnTrack *track, const TClonesArray *arr)
TVector3 Pol2By3Hit (BmnTrack *track, const TClonesArray *arr)
void DrawHits (BmnTrack *track, const TClonesArray *arr)
TVector3 CircleBy3Hit (const BmnHit *h0, const BmnHit *h1, const BmnHit *h2)
void fit_seg (Double_t *z_loc, Double_t *rh_seg, Double_t *rh_sigm_seg, Double_t *par_ab, Int_t skip_first, Int_t skip_second)
void Pol2Fit (BmnTrack *track, const TClonesArray *arr, Double_t &A, Double_t &B, Double_t &C, Int_t idSkip)
TVector3 Pol2Fit (vector< BmnHit * > hits, Int_t idSkip)
TVector2 LineFit (vector< BmnHit * > hits, Int_t idSkip, TString type)
vector< Double_t > dist (vector< Double_t > qp, Double_t mu)
vector< Double_t > W (vector< Double_t > dist, Double_t sig)
Double_t Sigma (vector< Double_t > dist, vector< Double_t > w)
Double_t Mu (vector< Double_t > qp, vector< Double_t > w)
void DrawBar (UInt_t iEv, UInt_t nEv)
void DrawBar (Long64_t iEv, Long64_t nEv)
Double_t GetVZByTwoStraightTracks (BmnTrack *tr0, BmnTrack *tr1, Double_t &dist)
Double_t GetVzByVectorStraightTracks (vector< BmnTrack > tr, Double_t &dist)
void UpdateTrackParam (FairTrackParam *initPar, const FairTrackParam *detPar, Double_t &chiSq)

Function Documentation

◆ CalcTx()

Double_t CalcTx ( const BmnHit * h0,
const BmnHit * h1,
const BmnHit * h2 )

Definition at line 422 of file BmnMath.cxx.

References CircleBy3Hit(), TVector3::X(), and TVector3::Y().

Referenced by BmnBeamTracking::CalculateTrackParams(), BmnCellAutoTracking::CalculateTrackParams(), BmnInnerTrackingRun7::CalculateTrackParams(), and SrcInnerTrackingRun7::CalculateTrackParams().

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

◆ CircleBy3Hit() [1/2]

TVector3 CircleBy3Hit ( BmnTrack * track,
const TClonesArray * arr )

Definition at line 470 of file BmnMath.cxx.

References TObjArray::At(), TMath::C(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), TMath::R(), and TMath::Sqrt().

Referenced by BmnBeamTracking::CalcQp(), BmnCellAutoTracking::CalcQp(), BmnInnerTrackingRun7::CalcQp(), SrcInnerTrackingRun7::CalcQp(), and CalcTx().

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

◆ CircleBy3Hit() [2/2]

TVector3 CircleBy3Hit ( const BmnHit * h0,
const BmnHit * h1,
const BmnHit * h2 )

Definition at line 551 of file BmnMath.cxx.

References TMath::C(), TMath::R(), TMath::Sqrt(), and z0.

Here is the call graph for this function:

◆ CircleFit() [1/2]

TVector3 CircleFit ( BmnTrack * track,
const TClonesArray * arr,
Double_t & chi2 )

Definition at line 312 of file BmnMath.cxx.

References TObjArray::At(), TMath::C(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), i, TMath::R(), TMath::Sq(), and TMath::Sqrt().

Referenced by BmnBeamTracking::CalcCovMatrix(), BmnCellAutoTracking::CalcCovMatrix(), BmnInnerTrackingRun7::CalcCovMatrix(), and SrcInnerTrackingRun7::CalcCovMatrix().

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

◆ CircleFit() [2/2]

TVector3 CircleFit ( vector< BmnHit * > hits,
Int_t idSkip )

Definition at line 369 of file BmnMath.cxx.

References TMath::C(), i, TMath::R(), and TMath::Sqrt().

Here is the call graph for this function:

◆ Dist()

Float_t Dist ( Float_t x1,
Float_t y1,
Float_t x2,
Float_t y2 )

Definition at line 432 of file BmnMath.cxx.

References TMath::Sq(), and TMath::Sqrt().

Referenced by BmnPairFinder::FindV0ByVirtualPlanes(), BmnTwoParticleDecay::FindV0ByVirtualPlanes(), and RadLenAna().

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

◆ dist()

vector< Double_t > dist ( vector< Double_t > qp,
Double_t mu )

Definition at line 869 of file BmnMath.cxx.

References TMath::Abs().

Referenced by BmnCalibrationTOF700(), BmnEfficiencyTOF700(), BmnIdentificationTOF700(), BmnMCEfficiencyTOF700(), BmnXTCalibrationTOF700(), BmnXTIdentificationTOF700(), BmnStsVectorFinderV9::BuildTriplets(), BmnCellAutoTracking::CalcQp(), BmnInnerTrackingRun7::CalcQp(), SrcInnerTrackingRun7::CalcQp(), L1Algo::CAMergeClones(), CbmStsDigitize::CrossSpacer(), BmnLambdaEmbeddingQa::DoInnerTrackerRecoEfficiency(), BmnKFPrimaryVertexFinder::EvalVertex(), CbmStsIdealMatchHits::Exec(), CbmStsMatchHits::Exec(), CbmStsRealMatchHits::Exec(), CbmStsMatchHits::ExecReal(), BmnRecoTools::FillSetStsHits(), BmnGlobalTracking::FindPairsTof(), BmnKFPrimaryVertexFinder::FindPca(), BmnParticle::FindPca(), SrcVertexFinder::FindVertexAnalitically(), SrcVertexFinder::FindVertexByVirtualPlanes(), BmnDchPoint::GetDistance(), BmnMwpcPoint::GetDistance(), GetVZByTwoStraightTracks(), GetVzByVectorStraightTracks(), GiveMeNumber(), nlohmann::detail::dtoa_impl::grisu2_digit_gen(), nlohmann::detail::dtoa_impl::grisu2_round(), CbmKF::Init(), BmnCSCModule::MakeCluster(), BmnGemStripModule::MakeCluster(), BmnSiBTModule::MakeCluster(), BmnSiliconModule::MakeCluster(), BmnSiProfModule::MakeCluster(), BmnVSPModule::MakeCluster(), BmnDchHit::SetDistanceToWire(), Sigma(), and W().

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

◆ DrawBar() [1/2]

void DrawBar ( Long64_t iEv,
Long64_t nEv )

Definition at line 961 of file BmnMath.cxx.

References ANSI_COLOR_BLUE_BG, ANSI_COLOR_RED, ANSI_COLOR_RESET, ANSI_COLOR_YELLOW_BG, and i.

◆ DrawBar() [2/2]

void DrawBar ( UInt_t iEv,
UInt_t nEv )

Definition at line 940 of file BmnMath.cxx.

References ANSI_COLOR_BLUE_BG, ANSI_COLOR_RED, ANSI_COLOR_RESET, ANSI_COLOR_YELLOW_BG, and i.

Referenced by BmnEmbedding::CloneSelected(), BmnEmbedding::Embed(), EmbEffView(), BmnProfAsic2Raw::ProcessDigits(), rescaleAmplitude(), rescaleAmplitudeCSC(), rescaleAmplitudeGem(), rescaleAmplitudeSi(), and BmnZdcBScanner::Scan().

Here is the caller graph for this function:

◆ DrawHits()

void DrawHits ( BmnTrack * track,
const TClonesArray * arr )

Definition at line 532 of file BmnMath.cxx.

References TObjArray::At(), TGraph::Draw(), TGraph::Fit(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), i, TCanvas::Update(), x, and z.

Here is the call graph for this function:

◆ fit_seg()

void fit_seg ( Double_t * z_loc,
Double_t * rh_seg,
Double_t * rh_sigm_seg,
Double_t * par_ab,
Int_t skip_first,
Int_t skip_second )

Definition at line 589 of file BmnMath.cxx.

References TMath::Abs(), f, i, sqrt_2, and z_loc.

Referenced by BmnDchTrackFinder::FillPlaneResiduals(), and BmnDchTrackFinder::FitDchSegments().

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

◆ GetVZByTwoStraightTracks()

Double_t GetVZByTwoStraightTracks ( BmnTrack * tr0,
BmnTrack * tr1,
Double_t & dist )

Definition at line 979 of file BmnMath.cxx.

References dist(), BmnTrack::GetParamFirst(), TMath::Sq(), and TMath::Sqrt().

Here is the call graph for this function:

◆ GetVzByVectorStraightTracks()

Double_t GetVzByVectorStraightTracks ( vector< BmnTrack > tr,
Double_t & dist )

Definition at line 999 of file BmnMath.cxx.

References dist(), i, TMath::Sq(), and TMath::Sqrt().

Referenced by SrcVertexFinder::FindVertexAnalitically().

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

◆ IsParCorrect() [1/2]

Bool_t IsParCorrect ( const FairTrackParam * par)

Definition at line 64 of file BmnMath.cxx.

References BmnFieldMap::IsFieldOff(), and TMath::IsNaN().

Here is the call graph for this function:

◆ IsParCorrect() [2/2]

Bool_t IsParCorrect ( const FairTrackParam * par,
const Bool_t isField )

Definition at line 59 of file BmnMath.cxx.

References IsParCorrect().

Referenced by BmnCellAutoTracking::CellsConnection(), BmnTwoParticleDecay::FindFirstPointOnMCTrack(), IsParCorrect(), BmnKalmanFilter::TGeoTrackPropagate(), BmnCellAutoTracking::TrackSelection(), BmnInnerTrackingRun7::TrackSelection(), and SrcInnerTrackingRun7::TrackSelection().

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

◆ LineFit() [1/3]

◆ LineFit() [2/3]

void LineFit ( Double_t & par1,
Double_t & par2,
BmnTrack * track,
TClonesArray * arr,
Int_t type,
Int_t idSkip )

Definition at line 245 of file BmnMath.cxx.

References TObjArray::At(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), and i.

Here is the call graph for this function:

◆ LineFit() [3/3]

TVector2 LineFit ( vector< BmnHit * > hits,
Int_t idSkip,
TString type )

Definition at line 818 of file BmnMath.cxx.

References i.

◆ LineFitBy3Hits()

TVector3 LineFitBy3Hits ( const BmnHit * h0,
const BmnHit * h1,
const BmnHit * h2 )

Definition at line 209 of file BmnMath.cxx.

References TMath::Sq().

Here is the call graph for this function:

◆ Mu()

Double_t Mu ( vector< Double_t > qp,
vector< Double_t > w )

Definition at line 906 of file BmnMath.cxx.

Referenced by BmnCellAutoTracking::CalcQp(), BmnInnerTrackingRun7::CalcQp(), and SrcInnerTrackingRun7::CalcQp().

Here is the caller graph for this function:

◆ NewtonSolver()

Float_t NewtonSolver ( Float_t A0,
Float_t A1,
Float_t A2,
Float_t A22 )

Definition at line 441 of file BmnMath.cxx.

References TMath::Abs(), and fabs().

Here is the call graph for this function:

◆ NumericalRootFinder()

Float_t NumericalRootFinder ( TF1 f,
Float_t left,
Float_t right )

Definition at line 96 of file BmnMath.cxx.

References f, ROOT::Math::BrentRootFinder::Root(), ROOT::Math::BrentRootFinder::SetFunction(), and ROOT::Math::BrentRootFinder::Solve().

Here is the call graph for this function:

◆ Pol2By3Hit()

TVector3 Pol2By3Hit ( BmnTrack * track,
const TClonesArray * arr )

Definition at line 505 of file BmnMath.cxx.

References TObjArray::At(), TMath::C(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), and z0.

Here is the call graph for this function:

◆ Pol2Fit() [1/2]

void Pol2Fit ( BmnTrack * track,
const TClonesArray * arr,
Double_t & A,
Double_t & B,
Double_t & C,
Int_t idSkip )

Definition at line 781 of file BmnMath.cxx.

References TObjArray::At(), TMath::C(), TGraph::Fit(), BmnTrack::GetHitIndex(), BmnTrack::GetNHits(), i, ROOT::Fit::FitResult::Parameter(), and TGraph::SetPoint().

Referenced by BmnGemResiduals::ResidualsAndDistances().

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

◆ Pol2Fit() [2/2]

TVector3 Pol2Fit ( vector< BmnHit * > hits,
Int_t idSkip )

Definition at line 799 of file BmnMath.cxx.

References TMath::C(), TGraph::Fit(), i, ROOT::Fit::FitResult::Parameter(), and TGraph::SetPoint().

Here is the call graph for this function:

◆ Sigma()

Double_t Sigma ( vector< Double_t > dist,
vector< Double_t > w )

Definition at line 890 of file BmnMath.cxx.

References dist(), and TMath::Sqrt().

Referenced by FitHistogrammInFirstMaxPeak().

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

◆ UpdateTrackParam()

void UpdateTrackParam ( FairTrackParam * initPar,
const FairTrackParam * detPar,
Double_t & chiSq )

Definition at line 1048 of file BmnMath.cxx.

References TMatrixTSym< class Element >::Invert(), and TMatrixT< class Element >::Transpose().

Here is the call graph for this function:

◆ W()

vector< Double_t > W ( vector< Double_t > dist,
Double_t sig )

Definition at line 878 of file BmnMath.cxx.

References TMath::C(), dist(), and TMath::Power().

Referenced by BmnCellAutoTracking::CalcQp(), BmnInnerTrackingRun7::CalcQp(), SrcInnerTrackingRun7::CalcQp(), L1Algo::CleanTriplets(), BmnTof2Raw2DigitNew::fillEqualization(), BmnTof2Raw2DigitNew::fillEvent(), BmnTof2Raw2DigitNew::fillPreparation(), BmnTof2Raw2DigitNew::fillSlewing(), BmnTof2Raw2DigitNew::fillSlewingT0(), CbmKFPixelMeasurement::Filter(), CbmKFUMeasurement::Filter(), L1Algo::FilterTracks(), CbmL1::Init(), and BmnGemStripMLPModel::PredictSplit().

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