CbmRoot
Loading...
Searching...
No Matches
DigiEventSelector.h
Go to the documentation of this file.
1/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Shreya Roy [committer], Pierre-Alain Loizeau, Norbert Herrmann, Volker Friese, Dominik Smith */
4
5#ifndef CBM_ALGO_DIGIEVENTSELECTOR_H
6#define CBM_ALGO_DIGIEVENTSELECTOR_H 1
7
8#include "DigiData.h"
10#include "TrackingSetup.h"
11
12#include <cstdint>
13#include <gsl/span>
14#include <map>
15
16namespace cbm::algo::evbuild
17{
18
26 std::map<ECbmModuleId, size_t> fMinNumDigis = {};
27 std::map<ECbmModuleId, size_t> fMinNumLayers = {};
28 };
29
30
41
42 public:
45
50 bool operator()(const DigiEvent& event) const;
51
55 void RegisterTrackingSetup(std::shared_ptr<TrackingSetup> pSetup) { fpTrackingSetup = pSetup; }
56
58 std::string ToString() const;
59
60
61 private: // methods
67 bool CheckStsStations(gsl::span<const CbmStsDigi> digis, size_t minNum) const;
68
74 bool CheckTofLayers(gsl::span<const CbmTofDigi> digis, size_t minNum) const;
75
76
77 private: // members
79 std::shared_ptr<TrackingSetup> fpTrackingSetup = nullptr;
80 };
81
82} // namespace cbm::algo::evbuild
83
84#endif /* CBM_ALGO_DIGIEVENTSELECTOR_H */
A detector setup interface used for tracking input data initialization (source)
Configuration of the DigiEventSelector class.
Algorithm to select CbmDigiEvents based on the number of digis and the number of activated layers in ...
DigiEventSelectorConfig fConfig
Configuration / parameters.
bool operator()(const DigiEvent &event) const
Test one event for the selection criteria.
std::shared_ptr< TrackingSetup > fpTrackingSetup
Tracking setup (access to stations info)
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.
std::string ToString() const
Info to string.
void RegisterTrackingSetup(std::shared_ptr< TrackingSetup > pSetup)
Registers tracking setup.
DigiEventSelector(DigiEventSelectorConfig config)
Constructor with configuration.
Event data with event number and trigger time.
Definition DigiData.h:79
std::map< ECbmModuleId, size_t > fMinNumLayers
std::map< ECbmModuleId, size_t > fMinNumDigis