24 : fpFinderQa(qaManager != nullptr ?
std::make_unique<kfp::V0FinderQa>(qaManager,
"V0Finder") : nullptr)
50 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ...";
55 L_(info) << config.ToString();
58 if (config.reconstructPdg != 3122) {
59 std::stringstream msg;
60 msg <<
"kfp::V0FinderChain: at the moment only lambda finding is possible. Provided PDG: " << config.reconstructPdg;
61 throw std::runtime_error(msg.str());
65 auto& particles{config.cuts.particles};
68 for (
int iParticle = 0; iParticle < int(particles.size()); ++iParticle) {
69 const auto& particle = particles[iParticle];
70 auto CheckOutParticle = [&](
int pdg,
int& iParticleToFind) {
71 if (particle.pdg == pdg) {
72 if (iParticleToFind == -1) {
73 iParticleToFind = iParticle;
76 std::stringstream msg;
77 msg <<
"kfp::V0FinderChain: entry for pdg= " << pdg <<
" is defined more then one time in the ";
78 msg <<
"config.cuts.particles";
79 throw std::runtime_error(msg.str());
83 CheckOutParticle(-211, iPion);
84 CheckOutParticle(2212, iProton);
86 if (iProton == -1 || iPion == -1) {
87 std::stringstream msg;
88 msg <<
"kfp::V0FinderChain: config cuts/particles: either pion or proton settings are not found";
89 throw std::runtime_error(msg.str());
91 const auto& pion{particles[iPion]};
92 const auto& proton{particles[iProton]};
96 throw std::runtime_error(
"kfp::V0FinderChain: BMON available addresses were not set");
98 int iBmonPartitionSelect = -1;
101 iBmonPartitionSelect = iPart;
105 if (iBmonPartitionSelect < 0) {
106 std::stringstream msg;
107 msg <<
"kfp::V0FinderChain: a reference BMON address ( " << std::hex << config.bmonAddress << std::dec
108 <<
" ) differs from ones, provided by hitfinder. Please check your configuration";
109 throw std::runtime_error(msg.str());
123 auto& kfpCuts{config.cuts.kfp};
143 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ... done";
145catch (
const std::exception& err) {
146 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ... failed. Reason: " << err.what();
147 throw std::runtime_error(
"initialization of V0-finder chain failed");
Configuration structure for V0 selector in mCBM.
This file contains the definition of the ParFiles class.
Class to store different triggers for a given event.
const Options & Opts() const
A chain for the V0 finder.
V0FinderChain()=default
Default constructor.
EventOutput ProcessEvent(const RecoResults &recoEvent)
Processes an event, returns a collection of fired triggers.
void Finalize()
Finalizes the instance (called in the end of the run)
PODVector< uint32_t > fBmonDefinedAddresses
Available addresses of BMON.
kfp::V0FinderMonitor fMonitorRun
Monitor per run.
kfp::V0FinderMonitorData_t fMonitorTimeslice
Monitor per timeslice.
kfp::V0Finder fFinder
Instance of the V0-finding algorithm.
void Init()
Initializes the instance (called in the beginning of the run)
kfp::V0FinderMonitorData_t GetMonitor()
Gets a monitor.
std::unique_ptr< kfp::V0FinderQa > fpFinderQa
QA module.
void Reset()
Resets all the counters and timers.
void AddMonitorData(const MonitorData &other, bool parallel=false)
Adds the other monitor data to this.
std::string ToString() const
Prints counters summary to string.
void AddMonitorData(const MonitorData< ECounterKey, ETimerKey > &data, bool parallel=false)
Adds the other monitor data to this.
const V0FinderMonitorData_t & GetEventMonitor() const
Gets monitor data.
void SetLdLCut2D(float cut)
Sets cut on for 2-daughter decays.
void SetChiPrimaryCut2D(float cut)
Sets cut on of each track for 2-daughter decays.
CbmEventTriggers Process(const RecoResults &recoEvent)
Processes a reconstructed data sample, returns a collection of fired triggers.
void SetMinPionDca(double dca)
void AddDecayToReconstructionList(int pdg)
Adds particle to reconstruction list.
void SetTzeroOffset(double offset)
Sets an offset to t0.
void SetPrimaryAssignedPdg(int pdg)
Sets the assigned PDG for primary particles.
void SetBmonPartitionIndex(int iPartition)
Sets an address of a reference BMON diamond.
void SetLCut(float cut)
Sets cut on the distance to the primary vertex from the decay vertex.
void SetQpAssignedUncertainty(double uncertainty)
Assignes an uncertainty to the momentum measurement.
void SetMinProtonDca(double dca)
Sets minimal proton DCA to primary vertex.
void SetProtonVelocityRange(double vMin, double vMax)
Sets proton velocity range.
void SetChi2Cut2D(float cut)
Sets cut on for 2-daughter decays.
void SetPionVelocityRange(double vMin, double vMax)
Sets minimal pion DCA to primary vertex.
void Init()
Initializes the instance (called in the beginning of the run)
T ReadFromFile(fs::path path)
Class to hold the paths to the parameter files for the different detectors.
struct cbm::algo::ParFiles::@5 kfp