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