File indexing completed on 2025-01-30 10:04:50
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 = algorithms::Algorithm<
0027 algorithms::Input<
0028 const edm4eic::CalorimeterHitCollection
0029 >,
0030 algorithms::Output<
0031 edm4eic::CalorimeterHitCollection
0032 >
0033 >;
0034
0035 class HEXPLIT
0036 : public HEXPLITAlgorithm,
0037 public WithPodConfig<HEXPLITConfig> {
0038
0039 public:
0040 HEXPLIT(std::string_view name)
0041 : HEXPLITAlgorithm{name,
0042 {"inputHits"},
0043 {"outputSubcellHits"},
0044 "Split hits into subcell hits"} {}
0045
0046 void init() final;
0047 void process(const Input&, const Output&) const final;
0048
0049 private:
0050
0051 static const int SUBCELLS=12;
0052
0053 static const int NEIGHBORS=12;
0054
0055 static const int OVERLAP=3;
0056
0057 static const std::vector<double> neighbor_offsets_x;
0058 static const std::vector<double> neighbor_offsets_y;
0059
0060 static const int neighbor_indices[SUBCELLS][OVERLAP];
0061
0062 static const std::vector<double> subcell_offsets_x;
0063 static const std::vector<double> subcell_offsets_y;
0064
0065 private:
0066 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
0067
0068 };
0069
0070 }