CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::Setup< F > Class Template Reference

KF-framework representation of the detector setup. More...

#include <KfSetup.h>

Inheritance diagram for cbm::algo::kf::Setup< F >:
[legend]
Collaboration diagram for cbm::algo::kf::Setup< F >:
[legend]

Public Member Functions

 Setup ()=default
 Default constructor (for boost serialization)
 
 Setup (const ModuleIndexMap &moduleIndexMap, const std::vector< MaterialMap > &materialLayers, std::vector< ActiveLayer< F > > activeLayers, const Field< F > &field, const Target< F > &target)
 Constructor.
 
template<typename FSrc>
 Setup (const Setup< FSrc > &other)
 Copy-convert constructor.
 
 Setup (const Setup &)=default
 Default copy constructor.
 
 Setup (Setup &&)=default
 Move constructor.
 
 ~Setup ()=default
 Destructor.
 
Setupoperator= (const Setup &other)=default
 Copy assignment operator.
 
Setupoperator= (Setup &&)=default
 Move assignment operator.
 
template<class EDetID>
Setup CreateSetupWithDisabledLayers (const std::vector< std::pair< EDetID, int > > &toDisable) const
 Creates another setup from this with some of the layers disabled.
 
template<class EDetID>
void DisableLayer (EDetID iDet, int iLoc)
 Disables geo layer.
 
const ActiveLayer< F > & GetActiveLayer (int iLayer) const
 Gets active layer instance.
 
const auto & GetActiveLayers () const
 Gets active layers container.
 
template<class EDetID>
const ActiveLayer< F > & GetActiveLayer (EDetID iDet, int iLoc) const
 Gets active layer instance.
 
const Field< F > & GetField () const
 Makes an instance of the field depending on the template parameter.
 
const MaterialMapGetMaterial (int iLayer) const
 Gets material layer.
 
template<class EDetID>
const MaterialMapGetMaterial (EDetID iDet, int iLoc) const
 Gets material layer from external indices.
 
const ModuleIndexMapGetIndexMap () const
 Gets module index map.
 
int GetNofLayers () const
 Gets number of geometry layers.
 
template<class EDetID>
int GetNofLayers (EDetID iDet) const
 Gets number of layers for detector.
 
const Target< F > & GetTarget () const
 Gets target.
 
std::string ToString (int verbosity=1, int indentLevel=0) const
 String representation of the class contents.
 
template<class EDetID>
Setup< FCreateSetupWithDisabledLayers (const std::vector< std::pair< EDetID, int > > &toDisableInp) const
 

Private Member Functions

bool Validate () const
 Validates setup as a system of magnetic field, target and field.
 
template<class Archive>
void serialize (Archive &ar, const unsigned int)
 

Private Attributes

ModuleIndexMap fModuleIndexMap {}
 Index map (internal->external)
 
std::vector< MaterialMapfvMaterialLayers {}
 Container for material maps.
 
std::vector< ActiveLayer< F > > fvActiveLayers {}
 Container for active layers.
 
Field< FfField {}
 Magnetic field.
 
Target< FfTarget {}
 Target layer.
 

Friends

template<typename>
class Setup
 
class boost::serialization::access
 Serialization method.
 

Detailed Description

template<typename F>
class cbm::algo::kf::Setup< F >

KF-framework representation of the detector setup.

Template Parameters
FUnderlying floating-point data type

Definition at line 37 of file KfSetup.h.

Constructor & Destructor Documentation

◆ Setup() [1/5]

template<typename F>
cbm::algo::kf::Setup< F >::Setup ( )
default

Default constructor (for boost serialization)

◆ Setup() [2/5]

template<typename F>
cbm::algo::kf::Setup< F >::Setup ( const ModuleIndexMap & moduleIndexMap,
const std::vector< MaterialMap > & materialLayers,
std::vector< ActiveLayer< F > > activeLayers,
const Field< F > & field,
const Target< F > & target )
inline

Constructor.

Parameters
moduleIndexMapA map of module indices
materialLayersA vector of material layers
activeLayersA layer of active layer properties (NOTE: resource is moved)
fieldMagnetic field representation
targetTarget information

Definition at line 52 of file KfSetup.h.

References fField, fModuleIndexMap, fTarget, fvActiveLayers, fvMaterialLayers, and Validate().

◆ Setup() [3/5]

template<typename F>
template<typename FSrc>
cbm::algo::kf::Setup< F >::Setup ( const Setup< FSrc > & other)
inline

Copy-convert constructor.

Template Parameters
FSrcUnderlying floating-point data type of the source

Definition at line 72 of file KfSetup.h.

References F, fField, fModuleIndexMap, fTarget, fvActiveLayers, fvMaterialLayers, and Setup.

◆ Setup() [4/5]

template<typename F>
cbm::algo::kf::Setup< F >::Setup ( const Setup< F > & )
default

Default copy constructor.

References Setup.

◆ Setup() [5/5]

template<typename F>
cbm::algo::kf::Setup< F >::Setup ( Setup< F > && )
default

Move constructor.

References Setup.

◆ ~Setup()

template<typename F>
cbm::algo::kf::Setup< F >::~Setup ( )
default

Destructor.

Member Function Documentation

◆ CreateSetupWithDisabledLayers() [1/2]

template<typename F>
template<class EDetID>
Setup cbm::algo::kf::Setup< F >::CreateSetupWithDisabledLayers ( const std::vector< std::pair< EDetID, int > > & toDisable) const

Creates another setup from this with some of the layers disabled.

Template Parameters
EDetIDdetector ID enumeration
Parameters
toDisableA vector of pairs {iDet, iLoc} of inactive layers to be disabled
Note
if for particular iDet, iLoc == -1, all the stations of this detector are disabled

References Setup.

Referenced by cbm::algo::kf::Setup< cbm::algo::kf::fvec >::CreateSetupWithDisabledLayers().

◆ CreateSetupWithDisabledLayers() [2/2]

template<typename F>
template<class EDetID>
Setup< F > cbm::algo::kf::Setup< F >::CreateSetupWithDisabledLayers ( const std::vector< std::pair< EDetID, int > > & toDisableInp) const

Definition at line 203 of file KfSetup.h.

◆ DisableLayer()

template<typename F>
template<class EDetID>
void cbm::algo::kf::Setup< F >::DisableLayer ( EDetID iDet,
int iLoc )

Disables geo layer.

Template Parameters
EDetIDIndex of the detector subsystem
Parameters
iDetDetectorID
iLocLocal index of the module

Definition at line 262 of file KfSetup.h.

References cbm::algo::kf::utils::simd::Cast(), fField, fModuleIndexMap, fTarget, fvActiveLayers, and fvMaterialLayers.

◆ GetActiveLayer() [1/2]

template<typename F>
template<class EDetID>
const ActiveLayer< F > & cbm::algo::kf::Setup< F >::GetActiveLayer ( EDetID iDet,
int iLoc ) const
inline

Gets active layer instance.

Template Parameters
EDetIDIndex of the detector subsystem
Parameters
iDetDetectorID
iLocLocal index of the module

Definition at line 125 of file KfSetup.h.

References fModuleIndexMap, and fvActiveLayers.

◆ GetActiveLayer() [2/2]

template<typename F>
const ActiveLayer< F > & cbm::algo::kf::Setup< F >::GetActiveLayer ( int iLayer) const
inline

Gets active layer instance.

Parameters
iLayerIndex of layer

Definition at line 115 of file KfSetup.h.

References fvActiveLayers.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create(), and cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ GetActiveLayers()

template<typename F>
const auto & cbm::algo::kf::Setup< F >::GetActiveLayers ( ) const
inline

Gets active layers container.

Definition at line 118 of file KfSetup.h.

References fvActiveLayers.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create().

◆ GetField()

template<typename F>
const Field< F > & cbm::algo::kf::Setup< F >::GetField ( ) const
inline

Makes an instance of the field depending on the template parameter.

Exceptions
std::logic_errorIf the particular field member is undefined (nullopt)

Definition at line 132 of file KfSetup.h.

References fField.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create().

◆ GetIndexMap()

template<typename F>
const ModuleIndexMap & cbm::algo::kf::Setup< F >::GetIndexMap ( ) const
inline

Gets module index map.

Definition at line 149 of file KfSetup.h.

References fModuleIndexMap.

Referenced by cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ GetMaterial() [1/2]

template<typename F>
template<class EDetID>
const MaterialMap & cbm::algo::kf::Setup< F >::GetMaterial ( EDetID iDet,
int iLoc ) const
inline

Gets material layer from external indices.

Template Parameters
EDetIDIndex of the detector subsystem
Parameters
iDetDetectorID
iLocLocal index of the module

Definition at line 143 of file KfSetup.h.

References fModuleIndexMap, and fvMaterialLayers.

◆ GetMaterial() [2/2]

template<typename F>
const MaterialMap & cbm::algo::kf::Setup< F >::GetMaterial ( int iLayer) const
inline

Gets material layer.

Parameters
iLayerIndex of layer

Definition at line 136 of file KfSetup.h.

References fvMaterialLayers.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create(), and cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ GetNofLayers() [1/2]

template<typename F>
int cbm::algo::kf::Setup< F >::GetNofLayers ( ) const
inline

Gets number of geometry layers.

Definition at line 152 of file KfSetup.h.

References fModuleIndexMap.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create(), and cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ GetNofLayers() [2/2]

template<typename F>
template<class EDetID>
int cbm::algo::kf::Setup< F >::GetNofLayers ( EDetID iDet) const
inline

Gets number of layers for detector.

Template Parameters
EDetIdA type of the detector ID

Definition at line 157 of file KfSetup.h.

References fModuleIndexMap.

◆ GetTarget()

template<typename F>
const Target< F > & cbm::algo::kf::Setup< F >::GetTarget ( ) const
inline

Gets target.

Definition at line 163 of file KfSetup.h.

References fTarget.

Referenced by cbm::algo::ca::SearchWindowMapContainerFactory::Create().

◆ operator=() [1/2]

template<typename F>
Setup & cbm::algo::kf::Setup< F >::operator= ( const Setup< F > & other)
default

Copy assignment operator.

References Setup.

◆ operator=() [2/2]

template<typename F>
Setup & cbm::algo::kf::Setup< F >::operator= ( Setup< F > && )
default

Move assignment operator.

References Setup.

◆ serialize()

template<typename F>
template<class Archive>
void cbm::algo::kf::Setup< F >::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Definition at line 188 of file KfSetup.h.

References fField, fModuleIndexMap, fTarget, fvActiveLayers, and fvMaterialLayers.

◆ ToString()

template<typename T>
std::string Setup::ToString ( int verbosity = 1,
int indentLevel = 0 ) const

String representation of the class contents.

Parameters
verbosityA verbose level for output
indentLevelIndent level of the string output

Definition at line 20 of file KfSetup.cxx.

References fField, fModuleIndexMap, fTarget, fvActiveLayers, fvMaterialLayers, and ToString().

Referenced by cbm::algo::kf::SetupBuilder::SetFromSetup(), and ToString().

◆ Validate()

template<typename T>
bool Setup::Validate ( ) const
private

Validates setup as a system of magnetic field, target and field.

Note
In current version of the kf::Setup, (1) Number of material and field layers should be equal (2) z-coordinates of the material layers should correspond to ones of field layers (3) z-coordinate of the target is lower, then the first layer of material/field

Definition at line 45 of file KfSetup.cxx.

References Validate().

Referenced by Setup(), and Validate().

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<typename F>
friend class boost::serialization::access
friend

Serialization method.

Definition at line 186 of file KfSetup.h.

◆ Setup

template<typename F>
template<typename>
friend class Setup
friend

Definition at line 39 of file KfSetup.h.

References Setup.

Referenced by CreateSetupWithDisabledLayers(), operator=(), operator=(), Setup, Setup(), Setup(), and Setup().

Member Data Documentation

◆ fField

template<typename F>
Field<F> cbm::algo::kf::Setup< F >::fField {}
private

Magnetic field.

Definition at line 174 of file KfSetup.h.

Referenced by DisableLayer(), GetField(), serialize(), Setup(), Setup(), and ToString().

◆ fModuleIndexMap

template<typename F>
ModuleIndexMap cbm::algo::kf::Setup< F >::fModuleIndexMap {}
private

Index map (internal->external)

Definition at line 171 of file KfSetup.h.

Referenced by DisableLayer(), GetActiveLayer(), GetIndexMap(), GetMaterial(), GetNofLayers(), GetNofLayers(), serialize(), Setup(), Setup(), and ToString().

◆ fTarget

template<typename F>
Target<F> cbm::algo::kf::Setup< F >::fTarget {}
private

◆ fvActiveLayers

template<typename F>
std::vector<ActiveLayer<F> > cbm::algo::kf::Setup< F >::fvActiveLayers {}
private

Container for active layers.

Definition at line 173 of file KfSetup.h.

Referenced by DisableLayer(), GetActiveLayer(), GetActiveLayer(), GetActiveLayers(), serialize(), Setup(), Setup(), and ToString().

◆ fvMaterialLayers

template<typename F>
std::vector<MaterialMap> cbm::algo::kf::Setup< F >::fvMaterialLayers {}
private

Container for material maps.

Definition at line 172 of file KfSetup.h.

Referenced by DisableLayer(), GetMaterial(), GetMaterial(), serialize(), Setup(), Setup(), and ToString().


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