50 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ...";
57 std::stringstream msg;
58 msg <<
"kfp::V0FinderChain: at the moment only lambda finding is possible. Provided PDG: " << config.
reconstructPdg;
59 throw std::runtime_error(msg.str());
66 for (
int iParticle = 0; iParticle < int(particles.size()); ++iParticle) {
67 const auto& particle = particles[iParticle];
68 auto CheckOutParticle = [&](
int pdg,
int& iParticleToFind) {
69 if (particle.pdg == pdg) {
70 if (iParticleToFind == -1) {
71 iParticleToFind = iParticle;
74 std::stringstream msg;
75 msg <<
"kfp::V0FinderChain: entry for pdg= " << pdg <<
" is defined more then one time in the ";
76 msg <<
"config.cuts.particles";
77 throw std::runtime_error(msg.str());
81 CheckOutParticle(-211, iPion);
82 CheckOutParticle(2212, iProton);
84 if (iProton == -1 || iPion == -1) {
85 std::stringstream msg;
86 msg <<
"kfp::V0FinderChain: config cuts/particles: either pion or proton settings are not found";
87 throw std::runtime_error(msg.str());
89 const auto& pion{particles[iPion]};
90 const auto& proton{particles[iProton]};
94 throw std::runtime_error(
"kfp::V0FinderChain: BMON available addresses were not set");
96 int iBmonPartitionSelect = -1;
99 iBmonPartitionSelect = iPart;
103 if (iBmonPartitionSelect < 0) {
104 std::stringstream msg;
105 msg <<
"kfp::V0FinderChain: a reference BMON address ( " << std::hex << config.
bmonAddress << std::dec
106 <<
" ) differs from ones, provided by hitfinder. Please check your configuration";
107 throw std::runtime_error(msg.str());
114 fFinder.SetBmonPartitionIndex(iBmonPartitionSelect);
115 fFinder.SetMinPionDca(pion.minDca);
116 fFinder.SetMinProtonDca(proton.minDca);
117 fFinder.SetPionVelocityRange(pion.minVelocity, pion.maxVelocity);
118 fFinder.SetProtonVelocityRange(proton.minVelocity, proton.maxVelocity);
121 auto& kfpCuts{config.
cuts.
kfp};
122 fFinder.SetLdLCut2D(kfpCuts.minDecayLDL);
123 fFinder.SetLCut(kfpCuts.minDecayLength);
124 fFinder.SetChi2Cut2D(kfpCuts.maxChi2NdfGeo);
125 fFinder.SetChiPrimaryCut2D(kfpCuts.maxChi2NdfPrim);
141 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ... done";
143catch (
const std::exception& err) {
144 L_(info) <<
"kfp::V0FinderChain: initializing the V0-finder chain ... failed. Reason: " << err.what();
145 throw std::runtime_error(
"initialization of V0-finder chain failed");