Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RootMaterialTrackReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RootMaterialTrackReader.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-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 
18 
19 #include <cstddef>
20 #include <cstdint>
21 #include <memory>
22 #include <mutex>
23 #include <string>
24 #include <unordered_map>
25 #include <utility>
26 #include <vector>
27 
28 class TChain;
29 
30 namespace ActsExamples {
31 struct AlgorithmContext;
32 
39  public:
41  struct Config {
43  "material-tracks";
44  std::string treeName = "material-tracks";
45  std::vector<std::string> fileList;
46 
48  bool orderedEvents = true;
49  // Read surface information for the root file
51  };
52 
57 
59  ~RootMaterialTrackReader() override;
60 
62  std::string name() const override;
63 
65  std::pair<size_t, size_t> availableEvents() const override;
66 
70  ProcessCode read(const ActsExamples::AlgorithmContext& context) override;
71 
73  const Config& config() const { return m_cfg; }
74 
75  private:
77  std::unique_ptr<const Acts::Logger> m_logger;
78 
80  const Acts::Logger& logger() const { return *m_logger; }
81 
84 
86  m_outputMaterialTracks{this, "OutputMaterialTracks"};
87 
89  std::mutex m_read_mutex;
90 
92  size_t m_events = 0;
93 
95  size_t m_batchSize = 0;
96 
98  TChain* m_inputChain = nullptr;
99 
101  uint32_t m_eventId = 0;
102 
105  std::vector<long long> m_entryNumbers = {};
106 
107  float m_v_x = 0;
108  float m_v_y = 0;
109  float m_v_z = 0;
110  float m_v_px = 0;
111  float m_v_py = 0;
112  float m_v_pz = 0;
113  float m_v_phi = 0;
114  float m_v_eta = 0;
115  float m_tX0 = 0;
116  float m_tL0 = 0;
117 
118  std::vector<float>* m_step_x = new std::vector<float>;
119  std::vector<float>* m_step_y = new std::vector<float>;
120  std::vector<float>* m_step_z = new std::vector<float>;
121  std::vector<float>* m_step_dx = new std::vector<float>;
122  std::vector<float>* m_step_dy = new std::vector<float>;
123  std::vector<float>* m_step_dz = new std::vector<float>;
124  std::vector<float>* m_step_length = new std::vector<float>;
125  std::vector<float>* m_step_X0 = new std::vector<float>;
126  std::vector<float>* m_step_L0 = new std::vector<float>;
127  std::vector<float>* m_step_A = new std::vector<float>;
128  std::vector<float>* m_step_Z = new std::vector<float>;
129  std::vector<float>* m_step_rho =
130  new std::vector<float>;
131 
132  std::vector<std::uint64_t>* m_sur_id =
133  new std::vector<std::uint64_t>;
134 
135  std::vector<float>* m_sur_x =
136  new std::vector<float>;
137 
138  std::vector<float>* m_sur_y =
139  new std::vector<float>;
140 
141  std::vector<float>* m_sur_z =
142  new std::vector<float>;
143 
144  std::vector<float>* m_sur_pathCorrection =
145  new std::vector<float>;
146 
147 };
148 
149 } // namespace ActsExamples