CbmRoot
Loading...
Searching...
No Matches
cbm::kf::TrackingSetupBuilder Class Reference

Encapsulation of the kf::Setup initialization routines for CBM. More...

#include <CbmKfTrackingSetupBuilder.h>

Collaboration diagram for cbm::kf::TrackingSetupBuilder:
[legend]

Public Member Functions

std::shared_ptr< const cbm::algo::kf::Setup< double > > GetSharedGeoSetup ()
 Gets a shared pointer to the geometry setup.
 
template<typename T >
cbm::algo::kf::Setup< T > MakeSetup (cbm::algo::kf::EFieldMode fldMode)
 Makes setup object.
 
bool IsInGeometry (cbm::algo::ca::EDetectorID detID) const
 Checks, if a tracking detector is used (is in geometry and has hits)
 
bool HasHits (cbm::algo::ca::EDetectorID detID) const
 Checks, if a tracking detector has hits.
 
 TrackingSetupBuilder (const TrackingSetupBuilder &)=delete
 
 TrackingSetupBuilder (TrackingSetupBuilder &&)=delete
 
TrackingSetupBuilderoperator= (const TrackingSetupBuilder &)=delete
 
TrackingSetupBuilderoperator= (TrackingSetupBuilder &&)=delete
 

Static Public Member Functions

static TrackingSetupBuilderInstance ()
 Instance access.
 

Private Types

template<typename T >
using DetectorIDArray_t = cbm::core::EnumArray<cbm::algo::ca::EDetectorID, T>
 

Private Member Functions

 TrackingSetupBuilder ()=default
 Default constructor.
 
 ~TrackingSetupBuilder ()=default
 Destructor.
 
void CheckDetectorPresence ()
 Check detector presence.
 
void SetMaterialCacheFile (const TString &filename, size_t geoHash)
 Sets the material budget cache file name.
 
void Init ()
 Initializes the instance.
 

Private Attributes

cbm::algo::kf::SetupBuilder fBuilder {}
 KF-setup builder.
 
DetectorIDArray_t< bool > fvbDetInGeometry {{false}}
 Is detector subsystem in geometry?
 
DetectorIDArray_t< bool > fvbDetHasHits {{false}}
 Does detector subsystem have hits?
 
std::shared_ptr< cbm::algo::kf::Setup< double > > fpGeoSetup {nullptr}
 An instance of the tracking KF-setup in a double precision.
 
bool fbInitialized {false}
 Checks, if the setup was already initialized.
 

Static Private Attributes

static constexpr DetectorIDArray_t< const char * > kDetHitBrName
 Hit branch names vs. cbm::algo::ca::EDetectorID.
 
static constexpr double kMatCreatorPitch {0.1}
 Material budget map minimal bin size [cm].
 
static constexpr int kMatCreatorMaxNbins {100}
 Max number of bins in the material budget map in x(y) axis.
 
static constexpr int kMatCreatorNrays {3}
 Number of rays per dimension for the material budget.
 
static constexpr bool kMatCreatorSafeMode {true}
 Safe mode of the material map creation.
 
static constexpr double kTargFieldInitStep {2.5}
 Step between nodes in the target field initialization [cm].
 
static constexpr double kTargMaterialOffset {1}
 Offset between target upper limit and its material zMax [cm].
 
static TrackingSetupBuilderfpInstance {nullptr}
 
static std::mutex fMutex {}
 

Detailed Description

Encapsulation of the kf::Setup initialization routines for CBM.

Definition at line 24 of file CbmKfTrackingSetupBuilder.h.

Member Typedef Documentation

◆ DetectorIDArray_t

Constructor & Destructor Documentation

◆ TrackingSetupBuilder() [1/3]

cbm::kf::TrackingSetupBuilder::TrackingSetupBuilder ( const TrackingSetupBuilder & )
delete

◆ TrackingSetupBuilder() [2/3]

cbm::kf::TrackingSetupBuilder::TrackingSetupBuilder ( TrackingSetupBuilder && )
delete

◆ TrackingSetupBuilder() [3/3]

cbm::kf::TrackingSetupBuilder::TrackingSetupBuilder ( )
privatedefault

Default constructor.

◆ ~TrackingSetupBuilder()

cbm::kf::TrackingSetupBuilder::~TrackingSetupBuilder ( )
privatedefault

Destructor.

Member Function Documentation

◆ CheckDetectorPresence()

void TrackingSetupBuilder::CheckDetectorPresence ( )
private

◆ GetSharedGeoSetup()

std::shared_ptr< const cbm::algo::kf::Setup< double > > TrackingSetupBuilder::GetSharedGeoSetup ( )

Gets a shared pointer to the geometry setup.

Note
The original magnetic field is defined.
Use-cases: precise fit in physical analyses and QA.

Definition at line 58 of file CbmKfTrackingSetupBuilder.cxx.

References fpGeoSetup, and MakeSetup().

Referenced by CbmKfTrackFitter::Init().

◆ HasHits()

bool cbm::kf::TrackingSetupBuilder::HasHits ( cbm::algo::ca::EDetectorID detID) const
inline

Checks, if a tracking detector has hits.

Definition at line 49 of file CbmKfTrackingSetupBuilder.h.

References fvbDetHasHits.

◆ Init()

◆ Instance()

◆ IsInGeometry()

bool cbm::kf::TrackingSetupBuilder::IsInGeometry ( cbm::algo::ca::EDetectorID detID) const
inline

Checks, if a tracking detector is used (is in geometry and has hits)

Definition at line 46 of file CbmKfTrackingSetupBuilder.h.

References fvbDetInGeometry.

◆ MakeSetup()

template<typename T >
cbm::algo::kf::Setup< T > cbm::kf::TrackingSetupBuilder::MakeSetup ( cbm::algo::kf::EFieldMode fldMode)
inline

Makes setup object.

Parameters
fldModeField mode (kf::EFiledMode)

Definition at line 37 of file CbmKfTrackingSetupBuilder.h.

References fbInitialized, fBuilder, Init(), and cbm::algo::kf::SetupBuilder::MakeSetup().

Referenced by GetSharedGeoSetup().

◆ operator=() [1/2]

TrackingSetupBuilder & cbm::kf::TrackingSetupBuilder::operator= ( const TrackingSetupBuilder & )
delete

◆ operator=() [2/2]

TrackingSetupBuilder & cbm::kf::TrackingSetupBuilder::operator= ( TrackingSetupBuilder && )
delete

◆ SetMaterialCacheFile()

void cbm::kf::TrackingSetupBuilder::SetMaterialCacheFile ( const TString & filename,
size_t geoHash )
inlineprivate

Sets the material budget cache file name.

Parameters
filenameMaterial budget cache file name
geoHashA hash of the geometry

If provided, the instance will try to read the material budget maps from the file. If the file does not exist,or the geometry hash was changed since the last time (reference hash differs from the one read from the file), a warning will be produced, the material budget maps will be recreated on the fly and they will be stored again to the file (meaning a new cache file will be generated over the existing one).

Definition at line 82 of file CbmKfTrackingSetupBuilder.h.

References fBuilder, and cbm::algo::kf::SetupBuilder::SetMaterialCacheFile().

Referenced by Instance().

Member Data Documentation

◆ fbInitialized

bool cbm::kf::TrackingSetupBuilder::fbInitialized {false}
private

Checks, if the setup was already initialized.

Note
Each call of the setup initializer resets the setup builder, so the initialization is called in the next MakeSetup call Check, if the setup builder initialized

Definition at line 114 of file CbmKfTrackingSetupBuilder.h.

Referenced by Init(), and MakeSetup().

◆ fBuilder

cbm::algo::kf::SetupBuilder cbm::kf::TrackingSetupBuilder::fBuilder {}
private

KF-setup builder.

Definition at line 102 of file CbmKfTrackingSetupBuilder.h.

Referenced by Init(), MakeSetup(), and SetMaterialCacheFile().

◆ fMutex

std::mutex cbm::kf::TrackingSetupBuilder::fMutex {}
inlinestaticprivate

Definition at line 100 of file CbmKfTrackingSetupBuilder.h.

Referenced by Instance().

◆ fpGeoSetup

std::shared_ptr<cbm::algo::kf::Setup<double> > cbm::kf::TrackingSetupBuilder::fpGeoSetup {nullptr}
private

An instance of the tracking KF-setup in a double precision.

Note
The original magnetic field is defined.
Use-cases: precise fit in physical analyses and QA.

Definition at line 109 of file CbmKfTrackingSetupBuilder.h.

Referenced by GetSharedGeoSetup().

◆ fpInstance

TrackingSetupBuilder* cbm::kf::TrackingSetupBuilder::fpInstance {nullptr}
inlinestaticprivate

Definition at line 99 of file CbmKfTrackingSetupBuilder.h.

Referenced by Instance().

◆ fvbDetHasHits

DetectorIDArray_t<bool> cbm::kf::TrackingSetupBuilder::fvbDetHasHits {{false}}
private

Does detector subsystem have hits?

Definition at line 104 of file CbmKfTrackingSetupBuilder.h.

Referenced by CheckDetectorPresence(), and HasHits().

◆ fvbDetInGeometry

DetectorIDArray_t<bool> cbm::kf::TrackingSetupBuilder::fvbDetInGeometry {{false}}
private

Is detector subsystem in geometry?

Definition at line 103 of file CbmKfTrackingSetupBuilder.h.

Referenced by CheckDetectorPresence(), Init(), and IsInGeometry().

◆ kDetHitBrName

DetectorIDArray_t<const char*> cbm::kf::TrackingSetupBuilder::kDetHitBrName
staticconstexprprivate
Initial value:
{
{"MvdHit", "StsHit", "MuchPixelHit", "TrdHit", "TofHit"}}

Hit branch names vs. cbm::algo::ca::EDetectorID.

Definition at line 62 of file CbmKfTrackingSetupBuilder.h.

Referenced by CheckDetectorPresence().

◆ kMatCreatorMaxNbins

int cbm::kf::TrackingSetupBuilder::kMatCreatorMaxNbins {100}
staticconstexprprivate

Max number of bins in the material budget map in x(y) axis.

Definition at line 93 of file CbmKfTrackingSetupBuilder.h.

◆ kMatCreatorNrays

int cbm::kf::TrackingSetupBuilder::kMatCreatorNrays {3}
staticconstexprprivate

Number of rays per dimension for the material budget.

Definition at line 94 of file CbmKfTrackingSetupBuilder.h.

Referenced by Init().

◆ kMatCreatorPitch

double cbm::kf::TrackingSetupBuilder::kMatCreatorPitch {0.1}
staticconstexprprivate

Material budget map minimal bin size [cm].

Definition at line 92 of file CbmKfTrackingSetupBuilder.h.

◆ kMatCreatorSafeMode

bool cbm::kf::TrackingSetupBuilder::kMatCreatorSafeMode {true}
staticconstexprprivate

Safe mode of the material map creation.

Definition at line 95 of file CbmKfTrackingSetupBuilder.h.

Referenced by Init().

◆ kTargFieldInitStep

double cbm::kf::TrackingSetupBuilder::kTargFieldInitStep {2.5}
staticconstexprprivate

Step between nodes in the target field initialization [cm].

Definition at line 96 of file CbmKfTrackingSetupBuilder.h.

◆ kTargMaterialOffset

double cbm::kf::TrackingSetupBuilder::kTargMaterialOffset {1}
staticconstexprprivate

Offset between target upper limit and its material zMax [cm].

Definition at line 97 of file CbmKfTrackingSetupBuilder.h.


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