EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
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
11
#include "
Acts/Propagator/MaterialInteractor.hpp
"
12
#include "
Acts/Utilities/Definitions.hpp
"
13
#include "
Acts/Utilities/Logger.hpp
"
14
#include "
ActsExamples/Framework/BareAlgorithm.hpp
"
15
#include "
ActsExamples/Framework/ProcessCode.hpp
"
16
#include "
ActsExamples/Geant4/PrimaryGeneratorAction.hpp
"
17
18
#include <memory>
19
#include <mutex>
20
#include <string>
21
22
#include "G4VUserDetectorConstruction.hh"
23
24
class
G4RunManager;
25
26
namespace
ActsExamples {
27
28
using
RecordedMaterial
=
Acts::MaterialInteractor::result_type
;
30
using
RecordedMaterialTrack
=
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;
47
PrimaryGeneratorAction::Config
generationConfig
;
48
};
49
50
GeantinoRecording
(
Config
&& cfg,
Acts::Logging::Level
lvl);
51
~GeantinoRecording
();
52
53
ActsExamples::ProcessCode
execute
(
54
const
ActsExamples::AlgorithmContext
& ctx)
const
final
override
;
55
56
private
:
57
Config
m_cfg
;
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
acts
blob
sPHENIX
Examples
Algorithms
Geant4
include
ActsExamples
Geant4
GeantinoRecording.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration