CbmRoot
Loading...
Searching...
No Matches
cbm::algo::sts::RecoSetupUnit Class Reference

#include <RecoSetupUnit.h>

Inheritance diagram for cbm::algo::sts::RecoSetupUnit:
[legend]
Collaboration diagram for cbm::algo::sts::RecoSetupUnit:
[legend]

Public Types

using StationIdMap_t = std::vector<std::pair<uint32_t, int>>
 

Public Member Functions

 RecoSetupUnit ()=default
 Default constructor (note: needed for serialization)
 
 RecoSetupUnit (std::pair< std::vector< GeoVolume >, std::vector< GeoVolume > > &&stationVolumes, StationIdMap_t &&stationIdMap)
 Constructor from parameters.
 
bool IsValid () const
 Validates the interface.
 
const GeoVolumeGetActiveVolume (int stationId) const
 Gets active volume for a tracking station.
 
HitRange GetHitRange (const HitType &hit) const
 Returns default hit range for x, y and time measurements.
 
int GetNofTrackingStations () const
 Gets number of tracking stations.
 
int GetTrackingStationId (uint32_t address) const
 Gets a local index of a tracking station by a hardware address.
 
const GeoVolumeGetFullVolume (int stationId) const
 Gets full volume for a tracking station.
 
bool IsTimeInfoProvided (int stationId) const
 Checks, if station provides time measurements.
 
std::string TableOfTrackingStations () const
 Dumps table of tracking stations to string.
 

Static Public Member Functions

static constexpr std::string_view GetDetectorName ()
 Name of the detector.
 
static constexpr ECbmModuleId GetModuleId ()
 Module ID.
 

Protected Member Functions

HitRange ImplGetHitRange (const HitType &hit) const
 Returns default hit range factor.
 

Private Member Functions

int ImplGetTrackingStationId (uint32_t address) const
 Returns tracking station index by the STS address.
 
bool ImplIsTimeInfoProvided (int) const
 Returns a flag, if time information is provided by the detector.
 
bool IsInitialized () const
 Validates initialization of the instance.
 
template<class Archive>
void serialize (Archive &ar, const unsigned int)
 Serialization rule.
 

Private Attributes

StationIdMap_t fvStationIdMap {}
 A map of STS address to STS station ID.
 
std::vector< GeoVolumefvStationFullVolumes
 Geometric properties of each station passive volume.
 
std::vector< GeoVolumefvStationActiveVolumes
 Geometric properties of each station active volume.
 

Friends

class TrackingSetupIfs< RecoSetupUnit >
 
class boost::serialization::access
 

Detailed Description

Definition at line 25 of file sts/RecoSetupUnit.h.

Member Typedef Documentation

◆ StationIdMap_t

using cbm::algo::sts::RecoSetupUnit::StationIdMap_t = std::vector<std::pair<uint32_t, int>>

Definition at line 29 of file sts/RecoSetupUnit.h.

Constructor & Destructor Documentation

◆ RecoSetupUnit() [1/2]

cbm::algo::sts::RecoSetupUnit::RecoSetupUnit ( )
default

Default constructor (note: needed for serialization)

Referenced by RecoSetupUnit().

◆ RecoSetupUnit() [2/2]

RecoSetupUnit::RecoSetupUnit ( std::pair< std::vector< GeoVolume >, std::vector< GeoVolume > > && stationVolumes,
StationIdMap_t && stationIdMap )

Constructor from parameters.

Parameters
stationVolumesA pair of containers of station full and active volumes {full, active}
stationIdMapA map of hardware address to stationId

Definition at line 19 of file sts/RecoSetupUnit.cxx.

References fvStationIdMap, RecoSetupUnit(), and cbm::algo::TrackingSetupIfs< RecoSetupUnit >::TrackingSetupIfs().

Member Function Documentation

◆ GetActiveVolume()

const GeoVolume & cbm::algo::TrackingSetupIfs< RecoSetupUnit >::GetActiveVolume ( int stationId) const
inlineinherited

Gets active volume for a tracking station.

Parameters
stationIdLocal index of the tracking station

Definition at line 77 of file TrackingSetupIfs.h.

◆ GetDetectorName()

static constexpr std::string_view cbm::algo::sts::RecoSetupUnit::GetDetectorName ( )
inlinestaticconstexpr

Name of the detector.

Definition at line 41 of file sts/RecoSetupUnit.h.

◆ GetFullVolume()

const GeoVolume & cbm::algo::TrackingSetupIfs< RecoSetupUnit >::GetFullVolume ( int stationId) const
inlineinherited

Gets full volume for a tracking station.

Parameters
stationIdLocal index of the tracking station

Definition at line 103 of file TrackingSetupIfs.h.

◆ GetHitRange()

HitRange cbm::algo::TrackingSetupIfs< RecoSetupUnit >::GetHitRange ( const HitType & hit) const
inlineinherited

Returns default hit range for x, y and time measurements.

Template Parameters
HitTypeA type of a hit
Parameters
hitA hit
Returns
A HitRange object

The default ranges are defined under an assumption, that all the uncertainties obey a gaussian distribution

Definition at line 86 of file TrackingSetupIfs.h.

◆ GetModuleId()

static constexpr ECbmModuleId cbm::algo::sts::RecoSetupUnit::GetModuleId ( )
inlinestaticconstexpr

Module ID.

Definition at line 44 of file sts/RecoSetupUnit.h.

References kSts.

◆ GetNofTrackingStations()

◆ GetTrackingStationId()

int cbm::algo::TrackingSetupIfs< RecoSetupUnit >::GetTrackingStationId ( uint32_t address) const
inlineinherited

Gets a local index of a tracking station by a hardware address.

Parameters
addressHardware address

Definition at line 96 of file TrackingSetupIfs.h.

◆ ImplGetHitRange()

HitRange cbm::algo::TrackingSetupIfs< RecoSetupUnit >::ImplGetHitRange ( const HitType & hit) const
inlineprotectedinherited

Returns default hit range factor.

Template Parameters
HitTypeA type of the hit
Parameters
hitA particular hit

Definition at line 135 of file TrackingSetupIfs.h.

◆ ImplGetTrackingStationId()

int RecoSetupUnit::ImplGetTrackingStationId ( uint32_t address) const
inlineprivate

Returns tracking station index by the STS address.

Parameters
addressUnique hardware address of an STS element
Returns
Local index of tracking station

Definition at line 98 of file sts/RecoSetupUnit.h.

References fvStationIdMap, CbmStsAddress::GetElementId(), kStsLadder, and kStsUnit.

◆ ImplIsTimeInfoProvided()

bool cbm::algo::sts::RecoSetupUnit::ImplIsTimeInfoProvided ( int ) const
inlineprivate

Returns a flag, if time information is provided by the detector.

Parameters
stationIdLocal index of tracking station

Definition at line 76 of file sts/RecoSetupUnit.h.

◆ IsInitialized()

bool RecoSetupUnit::IsInitialized ( ) const
private

Validates initialization of the instance.

Returns
true The instance is valid
false The instance is not valid

Definition at line 28 of file sts/RecoSetupUnit.cxx.

References fvStationIdMap, cbm::algo::TrackingSetupIfs< RecoSetupUnit >::GetNofTrackingStations(), and max().

◆ IsTimeInfoProvided()

bool cbm::algo::TrackingSetupIfs< RecoSetupUnit >::IsTimeInfoProvided ( int stationId) const
inlineinherited

Checks, if station provides time measurements.

Parameters
stationIdLocal index of the tracking station

Definition at line 107 of file TrackingSetupIfs.h.

◆ IsValid()

bool cbm::algo::TrackingSetupIfs< RecoSetupUnit >::IsValid ( ) const
inherited

Validates the interface.

Returns
true The interface is valid
false The interface is not valid

Definition at line 73 of file TrackingSetupIfs.h.

◆ serialize()

template<class Archive>
void cbm::algo::sts::RecoSetupUnit::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Serialization rule.

Definition at line 86 of file sts/RecoSetupUnit.h.

References fvStationIdMap.

◆ TableOfTrackingStations()

std::string cbm::algo::TrackingSetupIfs< RecoSetupUnit >::TableOfTrackingStations ( ) const
inherited

Dumps table of tracking stations to string.

Definition at line 113 of file TrackingSetupIfs.h.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 83 of file sts/RecoSetupUnit.h.

References boost::serialization::access.

Referenced by boost::serialization::access.

◆ TrackingSetupIfs< RecoSetupUnit >

friend class TrackingSetupIfs< RecoSetupUnit >
friend

Definition at line 98 of file sts/RecoSetupUnit.h.

Member Data Documentation

◆ fvStationActiveVolumes

std::vector<GeoVolume> cbm::algo::TrackingSetupIfs< RecoSetupUnit >::fvStationActiveVolumes
privateinherited

Geometric properties of each station active volume.

Definition at line 151 of file TrackingSetupIfs.h.

◆ fvStationFullVolumes

std::vector<GeoVolume> cbm::algo::TrackingSetupIfs< RecoSetupUnit >::fvStationFullVolumes
privateinherited

Geometric properties of each station passive volume.

Definition at line 150 of file TrackingSetupIfs.h.

◆ fvStationIdMap

StationIdMap_t cbm::algo::sts::RecoSetupUnit::fvStationIdMap {}
private

A map of STS address to STS station ID.

In the map it is assumed, that a pair of STS unit and ladder uniquely correspond to a station and covers two possible situations: (a) A unit comprises ladders for two neighboring stations; an index of a station increments once when when iterating from the ladderId = 0 to ladderId = Max (b) A unit comprises ladders for a single station (this is the case for mCBM setups and uints 0, 1, 6-9, 18 and 19 in full STS)

The map is represented with a contiguous block of memory, which is indexed by STS unit ID. Each element of the memory block stores a pair of uint32_t and int. The second stores the lowest index of a station stationId, to which this unit contributes. The first stores a threshold value ladderIdThrsh of a ladder index, so for each ladderId < ladderIdThrsh a station number equals to stationId, and for each ladderId >= ladderIdThrsh it equals to stationId + 1. In case (b), the threshold ladderId value contains the maximal uint32_t.

An algorithm to access the station index from the STS hardware address is following: 1) u <- getUnitId(address), l <- getLadderId(address) # Gets uint and ladder ID 2) [thrsh, s] <- fStationIdMap[u] # Gets a threshold and lowest station ID for a unit 3) return l < thrsh ? s : s + 1

Definition at line 67 of file sts/RecoSetupUnit.h.

Referenced by ImplGetTrackingStationId(), IsInitialized(), RecoSetupUnit(), and serialize().


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