CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::StationInitializer Class Reference

A base class which provides interface to L1Algo station geometry. More...

#include <CaStationInitializer.h>

Collaboration diagram for cbm::algo::ca::StationInitializer:
[legend]

Public Types

enum class  EInitKey {
  kDetectorID , kStationID , kTrackingStatus , kXmax ,
  kYmax , kType , kTimeInfo , kFieldStatus ,
  kZref , kZmin , kZmax , kFieldSlice ,
  kGeoLayerID , kEnd
}
 Enumeration of fields, which must be initialized so the object can pass the threshold. More...
 
using InitController_t = ca::ObjectInitController<static_cast<int>(EInitKey::kEnd), EInitKey>
 

Public Member Functions

 StationInitializer ()=default
 Default constructor.
 
 StationInitializer (EDetectorID detetorID, int stationID) noexcept
 Constructor from stationID and detectorID.
 
 ~StationInitializer () noexcept=default
 Destructor.
 
 StationInitializer (const StationInitializer &other)=default
 Copy constructor.
 
bool operator< (const StationInitializer &right) const
 Less operator for StationInitializer object to sort stations in Z.
 
EDetectorID GetDetectorID () const
 Gets detector ID.
 
int GetFieldStatus () const
 Gets field status: 0 - station is outside the field, 1 - station is inside the field.
 
const InitController_tGetInitController () const
 Gets a const reference to the ca::ObjectInitController object.
 
const Station< fvec > & GetStation () const
 Gets a reference to ca::Station info field of the L1BaseStation info.
 
int GetStationID () const
 Gets station ID.
 
int GetStationType () const
 Gets station type.
 
bool GetTrackingStatus () const
 Gets tracking status: true - station is active for tracking, false - station exists, but not used in tracking.
 
double GetXmax () const
 Gets maximum distance between station center and its edge in x direction.
 
double GetYmax () const
 Gets maximum distance between station center and its edge in y direction.
 
double GetZref () const
 Gets double precised z position of the station [cm].
 
double GetZmin () const
 Gets min z of the station [cm].
 
double GetZmax () const
 Gets max z of the station [cm].
 
fvec GetZsimdVec () const
 Gets SIMD vectorized z position of the station [cm].
 
void Reset ()
 Resets fields to the default values.
 
void SetDetectorID (EDetectorID inID)
 Sets detector ID.
 
void SetFieldStatus (int fieldStatus)
 Sets flag: true - station is placed in field, false - station is placed outside the field.
 
void SetFieldFunction (const std::function< void(const double(&xyz)[3], double(&B)[3])> &getFieldValue)
 Sets arrays of the approcimation.
 
void SetGeoLayerID (int geoLayerID)
 Sets geometry ID (index of the layer in the geometrical setup)
 
void SetStationID (int inID)
 Sets station ID.
 
void SetStationType (int inType)
 Sets type of station.
 
void SetTimeInfo (int inTimeInfo)
 Sets flag: 0 - time information is not provided by this detector type 1 - time information is provided by the detector and can be used in tracking.
 
void SetTrackingStatus (bool flag)
 Sets tracking status: true - station is active for tracking, false - station exists, but not used in tracking.
 
void SetXmax (double aSize)
 Sets maximum distance between station center and its edge in x direction.
 
void SetYmax (double aSize)
 Sets maximum distance between station center and its edge in y direction.
 
void SetZref (double inZ)
 Sets reference z position of the station.
 
void SetZmin (double inZ)
 Sets min z of the station.
 
void SetZmax (double inZ)
 Sets max z of the station.
 
void Swap (StationInitializer &other) noexcept
 Swap method for easy implementation of move constructor and copy and move assignment operator.
 
std::string ToString (int verbosityLevel=0, int indentLevel=0) const
 String representation of class contents.
 

Private Types

enum class  EManagementFlag { kThicknessMapMoved , kEnd }
 Enumeration for internal logic control. More...
 
using ManagementFlags_t = std::bitset<static_cast<int>(EManagementFlag::kEnd)>
 

Private Attributes

EDetectorID fDetectorID {static_cast<EDetectorID>(0)}
 Detector ID.
 
int fStationID {-1}
 Local ID of a station.
 
bool fTrackingStatus {false}
 Tracking status: true - station is used for tracking.
 
double fXmax {0}
 Maximum distance between station center and its edge in x direction.
 
double fYmax {0}
 Maximum distance between station center and its edge in y direction.
 
double fZref {0}
 reference z
 
double fZmin {0}
 min z
 
double fZmax {0}
 max z
 
Station< fvecfStation {}
 ca::Station structure, describes a station in L1Algo
 
InitController_t fInitController {}
 Class fileds initialization flags.
 
ManagementFlags_t fManagementFlags {}
 bitset flags to manage internal behaviour of the class
 

Detailed Description

A base class which provides interface to L1Algo station geometry.

Definition at line 25 of file CaStationInitializer.h.

Member Typedef Documentation

◆ InitController_t

◆ ManagementFlags_t

using cbm::algo::ca::StationInitializer::ManagementFlags_t = std::bitset<static_cast<int>(EManagementFlag::kEnd)>
private

Definition at line 32 of file CaStationInitializer.h.

Member Enumeration Documentation

◆ EInitKey

Enumeration of fields, which must be initialized so the object can pass the threshold.

Enumerator
kDetectorID 

detector ID

kStationID 

station ID

kTrackingStatus 

flag, if station is used in tracking or not

kXmax 

max size in X direction

kYmax 

max size in Y direction

kType 

station type

kTimeInfo 

if time info is used (flag)

kFieldStatus 

if station is placed in field (flag)

kZref 

reference z of the station

kZmin 

min z of the station

kZmax 

max z of the station

kFieldSlice 

ca::Station.ca::FieldSlice object initialization

kGeoLayerID 

index of geo layer in geometrical setup (including possibly inactive stations)

kEnd 

Definition at line 37 of file CaStationInitializer.h.

◆ EManagementFlag

Enumeration for internal logic control.

Enumerator
kThicknessMapMoved 

if the thickness map was moved from the StationInitializer instance

kEnd 

Definition at line 27 of file CaStationInitializer.h.

Constructor & Destructor Documentation

◆ StationInitializer() [1/3]

cbm::algo::ca::StationInitializer::StationInitializer ( )
default

Default constructor.

◆ StationInitializer() [2/3]

StationInitializer::StationInitializer ( EDetectorID detetorID,
int stationID )
noexcept

Constructor from stationID and detectorID.

Definition at line 27 of file CaStationInitializer.cxx.

◆ ~StationInitializer()

cbm::algo::ca::StationInitializer::~StationInitializer ( )
defaultnoexcept

Destructor.

◆ StationInitializer() [3/3]

cbm::algo::ca::StationInitializer::StationInitializer ( const StationInitializer & other)
default

Copy constructor.

Member Function Documentation

◆ GetDetectorID()

EDetectorID cbm::algo::ca::StationInitializer::GetDetectorID ( ) const
inline

Gets detector ID.

Definition at line 75 of file CaStationInitializer.h.

References fDetectorID.

◆ GetFieldStatus()

int cbm::algo::ca::StationInitializer::GetFieldStatus ( ) const
inline

Gets field status: 0 - station is outside the field, 1 - station is inside the field.

Definition at line 78 of file CaStationInitializer.h.

References fStation.

◆ GetInitController()

const InitController_t & cbm::algo::ca::StationInitializer::GetInitController ( ) const
inline

Gets a const reference to the ca::ObjectInitController object.

Definition at line 81 of file CaStationInitializer.h.

References fInitController.

◆ GetStation()

const Station< fvec > & StationInitializer::GetStation ( ) const

Gets a reference to ca::Station info field of the L1BaseStation info.

Definition at line 45 of file CaStationInitializer.cxx.

References fDetectorID, fInitController, fStation, fStationID, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::IsFinalized().

◆ GetStationID()

int cbm::algo::ca::StationInitializer::GetStationID ( ) const
inline

Gets station ID.

Definition at line 87 of file CaStationInitializer.h.

References fStationID.

◆ GetStationType()

int cbm::algo::ca::StationInitializer::GetStationType ( ) const
inline

Gets station type.

Definition at line 90 of file CaStationInitializer.h.

References fStation.

◆ GetTrackingStatus()

bool cbm::algo::ca::StationInitializer::GetTrackingStatus ( ) const
inline

Gets tracking status: true - station is active for tracking, false - station exists, but not used in tracking.

Definition at line 93 of file CaStationInitializer.h.

References fTrackingStatus.

◆ GetXmax()

double cbm::algo::ca::StationInitializer::GetXmax ( ) const
inline

Gets maximum distance between station center and its edge in x direction.

Definition at line 96 of file CaStationInitializer.h.

References fXmax.

◆ GetYmax()

double cbm::algo::ca::StationInitializer::GetYmax ( ) const
inline

Gets maximum distance between station center and its edge in y direction.

Definition at line 99 of file CaStationInitializer.h.

References fYmax.

◆ GetZmax()

double cbm::algo::ca::StationInitializer::GetZmax ( ) const
inline

Gets max z of the station [cm].

Definition at line 108 of file CaStationInitializer.h.

References fZmax.

◆ GetZmin()

double cbm::algo::ca::StationInitializer::GetZmin ( ) const
inline

Gets min z of the station [cm].

Definition at line 105 of file CaStationInitializer.h.

References fZmin.

◆ GetZref()

double cbm::algo::ca::StationInitializer::GetZref ( ) const
inline

Gets double precised z position of the station [cm].

Definition at line 102 of file CaStationInitializer.h.

References fZref.

Referenced by operator<().

◆ GetZsimdVec()

fvec cbm::algo::ca::StationInitializer::GetZsimdVec ( ) const
inline

Gets SIMD vectorized z position of the station [cm].

Definition at line 111 of file CaStationInitializer.h.

References fStation.

◆ operator<()

bool cbm::algo::ca::StationInitializer::operator< ( const StationInitializer & right) const
inline

Less operator for StationInitializer object to sort stations in Z.

Definition at line 72 of file CaStationInitializer.h.

References GetZref().

◆ Reset()

void StationInitializer::Reset ( )

Resets fields to the default values.

Definition at line 37 of file CaStationInitializer.cxx.

References Swap().

◆ SetDetectorID()

◆ SetFieldFunction()

void StationInitializer::SetFieldFunction ( const std::function< void(const double(&xyz)[3], double(&B)[3])> & getFieldValue)

Sets arrays of the approcimation.

Parameters
getFieldA user function, which gets a xyz array of position coordinates and fills B array of magnetic field components in position

Magnetic field function type Signature: tuple<Bx, By, Bz>(x, y, z);

Definition at line 72 of file CaStationInitializer.cxx.

References fDetectorID, cbm::algo::ca::Station< DataT >::fieldSlice, fInitController, fStation, fStationID, fXmax, fYmax, fZref, cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::GetFlag(), kFieldSlice, kXmax, kYmax, kZref, cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag(), x, and y.

◆ SetFieldStatus()

void StationInitializer::SetFieldStatus ( int fieldStatus)

Sets flag: true - station is placed in field, false - station is placed outside the field.

Definition at line 107 of file CaStationInitializer.cxx.

References fInitController, fStation, kFieldStatus, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetGeoLayerID()

void StationInitializer::SetGeoLayerID ( int geoLayerID)

Sets geometry ID (index of the layer in the geometrical setup)

Definition at line 115 of file CaStationInitializer.cxx.

References fInitController, fStation, kGeoLayerID, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetStationID()

◆ SetStationType()

◆ SetTimeInfo()

void StationInitializer::SetTimeInfo ( int inTimeInfo)

Sets flag: 0 - time information is not provided by this detector type 1 - time information is provided by the detector and can be used in tracking.

Definition at line 167 of file CaStationInitializer.cxx.

References fInitController, fStation, kTimeInfo, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetTrackingStatus()

void StationInitializer::SetTrackingStatus ( bool flag)

Sets tracking status: true - station is active for tracking, false - station exists, but not used in tracking.

Definition at line 175 of file CaStationInitializer.cxx.

References fInitController, fTrackingStatus, kTrackingStatus, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetXmax()

void StationInitializer::SetXmax ( double aSize)

Sets maximum distance between station center and its edge in x direction.

Definition at line 149 of file CaStationInitializer.cxx.

References fInitController, fStation, fXmax, kXmax, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetYmax()

void StationInitializer::SetYmax ( double aSize)

Sets maximum distance between station center and its edge in y direction.

Definition at line 158 of file CaStationInitializer.cxx.

References fInitController, fStation, fYmax, kYmax, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ SetZmax()

void StationInitializer::SetZmax ( double inZ)

◆ SetZmin()

void StationInitializer::SetZmin ( double inZ)

◆ SetZref()

void StationInitializer::SetZref ( double inZ)

Sets reference z position of the station.

Definition at line 183 of file CaStationInitializer.cxx.

References fInitController, fStation, fZref, kZref, and cbm::algo::ca::ObjectInitController< NumberOfFlags, InitKeyEnum >::SetFlag().

◆ Swap()

void StationInitializer::Swap ( StationInitializer & other)
noexcept

Swap method for easy implementation of move constructor and copy and move assignment operator.

Definition at line 208 of file CaStationInitializer.cxx.

Referenced by Reset().

◆ ToString()

std::string StationInitializer::ToString ( int verbosityLevel = 0,
int indentLevel = 0 ) const

String representation of class contents.

Parameters
indentLevelNumber of indent characters in the output

Definition at line 224 of file CaStationInitializer.cxx.

References fDetectorID, fStation, fStationID, fXmax, fYmax, fZmax, fZmin, and fZref.

Member Data Documentation

◆ fDetectorID

EDetectorID cbm::algo::ca::StationInitializer::fDetectorID {static_cast<EDetectorID>(0)}
private

Detector ID.

Definition at line 166 of file CaStationInitializer.h.

Referenced by GetDetectorID(), GetStation(), SetDetectorID(), SetFieldFunction(), and ToString().

◆ fInitController

InitController_t cbm::algo::ca::StationInitializer::fInitController {}
private

◆ fManagementFlags

ManagementFlags_t cbm::algo::ca::StationInitializer::fManagementFlags {}
private

bitset flags to manage internal behaviour of the class

Definition at line 176 of file CaStationInitializer.h.

◆ fStation

Station<fvec> cbm::algo::ca::StationInitializer::fStation {}
private

◆ fStationID

int cbm::algo::ca::StationInitializer::fStationID {-1}
private

Local ID of a station.

Definition at line 167 of file CaStationInitializer.h.

Referenced by GetStation(), GetStationID(), SetFieldFunction(), SetStationID(), and ToString().

◆ fTrackingStatus

bool cbm::algo::ca::StationInitializer::fTrackingStatus {false}
private

Tracking status: true - station is used for tracking.

Definition at line 168 of file CaStationInitializer.h.

Referenced by GetTrackingStatus(), and SetTrackingStatus().

◆ fXmax

double cbm::algo::ca::StationInitializer::fXmax {0}
private

Maximum distance between station center and its edge in x direction.

Definition at line 169 of file CaStationInitializer.h.

Referenced by GetXmax(), SetFieldFunction(), SetXmax(), and ToString().

◆ fYmax

double cbm::algo::ca::StationInitializer::fYmax {0}
private

Maximum distance between station center and its edge in y direction.

Definition at line 170 of file CaStationInitializer.h.

Referenced by GetYmax(), SetFieldFunction(), SetYmax(), and ToString().

◆ fZmax

double cbm::algo::ca::StationInitializer::fZmax {0}
private

max z

Definition at line 173 of file CaStationInitializer.h.

Referenced by GetZmax(), SetZmax(), and ToString().

◆ fZmin

double cbm::algo::ca::StationInitializer::fZmin {0}
private

min z

Definition at line 172 of file CaStationInitializer.h.

Referenced by GetZmin(), SetZmin(), and ToString().

◆ fZref

double cbm::algo::ca::StationInitializer::fZref {0}
private

reference z

Definition at line 171 of file CaStationInitializer.h.

Referenced by GetZref(), SetFieldFunction(), SetZref(), and ToString().


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