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
Pythia8ProcessGenerator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Pythia8ProcessGenerator.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-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
9
#pragma once
10
11
#include "
Acts/Utilities/Logger.hpp
"
12
#include "
Acts/Utilities/PdgParticle.hpp
"
13
#include "
Acts/Utilities/Units.hpp
"
14
#include "
ActsExamples/EventData/SimParticle.hpp
"
15
#include "
ActsExamples/Framework/RandomNumbers.hpp
"
16
17
#include <memory>
18
#include <mutex>
19
#include <vector>
20
21
namespace
Pythia8
{
22
class
Pythia;
23
}
24
namespace
ActsExamples {
25
26
class
Pythia8Generator
{
27
public
:
28
struct
Config
{
30
Acts::PdgParticle
pdgBeam0
=
Acts::PdgParticle::eProton
;
32
Acts::PdgParticle
pdgBeam1
=
Acts::PdgParticle::eProton
;
34
double
cmsEnergy
= 14 *
Acts::UnitConstants::TeV
;
36
std::vector<std::string>
settings
= {{
"HardQCD:all = on"
}};
37
};
38
39
static
std::function<SimParticleContainer(RandomEngine&)>
makeFunction
(
40
const
Config
& cfg,
Acts::Logging::Level
lvl);
41
42
Pythia8Generator
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
43
~Pythia8Generator
();
44
// try to prevent pythia breakage by forbidding copying
45
Pythia8Generator
() =
delete
;
46
Pythia8Generator
(
const
Pythia8Generator
&) =
delete
;
47
Pythia8Generator
(
Pythia8Generator
&&) =
delete
;
48
Pythia8Generator
&
operator=
(
const
Pythia8Generator
&) =
delete
;
49
Pythia8Generator
&
operator=
(
Pythia8Generator
&& other) =
delete
;
50
51
SimParticleContainer
operator()
(
RandomEngine
& rng);
52
53
private
:
55
const
Acts::Logger
&
logger
()
const
{
return
(*
m_logger
); }
56
57
Config
m_cfg
;
58
std::unique_ptr<const Acts::Logger>
m_logger
;
59
std::unique_ptr<::Pythia8::Pythia>
m_pythia8
;
60
std::mutex
m_pythia8Mutex
;
61
};
62
63
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
GeneratorsPythia8
ActsExamples
Generators
Pythia8ProcessGenerator.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration