EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CKFPerformanceWriter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CKFPerformanceWriter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 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 
11 #include "Acts/Utilities/Units.hpp"
18 
19 #include <mutex>
20 
21 class TFile;
22 class TTree;
23 
24 using namespace Acts::UnitLiterals;
25 
26 namespace ActsExamples {
27 
36 class CKFPerformanceWriter final : public WriterT<TrajectoryContainer> {
37  public:
38  struct Config {
40  std::string inputParticles;
42  std::string inputTrajectories;
44  std::string outputDir;
46  std::string outputFilename = "performance_ckf.root";
53  double truthMatchProbMin = 0.5;
55  size_t nMeasurementsMin = 9;
57  double ptMin = 1_GeV;
58  };
59 
62  ~CKFPerformanceWriter() override;
63 
65  ProcessCode endRun() final override;
66 
67  private:
68  ProcessCode writeT(const AlgorithmContext& ctx,
69  const TrajectoryContainer& trajectories) final override;
70 
71  Config m_cfg;
73  std::mutex m_writeMutex;
74  TFile* m_outputFile{nullptr};
80  FakeRatePlotTool::FakeRatePlotCache m_fakeRatePlotCache{};
87 };
88 
89 } // namespace ActsExamples