ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RootVertexAndTracksReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RootVertexAndTracksReader.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 
14 #include <mutex>
15 #include <vector>
16 
20 
21 class TChain;
22 
23 namespace FW {
24 
29 class RootVertexAndTracksReader final : public IReader {
30  public:
32  struct Config {
33  std::string outputCollection = "vertexAndTracksCollection";
34  std::string treeName = "event";
35  std::vector<std::string> fileList;
36  unsigned int batchSize = 1;
37  };
38 
43 
45  ~RootVertexAndTracksReader() final override;
46 
48  std::string name() const final override;
49 
51  std::pair<size_t, size_t> availableEvents() const final override;
52 
56  ProcessCode read(const FW::AlgorithmContext& context) final override;
57 
58  private:
64  size_t m_events = 0;
66  TChain* m_inputChain = nullptr;
67  int m_eventNr = 0;
68 
69  std::vector<double>* m_ptrVx = new std::vector<double>;
70  std::vector<double>* m_ptrVy = new std::vector<double>;
71  std::vector<double>* m_ptrVz = new std::vector<double>;
72  std::vector<double>* m_ptrD0 = new std::vector<double>;
73  std::vector<double>* m_ptrZ0 = new std::vector<double>;
74  std::vector<double>* m_ptrPhi = new std::vector<double>;
75  std::vector<double>* m_ptrTheta = new std::vector<double>;
76  std::vector<double>* m_ptrQP = new std::vector<double>;
77  std::vector<double>* m_ptrTime = new std::vector<double>;
78  std::vector<int>* m_ptrVtxID = new std::vector<int>;
79  std::vector<std::vector<double>>* m_ptrTrkCov =
80  new std::vector<std::vector<double>>;
81 
82  std::unique_ptr<const Acts::Logger> m_logger;
83 
84  const Acts::Logger& logger() const { return *m_logger; }
85 };
86 
87 } // namespace FW