ECCE @ EIC Software
Reference for
ECCE @ 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 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 <functional>
16
#include <memory>
17
#include <utility>
18
#include <vector>
19
20
#include "
ACTFW/EventData/SimVertex.hpp
"
21
#include "
ACTFW/Framework/IReader.hpp
"
22
#include "
ACTFW/Framework/RandomNumbers.hpp
"
23
#include "
Acts/Utilities/Definitions.hpp
"
24
#include "
Acts/Utilities/Logger.hpp
"
25
26
namespace
FW {
27
33
class
EventGenerator
final :
public
FW::IReader
{
34
public
:
47
using
MultiplicityGenerator
= std::function<size_t(RandomEngine&)>;
48
using
VertexGenerator
=
49
std::function<Acts::ActsVector<double, 4>(
RandomEngine
&)>;
50
using
ProcessGenerator
= std::function<std::vector<SimVertex>(
RandomEngine
&)>;
51
struct
Generator
{
52
MultiplicityGenerator
multiplicity
=
nullptr
;
53
VertexGenerator
vertex
=
nullptr
;
54
ProcessGenerator
process
=
nullptr
;
55
};
56
57
struct
Config
{
59
std::string
output
;
61
std::vector<Generator>
generators
;
63
bool
shuffle
=
false
;
65
std::shared_ptr<const RandomNumbers>
randomNumbers
;
66
};
67
68
EventGenerator
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
69
71
std::string
name
() const override final;
73
std::pair<
size_t
,
size_t
>
availableEvents
() const final override;
75
ProcessCode
read
(const
AlgorithmContext
&
context
) override final;
76
77
private:
78
const Acts::Logger&
logger
()
const
{
return
*
m_logger
; }
79
80
Config
m_cfg
;
81
std::unique_ptr<const Acts::Logger>
m_logger
;
82
};
83
84
}
// namespace FW
acts
blob
master
Examples
Algorithms
Generators
ACTFW
Generators
EventGenerator.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration