EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::RootParticleWriter Exception Referencefinal

#include <acts/blob/sPHENIX/Examples/Io/Root/include/ActsExamples/Io/Root/RootParticleWriter.hpp>

+ Inheritance diagram for ActsExamples::RootParticleWriter:
+ Collaboration diagram for ActsExamples::RootParticleWriter:

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::Loggerlogger () 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
 

Detailed Description

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

Constructor & Destructor Documentation

ActsExamples::RootParticleWriter::RootParticleWriter ( const Config cfg,
Acts::Logging::Level  lvl 
)
ActsExamples::RootParticleWriter::~RootParticleWriter ( )
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

Member Function Documentation

ActsExamples::ProcessCode ActsExamples::RootParticleWriter::endRun ( )
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

References ACTS_INFO, and SUCCESS.

ActsExamples::ProcessCode ActsExamples::RootParticleWriter::writeT ( const AlgorithmContext ctx,
const SimParticleContainer particles 
)
finaloverrideprotectedvirtual

Type-specific write implementation.

Parameters
[in]ctxis the algorithm context
[in]particlesare 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.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::RootParticleWriter::m_cfg
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().

float ActsExamples::RootParticleWriter::m_eta
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().

uint32_t ActsExamples::RootParticleWriter::m_eventId
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().

uint32_t ActsExamples::RootParticleWriter::m_generation
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().

float ActsExamples::RootParticleWriter::m_m
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().

TFile* ActsExamples::RootParticleWriter::m_outputFile = nullptr
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().

TTree* ActsExamples::RootParticleWriter::m_outputTree = nullptr
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().

uint32_t ActsExamples::RootParticleWriter::m_particle
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().

uint64_t ActsExamples::RootParticleWriter::m_particleId
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().

int32_t ActsExamples::RootParticleWriter::m_particleType
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().

float ActsExamples::RootParticleWriter::m_phi
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().

uint32_t ActsExamples::RootParticleWriter::m_process
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().

float ActsExamples::RootParticleWriter::m_pt
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().

float ActsExamples::RootParticleWriter::m_px
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().

float ActsExamples::RootParticleWriter::m_py
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().

float ActsExamples::RootParticleWriter::m_pz
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().

float ActsExamples::RootParticleWriter::m_q
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().

uint32_t ActsExamples::RootParticleWriter::m_subParticle
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().

uint32_t ActsExamples::RootParticleWriter::m_vertexPrimary
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().

uint32_t ActsExamples::RootParticleWriter::m_vertexSecondary
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().

float ActsExamples::RootParticleWriter::m_vt
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().

float ActsExamples::RootParticleWriter::m_vx
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().

float ActsExamples::RootParticleWriter::m_vy
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().

float ActsExamples::RootParticleWriter::m_vz
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().

std::mutex ActsExamples::RootParticleWriter::m_writeMutex
private

Definition at line 66 of file RootParticleWriter.hpp.

View newest version in sPHENIX GitHub at line 66 of file RootParticleWriter.hpp


The documentation for this exception was generated from the following files: