CbmRoot
|
Encapsulation of the kf::Setup initialization routines for CBM. More...
#include <CbmKfTrackingSetupBuilder.h>
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 | |
TrackingSetupBuilder & | operator= (const TrackingSetupBuilder &)=delete |
TrackingSetupBuilder & | operator= (TrackingSetupBuilder &&)=delete |
Static Public Member Functions | |
static TrackingSetupBuilder * | Instance () |
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 TrackingSetupBuilder * | fpInstance {nullptr} |
static std::mutex | fMutex {} |
Encapsulation of the kf::Setup initialization routines for CBM.
Definition at line 24 of file CbmKfTrackingSetupBuilder.h.
|
private |
Definition at line 59 of file CbmKfTrackingSetupBuilder.h.
|
delete |
|
delete |
|
privatedefault |
Default constructor.
|
privatedefault |
Destructor.
|
private |
Check detector presence.
Definition at line 38 of file CbmKfTrackingSetupBuilder.cxx.
References fvbDetHasHits, fvbDetInGeometry, CbmSetup::Instance(), CbmSetup::IsActive(), kDetHitBrName, cbm::algo::ca::ToCbmModuleId(), and ToString().
Referenced by Init(), and Instance().
std::shared_ptr< const cbm::algo::kf::Setup< double > > TrackingSetupBuilder::GetSharedGeoSetup | ( | ) |
Gets a shared pointer to the geometry setup.
Definition at line 58 of file CbmKfTrackingSetupBuilder.cxx.
References fpGeoSetup, and MakeSetup().
Referenced by CbmKfTrackFitter::Init().
|
inline |
Checks, if a tracking detector has hits.
Definition at line 49 of file CbmKfTrackingSetupBuilder.h.
References fvbDetHasHits.
|
private |
Initializes the instance.
Definition at line 70 of file CbmKfTrackingSetupBuilder.cxx.
References cbm::algo::kf::SetupBuilder::AddLayer(), CheckDetectorPresence(), fbInitialized, fBuilder, fvbDetInGeometry, cbm::kf::Target::Instance(), CbmMuchTrackingInterface::Instance(), CbmMvdTrackingInterface::Instance(), CbmStsTrackingInterface::Instance(), CbmTofTrackingInterface::Instance(), CbmTrdTrackingInterface::Instance(), kMatCreatorNrays, kMatCreatorSafeMode, cbm::algo::kf::defs::MinField, cbm::algo::kf::SetupBuilder::Reset(), cbm::algo::kf::SetupBuilder::SetFieldFunction(), cbm::algo::kf::SetupBuilder::SetMaterialMapFactory(), and cbm::algo::kf::SetupBuilder::SetTargetProperty().
Referenced by MakeSetup().
|
static |
Instance access.
Definition at line 137 of file CbmKfTrackingSetupBuilder.cxx.
References CheckDetectorPresence(), fMutex, fpInstance, CbmSetup::GetProvider(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetup::GetTag(), CbmSetup::Instance(), and SetMaterialCacheFile().
Referenced by CbmKfTrackFitter::Init(), and CbmL1::Init().
|
inline |
Checks, if a tracking detector is used (is in geometry and has hits)
Definition at line 46 of file CbmKfTrackingSetupBuilder.h.
References fvbDetInGeometry.
|
inline |
Makes setup object.
fldMode | Field mode (kf::EFiledMode) |
Definition at line 37 of file CbmKfTrackingSetupBuilder.h.
References fbInitialized, fBuilder, Init(), and cbm::algo::kf::SetupBuilder::MakeSetup().
Referenced by GetSharedGeoSetup().
|
delete |
|
delete |
|
inlineprivate |
Sets the material budget cache file name.
filename | Material budget cache file name |
geoHash | A 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().
|
private |
Checks, if the setup was already initialized.
Definition at line 114 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init(), and MakeSetup().
|
private |
KF-setup builder.
Definition at line 102 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init(), MakeSetup(), and SetMaterialCacheFile().
|
inlinestaticprivate |
Definition at line 100 of file CbmKfTrackingSetupBuilder.h.
Referenced by Instance().
|
private |
An instance of the tracking KF-setup in a double precision.
Definition at line 109 of file CbmKfTrackingSetupBuilder.h.
Referenced by GetSharedGeoSetup().
|
inlinestaticprivate |
Definition at line 99 of file CbmKfTrackingSetupBuilder.h.
Referenced by Instance().
|
private |
Does detector subsystem have hits?
Definition at line 104 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence(), and HasHits().
|
private |
Is detector subsystem in geometry?
Definition at line 103 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence(), Init(), and IsInGeometry().
|
staticconstexprprivate |
Hit branch names vs. cbm::algo::ca::EDetectorID.
Definition at line 62 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence().
|
staticconstexprprivate |
Max number of bins in the material budget map in x(y) axis.
Definition at line 93 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Number of rays per dimension for the material budget.
Definition at line 94 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init().
|
staticconstexprprivate |
Material budget map minimal bin size [cm].
Definition at line 92 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Safe mode of the material map creation.
Definition at line 95 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init().
|
staticconstexprprivate |
Step between nodes in the target field initialization [cm].
Definition at line 96 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Offset between target upper limit and its material zMax [cm].
Definition at line 97 of file CbmKfTrackingSetupBuilder.h.