trout
Phlex-based reconstruction framework for the SHiP experiment.
Loading...
Searching...
No Matches
identity_reco.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 CERN for the benefit of the SHiP Collaboration
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5// identity_reco.hpp — shared registration helper for the placeholder
6// per-subdetector reconstruction modules (upstream tagger, surround tagger,
7// calorimeter, timing detector). Each is currently a passthrough that
8// republishes the digitised hits as that detector's "reconstructed" product;
9// real reconstruction replaces the lambda body per detector as it lands.
10
11#pragma once
12
13#include "phlex/core/product_selector.hpp"
14#include "phlex/module.hpp"
15
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace SHiP::trout {
21
22template <typename Hit, typename Registrar>
23void register_identity_reco(Registrar& m, phlex::configuration const& config,
24 std::string const& name, std::string const& input_suffix) {
25 auto const layer = config.template get<std::string>("layer");
26
27 m.transform(
28 name,
29 [](std::shared_ptr<std::vector<Hit>> const& hits) -> std::vector<Hit> {
30 return hits ? *hits : std::vector<Hit>{};
31 },
32 phlex::concurrency::unlimited)
33 .input_family(
34 phlex::product_selector{.creator = "rntuple_source",
35 .layer = phlex::experimental::identifier{layer},
36 .suffix = phlex::experimental::identifier{input_suffix}})
37 .output_product_suffixes(name);
38}
39
40} // namespace SHiP::trout
Definition fit_seed.cpp:16
void register_identity_reco(Registrar &m, phlex::configuration const &config, std::string const &name, std::string const &input_suffix)
Definition identity_reco.hpp:23