Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RootNuclearInteractionParametersWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootNuclearInteractionParametersWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020-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
11
#include "
Acts/Utilities/Logger.hpp
"
12
#include "
ActsExamples/EventData/ExtractedSimulationProcess.hpp
"
13
#include "
ActsExamples/Framework/ProcessCode.hpp
"
14
#include "
ActsExamples/Framework/WriterT.hpp
"
15
#include "
ActsExamples/Io/NuclearInteractions/detail/NuclearInteractionParametrisation.hpp
"
16
17
#include <mutex>
18
#include <string>
19
#include <vector>
20
21
namespace
ActsExamples {
22
struct
AlgorithmContext;
23
30
class
RootNuclearInteractionParametersWriter
final
31
:
public
WriterT
<ExtractedSimulationProcessContainer> {
32
public
:
33
struct
Config
{
35
std::string
inputSimulationProcesses
;
37
std::string
filePath
=
"parameters.root"
;
39
std::string
fileMode
=
"RECREATE"
;
40
42
unsigned
int
interactionProbabilityBins
= 1e6;
44
unsigned
int
momentumBins
= 1e6;
46
unsigned
int
invariantMassBins
= 1e6;
48
unsigned
int
multiplicityMax
= 10;
50
bool
writeOptionalHistograms
=
true
;
52
unsigned
int
nSimulatedEvents
= 0;
53
};
54
59
RootNuclearInteractionParametersWriter
(
const
Config
&
config
,
60
Acts::Logging::Level
level
);
61
~RootNuclearInteractionParametersWriter
()
override
;
62
64
ProcessCode
finalize
()
override
;
65
67
const
Config
&
config
()
const
{
return
m_cfg
; }
68
69
protected
:
74
ProcessCode
writeT
(
const
AlgorithmContext
&
/*ctx*/
,
75
const
ExtractedSimulationProcessContainer
&
event
)
override
;
76
77
private
:
78
Config
m_cfg
;
79
std::mutex
m_writeMutex
;
80
std::vector<detail::NuclearInteractionParametrisation::EventFraction>
81
m_eventFractionCollection
;
82
};
83
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
NuclearInteractions
include
ActsExamples
Io
NuclearInteractions
RootNuclearInteractionParametersWriter.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration