CbmRoot
Loading...
Searching...
No Matches
TrackingGeoSetupFactory Class Referenceabstract

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

#include <CbmKfTrackingGeoSetupFactory.h>

Inheritance diagram for TrackingGeoSetupFactory:
[legend]
Collaboration diagram for 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_t & GetFieldFunction () const override
 Access to field function.
 
virtual Setup< double > Create (FloatTag< double > floatTag, EFieldMode fldMode) const =0
 Method to create a setup with double-precision floating point type.
 
virtual Setup< float > Create (FloatTag< float > floatTag, EFieldMode fldMode) const =0
 Method to create a setup with single-precision floating point type.
 
virtual Setup< fvecCreate (FloatTag< fvec > floatTag, EFieldMode fldMode) const =0
 Method to create a setup with vectorized floating point type.
 

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

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

Definition at line 68 of file CbmKfTrackingGeoSetupFactory.h.

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.

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.

◆ Create() [1/6]

virtual Setup< double > cbm::algo::kf::ISetupFactory::Create ( FloatTag< double > floatTag,
EFieldMode fldMode ) const
pure virtualinherited

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

Parameters
floatTagFloating point tag
fldModeField mode

Implemented in cbm::kf::TrackingGeoSetupFactory.

◆ Create() [2/6]

virtual Setup< float > cbm::algo::kf::ISetupFactory::Create ( FloatTag< float > floatTag,
EFieldMode fldMode ) const
pure virtualinherited

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

Parameters
floatTagFloating point tag
fldModeField mode

Implemented in cbm::kf::TrackingGeoSetupFactory.

◆ Create() [3/6]

virtual Setup< fvec > cbm::algo::kf::ISetupFactory::Create ( FloatTag< fvec > floatTag,
EFieldMode fldMode ) const
pure virtualinherited

Method to create a setup with vectorized floating point type.

Parameters
floatTagFloating point tag
fldModeField mode

Implemented in cbm::kf::TrackingGeoSetupFactory.

◆ Create() [4/6]

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

Method to create a setup with vectorized floating point type.

Parameters
floatTagFloating point tag
fldModeField mode

Definition at line 51 of file CbmKfTrackingGeoSetupFactory.h.

◆ Create() [5/6]

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

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

Parameters
floatTagFloating point tag
fldModeField mode

Definition at line 35 of file CbmKfTrackingGeoSetupFactory.h.

◆ Create() [6/6]

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

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

Parameters
floatTagFloating point tag
fldModeField mode

Definition at line 43 of file CbmKfTrackingGeoSetupFactory.h.

◆ 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.

◆ 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.

◆ 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.

◆ MaterialCacheFile()

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

Gets the material budget cache-file.

Definition at line 151 of file CbmKfTrackingGeoSetupFactory.cxx.

◆ 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.

Member Data Documentation

◆ fBuilder

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

KF-setup builder.

Definition at line 81 of file CbmKfTrackingGeoSetupFactory.h.

◆ fvbDetHasHits

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

Does detector subsystem have hits?

Definition at line 83 of file CbmKfTrackingGeoSetupFactory.h.

◆ fvbDetInGeometry

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

Is detector subsystem in geometry?

Definition at line 82 of file CbmKfTrackingGeoSetupFactory.h.

◆ 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.

◆ 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.

◆ 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.

◆ 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: