Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RootTrajectorySummaryReader.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RootTrajectorySummaryReader.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2021 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 <cstdint>
22 #include <memory>
23 #include <mutex>
24 #include <string>
25 #include <utility>
26 #include <vector>
27 
28 class TChain;
29 
30 namespace ActsExamples {
31 struct AlgorithmContext;
32 
38  public:
40  struct Config {
41  std::string outputTracks = "outputTracks";
43  "outputParticles";
44  std::string treeName = "tracksummary";
46 
48  bool orderedEvents = true;
49  };
50 
55 
58 
60  std::string name() const override { return "RootTrackSummaryReader"; }
61 
63  std::pair<size_t, size_t> availableEvents() const override;
64 
68  ProcessCode read(const ActsExamples::AlgorithmContext& context) override;
69 
71  const Config& config() const { return m_cfg; }
72 
73  private:
75  std::unique_ptr<const Acts::Logger> m_logger;
76 
78  const Acts::Logger& logger() const { return *m_logger; }
79 
82 
84  m_outputTrackParameters{this, "OutputTrackParameters"};
85 
87  "OutputParticles"};
88 
90  std::mutex m_read_mutex;
91 
93  size_t m_events = 0;
94 
96  TChain* m_inputChain = nullptr;
97 
98  uint32_t m_eventNr{0};
99  std::vector<uint32_t>* m_multiTrajNr =
100  new std::vector<uint32_t>;
101  std::vector<unsigned int>* m_subTrajNr =
102  new std::vector<unsigned int>;
103 
104 
107  std::vector<long long> m_entryNumbers = {};
108 
109  std::vector<unsigned int>* m_nStates =
110  new std::vector<unsigned int>;
111  std::vector<unsigned int>* m_nMeasurements =
112  new std::vector<unsigned int>;
113  std::vector<unsigned int>* m_nOutliers =
114  new std::vector<unsigned int>;
115  std::vector<unsigned int>* m_nHoles =
116  new std::vector<unsigned int>;
117  std::vector<float>* m_chi2Sum = new std::vector<float>;
118  std::vector<unsigned int>* m_NDF =
119  new std::vector<unsigned int>;
120 
121  std::vector<std::vector<double>>* m_measurementChi2 =
122  new std::vector<std::vector<double>>;
123 
124  std::vector<std::vector<double>>* m_outlierChi2 =
125  new std::vector<std::vector<double>>;
126  std::vector<std::vector<double>>* m_measurementVolume =
127  new std::vector<std::vector<double>>;
128 
129  std::vector<std::vector<double>>* m_measurementLayer =
130  new std::vector<std::vector<double>>;
131 
132  std::vector<std::vector<double>>* m_outlierVolume =
133  new std::vector<std::vector<double>>;
134  std::vector<std::vector<double>>* m_outlierLayer =
135  new std::vector<std::vector<double>>;
136 
137  // The majority truth particle info
138  std::vector<unsigned int>* m_nMajorityHits =
139  new std::vector<unsigned int>;
140 
141  std::vector<uint64_t>* m_majorityParticleId =
142  new std::vector<uint64_t>;
143  std::vector<int>* m_t_charge =
144  new std::vector<int>;
145  std::vector<float>* m_t_time =
146  new std::vector<float>;
147  std::vector<float>* m_t_vx =
148  new std::vector<float>;
149  std::vector<float>* m_t_vy =
150  new std::vector<float>;
151  std::vector<float>* m_t_vz =
152  new std::vector<float>;
153  std::vector<float>* m_t_px =
154  new std::vector<float>;
155  std::vector<float>* m_t_py =
156  new std::vector<float>;
157  std::vector<float>* m_t_pz =
158  new std::vector<float>;
159  std::vector<float>* m_t_theta =
160  new std::vector<float>;
161  std::vector<float>* m_t_phi =
162  new std::vector<float>;
163  std::vector<float>* m_t_pT =
164  new std::vector<float>;
165  std::vector<float>* m_t_eta =
166  new std::vector<float>;
167 
168  std::vector<bool>* m_hasFittedParams =
169  new std::vector<bool>;
170  std::vector<float>* m_eLOC0_fit =
171  new std::vector<float>;
172  std::vector<float>* m_eLOC1_fit =
173  new std::vector<float>;
174  std::vector<float>* m_ePHI_fit =
175  new std::vector<float>;
176  std::vector<float>* m_eTHETA_fit =
177  new std::vector<float>;
178  std::vector<float>* m_eQOP_fit =
179  new std::vector<float>;
180  std::vector<float>* m_eT_fit =
181  new std::vector<float>;
182  std::vector<float>* m_err_eLOC0_fit =
183  new std::vector<float>;
184  std::vector<float>* m_err_eLOC1_fit =
185  new std::vector<float>;
186  std::vector<float>* m_err_ePHI_fit =
187  new std::vector<float>;
188  std::vector<float>* m_err_eTHETA_fit =
189  new std::vector<float>;
190  std::vector<float>* m_err_eQOP_fit =
191  new std::vector<float>;
192  std::vector<float>* m_err_eT_fit =
193  new std::vector<float>;
194 };
195 
196 } // namespace ActsExamples