EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/Examples/Algorithms/Generators/ActsExamples/Generators/EventGenerator.hpp>
Classes | |
struct | Config |
struct | Generator |
Public Types | |
using | MultiplicityGenerator = std::function< size_t(RandomEngine &)> |
using | VertexGenerator = std::function< Acts::Vector4D(RandomEngine &)> |
using | ParticlesGenerator = std::function< SimParticleContainer(RandomEngine &)> |
Public Member Functions | |
EventGenerator (const Config &cfg, Acts::Logging::Level lvl) | |
std::string | name () const final |
Name of the reader. | |
std::pair< size_t, size_t > | availableEvents () const final |
Available events range. Always return [0,SIZE_MAX) since we generate them. | |
ProcessCode | read (const AlgorithmContext &context) final |
Generate an event. | |
Public Member Functions inherited from ActsExamples::IReader | |
virtual | ~IReader ()=default |
Private Member Functions | |
const Acts::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
std::unique_ptr< const Acts::Logger > | m_logger |
Event generator based on separate particles and vertex generators.
This must be a reader and not just an algorithm since it might read in pre-computed generator samples, e.g. via HepMC, and therefore has an internal state that will be modified.
Definition at line 33 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 33 of file EventGenerator.hpp
using ActsExamples::EventGenerator::MultiplicityGenerator = std::function<size_t(RandomEngine&)> |
Combined set of generator functions.
Each generator creates a number of primary vertices (multiplicity), each with an separate vertex position and time (vertex), and a set of associated particles grouped into secondary vertices (process) anchored at the primary vertex position. The first group of particles generated by the process are the particles associated directly to the primary vertex.
The process generator is responsible for defining all components of the particle barcode except the primary vertex. The primary vertex will be set/overwritten by the event generator.
Definition at line 47 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 47 of file EventGenerator.hpp
using ActsExamples::EventGenerator::ParticlesGenerator = std::function<SimParticleContainer(RandomEngine&)> |
Definition at line 49 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 49 of file EventGenerator.hpp
using ActsExamples::EventGenerator::VertexGenerator = std::function<Acts::Vector4D(RandomEngine&)> |
Definition at line 48 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 48 of file EventGenerator.hpp
ActsExamples::EventGenerator::EventGenerator | ( | const Config & | cfg, |
Acts::Logging::Level | lvl | ||
) |
Definition at line 17 of file EventGenerator.cpp.
View newest version in sPHENIX GitHub at line 17 of file EventGenerator.cpp
References ActsExamples::EventGenerator::Config::generators, m_cfg, ActsExamples::EventGenerator::Config::outputParticles, and ActsExamples::EventGenerator::Config::randomNumbers.
|
finalvirtual |
Available events range. Always return [0,SIZE_MAX) since we generate them.
Implements ActsExamples::IReader.
Definition at line 35 of file EventGenerator.cpp.
View newest version in sPHENIX GitHub at line 35 of file EventGenerator.cpp
References Acts::UnitConstants::u.
|
inlineprivate |
Definition at line 75 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 75 of file EventGenerator.hpp
References m_logger.
|
finalvirtual |
Name of the reader.
Implements ActsExamples::IReader.
Definition at line 31 of file EventGenerator.cpp.
View newest version in sPHENIX GitHub at line 31 of file EventGenerator.cpp
Referenced by eicpy.verify.PythiaHistograms::__init__(), and eicpy.verify.DjangohHistograms::__init__().
|
finalvirtual |
Generate an event.
Implements ActsExamples::IReader.
Definition at line 40 of file EventGenerator.cpp.
View newest version in sPHENIX GitHub at line 40 of file EventGenerator.cpp
References ACTS_DEBUG, ACTS_VERBOSE, ActsExamples::WhiteBoard::add(), ActsExamples::AlgorithmContext::eventNumber, ActsExamples::AlgorithmContext::eventStore, n, particle, pid, Acts::Test::pos4(), and SUCCESS.
|
private |
Definition at line 77 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 77 of file EventGenerator.hpp
Referenced by EventGenerator().
|
private |
Definition at line 78 of file EventGenerator.hpp.
View newest version in sPHENIX GitHub at line 78 of file EventGenerator.hpp
Referenced by logger().