EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeantinoRecording.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GeantinoRecording.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-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 
17 
18 #include <memory>
19 #include <mutex>
20 #include <string>
21 
22 #include "G4VUserDetectorConstruction.hh"
23 
24 class G4RunManager;
25 
26 namespace ActsExamples {
27 
31  std::pair<std::pair<Acts::Vector3D, Acts::Vector3D>, RecordedMaterial>;
32 
37 class GeantinoRecording final : public BareAlgorithm {
38  public:
39  struct Config {
41  std::string outputMaterialTracks = "geant-material-tracks";
43  std::unique_ptr<G4VUserDetectorConstruction> detectorConstruction;
45  size_t tracksPerEvent = 0;
48  };
49 
52 
54  const ActsExamples::AlgorithmContext& ctx) const final override;
55 
56  private:
58  std::unique_ptr<G4RunManager> m_runManager;
59  // has to be mutable; algorithm interface enforces object constness
60  mutable std::mutex m_runManagerLock;
61 };
62 
63 } // namespace ActsExamples