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

A factory for geometry tracking KF-setup in CBM. More...

#include <CbmKfTrackingGeoSetupFactory.h>

Inheritance diagram for cbm::kf::TrackingGeoSetupFactory:
[legend]
Collaboration diagram for cbm::kf::TrackingGeoSetupFactory:
[legend]

Public Member Functions

 TrackingGeoSetupFactory (bool requireHitPresence=false)
 Constructor (RAII)
 
Setup< double > Create (FloatTag< double >, EFieldMode fldMode) const override
 Method to create a setup with double-precision floating point type.
 
Setup< float > Create (FloatTag< float >, EFieldMode fldMode) const override
 Method to create a setup with single-precision floating point type.
 
Setup< fvecCreate (FloatTag< algo::kf::fvec >, EFieldMode fldMode) const override
 Method to create a setup with vectorized floating point type.
 
bool IsInGeometry (algo::ca::EDetectorID detID) const
 Checks, if a tracking detector is in geometry.
 
bool HasHits (algo::ca::EDetectorID detID) const
 Checks, if a tracking detector has hits.
 
const algo::kf::FieldFn_tGetFieldFunction () const override
 Access to field function.
 

Private Types

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

Private Member Functions

void CheckDetectorPresence (bool requireHitPresence)
 Check detector presence.
 
void SetMaterialCacheFile (const TString &filename, size_t geoHash)
 Sets the material budget cache file name.
 
std::string MaterialCacheFile () const
 Gets the material budget cache-file.
 

Private Attributes

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?
 

Static Private Attributes

static constexpr DetectorIDArray_t< const char * > kDetHitBrName
 Hit branch names vs. 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].
 

Detailed Description

A factory for geometry tracking KF-setup in CBM.

Definition at line 25 of file CbmKfTrackingGeoSetupFactory.h.

Member Typedef Documentation

◆ DetectorIDArray_t

Constructor & Destructor Documentation

◆ TrackingGeoSetupFactory()

TrackingGeoSetupFactory::TrackingGeoSetupFactory ( bool requireHitPresence = false)

Constructor (RAII)

Parameters
requireHitPresenceRequires hits to be in data-sample to infer the subsystem presence
Exceptions
std::runtime_error,ifthe internal fields cannot be properly initialized

Definition at line 41 of file CbmKfTrackingGeoSetupFactory.cxx.

References CheckDetectorPresence(), fBuilder, fvbDetInGeometry, cbm::RecoSetupManager::GetSetup(), cbm::kf::Target::Instance(), cbm::RecoSetupManager::Instance(), CbmSetup::Instance(), kMatCreatorNrays, kMatCreatorSafeMode, MaterialCacheFile(), cbm::algo::kf::defs::MinField, and cbm::kf::tools::SetOriginalCbmField().

Member Function Documentation

◆ CheckDetectorPresence()

void TrackingGeoSetupFactory::CheckDetectorPresence ( bool requireHitPresence)
private

Check detector presence.

Parameters
requireHitPresenceRequires hits to be in data-sample to infer the subsystem presence

Definition at line 124 of file CbmKfTrackingGeoSetupFactory.cxx.

References fvbDetHasHits, fvbDetInGeometry, CbmSetup::Instance(), CbmSetup::IsActive(), kDetHitBrName, cbm::algo::ca::ToCbmModuleId(), and cbm::util::ToString().

Referenced by TrackingGeoSetupFactory().

◆ Create() [1/3]

Setup< fvec > cbm::kf::TrackingGeoSetupFactory::Create ( FloatTag< algo::kf::fvec > ,
EFieldMode fldMode ) const
inlineoverridevirtual

Method to create a setup with vectorized floating point type.

Parameters
floatTagFloating point tag
fldModeField mode

Implements cbm::algo::kf::ISetupFactory.

Definition at line 51 of file CbmKfTrackingGeoSetupFactory.h.

References fBuilder.

◆ Create() [2/3]

Setup< double > cbm::kf::TrackingGeoSetupFactory::Create ( FloatTag< double > ,
EFieldMode fldMode ) const
inlineoverridevirtual

Method to create a setup with double-precision floating point type.

Parameters
floatTagFloating point tag
fldModeField mode

Implements cbm::algo::kf::ISetupFactory.

Definition at line 35 of file CbmKfTrackingGeoSetupFactory.h.

References fBuilder.

◆ Create() [3/3]

Setup< float > cbm::kf::TrackingGeoSetupFactory::Create ( FloatTag< float > ,
EFieldMode fldMode ) const
inlineoverridevirtual

Method to create a setup with single-precision floating point type.

Parameters
floatTagFloating point tag
fldModeField mode

Implements cbm::algo::kf::ISetupFactory.

Definition at line 43 of file CbmKfTrackingGeoSetupFactory.h.

References fBuilder.

◆ GetFieldFunction()

const algo::kf::FieldFn_t & cbm::kf::TrackingGeoSetupFactory::GetFieldFunction ( ) const
inlineoverridevirtual

Access to field function.

Implements cbm::algo::kf::ISetupFactory.

Definition at line 63 of file CbmKfTrackingGeoSetupFactory.h.

References fBuilder.

◆ HasHits()

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

Checks, if a tracking detector has hits.

Definition at line 60 of file CbmKfTrackingGeoSetupFactory.h.

References fvbDetHasHits.

◆ IsInGeometry()

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

Checks, if a tracking detector is in geometry.

Definition at line 57 of file CbmKfTrackingGeoSetupFactory.h.

References fvbDetInGeometry.

◆ MaterialCacheFile()

std::string TrackingGeoSetupFactory::MaterialCacheFile ( ) const
private

Gets the material budget cache-file.

Definition at line 151 of file CbmKfTrackingGeoSetupFactory.cxx.

References CbmSetup::GetProvider(), CbmGeoSetupProvider::GetSetup(), CbmGeoSetup::GetTag(), and CbmSetup::Instance().

Referenced by TrackingGeoSetupFactory().

◆ SetMaterialCacheFile()

void cbm::kf::TrackingGeoSetupFactory::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 97 of file CbmKfTrackingGeoSetupFactory.h.

References fBuilder.

Member Data Documentation

◆ fBuilder

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

◆ fvbDetHasHits

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

Does detector subsystem have hits?

Definition at line 83 of file CbmKfTrackingGeoSetupFactory.h.

Referenced by CheckDetectorPresence(), and HasHits().

◆ fvbDetInGeometry

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

Is detector subsystem in geometry?

Definition at line 82 of file CbmKfTrackingGeoSetupFactory.h.

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

◆ kDetHitBrName

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

Hit branch names vs. EDetectorID.

Definition at line 70 of file CbmKfTrackingGeoSetupFactory.h.

Referenced by CheckDetectorPresence().

◆ kMatCreatorMaxNbins

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

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

Definition at line 75 of file CbmKfTrackingGeoSetupFactory.h.

◆ kMatCreatorNrays

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

Number of rays per dimension for the material budget.

Definition at line 76 of file CbmKfTrackingGeoSetupFactory.h.

Referenced by TrackingGeoSetupFactory().

◆ kMatCreatorPitch

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

Material budget map minimal bin size [cm].

Definition at line 74 of file CbmKfTrackingGeoSetupFactory.h.

◆ kMatCreatorSafeMode

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

Safe mode of the material map creation.

Definition at line 77 of file CbmKfTrackingGeoSetupFactory.h.

Referenced by TrackingGeoSetupFactory().

◆ kTargFieldInitStep

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

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

Definition at line 78 of file CbmKfTrackingGeoSetupFactory.h.

◆ kTargMaterialOffset

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

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

Definition at line 79 of file CbmKfTrackingGeoSetupFactory.h.


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