Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EDM4hepSimHitReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EDM4hepSimHitReader.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
17 
18 #include <memory>
19 #include <string>
20 
21 #include <edm4hep/MCParticleCollection.h>
22 #include <podio/ROOTFrameReader.h>
23 
24 namespace ActsExamples {
25 
33 class EDM4hepSimHitReader final : public IReader {
34  public:
35  struct Config {
39  std::string inputParticles = "MCParticles";
41  std::string inputSimTrackerHits = "ActsSimTrackerHits";
47  std::shared_ptr<DD4hep::DD4hepDetector> dd4hepDetector;
48  };
49 
55 
56  std::string name() const final;
57 
59  std::pair<size_t, size_t> availableEvents() const final;
60 
62  ProcessCode read(const ActsExamples::AlgorithmContext& ctx) final;
63 
65  const Config& config() const { return m_cfg; }
66 
67  private:
69  std::pair<size_t, size_t> m_eventsRange;
70  std::unique_ptr<const Acts::Logger> m_logger;
71 
72  podio::ROOTFrameReader m_reader;
73 
74  const Acts::Logger& logger() const { return *m_logger; }
75 
78  "OutputParticles"};
79 };
80 
81 } // namespace ActsExamples