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
ParametricParticleGenerator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ParametricParticleGenerator.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/Definitions/PdgParticle.hpp
"
12
#include "
Acts/Definitions/Units.hpp
"
13
#include "
ActsExamples/EventData/SimParticle.hpp
"
14
#include "
ActsExamples/Framework/RandomNumbers.hpp
"
15
#include "
ActsExamples/Generators/EventGenerator.hpp
"
16
17
#include <array>
18
#include <cmath>
19
#include <cstddef>
20
#include <limits>
21
#include <optional>
22
23
namespace
ActsExamples {
24
31
class
ParametricParticleGenerator
:
public
EventGenerator::ParticlesGenerator
{
32
public
:
33
struct
Config
{
35
double
phiMin
= -M_PI;
36
double
phiMax
= M_PI;
46
double
thetaMin
=
std::numeric_limits<double>::min
();
47
double
thetaMax
= M_PI - std::numeric_limits<double>::epsilon();
48
bool
etaUniform
=
false
;
50
double
pMin
= 1 *
Acts::UnitConstants::GeV
;
51
double
pMax
= 10 *
Acts::UnitConstants::GeV
;
53
bool
pTransverse
=
false
;
55
Acts::PdgParticle
pdg
=
Acts::PdgParticle::eMuon
;
57
bool
randomizeCharge
=
false
;
59
size_t
numParticles
= 1;
60
62
std::optional<double>
charge
;
64
std::optional<double>
mass
;
65
};
66
67
ParametricParticleGenerator
(
const
Config
&
cfg
);
68
70
SimParticleContainer
operator()
(
RandomEngine
&
rng
)
override
;
71
72
private
:
73
Config
m_cfg
;
74
// will be automatically set from PDG data tables
75
double
m_charge
;
76
double
m_mass
;
77
double
m_cosThetaMin
;
78
double
m_cosThetaMax
;
79
double
m_etaMin
;
80
double
m_etaMax
;
81
};
82
83
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Generators
ActsExamples
Generators
ParametricParticleGenerator.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration