Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HitsPrinter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HitsPrinter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
19 
20 #include <cstddef>
21 #include <string>
22 #include <vector>
23 
24 namespace Acts {
25 class PlanarModuleCluster;
26 } // namespace Acts
27 namespace ActsFatras {
28 class Barcode;
29 } // namespace ActsFatras
30 
31 namespace ActsExamples {
32 struct AlgorithmContext;
33 
35 class HitsPrinter : public IAlgorithm {
36  public:
39  using HitIds = std::vector<size_t>;
40 
41  struct Config {
48  // Print hits selected by their indices (zero length to disable).
49  size_t selectIndexStart = 0u;
50  size_t selectIndexLength = 0u;
51  // Print hits within a certain geometry range (zero to disable).
52  size_t selectVolume = 0u;
53  size_t selectLayer = 0u;
54  size_t selectModule = 0u;
55  };
56 
58 
59  ProcessCode execute(const AlgorithmContext& ctx) const override;
60 
61  const Config& config() const { return m_cfg; }
62 
63  private:
65 
66  ReadDataHandle<Clusters> m_inputClusters{this, "InputClusters"};
68  this, "InputMeasurementParticlesMaps"};
69  ReadDataHandle<HitIds> m_inputHitIds{this, "InputHitIds"};
70 };
71 
72 } // namespace ActsExamples