trout
Phlex-based reconstruction framework for the SHiP experiment.
Loading...
Searching...
No Matches
upstream_tagger_histogrammer.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// upstream_tagger_histogrammer.hpp — Upstream Tagger validation histograms.
6// A placeholder for the UBT experts to fill in: so far only the per-event hit
7// multiplicity, which comes from the shared MultiplicityHistogrammer. Book
8// UBT-specific histograms in the constructor and fill them in observe(); once
9// there are enough of them, drop the base class and keep only this file (see
10// SpectrometerHistogrammer for how that ends up looking).
11
12#pragma once
13
14#include "HistoFileService.hpp"
16
17#include <SHiP/detectors/UBTHit.hpp>
18#include <memory>
19#include <utility>
20#include <vector>
21
22namespace SHiP::trout {
23
25 public:
26 explicit UpstreamTaggerHistogrammer(std::shared_ptr<HistoFileService> file_service)
27 : MultiplicityHistogrammer{std::move(file_service), "h_upstream_tagger_multiplicity",
28 "Upstream tagger hits per event;N;Events"} {}
29
30 // Deliberately not inherited: phlex deduces the bound object type and the
31 // member pointer's class in one go (see delegate() in
32 // phlex/metaprogramming/delegate.hpp), so &UpstreamTaggerHistogrammer::observe
33 // has to name a member of this class. Convenient, since this is also where
34 // the UBT-specific fills belong.
35 void observe(std::vector<SHiP::UBTHit> const& hits) { MultiplicityHistogrammer::observe(hits); }
36};
37
38} // namespace SHiP::trout
void observe(std::vector< Hit > const &hits)
Definition multiplicity_histogrammer.hpp:39
MultiplicityHistogrammer(std::shared_ptr< HistoFileService > file_service, std::string hist_name, std::string hist_title)
Definition multiplicity_histogrammer.hpp:31
std::shared_ptr< HistoFileService > const & file_service() const
Definition multiplicity_histogrammer.hpp:51
void observe(std::vector< SHiP::UBTHit > const &hits)
Definition upstream_tagger_histogrammer.hpp:35
UpstreamTaggerHistogrammer(std::shared_ptr< HistoFileService > file_service)
Definition upstream_tagger_histogrammer.hpp:26
Definition fit_seed.cpp:16