Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:55:20

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 - 2025 Whitney Armstrong, Sylvester Joosten, Dmitry Romanov, Wouter Deconinck, Shujie Li
0003 
0004 #pragma once
0005 
0006 #include <DD4hep/Detector.h>
0007 #include <DDRec/CellIDPositionConverter.h>
0008 #include <algorithms/algorithm.h>
0009 #include <algorithms/geo.h>
0010 #include <edm4eic/Measurement2DCollection.h>
0011 #include <edm4eic/TrackerHitCollection.h>
0012 #include <gsl/pointers>
0013 #include <memory>
0014 #include <string>
0015 #include <string_view>
0016 
0017 #include "algorithms/interfaces/ActsSvc.h"
0018 #include "algorithms/interfaces/WithPodConfig.h"
0019 #include "algorithms/tracking/ActsGeometryProvider.h"
0020 
0021 namespace eicrecon {
0022 
0023 using TrackerMeasurementFromHitsAlgorithm =
0024     algorithms::Algorithm<algorithms::Input<edm4eic::TrackerHitCollection>,
0025                           algorithms::Output<edm4eic::Measurement2DCollection>>;
0026 
0027 class TrackerMeasurementFromHits : public TrackerMeasurementFromHitsAlgorithm,
0028                                    public WithPodConfig<NoConfig> {
0029 public:
0030   TrackerMeasurementFromHits(std::string_view name)
0031       : TrackerMeasurementFromHitsAlgorithm{name,
0032                                             {"inputTrackerHits"},
0033                                             {"outputMeasurements"},
0034                                             "convert tracker hits to measurements."} {}
0035 
0036   void init() final;
0037   void process(const Input&, const Output&) const final;
0038 
0039 private:
0040   const algorithms::GeoSvc& m_geo{algorithms::GeoSvc::instance()};
0041   const dd4hep::Detector* m_dd4hepGeo{m_geo.detector()};
0042   const dd4hep::rec::CellIDPositionConverter* m_converter{m_geo.cellIDPositionConverter()};
0043 
0044   const algorithms::ActsSvc& m_acts{algorithms::ActsSvc::instance()};
0045   std::shared_ptr<const ActsGeometryProvider> m_acts_context{m_acts.acts_geometry_provider()};
0046 
0047   /// Detector-specific information
0048   unsigned long m_detid_b0tracker;
0049 };
0050 
0051 } // namespace eicrecon