BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnAligner< HitType > Class Template Reference

#include <BmnAligner.h>

Inheritance diagram for BmnAligner< HitType >:
Collaboration diagram for BmnAligner< HitType >:

Public Member Functions

 BmnAligner (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *constraintsPath=nullptr, Int_t nThreads=1)
 BmnAligner (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *filesListPath, const char *constraintsPath=nullptr, Int_t nThreads=1)
virtual ~BmnAligner ()
Bool_t Align (Bool_t fixEvery=kFALSE)
virtual Bool_t PrepareData (const char *tracksPath=nullptr)
Bool_t SaveSolution (const char *jsonPath, Bool_t withAlpha=kFALSE)
Bool_t LoadSolution (const char *jsonPath, Bool_t withAlpha=kTRUE, Bool_t withMSE=kTRUE)
virtual void Draw ()
Bool_t Initialized () const noexcept
Int_t TotalTracks () const noexcept
Int_t TotalHits () const noexcept
Double_t OmegaScaleFactor () const noexcept
BmnAlignResult * GetCurrentResult () const noexcept
BmnAlignResult * GetResult (Bool_t last=kTRUE) const noexcept
 BmnAligner (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *constraintsPath=nullptr, Int_t nThreads=1)
 BmnAligner (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *filesListPath, const char *constraintsPath=nullptr, Int_t nThreads=1)
virtual ~BmnAligner ()
Bool_t Align (Bool_t fixEvery=kFALSE)
virtual Bool_t PrepareData (const char *tracksPath=nullptr)
Bool_t SaveSolution (const char *jsonPath, Bool_t withAlpha=kFALSE)
Bool_t LoadSolution (const char *jsonPath, Bool_t withAlpha=kTRUE, Bool_t withMSE=kTRUE)
virtual void Draw ()
Bool_t Initialized () const noexcept
Int_t TotalTracks () const noexcept
Int_t TotalHits () const noexcept
Double_t OmegaScaleFactor () const noexcept
BmnAlignResult * GetCurrentResult () const noexcept
BmnAlignResult * GetResult (Bool_t last=kTRUE) const noexcept

Protected Types

typedef std::array< Bool_t, BMN_MODULE_COUNT > DetectorFlags_t
typedef std::array< Int_t, BMN_MODULE_COUNT > DetectorHitCount_t
typedef ROOT::Math::BrentMinimizer1D Minimizer1D_t
typedef std::array< Bool_t, BMN_MODULE_COUNT > DetectorFlags_t
typedef std::array< Int_t, BMN_MODULE_COUNT > DetectorHitCount_t
typedef ROOT::Math::BrentMinimizer1D Minimizer1D_t

Protected Member Functions

virtual Bool_t IterateAlignment ()
Double_t CalculateMSE (const SVectGLT &solution)
virtual Double_t CalculateMSE (Bool_t withResiduals)
Bool_t SolveGlobal (const TMatrixD &mCL, const TVectorD &vBL)
virtual void ReportResults () const
Bool_t LoadConstraints ()
void InitIterators ()
void PrepareDrawing ()
void DrawResiduals ()
void AddBlankSolution ()
void StoreZeroSolution (const std::vector< SVectLC > &AlphaZero)
void MarkTime (TStopwatch &timer)
void DoneInTime (TStopwatch &timer, const char *stage)
Int_t GetThreadCount () const noexcept
BmnSimpleProgressBar & GetProgressBar () noexcept
virtual Bool_t IterateAlignment ()
Double_t CalculateMSE (const SVectGLT &solution)
virtual Double_t CalculateMSE (Bool_t withResiduals)
Bool_t SolveGlobal (const TMatrixD &mCL, const TVectorD &vBL)
virtual void ReportResults () const
Bool_t LoadConstraints ()
void InitIterators ()
void PrepareDrawing ()
void DrawResiduals ()
void AddBlankSolution ()
void StoreZeroSolution (const std::vector< SVectLC > &AlphaZero)
void MarkTime (TStopwatch &timer)
void DoneInTime (TStopwatch &timer, const char *stage)
Int_t GetThreadCount () const noexcept
BmnSimpleProgressBar & GetProgressBar () noexcept

Protected Attributes

BmnSimpleProgressBar fProgressBar
Bool_t fInitialized {kFALSE}
Bool_t fMSEclcSlow {kFALSE}
UInt_t fMSEclcCounter {0u}
UInt_t fMSEclcTick {1u}
Double_t fTotalCpuTime {0.0}
Double_t fTotalRealTime {0.0}
Double_t fOmegaScaleFactor {1.0}
Int_t fIteration {-1}
Int_t fRegularIters {0}
Int_t fActiveDetCount {BMN_MODULE_COUNT}
DetectorFlags_t fDetectorActive
std::vector< Bool_t > * fpTrackUsable {nullptr}
Int_t fTracksUsableCnt {0}
Int_t fTotalTracks {0}
Int_t fTotalHits {0}
DetectorHitCount_t fHitsPerDetector {}
Minimizer1D_t fBrent
const BmnMeasureModel * fpMeasureModel
const BmnDetectorModel * fpDetModel
const char * fpConstraintsPath
std::vector< TVectorD > fConstraints {}
Int_t fConstraintsCnt {0}
BmnRootIterator * fpRootIterator {nullptr}
BmnRamIterator< HitType > * fpRamIterator {nullptr}
BmnDataIterator * fpIteratorMain {nullptr}
HitType * fpHits {nullptr}
Byte_t * fpHitsData {nullptr}
Int_t * fpFirstHits {nullptr}
BmnAlignResult * fpResultLast {nullptr}
BmnAlignResult * fpResultCurrent {nullptr}
std::deque< BmnAlignResult > fIterationResults
TPad * fpPad3D {nullptr}
TPad * fpPadG1 {nullptr}
TPad * fpPadG2 {nullptr}
TPad * fpPadG3 {nullptr}
TPad * fpPadG4 {nullptr}
Double_t fMaxZvalue {0.0}

Private Member Functions

void ProcessTracks (TVectorD *pvB_dash, TMatrixD *pmC_dash, Int_t threadNum)
void CalculateMSEpart (Bool_t withResiduals, Int_t threadNum)
void ProcessTracks (TVectorD *pvB_dash, TMatrixD *pmC_dash, Int_t threadNum)
void CalculateMSEpart (Bool_t withResiduals, Int_t threadNum)

Private Attributes

std::vector< BmnDataIterator * > fpIterators
std::vector< Int_t > fFirstTracksIdx
std::mutex fMutexGlobal
Int_t fThreadsCnt {1}

Detailed Description

template<typename HitType = BmnHitRecord>
class BmnAligner< HitType >

Definition at line 36 of file BmnAligner.h.

Member Typedef Documentation

◆ DetectorFlags_t [1/2]

template<typename HitType = BmnHitRecord>
typedef std::array<Bool_t, BMN_MODULE_COUNT> BmnAligner< HitType >::DetectorFlags_t
protected

Definition at line 91 of file BmnAligner.h.

◆ DetectorFlags_t [2/2]

template<typename HitType = BmnHitRecord>
typedef std::array<Bool_t, BMN_MODULE_COUNT> BmnAligner< HitType >::DetectorFlags_t
protected

Definition at line 91 of file BmnAligner.h.

◆ DetectorHitCount_t [1/2]

template<typename HitType = BmnHitRecord>
typedef std::array<Int_t, BMN_MODULE_COUNT> BmnAligner< HitType >::DetectorHitCount_t
protected

Definition at line 92 of file BmnAligner.h.

◆ DetectorHitCount_t [2/2]

template<typename HitType = BmnHitRecord>
typedef std::array<Int_t, BMN_MODULE_COUNT> BmnAligner< HitType >::DetectorHitCount_t
protected

Definition at line 92 of file BmnAligner.h.

◆ Minimizer1D_t [1/2]

template<typename HitType = BmnHitRecord>
typedef ROOT::Math::BrentMinimizer1D BmnAligner< HitType >::Minimizer1D_t
protected

Definition at line 93 of file BmnAligner.h.

◆ Minimizer1D_t [2/2]

template<typename HitType = BmnHitRecord>
typedef ROOT::Math::BrentMinimizer1D BmnAligner< HitType >::Minimizer1D_t
protected

Definition at line 93 of file BmnAligner.h.

Constructor & Destructor Documentation

◆ BmnAligner() [1/4]

template<typename HitType>
BmnAligner< HitType >::BmnAligner ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * constraintsPath = nullptr,
Int_t nThreads = 1 )
inline

Definition at line 163 of file BmnAligner.h.

References TH1::AddDirectory(), BMN_BRENT_GRID_SIZE, fBrent, fDetectorActive, fpConstraintsPath, fpDetModel, fpMeasureModel, fThreadsCnt, and TH1::StatOverflows().

Referenced by BmnAligner(), and BmnAlignerApply::BmnAlignerApply().

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

◆ BmnAligner() [2/4]

template<typename HitType>
BmnAligner< HitType >::BmnAligner ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * filesListPath,
const char * constraintsPath = nullptr,
Int_t nThreads = 1 )

Definition at line 34 of file BmnAligner.cxx.

References BmnAligner(), BMN_MAX_HIT_RAM_SIZE, DoneInTime(), fInitialized, fpDetModel, fpFirstHits, fpHits, fpHitsData, fpIteratorMain, fpRamIterator, fProgressBar, fpRootIterator, fpTrackUsable, fTotalHits, fTotalTracks, fTracksUsableCnt, and InitIterators().

Here is the call graph for this function:

◆ ~BmnAligner() [1/2]

template<typename HitType>
BmnAligner< HitType >::~BmnAligner ( )
virtual

◆ BmnAligner() [3/4]

template<typename HitType = BmnHitRecord>
BmnAligner< HitType >::BmnAligner ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * constraintsPath = nullptr,
Int_t nThreads = 1 )

◆ BmnAligner() [4/4]

template<typename HitType = BmnHitRecord>
BmnAligner< HitType >::BmnAligner ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * filesListPath,
const char * constraintsPath = nullptr,
Int_t nThreads = 1 )

◆ ~BmnAligner() [2/2]

template<typename HitType = BmnHitRecord>
virtual BmnAligner< HitType >::~BmnAligner ( )
virtual

Member Function Documentation

◆ AddBlankSolution() [1/2]

template<typename HitType>
void BmnAligner< HitType >::AddBlankSolution ( )
inlineprotected

Definition at line 179 of file BmnAligner.h.

References fIterationResults, fpResultCurrent, fpResultLast, and fTotalTracks.

Referenced by IterateAlignment(), LoadSolution(), and StoreZeroSolution().

Here is the caller graph for this function:

◆ AddBlankSolution() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::AddBlankSolution ( )
inlineprotected

◆ Align() [1/2]

template<typename HitType>
Bool_t BmnAligner< HitType >::Align ( Bool_t fixEvery = kFALSE)

Definition at line 433 of file BmnAligner.cxx.

References BMN_MAX_REGULAR_RETRY, BMN_MIN_ACTIVE_DETECTORS, BMN_MIN_HITS_PORTION, BMN_MIN_REGULAR_ITERS, BMN_MIN_REL_PROGRESS, BMN_MODULE_COUNT, BMN_REL_PROGRESS_GOOD, DoneInTime(), fActiveDetCount, fDetectorActive, fHitsPerDetector, fIterationResults, fpDetModel, fpResultCurrent, fpResultLast, fRegularIters, fTotalTracks, i, IterateAlignment(), and ReportResults().

Referenced by align().

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

◆ Align() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::Align ( Bool_t fixEvery = kFALSE)

◆ CalculateMSE() [1/4]

template<typename HitType>
Double_t BmnAligner< HitType >::CalculateMSE ( Bool_t withResiduals)
protectedvirtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

Definition at line 998 of file BmnAligner.cxx.

References _BMN_ALIGNER_RUN_THREADS, CalculateMSEpart(), fMSEclcCounter, fMSEclcSlow, fMSEclcTick, fpResultCurrent, and fProgressBar.

Here is the call graph for this function:

◆ CalculateMSE() [2/4]

template<typename HitType = BmnHitRecord>
virtual Double_t BmnAligner< HitType >::CalculateMSE ( Bool_t withResiduals)
protectedvirtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

◆ CalculateMSE() [3/4]

template<typename HitType>
Double_t BmnAligner< HitType >::CalculateMSE ( const SVectGLT & solution)
protected

Definition at line 984 of file BmnAligner.cxx.

References CalculateMSE(), and fpResultCurrent.

Referenced by CalculateMSE(), IterateAlignment(), LoadSolution(), PrepareData(), SolveGlobal(), and StoreZeroSolution().

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

◆ CalculateMSE() [4/4]

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::CalculateMSE ( const SVectGLT & solution)
protected

◆ CalculateMSEpart() [1/2]

template<typename HitType>
void BmnAligner< HitType >::CalculateMSEpart ( Bool_t withResiduals,
Int_t threadNum )
private

Definition at line 1017 of file BmnAligner.cxx.

References TMath::Abs(), BMN_ALMOST_ZERO, BMN_MODULE_COUNT, BMN_RESIDUALS_BINS, BMN_RESIDUALS_RANGE_X, BMN_RESIDUALS_RANGE_Y, delta, BmnDataIterator::EndOfHits(), BmnDataIterator::EndOfTracks(), fFirstTracksIdx, TH1::Fill(), fMutexGlobal, fOmegaScaleFactor, fpDetModel, fpIteratorMain, fpIterators, fpMeasureModel, fpResultCurrent, fpTrackUsable, BmnDataIterator::HitDetectorID(), BmnDataIterator::HitWx(), BmnDataIterator::HitWy(), BmnDataIterator::HitX(), BmnDataIterator::HitY(), BmnDataIterator::HitZ(), BmnDataIterator::NextHit(), BmnDataIterator::NextTrack(), and BmnDataIterator::ResetAll().

Referenced by CalculateMSE().

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

◆ CalculateMSEpart() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::CalculateMSEpart ( Bool_t withResiduals,
Int_t threadNum )
private

◆ DoneInTime() [1/2]

template<typename HitType>
void BmnAligner< HitType >::DoneInTime ( TStopwatch & timer,
const char * stage )
protected

Definition at line 1161 of file BmnAligner.cxx.

References TStopwatch::CpuTime(), MarkTime(), and TStopwatch::RealTime().

Referenced by BmnAligner(), Align(), LoadConstraints(), LoadSolution(), PrepareData(), and SaveSolution().

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

◆ DoneInTime() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::DoneInTime ( TStopwatch & timer,
const char * stage )
protected

◆ Draw() [1/2]

template<typename HitType>
void BmnAligner< HitType >::Draw ( )
virtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

Definition at line 1227 of file BmnAligner.cxx.

References BMN_DRAW_TRACKS_CNT, TPolyLine3D::Draw(), DrawResiduals(), fMaxZvalue, fpIteratorMain, fpPad3D, fProgressBar, fpTrackUsable, fTracksUsableCnt, GetResult(), iX0, iX1, iY0, iY1, PrepareDrawing(), TAttLine::SetLineColor(), TAttLine::SetLineStyle(), TPolyLine3D::SetPoint(), and TRandom::Uniform().

Here is the call graph for this function:

◆ Draw() [2/2]

template<typename HitType = BmnHitRecord>
virtual void BmnAligner< HitType >::Draw ( )
virtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

◆ DrawResiduals() [1/2]

template<typename HitType>
void BmnAligner< HitType >::DrawResiduals ( )
protected

Definition at line 1196 of file BmnAligner.cxx.

References TH1::Draw(), fpPadG2, fpPadG3, GetResult(), TH1::GetYaxis(), TAttFill::SetFillColor(), TAttLine::SetLineColor(), and TAxis::SetRangeUser().

Referenced by Draw().

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

◆ DrawResiduals() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::DrawResiduals ( )
protected

◆ GetCurrentResult() [1/2]

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::GetCurrentResult ( ) const
inlinenoexcept

Definition at line 63 of file BmnAligner.h.

Referenced by BmnATestTrack::AddMSE(), and SaveSolution().

Here is the caller graph for this function:

◆ GetCurrentResult() [2/2]

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::GetCurrentResult ( ) const
inlinenoexcept

Definition at line 63 of file BmnAligner.h.

◆ GetProgressBar() [1/2]

template<typename HitType = BmnHitRecord>
BmnSimpleProgressBar & BmnAligner< HitType >::GetProgressBar ( )
inlineprotectednoexcept

Definition at line 142 of file BmnAligner.h.

◆ GetProgressBar() [2/2]

template<typename HitType = BmnHitRecord>
BmnSimpleProgressBar & BmnAligner< HitType >::GetProgressBar ( )
inlineprotectednoexcept

Definition at line 142 of file BmnAligner.h.

◆ GetResult() [1/2]

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::GetResult ( Bool_t last = kTRUE) const
inlinenoexcept

Definition at line 64 of file BmnAligner.h.

Referenced by Draw(), DrawResiduals(), and ReportResults().

Here is the caller graph for this function:

◆ GetResult() [2/2]

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::GetResult ( Bool_t last = kTRUE) const
inlinenoexcept

Definition at line 64 of file BmnAligner.h.

◆ GetThreadCount() [1/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::GetThreadCount ( ) const
inlineprotectednoexcept

Definition at line 141 of file BmnAligner.h.

◆ GetThreadCount() [2/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::GetThreadCount ( ) const
inlineprotectednoexcept

Definition at line 141 of file BmnAligner.h.

◆ Initialized() [1/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::Initialized ( ) const
inlinenoexcept

Definition at line 59 of file BmnAligner.h.

Referenced by align().

Here is the caller graph for this function:

◆ Initialized() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::Initialized ( ) const
inlinenoexcept

Definition at line 59 of file BmnAligner.h.

◆ InitIterators() [1/2]

template<typename HitType>
void BmnAligner< HitType >::InitIterators ( )
protected

Definition at line 1123 of file BmnAligner.cxx.

References BMN_MIN_TRACKS_PER_THREAD, fFirstTracksIdx, fpIteratorMain, fpIterators, fpRamIterator, fpRootIterator, fThreadsCnt, fTotalTracks, and i.

Referenced by BmnAligner().

Here is the caller graph for this function:

◆ InitIterators() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::InitIterators ( )
protected

◆ IterateAlignment() [1/2]

◆ IterateAlignment() [2/2]

template<typename HitType = BmnHitRecord>
virtual Bool_t BmnAligner< HitType >::IterateAlignment ( )
protectedvirtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

◆ LoadConstraints() [1/2]

template<typename HitType>
Bool_t BmnAligner< HitType >::LoadConstraints ( )
protected

Definition at line 214 of file BmnAligner.cxx.

References BMN_GLPARAMS_TOTAL, DoneInTime(), fConstraints, fConstraintsCnt, fpConstraintsPath, and i.

Referenced by PrepareData().

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

◆ LoadConstraints() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::LoadConstraints ( )
protected

◆ LoadSolution() [1/2]

template<typename HitType>
Bool_t BmnAligner< HitType >::LoadSolution ( const char * jsonPath,
Bool_t withAlpha = kTRUE,
Bool_t withMSE = kTRUE )

Definition at line 269 of file BmnAligner.cxx.

References AddBlankSolution(), BMN_CORRECTIONS, BMN_GLOBAL_PARAMS_PD, BMN_MODULE_COUNT, CalculateMSE(), DoneInTime(), fActiveDetCount, fDetectorActive, fpDetModel, fpResultCurrent, fpResultLast, and i.

Referenced by align(), and BmnAlignerApply::Init().

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

◆ LoadSolution() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::LoadSolution ( const char * jsonPath,
Bool_t withAlpha = kTRUE,
Bool_t withMSE = kTRUE )

◆ MarkTime() [1/2]

template<typename HitType>
void BmnAligner< HitType >::MarkTime ( TStopwatch & timer)
inlineprotected

Definition at line 195 of file BmnAligner.h.

References TStopwatch::CpuTime(), fTotalCpuTime, fTotalRealTime, TStopwatch::RealTime(), and TStopwatch::Stop().

Referenced by DoneInTime().

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

◆ MarkTime() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::MarkTime ( TStopwatch & timer)
inlineprotected

◆ OmegaScaleFactor() [1/2]

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::OmegaScaleFactor ( ) const
inlinenoexcept

Definition at line 62 of file BmnAligner.h.

Referenced by BmnATestTrack::AddMSE().

Here is the caller graph for this function:

◆ OmegaScaleFactor() [2/2]

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::OmegaScaleFactor ( ) const
inlinenoexcept

Definition at line 62 of file BmnAligner.h.

◆ PrepareData() [1/2]

◆ PrepareData() [2/2]

template<typename HitType = BmnHitRecord>
virtual Bool_t BmnAligner< HitType >::PrepareData ( const char * tracksPath = nullptr)
virtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

◆ PrepareDrawing() [1/2]

template<typename HitType>
void BmnAligner< HitType >::PrepareDrawing ( )
protected

Definition at line 1170 of file BmnAligner.cxx.

References fpPad3D, fpPadG1, fpPadG2, fpPadG3, fpPadG4, TCanvas::SetCanvasSize(), TCanvas::SetFixedAspectRatio(), TCanvas::SetRealAspectRatio(), and TCanvas::SetWindowSize().

Referenced by Draw().

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

◆ PrepareDrawing() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::PrepareDrawing ( )
protected

◆ ProcessTracks() [1/2]

template<typename HitType>
void BmnAligner< HitType >::ProcessTracks ( TVectorD * pvB_dash,
TMatrixD * pmC_dash,
Int_t threadNum )
private

Definition at line 815 of file BmnAligner.cxx.

References ROOT::Math::SMatrix< class T, unsigned int D1, unsigned int D2, class R >::Array(), ROOT::Math::SVector< class T, unsigned int D >::Array(), BMN_GLOBAL_PARAMS_PD, BMN_LOCAL_PARAMS_PT, BMN_MODULE_COUNT, BmnDataIterator::EndOfHits(), BmnDataIterator::EndOfTracks(), fActiveDetCount, fDetectorActive, fFirstTracksIdx, fMutexGlobal, fOmegaScaleFactor, fpDetModel, fpIterators, fpMeasureModel, fpResultCurrent, fpResultLast, fpTrackUsable, BmnDataIterator::HitDetectorID(), BmnDataIterator::HitWx(), BmnDataIterator::HitWy(), BmnDataIterator::HitX(), BmnDataIterator::HitY(), BmnDataIterator::HitZ(), i, ROOT::Math::SMatrix< class T, unsigned int D1, unsigned int D2, class R >::Invert(), ROOT::Math::SMatrix< Double_t, BMN_GLOBAL_PARAMS_PD, BMN_GLOBAL_PARAMS_PD >::kSize, ROOT::Math::SMatrix< Double_t, BMN_GLOBAL_PARAMS_PD, BMN_LOCAL_PARAMS_PT >::kSize, ROOT::Math::SMatrix< Double_t, BMN_LOCAL_PARAMS_PT, BMN_LOCAL_PARAMS_PT >::kSize, ROOT::Math::SVector< Double_t, BMN_GLOBAL_PARAMS_PD >::kSize, ROOT::Math::SVector< Double_t, BMN_LOCAL_PARAMS_PT >::kSize, TMatrixT< Double_t >::kTransposed, BmnDataIterator::NextHit(), BmnDataIterator::NextTrack(), BmnDataIterator::ResetAll(), BmnDataIterator::ResetHits(), ROOT::Math::SMatrix< class T, unsigned int D1, unsigned int D2, class R >::SetElements(), ROOT::Math::SVector< class T, unsigned int D >::SetElements(), ROOT::Math::TensorProd(), TMatrixT< class Element >::Use(), TVectorT< class Element >::Use(), and z.

Referenced by IterateAlignment().

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

◆ ProcessTracks() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::ProcessTracks ( TVectorD * pvB_dash,
TMatrixD * pmC_dash,
Int_t threadNum )
private

◆ ReportResults() [1/2]

template<typename HitType>
void BmnAligner< HitType >::ReportResults ( ) const
protectedvirtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

Definition at line 1088 of file BmnAligner.cxx.

References fTotalCpuTime, fTotalRealTime, TH1::GetMean(), GetResult(), TH1::GetStdDev(), BmnAlignResult::GetValueMSE(), BmnAlignResult::ResidualsX(), and BmnAlignResult::ResidualsY().

Referenced by Align(), and BmnAlignerTest::ReportResults().

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

◆ ReportResults() [2/2]

template<typename HitType = BmnHitRecord>
virtual void BmnAligner< HitType >::ReportResults ( ) const
protectedvirtual

Reimplemented in BmnAlignerTest, and BmnAlignerTest.

◆ SaveSolution() [1/2]

template<typename HitType>
Bool_t BmnAligner< HitType >::SaveSolution ( const char * jsonPath,
Bool_t withAlpha = kFALSE )

Definition at line 373 of file BmnAligner.cxx.

References BmnAlignResult::A(), BmnAlignResult::Alpha(), BMN_CORRECTIONS, BMN_GLOBAL_PARAMS_PD, BMN_LOCAL_PARAMS_PT, BMN_MIN_HITS_PER_TRACK, BMN_MODULE_COUNT, DoneInTime(), fpDetModel, fTotalTracks, GetCurrentResult(), and i.

Referenced by align().

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

◆ SaveSolution() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::SaveSolution ( const char * jsonPath,
Bool_t withAlpha = kFALSE )

◆ SolveGlobal() [1/2]

template<typename HitType>
Bool_t BmnAligner< HitType >::SolveGlobal ( const TMatrixD & mCL,
const TVectorD & vBL )
protected

Definition at line 724 of file BmnAligner.cxx.

References BMN_1D_STEP_TOLERANCE, BMN_GLOBAL_PARAMS_PD, BMN_MODULE_COUNT, CalculateMSE(), TDecompLU::Decompose(), TDecompSVD::Decompose(), fActiveDetCount, fBrent, fDetectorActive, fpResultCurrent, fpResultLast, fRegularIters, TVectorT< class Element >::GetMatrixArray(), TVectorT< class Element >::GetNrows(), TDecompSVD::GetSig(), TVectorT< class Element >::GetSub(), i, TDecompLU::Invert(), and TDecompSVD::Solve().

Referenced by IterateAlignment().

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

◆ SolveGlobal() [2/2]

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::SolveGlobal ( const TMatrixD & mCL,
const TVectorD & vBL )
protected

◆ StoreZeroSolution() [1/2]

template<typename HitType>
void BmnAligner< HitType >::StoreZeroSolution ( const std::vector< SVectLC > & AlphaZero)
inlineprotected

Definition at line 187 of file BmnAligner.h.

References AddBlankSolution(), CalculateMSE(), and fpResultCurrent.

Referenced by PrepareData().

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

◆ StoreZeroSolution() [2/2]

template<typename HitType = BmnHitRecord>
void BmnAligner< HitType >::StoreZeroSolution ( const std::vector< SVectLC > & AlphaZero)
inlineprotected

◆ TotalHits() [1/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::TotalHits ( ) const
inlinenoexcept

Definition at line 61 of file BmnAligner.h.

◆ TotalHits() [2/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::TotalHits ( ) const
inlinenoexcept

Definition at line 61 of file BmnAligner.h.

◆ TotalTracks() [1/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::TotalTracks ( ) const
inlinenoexcept

Definition at line 60 of file BmnAligner.h.

◆ TotalTracks() [2/2]

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::TotalTracks ( ) const
inlinenoexcept

Definition at line 60 of file BmnAligner.h.

Member Data Documentation

◆ fActiveDetCount

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fActiveDetCount {BMN_MODULE_COUNT}
protected

Definition at line 101 of file BmnAligner.h.

Referenced by Align(), IterateAlignment(), LoadSolution(), ProcessTracks(), and SolveGlobal().

◆ fBrent

template<typename HitType = BmnHitRecord>
Minimizer1D_t BmnAligner< HitType >::fBrent
protected

Definition at line 106 of file BmnAligner.h.

Referenced by BmnAligner(), and SolveGlobal().

◆ fConstraints

template<typename HitType = BmnHitRecord>
std::vector< TVectorD > BmnAligner< HitType >::fConstraints {}
protected

Definition at line 111 of file BmnAligner.h.

Referenced by IterateAlignment(), and LoadConstraints().

◆ fConstraintsCnt

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fConstraintsCnt {0}
protected

Definition at line 112 of file BmnAligner.h.

Referenced by IterateAlignment(), and LoadConstraints().

◆ fDetectorActive

template<typename HitType = BmnHitRecord>
DetectorFlags_t BmnAligner< HitType >::fDetectorActive
protected

◆ fFirstTracksIdx

template<typename HitType = BmnHitRecord>
std::vector< Int_t > BmnAligner< HitType >::fFirstTracksIdx
private

Definition at line 133 of file BmnAligner.h.

Referenced by CalculateMSEpart(), InitIterators(), and ProcessTracks().

◆ fHitsPerDetector

template<typename HitType = BmnHitRecord>
DetectorHitCount_t BmnAligner< HitType >::fHitsPerDetector {}
protected

Definition at line 105 of file BmnAligner.h.

Referenced by Align(), and PrepareData().

◆ fInitialized

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::fInitialized {kFALSE}
protected

Definition at line 96 of file BmnAligner.h.

Referenced by BmnAligner(), IterateAlignment(), and PrepareData().

◆ fIteration

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fIteration {-1}
protected

Definition at line 101 of file BmnAligner.h.

Referenced by IterateAlignment().

◆ fIterationResults

template<typename HitType = BmnHitRecord>
std::deque< BmnAlignResult > BmnAligner< HitType >::fIterationResults
protected

Definition at line 123 of file BmnAligner.h.

Referenced by AddBlankSolution(), and Align().

◆ fMaxZvalue

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::fMaxZvalue {0.0}
protected

Definition at line 128 of file BmnAligner.h.

Referenced by Draw(), and PrepareData().

◆ fMSEclcCounter

template<typename HitType = BmnHitRecord>
UInt_t BmnAligner< HitType >::fMSEclcCounter {0u}
protected

Definition at line 97 of file BmnAligner.h.

Referenced by CalculateMSE(), and IterateAlignment().

◆ fMSEclcSlow

template<typename HitType = BmnHitRecord>
Bool_t BmnAligner< HitType >::fMSEclcSlow {kFALSE}
protected

Definition at line 96 of file BmnAligner.h.

Referenced by CalculateMSE(), and PrepareData().

◆ fMSEclcTick

template<typename HitType = BmnHitRecord>
UInt_t BmnAligner< HitType >::fMSEclcTick {1u}
protected

Definition at line 97 of file BmnAligner.h.

Referenced by CalculateMSE(), and PrepareData().

◆ fMutexGlobal

template<typename HitType = BmnHitRecord>
std::mutex BmnAligner< HitType >::fMutexGlobal
private

Definition at line 134 of file BmnAligner.h.

Referenced by CalculateMSEpart(), and ProcessTracks().

◆ fOmegaScaleFactor

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::fOmegaScaleFactor {1.0}
protected

Definition at line 100 of file BmnAligner.h.

Referenced by CalculateMSEpart(), PrepareData(), and ProcessTracks().

◆ fpConstraintsPath

template<typename HitType = BmnHitRecord>
const char * BmnAligner< HitType >::fpConstraintsPath
protected

Definition at line 110 of file BmnAligner.h.

Referenced by BmnAligner(), and LoadConstraints().

◆ fpDetModel

template<typename HitType = BmnHitRecord>
const BmnDetectorModel * BmnAligner< HitType >::fpDetModel
protected

◆ fpFirstHits

template<typename HitType = BmnHitRecord>
Int_t * BmnAligner< HitType >::fpFirstHits {nullptr}
protected

Definition at line 119 of file BmnAligner.h.

Referenced by BmnAligner(), ~BmnAligner(), and PrepareData().

◆ fpHits

template<typename HitType = BmnHitRecord>
HitType * BmnAligner< HitType >::fpHits {nullptr}
protected

Definition at line 117 of file BmnAligner.h.

Referenced by BmnAligner(), and PrepareData().

◆ fpHitsData

template<typename HitType = BmnHitRecord>
Byte_t * BmnAligner< HitType >::fpHitsData {nullptr}
protected

Definition at line 118 of file BmnAligner.h.

Referenced by BmnAligner(), and ~BmnAligner().

◆ fpIteratorMain

template<typename HitType = BmnHitRecord>
BmnDataIterator * BmnAligner< HitType >::fpIteratorMain {nullptr}
protected

Definition at line 116 of file BmnAligner.h.

Referenced by BmnAligner(), CalculateMSEpart(), Draw(), InitIterators(), and PrepareData().

◆ fpIterators

template<typename HitType = BmnHitRecord>
std::vector< BmnDataIterator * > BmnAligner< HitType >::fpIterators
private

Definition at line 132 of file BmnAligner.h.

Referenced by ~BmnAligner(), CalculateMSEpart(), InitIterators(), and ProcessTracks().

◆ fpMeasureModel

template<typename HitType = BmnHitRecord>
const BmnMeasureModel * BmnAligner< HitType >::fpMeasureModel
protected

Definition at line 108 of file BmnAligner.h.

Referenced by BmnAligner(), CalculateMSEpart(), BmnAlignerApply::Exec(), and ProcessTracks().

◆ fpPad3D

template<typename HitType = BmnHitRecord>
TPad * BmnAligner< HitType >::fpPad3D {nullptr}
protected

Definition at line 127 of file BmnAligner.h.

Referenced by Draw(), and PrepareDrawing().

◆ fpPadG1

template<typename HitType = BmnHitRecord>
TPad * BmnAligner< HitType >::fpPadG1 {nullptr}
protected

Definition at line 127 of file BmnAligner.h.

Referenced by PrepareDrawing().

◆ fpPadG2

template<typename HitType = BmnHitRecord>
TPad * BmnAligner< HitType >::fpPadG2 {nullptr}
protected

Definition at line 127 of file BmnAligner.h.

Referenced by DrawResiduals(), and PrepareDrawing().

◆ fpPadG3

template<typename HitType = BmnHitRecord>
TPad * BmnAligner< HitType >::fpPadG3 {nullptr}
protected

Definition at line 127 of file BmnAligner.h.

Referenced by DrawResiduals(), and PrepareDrawing().

◆ fpPadG4

template<typename HitType = BmnHitRecord>
TPad * BmnAligner< HitType >::fpPadG4 {nullptr}
protected

Definition at line 127 of file BmnAligner.h.

Referenced by PrepareDrawing().

◆ fpRamIterator

template<typename HitType = BmnHitRecord>
BmnRamIterator< HitType > * BmnAligner< HitType >::fpRamIterator {nullptr}
protected

Definition at line 115 of file BmnAligner.h.

Referenced by BmnAligner(), ~BmnAligner(), InitIterators(), and PrepareData().

◆ fpResultCurrent

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::fpResultCurrent {nullptr}
protected

◆ fpResultLast

template<typename HitType = BmnHitRecord>
BmnAlignResult * BmnAligner< HitType >::fpResultLast {nullptr}
protected

◆ fProgressBar

template<typename HitType = BmnHitRecord>
BmnSimpleProgressBar BmnAligner< HitType >::fProgressBar
protected

Definition at line 95 of file BmnAligner.h.

Referenced by BmnAligner(), CalculateMSE(), Draw(), IterateAlignment(), and PrepareData().

◆ fpRootIterator

template<typename HitType = BmnHitRecord>
BmnRootIterator * BmnAligner< HitType >::fpRootIterator {nullptr}
protected

Definition at line 114 of file BmnAligner.h.

Referenced by BmnAligner(), ~BmnAligner(), InitIterators(), and PrepareData().

◆ fpTrackUsable

template<typename HitType = BmnHitRecord>
std::vector< Bool_t > * BmnAligner< HitType >::fpTrackUsable {nullptr}
protected

Definition at line 103 of file BmnAligner.h.

Referenced by BmnAligner(), ~BmnAligner(), CalculateMSEpart(), Draw(), and ProcessTracks().

◆ fRegularIters

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fRegularIters {0}
protected

Definition at line 101 of file BmnAligner.h.

Referenced by Align(), IterateAlignment(), and SolveGlobal().

◆ fThreadsCnt

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fThreadsCnt {1}
private

Definition at line 135 of file BmnAligner.h.

Referenced by BmnAligner(), ~BmnAligner(), InitIterators(), and IterateAlignment().

◆ fTotalCpuTime

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::fTotalCpuTime {0.0}
protected

Definition at line 98 of file BmnAligner.h.

Referenced by MarkTime(), and ReportResults().

◆ fTotalHits

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fTotalHits {0}
protected

Definition at line 104 of file BmnAligner.h.

Referenced by BmnAligner().

◆ fTotalRealTime

template<typename HitType = BmnHitRecord>
Double_t BmnAligner< HitType >::fTotalRealTime {0.0}
protected

Definition at line 98 of file BmnAligner.h.

Referenced by MarkTime(), and ReportResults().

◆ fTotalTracks

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fTotalTracks {0}
protected

◆ fTracksUsableCnt

template<typename HitType = BmnHitRecord>
Int_t BmnAligner< HitType >::fTracksUsableCnt {0}
protected

Definition at line 104 of file BmnAligner.h.

Referenced by BmnAligner(), and Draw().


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