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
EventGenerator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EventGenerator.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019-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
12
13
#pragma once
14
15
#include "
Acts/Utilities/Definitions.hpp
"
16
#include "
Acts/Utilities/Logger.hpp
"
17
#include "
ActsExamples/EventData/SimParticle.hpp
"
18
#include "
ActsExamples/Framework/IReader.hpp
"
19
#include "
ActsExamples/Framework/RandomNumbers.hpp
"
20
21
#include <functional>
22
#include <memory>
23
#include <utility>
24
#include <vector>
25
26
namespace
ActsExamples {
27
33
class
EventGenerator
final :
public
ActsExamples::IReader
{
34
public
:
47
using
MultiplicityGenerator
= std::function<size_t(RandomEngine&)>;
48
using
VertexGenerator
= std::function<Acts::Vector4D(RandomEngine&)>;
49
using
ParticlesGenerator
= std::function<SimParticleContainer(RandomEngine&)>;
50
struct
Generator
{
51
MultiplicityGenerator
multiplicity
=
nullptr
;
52
VertexGenerator
vertex
=
nullptr
;
53
ParticlesGenerator
particles
=
nullptr
;
54
};
55
56
struct
Config
{
58
std::string
outputParticles
;
60
std::vector<Generator>
generators
;
62
std::shared_ptr<const RandomNumbers>
randomNumbers
;
63
};
64
65
EventGenerator
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
66
68
std::string
name
() const final;
70
std::pair<
size_t
,
size_t
>
availableEvents
() const final;
72
ProcessCode
read
(const
AlgorithmContext
& context) final;
73
74
private:
75
const Acts::Logger&
logger
()
const
{
return
*
m_logger
; }
76
77
Config
m_cfg
;
78
std::unique_ptr<const Acts::Logger>
m_logger
;
79
};
80
81
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Generators
ActsExamples
Generators
EventGenerator.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration