EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
FarForwardNeutralsReconstruction.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2026 Sebouh Paul, Baptiste Fraisse
3
4#pragma once
5#include <DD4hep/Detector.h>
6#include <algorithms/algorithm.h>
7#include <algorithms/geo.h>
8#include <edm4eic/ClusterCollection.h>
9#include <edm4eic/ReconstructedParticleCollection.h>
10#include <spdlog/logger.h>
11#include <gsl/pointers>
12#include <memory>
13#include <string> // for basic_string
14#include <string_view> // for string_view
15#include <vector>
16#include <functional>
20
21namespace eicrecon {
22
24
25 algorithms::Algorithm<
26 algorithms::Input<const edm4eic::ClusterCollection, // clusters ZDC-Hcal
27 const edm4eic::ClusterCollection, // clusters B0-Ecal
28 const edm4eic::ClusterCollection, // clusters EndcapP-Ecal
29 const edm4eic::ClusterCollection>, // clusters LFHCAL
30
31 algorithms::Output<
32 edm4eic::ReconstructedParticleCollection, // neutrons/gamma in ZDC-Hcal
33 edm4eic::ReconstructedParticleCollection, // neutrons/gamma in B0-Ecal
34 edm4eic::ReconstructedParticleCollection, // neutrons/gamma in EndcapP-Ecal
35 edm4eic::ReconstructedParticleCollection>>; // neutrons/gamma in LFHCAL
57 public WithPodConfig<FarForwardNeutralsReconstructionConfig> {
58public:
59 FarForwardNeutralsReconstruction(std::string_view name)
61 name,
62
63 {"clustersHcal", "clustersB0", "clustersEcalEndCapP", "clustersLFHCAL"},
64
65 {"outputNeutralsHcal", "outputNeutralsB0", "outputNeutralsEcalEndCapP",
66 "outputNeutralsLFHCAL"},
67
68 "Convert EMCal and HCal clusters into neutron or photon candidates"} {}
69
70 void init() final;
71 void process(const Input&, const Output&) const final;
72
73private:
74 bool isGamma(const edm4eic::Cluster& cluster) const;
75 std::shared_ptr<spdlog::logger> m_log;
76 const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
77 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
78 double m_gammaZMax{0};
79
80 enum class GammaMode { None, LeaderOnly, AllPassing };
81 enum class NeutronMode { None, SumAll, LeaderOnly };
82
83 using CorrFunc = std::function<double(double, const std::vector<double>&)>;
84
85 static double corrPower(double E, const std::vector<double>& coeffs);
86
87 int processNeutralCalo(const edm4eic::ClusterCollection* clusters,
88 edm4eic::ReconstructedParticleCollection* out_neutrals,
89 const std::vector<double>& gammaScaleCoeff,
90 const std::vector<double>& neutronScaleCoeff, bool canDetectGammas,
91 bool canDetectNeutrons, const CorrFunc& gammaCorr,
92 const CorrFunc& neutronCorr, GammaMode gammaMode,
93 double gammaLeaderFracMin, double clusterEmin, NeutronMode neutronMode,
94 bool associateAllClustersToNeutron) const;
95};
96
97} // namespace eicrecon
Definition FarForwardNeutralsReconstruction.h:57
FarForwardNeutralsReconstruction(std::string_view name)
Definition FarForwardNeutralsReconstruction.h:59
Definition WithPodConfig.h:22
Definition ActsSvc.h:11
Definition ActsGeometryProvider.h:28
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< const edm4eic::ClusterCollection, const edm4eic::ClusterCollection, const edm4eic::ClusterCollection, const edm4eic::ClusterCollection >, algorithms::Output< edm4eic::ReconstructedParticleCollection, edm4eic::ReconstructedParticleCollection, edm4eic::ReconstructedParticleCollection, edm4eic::ReconstructedParticleCollection > > FarForwardNeutralsReconstructionAlgorithm
Definition FarForwardNeutralsReconstruction.h:35
Definition SimCalorimeterHitProcessor.cc:35