File indexing completed on 2025-06-30 08:34:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #pragma once
0011
0012 #include <DD4hep/Detector.h>
0013 #include <algorithms/algorithm.h>
0014 #include <algorithms/geo.h>
0015 #include <edm4eic/CalorimeterHitCollection.h>
0016 #include <gsl/pointers>
0017 #include <string> // for basic_string
0018 #include <string_view> // for string_view
0019 #include <vector>
0020
0021 #include "HEXPLITConfig.h"
0022 #include "algorithms/interfaces/WithPodConfig.h"
0023
0024 namespace eicrecon {
0025
0026 using HEXPLITAlgorithm =
0027 algorithms::Algorithm<algorithms::Input<const edm4eic::CalorimeterHitCollection>,
0028 algorithms::Output<edm4eic::CalorimeterHitCollection>>;
0029
0030 class HEXPLIT : public HEXPLITAlgorithm, public WithPodConfig<HEXPLITConfig> {
0031
0032 public:
0033 HEXPLIT(std::string_view name)
0034 : HEXPLITAlgorithm{
0035 name, {"inputHits"}, {"outputSubcellHits"}, "Split hits into subcell hits"} {}
0036
0037 void init() final;
0038 void process(const Input&, const Output&) const final;
0039
0040 private:
0041
0042 static const int SUBCELLS = 12;
0043
0044 static const int NEIGHBORS = 12;
0045
0046 static const int OVERLAP = 3;
0047
0048 static const std::vector<double> neighbor_offsets_x;
0049 static const std::vector<double> neighbor_offsets_y;
0050
0051 static const int neighbor_indices[SUBCELLS][OVERLAP];
0052
0053 static const std::vector<double> subcell_offsets_x;
0054 static const std::vector<double> subcell_offsets_y;
0055
0056 private:
0057 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
0058 };
0059
0060 }