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

#include <BmnAlignerApply.h>

Inheritance diagram for BmnAlignerApply:
Collaboration diagram for BmnAlignerApply:

Public Member Functions

 BmnAlignerApply ()=delete
 BmnAlignerApply (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *alignFilePath, Bool_t applyLorentz=kTRUE)
virtual ~BmnAlignerApply ()=default
virtual InitStatus Init ()
virtual void Exec (Option_t *opt)
virtual void Finish ()
 BmnAlignerApply ()=delete
 BmnAlignerApply (const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *alignFilePath, Bool_t applyLorentz=kTRUE)
virtual ~BmnAlignerApply ()=default
virtual InitStatus Init ()
virtual void Exec (Option_t *opt)
virtual void Finish ()
Public Member Functions inherited from BmnAligner< HitType >
 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
Public Member Functions inherited from BmnTask
 BmnTask ()
 Default constructor.
 BmnTask (const char *name, Int_t iVerbose=1)
 Standard constructor.
virtual ~BmnTask ()
 Destroy the BmnTask object.
virtual void OnlineWrite (const std::unique_ptr< TTree > &resultTree)
 Write task resul to tree.
 BmnTask (const BmnTask &)=delete
BmnTask & operator= (const BmnTask &)=delete
 BmnTask ()
 Default constructor.
 BmnTask (const char *name, Int_t iVerbose=1)
 Standard constructor.
virtual ~BmnTask ()
 Destroy the BmnTask object.
virtual void OnlineWrite (const std::unique_ptr< TTree > &resultTree)
 Write task resul to tree.
 BmnTask (const BmnTask &)=delete
BmnTask & operator= (const BmnTask &)=delete

Private Member Functions

void ReadCorrections (int irun, int igem, std::map< int, std::vector< Double_t > > *locCorX, std::map< int, std::vector< Double_t > > *locCorY, int &nx, int &ny)
void ReadCorrections (int irun, int igem, std::map< int, std::vector< Double_t > > *locCorX, std::map< int, std::vector< Double_t > > *locCorY, int &nx, int &ny)

Private Attributes

TClonesArray * fpStsHitsArray {nullptr}
const char * fAlignFilePath
const Bool_t fLorentzCorrectionApply
TH2D * hLorCorX [2][17] = {{nullptr}, {nullptr}}
TH2D * hLorCorY [2][17] = {{nullptr}, {nullptr}}
Bool_t fieldFlag

Additional Inherited Members

Protected Types inherited from BmnAligner< HitType >
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 inherited from BmnAligner< HitType >
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 inherited from BmnAligner< HitType >
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}

Detailed Description

Definition at line 24 of file BmnAlignerApply.h.

Constructor & Destructor Documentation

◆ BmnAlignerApply() [1/4]

BmnAlignerApply::BmnAlignerApply ( )
delete

Referenced by ReadCorrections().

Here is the caller graph for this function:

◆ BmnAlignerApply() [2/4]

BmnAlignerApply::BmnAlignerApply ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * alignFilePath,
Bool_t applyLorentz = kTRUE )
inline

Definition at line 35 of file BmnAlignerApply.h.

References BmnAligner< HitType >::BmnAligner(), fAlignFilePath, and fLorentzCorrectionApply.

Here is the call graph for this function:

◆ ~BmnAlignerApply() [1/2]

virtual BmnAlignerApply::~BmnAlignerApply ( )
virtualdefault

◆ BmnAlignerApply() [3/4]

BmnAlignerApply::BmnAlignerApply ( )
delete

◆ BmnAlignerApply() [4/4]

BmnAlignerApply::BmnAlignerApply ( const BmnMeasureModel * measureModel,
const BmnDetectorModel * modelDetector,
const char * alignFilePath,
Bool_t applyLorentz = kTRUE )
inline

Definition at line 35 of file BmnAlignerApply.h.

References BmnAligner< HitType >::BmnAligner(), fAlignFilePath, and fLorentzCorrectionApply.

Here is the call graph for this function:

◆ ~BmnAlignerApply() [2/2]

virtual BmnAlignerApply::~BmnAlignerApply ( )
virtualdefault

Member Function Documentation

◆ Exec() [1/2]

void BmnAlignerApply::Exec ( Option_t * opt)
virtual

◆ Exec() [2/2]

virtual void BmnAlignerApply::Exec ( Option_t * opt)
virtual

◆ Finish() [1/2]

void BmnAlignerApply::Finish ( )
virtual

Definition at line 268 of file BmnAlignerApply.cxx.

◆ Finish() [2/2]

virtual void BmnAlignerApply::Finish ( )
virtual

References hLorCorX.

◆ Init() [1/2]

InitStatus BmnAlignerApply::Init ( )
virtual

Definition at line 24 of file BmnAlignerApply.cxx.

References TMath::Abs(), fAlignFilePath, fieldFlag, fLorentzCorrectionApply, fpStsHitsArray, BmnGemStripStationSet::GetNStations(), BmnSiliconStationSet::GetNStations(), hLorCorX, hLorCorY, BmnAligner< HitType >::LoadSolution(), ReadCorrections(), x, and y.

Here is the call graph for this function:

◆ Init() [2/2]

virtual InitStatus BmnAlignerApply::Init ( )
virtual

◆ ReadCorrections() [1/2]

void BmnAlignerApply::ReadCorrections ( int irun,
int igem,
std::map< int, std::vector< Double_t > > * locCorX,
std::map< int, std::vector< Double_t > > * locCorY,
int & nx,
int & ny )
private

Definition at line 292 of file BmnAlignerApply.cxx.

References TString::Atoi(), TString::Contains(), TString::Data(), TObjArray::Delete(), TObjArray::GetEntriesFast(), TString::ReadLine(), TString::Tokenize(), and TObjArray::UncheckedAt().

Referenced by Init().

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

◆ ReadCorrections() [2/2]

void BmnAlignerApply::ReadCorrections ( int irun,
int igem,
std::map< int, std::vector< Double_t > > * locCorX,
std::map< int, std::vector< Double_t > > * locCorY,
int & nx,
int & ny )
private

References BmnAlignerApply(), and fieldFlag.

Here is the call graph for this function:

Member Data Documentation

◆ fAlignFilePath

const char * BmnAlignerApply::fAlignFilePath
private

Definition at line 30 of file BmnAlignerApply.h.

Referenced by BmnAlignerApply(), and Init().

◆ fieldFlag

Bool_t BmnAlignerApply::fieldFlag
private

Definition at line 71 of file BmnAlignerApply.h.

Referenced by Exec(), Init(), and ReadCorrections().

◆ fLorentzCorrectionApply

const Bool_t BmnAlignerApply::fLorentzCorrectionApply
private

Definition at line 31 of file BmnAlignerApply.h.

Referenced by BmnAlignerApply(), Exec(), and Init().

◆ fpStsHitsArray

TClonesArray * BmnAlignerApply::fpStsHitsArray {nullptr}
private

Definition at line 29 of file BmnAlignerApply.h.

Referenced by Exec(), and Init().

◆ hLorCorX

TH2D * BmnAlignerApply::hLorCorX = {{nullptr}, {nullptr}}
private

Definition at line 63 of file BmnAlignerApply.h.

Referenced by Exec(), Finish(), and Init().

◆ hLorCorY

TH2D * BmnAlignerApply::hLorCorY = {{nullptr}, {nullptr}}
private

Definition at line 63 of file BmnAlignerApply.h.

Referenced by Exec(), and Init().


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