trout
Phlex-based reconstruction framework for the SHiP experiment.
Loading...
Searching...
No Matches
calorimeter_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// calorimeter_histogrammer.hpp — calorimeter validation histograms. A
6// placeholder for the calorimeter experts to fill in: so far only the per-event
7// hit multiplicity, which comes from the shared MultiplicityHistogrammer. Book
8// calorimeter-specific histograms in the constructor and fill them in
9// observe(); once there are enough of them, drop the base class and keep only
10// this file (see SpectrometerHistogrammer for how that ends up looking).
11
12#pragma once
13
14#include "HistoFileService.hpp"
16
17#include <SHiP/detectors/CaloHit.hpp>
18#include <memory>
19#include <utility>
20#include <vector>
21
22namespace SHiP::trout {
23
25 public:
26 explicit CalorimeterHistogrammer(std::shared_ptr<HistoFileService> file_service)
27 : MultiplicityHistogrammer{std::move(file_service), "h_calorimeter_multiplicity",
28 "Calorimeter 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 &CalorimeterHistogrammer::observe
33 // has to name a member of this class. Convenient, since this is also where
34 // the calorimeter-specific fills belong.
35 void observe(std::vector<SHiP::CaloHit> const& hits) {
37 }
38};
39
40} // namespace SHiP::trout
void observe(std::vector< SHiP::CaloHit > const &hits)
Definition calorimeter_histogrammer.hpp:35
CalorimeterHistogrammer(std::shared_ptr< HistoFileService > file_service)
Definition calorimeter_histogrammer.hpp:26
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
Definition fit_seed.cpp:16