Shannon
Phlex-based digitisation framework for the SHiP experiment.
Loading...
Searching...
No Matches
gaussian_smearer.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// gaussian_smearer.hpp — placeholder smearing model shared by all detectors
6//
7// Applies a Gaussian x/y position smearing to a simulated hit. Detector
8// digitisers delegate here until their detector-specific models become
9// available.
10
11#pragma once
12
13#include <SHiP/RecHit.hpp>
14#include <SHiP/SimHit.hpp>
15#include <SHiP/random/philox_rng.hpp>
16
17namespace SHiP::shannon {
18
20 public:
21 explicit GaussianSmearer(double sigma_x = 0.1, double sigma_y = 0.1)
22 : sigma_x_{sigma_x}, sigma_y_{sigma_y} {}
23
24 ::SHiP::RecHit smear(::SHiP::SimHit const& sim_hit, SHiP::random::PhiloxRng& rng) const {
25 auto reconstructed = SHiP::from_sim_hit(sim_hit);
26 reconstructed.position = {sim_hit.position[0] + rng.gaussian(0.0, sigma_x_),
27 sim_hit.position[1] + rng.gaussian(0.0, sigma_y_),
28 sim_hit.position[2]};
29
30 return reconstructed;
31 }
32
33 private:
34 double sigma_x_;
35 double sigma_y_;
36};
37
38} // namespace SHiP::shannon
GaussianSmearer(double sigma_x=0.1, double sigma_y=0.1)
Definition gaussian_smearer.hpp:21
::SHiP::RecHit smear(::SHiP::SimHit const &sim_hit, SHiP::random::PhiloxRng &rng) const
Definition gaussian_smearer.hpp:24
Definition calorimeter.hpp:15