ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RootPropagationStepsWriter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RootPropagationStepsWriter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 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 
12 #include <mutex>
13 
15 
16 class TFile;
17 class TTree;
18 
19 namespace FW {
20 
21 using PropagationSteps = std::vector<Acts::detail::Step>;
22 
35  : public WriterT<std::vector<PropagationSteps>> {
36  public:
37  struct Config {
38  std::string collection =
39  "propagation_steps";
40  std::string filePath = "";
41  std::string fileMode = "RECREATE";
42  std::string treeName = "propagation_steps";
43  TFile* rootFile = nullptr;
44  };
45 
51 
53  ~RootPropagationStepsWriter() override;
54 
56  ProcessCode endRun() final override;
57 
58  protected:
65  const std::vector<PropagationSteps>& steps) final override;
66 
67  private:
70  TFile* m_outputFile;
71  TTree* m_outputTree;
72  int m_eventNr;
73  std::vector<int> m_volumeID;
74  std::vector<int> m_boundaryID;
75  std::vector<int> m_layerID;
76  std::vector<int> m_approachID;
77  std::vector<int> m_sensitiveID;
78  std::vector<float> m_x;
79  std::vector<float> m_y;
80  std::vector<float> m_z;
81  std::vector<float> m_dx;
82  std::vector<float> m_dy;
83  std::vector<float> m_dz;
84  std::vector<int> m_step_type;
85  std::vector<float> m_step_acc;
86  std::vector<float> m_step_act;
87  std::vector<float> m_step_abt;
88  std::vector<float> m_step_usr;
89 };
90 
91 } // namespace FW