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. | |
void | SetIgnoreHitPresence (bool ok=true) |
Sets hits ignoring (DEBUG FLAG) | |
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. | |
bool | fbIgnoreHitPresence {false} |
Ignores hit presence, when active subsystems are determined. | |
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 67 of file CbmKfTrackingSetupBuilder.h.
|
delete |
|
delete |
|
privatedefault |
Default constructor.
|
privatedefault |
Destructor.
|
private |
Check detector presence.
Definition at line 38 of file CbmKfTrackingSetupBuilder.cxx.
References fbIgnoreHitPresence, fvbDetHasHits, fvbDetInGeometry, CbmSetup::Instance(), CbmSetup::IsActive(), kDetHitBrName, cbm::algo::ca::ToCbmModuleId(), and ToString().
Referenced by Init(), Instance(), and SetIgnoreHitPresence().
std::shared_ptr< const cbm::algo::kf::Setup< double > > TrackingSetupBuilder::GetSharedGeoSetup | ( | ) |
Gets a shared pointer to the geometry setup.
Definition at line 64 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 76 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 143 of file CbmKfTrackingSetupBuilder.cxx.
References CheckDetectorPresence(), fMutex, fpInstance, CbmSetup::GetProvider(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetup::GetTag(), CbmSetup::Instance(), and SetMaterialCacheFile().
Referenced by CbmOnlineParWrite::AddCa(), 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 |
|
inline |
Sets hits ignoring (DEBUG FLAG)
Definition at line 52 of file CbmKfTrackingSetupBuilder.h.
References CheckDetectorPresence(), fbIgnoreHitPresence, and fbInitialized.
|
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 90 of file CbmKfTrackingSetupBuilder.h.
References fBuilder, and cbm::algo::kf::SetupBuilder::SetMaterialCacheFile().
Referenced by Instance().
|
private |
Ignores hit presence, when active subsystems are determined.
Definition at line 123 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence(), and SetIgnoreHitPresence().
|
private |
Checks, if the setup was already initialized.
Definition at line 122 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init(), MakeSetup(), and SetIgnoreHitPresence().
|
private |
KF-setup builder.
Definition at line 110 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init(), MakeSetup(), and SetMaterialCacheFile().
|
inlinestaticprivate |
Definition at line 108 of file CbmKfTrackingSetupBuilder.h.
Referenced by Instance().
|
private |
An instance of the tracking KF-setup in a double precision.
Definition at line 117 of file CbmKfTrackingSetupBuilder.h.
Referenced by GetSharedGeoSetup().
|
inlinestaticprivate |
Definition at line 107 of file CbmKfTrackingSetupBuilder.h.
Referenced by Instance().
|
private |
Does detector subsystem have hits?
Definition at line 112 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence(), and HasHits().
|
private |
Is detector subsystem in geometry?
Definition at line 111 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence(), Init(), and IsInGeometry().
|
staticconstexprprivate |
Hit branch names vs. cbm::algo::ca::EDetectorID.
Definition at line 70 of file CbmKfTrackingSetupBuilder.h.
Referenced by CheckDetectorPresence().
|
staticconstexprprivate |
Max number of bins in the material budget map in x(y) axis.
Definition at line 101 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Number of rays per dimension for the material budget.
Definition at line 102 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init().
|
staticconstexprprivate |
Material budget map minimal bin size [cm].
Definition at line 100 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Safe mode of the material map creation.
Definition at line 103 of file CbmKfTrackingSetupBuilder.h.
Referenced by Init().
|
staticconstexprprivate |
Step between nodes in the target field initialization [cm].
Definition at line 104 of file CbmKfTrackingSetupBuilder.h.
|
staticconstexprprivate |
Offset between target upper limit and its material zMax [cm].
Definition at line 105 of file CbmKfTrackingSetupBuilder.h.