ECCE @ EIC 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 
14 #include <mutex>
15 #include <vector>
16 
20 
21 class TChain;
22 
23 namespace FW {
24 
31  public:
33  struct Config {
34  std::string collection =
35  "material-tracks";
36  std::string filePath = "";
37  std::string treeName = "material-tracks";
38  std::vector<std::string> fileList;
39 
40  unsigned int batchSize = 1;
41 
43  std::shared_ptr<const Acts::Logger> logger;
44 
46  std::string name;
47 
51  Config(const std::string& lname = "MaterialReader",
53  : logger(Acts::getDefaultLogger(lname, lvl)), name(lname) {}
54  };
55 
58  RootMaterialTrackReader(const Config& cfg);
59 
62 
64  std::string name() const final override;
65 
67  std::pair<size_t, size_t> availableEvents() const final override;
68 
72  ProcessCode read(const FW::AlgorithmContext& context) final override;
73 
74  private:
76  const Acts::Logger& logger() const { return *m_cfg.logger; }
77 
80 
83 
85  size_t m_events = 0;
86 
88  TChain* m_inputChain = nullptr;
89 
90  float m_v_x;
91  float m_v_y;
92  float m_v_z;
93  float m_v_px;
94  float m_v_py;
95  float m_v_pz;
96  float m_v_phi;
97  float m_v_eta;
98  float m_tX0;
99  float m_tL0;
100 
101  std::vector<float>* m_step_x = new std::vector<float>;
102  std::vector<float>* m_step_y = new std::vector<float>;
103  std::vector<float>* m_step_z = new std::vector<float>;
104  std::vector<float>* m_step_length = new std::vector<float>;
105  std::vector<float>* m_step_X0 = new std::vector<float>;
106  std::vector<float>* m_step_L0 = new std::vector<float>;
107  std::vector<float>* m_step_A = new std::vector<float>;
108  std::vector<float>* m_step_Z = new std::vector<float>;
109  std::vector<float>* m_step_rho =
110  new std::vector<float>;
111 };
112 
113 } // namespace FW