CbmRoot
Loading...
Searching...
No Matches
cbm::algo::evbuild::DigiEventSelector Class Reference

Algorithm to select CbmDigiEvents based on the number of digis and the number of activated layers in each detector system. More...

#include <DigiEventSelector.h>

Collaboration diagram for cbm::algo::evbuild::DigiEventSelector:
[legend]

Public Member Functions

 DigiEventSelector (DigiEventSelectorConfig config)
 Constructor with configuration.
 
bool operator() (const DigiEvent &event) const
 Test one event for the selection criteria.
 
void RegisterTrackingSetup (std::shared_ptr< TrackingSetup > pSetup)
 Registers tracking setup.
 
std::string ToString () const
 Info to string.
 

Private Member Functions

bool CheckStsStations (gsl::span< const CbmStsDigi > digis, size_t minNum) const
 Test for the number of STS stations.
 
bool CheckTofLayers (gsl::span< const CbmTofDigi > digis, size_t minNum) const
 Test for the number of TOF layers.
 

Private Attributes

DigiEventSelectorConfig fConfig
 Configuration / parameters.
 
std::shared_ptr< TrackingSetupfpTrackingSetup = nullptr
 Tracking setup (access to stations info)
 

Detailed Description

Algorithm to select CbmDigiEvents based on the number of digis and the number of activated layers in each detector system.

Author
Dominik Smith d.smi.nosp@m.th@ .nosp@m.gsi.d.nosp@m.e
Shreya Roy s.roy.nosp@m.@gsi.nosp@m..de
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
26.01.2023

Definition at line 40 of file DigiEventSelector.h.

Constructor & Destructor Documentation

◆ DigiEventSelector()

cbm::algo::evbuild::DigiEventSelector::DigiEventSelector ( DigiEventSelectorConfig config)
inline

Constructor with configuration.

Definition at line 44 of file DigiEventSelector.h.

Member Function Documentation

◆ CheckStsStations()

bool cbm::algo::evbuild::DigiEventSelector::CheckStsStations ( gsl::span< const CbmStsDigi > digis,
size_t minNum ) const
private

Test for the number of STS stations.

Parameters
digisVector of STS digis
minNumRequested minimum of active STS stations
Returns
True if the number of active STS layers is above the threshold

Definition at line 53 of file DigiEventSelector.cxx.

References CbmStsAddress::GetElementId(), and kStsUnit.

Referenced by operator()().

◆ CheckTofLayers()

bool cbm::algo::evbuild::DigiEventSelector::CheckTofLayers ( gsl::span< const CbmTofDigi > digis,
size_t minNum ) const
private

Test for the number of TOF layers.

Parameters
digisVector of TOF digis
minNumRequested minimum of active TOF layers
Returns
True if the number of active TOF layers is above the threshold

Definition at line 92 of file DigiEventSelector.cxx.

References fpTrackingSetup, CbmTofAddress::GetRpcFullId(), and CbmTofAddress::GetStripFullId().

Referenced by operator()().

◆ operator()()

bool cbm::algo::evbuild::DigiEventSelector::operator() ( const DigiEvent & event) const

Test one event for the selection criteria.

Parameters
eventDigiEvent
Returns
true if event satisfies the criteria; else false

Definition at line 20 of file DigiEventSelector.cxx.

References CheckStsStations(), CheckTofLayers(), fConfig, cbm::algo::evbuild::DigiEventSelectorConfig::fMinNumDigis, cbm::algo::evbuild::DigiEventSelectorConfig::fMinNumLayers, cbm::algo::DigiData::fSts, cbm::algo::DigiData::fTof, kSts, kTof, and cbm::algo::DigiData::Size().

◆ RegisterTrackingSetup()

void cbm::algo::evbuild::DigiEventSelector::RegisterTrackingSetup ( std::shared_ptr< TrackingSetup > pSetup)
inline

Registers tracking setup.

Parameters
pSetupThe tracking setup instance

Definition at line 55 of file DigiEventSelector.h.

References fpTrackingSetup.

Referenced by cbm::algo::evbuild::EventbuildChain::RegisterTrackingSetup(), and TEST().

◆ ToString()

Member Data Documentation

◆ fConfig

DigiEventSelectorConfig cbm::algo::evbuild::DigiEventSelector::fConfig
private

Configuration / parameters.

Definition at line 78 of file DigiEventSelector.h.

Referenced by operator()(), and ToString().

◆ fpTrackingSetup

std::shared_ptr<TrackingSetup> cbm::algo::evbuild::DigiEventSelector::fpTrackingSetup = nullptr
private

Tracking setup (access to stations info)

Definition at line 79 of file DigiEventSelector.h.

Referenced by CheckTofLayers(), and RegisterTrackingSetup().


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