EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/Examples/Io/Root/include/ActsExamples/Io/Root/RootParticleWriter.hpp>
Classes | |
struct | Config |
Public Member Functions | |
RootParticleWriter (const Config &cfg, Acts::Logging::Level lvl) | |
~RootParticleWriter () finaloverride | |
Ensure underlying file is closed. | |
ProcessCode | endRun () finaloverride |
End-of-run hook. | |
Public Member Functions inherited from ActsExamples::WriterT< SimParticleContainer > | |
WriterT (std::string objectName, std::string writerName, Acts::Logging::Level level) | |
std::string | name () const finaloverride |
Provide the name of the writer. | |
ProcessCode | write (const AlgorithmContext &context) finaloverride |
Read the object and call the type-specific member function. | |
ProcessCode | endRun () override |
No-op default implementation. | |
Public Member Functions inherited from ActsExamples::IWriter | |
virtual | ~IWriter ()=default |
Protected Member Functions | |
ProcessCode | writeT (const AlgorithmContext &ctx, const SimParticleContainer &particles) finaloverride |
Protected Member Functions inherited from ActsExamples::WriterT< SimParticleContainer > | |
const Acts::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
std::mutex | m_writeMutex |
TFile * | m_outputFile = nullptr |
TTree * | m_outputTree = nullptr |
uint32_t | m_eventId |
Event identifier. | |
uint64_t | m_particleId |
Event-unique particle identifier a.k.a barcode. | |
int32_t | m_particleType |
Particle type a.k.a. PDG particle number. | |
uint32_t | m_process |
Production process type, i.e. what generated the particle. | |
float | m_vx |
Production position components in mm. | |
float | m_vy |
float | m_vz |
float | m_vt |
float | m_px |
Momentum components in GeV. | |
float | m_py |
float | m_pz |
float | m_m |
Mass in GeV. | |
float | m_q |
Charge in e. | |
float | m_eta |
Direction pseudo-rapidity. | |
float | m_phi |
Direction angle in the transverse plane. | |
float | m_pt |
Transverse momentum in GeV. | |
uint32_t | m_vertexPrimary |
uint32_t | m_vertexSecondary |
uint32_t | m_particle |
uint32_t | m_generation |
uint32_t | m_subParticle |
Write out particles as a flat TTree.
Each entry in the TTree corresponds to one particle for optimum writing speed. The event number is part of the written data.
Safe to use from multiple writer threads. To avoid thread-saftey issues, the writer must be the sole owner of the underlying file. Thus, the output file pointer can not be given from the outside.
Definition at line 31 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 31 of file RootParticleWriter.hpp
ActsExamples::RootParticleWriter::RootParticleWriter | ( | const Config & | cfg, |
Acts::Logging::Level | lvl | ||
) |
Construct the particle writer.
cfg is the configuration object lvl is the logging level
Definition at line 20 of file RootParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 20 of file RootParticleWriter.cpp
References ActsExamples::RootParticleWriter::Config::fileMode, ActsExamples::RootParticleWriter::Config::filePath, m_cfg, m_eta, m_eventId, m_generation, m_m, m_outputFile, m_outputTree, m_particle, m_particleId, m_particleType, m_phi, m_process, m_pt, m_px, m_py, m_pz, m_q, m_subParticle, m_vertexPrimary, m_vertexSecondary, m_vt, m_vx, m_vy, m_vz, and ActsExamples::RootParticleWriter::Config::treeName.
|
finaloverride |
Ensure underlying file is closed.
Definition at line 67 of file RootParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 67 of file RootParticleWriter.cpp
|
finaloverridevirtual |
End-of-run hook.
Implements ActsExamples::IWriter.
Definition at line 73 of file RootParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 73 of file RootParticleWriter.cpp
|
finaloverrideprotectedvirtual |
Type-specific write implementation.
[in] | ctx | is the algorithm context |
[in] | particles | are the particle to be written |
Implements ActsExamples::WriterT< SimParticleContainer >.
Definition at line 83 of file RootParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 83 of file RootParticleWriter.cpp
References ACTS_ERROR, Acts::UnitConstants::e, Acts::VectorHelpers::eta(), ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, p, particle, Acts::VectorHelpers::perp(), Acts::VectorHelpers::phi(), and SUCCESS.
|
private |
Definition at line 65 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 65 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Direction pseudo-rapidity.
Definition at line 89 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 89 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Event identifier.
Definition at line 70 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 70 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 98 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 98 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Mass in GeV.
Definition at line 84 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 84 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 67 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 67 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 68 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 68 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 97 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 97 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Event-unique particle identifier a.k.a barcode.
Definition at line 72 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 72 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Particle type a.k.a. PDG particle number.
Definition at line 74 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 74 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Direction angle in the transverse plane.
Definition at line 91 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 91 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Production process type, i.e. what generated the particle.
Definition at line 76 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 76 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Transverse momentum in GeV.
Definition at line 93 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 93 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Momentum components in GeV.
Definition at line 82 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 82 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 82 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Charge in e.
Definition at line 86 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 86 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 99 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 99 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 95 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 95 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 96 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 96 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 80 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 80 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Production position components in mm.
Definition at line 78 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 78 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 78 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 78 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 78 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 78 of file RootParticleWriter.hpp
Referenced by RootParticleWriter().
|
private |
Definition at line 66 of file RootParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 66 of file RootParticleWriter.hpp