Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Io/Root/include/ActsExamples/Io/Root/RootSimHitWriter.hpp>
Classes | |
struct | Config |
Public Member Functions | |
RootSimHitWriter (const Config &config, Acts::Logging::Level level) | |
~RootSimHitWriter () override | |
Ensure underlying file is closed. | |
ProcessCode | finalize () override |
End-of-run hook. | |
const Config & | config () const |
Get readonly access to the config parameters. | |
Public Member Functions inherited from ActsExamples::WriterT< SimHitContainer > | |
WriterT (std::string objectName, std::string writerName, Acts::Logging::Level level) | |
std::string | name () const override |
Provide the name of the writer. | |
ProcessCode | write (const AlgorithmContext &context) override |
Read the object and call the type-specific member function. | |
ProcessCode | finalize () override |
No-op default implementation. | |
Public Member Functions inherited from ActsExamples::IWriter | |
ProcessCode | internalExecute (const AlgorithmContext &context) final |
ProcessCode | initialize () override |
Fulfil the algorithm interface. | |
Public Member Functions inherited from ActsExamples::SequenceElement | |
virtual | ~SequenceElement ()=default |
const std::vector< const DataHandleBase * > & | writeHandles () const |
const std::vector< const DataHandleBase * > & | readHandles () const |
Protected Member Functions | |
ProcessCode | writeT (const AlgorithmContext &ctx, const SimHitContainer &hits) override |
Protected Member Functions inherited from ActsExamples::WriterT< SimHitContainer > | |
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 = 0 |
Event identifier. | |
uint64_t | m_geometryId = 0 |
Hit surface identifier. | |
uint64_t | m_particleId = 0 |
Event-unique particle identifier a.k.a. barcode. | |
float | m_tx = 0 |
True global hit position components in mm. | |
float | m_ty = 0 |
float | m_tz = 0 |
float | m_tt = 0 |
float | m_tpx = 0 |
True particle four-momentum in GeV at hit position before interaction. | |
float | m_tpy = 0 |
float | m_tpz = 0 |
float | m_te = 0 |
float | m_deltapx = 0 |
True change in particle four-momentum in GeV due to interactions. | |
float | m_deltapy = 0 |
float | m_deltapz = 0 |
float | m_deltae = 0 |
int32_t | m_index = 0 |
Hit index along the particle trajectory. | |
uint32_t | m_volumeId = 0 |
uint32_t | m_boundaryId = 0 |
uint32_t | m_layerId = 0 |
uint32_t | m_approachId = 0 |
uint32_t | m_sensitiveId = 0 |
Write out simulated hits as a flat TTree.
Each entry in the TTree corresponds to one hit 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 34 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 34 of file RootSimHitWriter.hpp
ActsExamples::RootSimHitWriter::RootSimHitWriter | ( | const Config & | config, |
Acts::Logging::Level | level | ||
) |
Construct the particle writer.
config | is the configuration object |
level | is the logging level |
Definition at line 24 of file RootSimHitWriter.cpp.
View newest version in sPHENIX GitHub at line 24 of file RootSimHitWriter.cpp
References ActsExamples::RootSimHitWriter::Config::fileMode, ActsExamples::RootSimHitWriter::Config::filePath, m_approachId, m_boundaryId, m_cfg, m_deltae, m_deltapx, m_deltapy, m_deltapz, m_eventId, m_geometryId, m_index, m_layerId, m_outputFile, m_outputTree, m_particleId, m_sensitiveId, m_te, m_tpx, m_tpy, m_tpz, m_tt, m_tx, m_ty, m_tz, m_volumeId, and ActsExamples::RootSimHitWriter::Config::treeName.
|
override |
Ensure underlying file is closed.
Definition at line 71 of file RootSimHitWriter.cpp.
View newest version in sPHENIX GitHub at line 71 of file RootSimHitWriter.cpp
|
inline |
Get readonly access to the config parameters.
Definition at line 60 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 60 of file RootSimHitWriter.hpp
References m_cfg.
|
overridevirtual |
End-of-run hook.
Implements ActsExamples::SequenceElement.
Definition at line 77 of file RootSimHitWriter.cpp.
View newest version in sPHENIX GitHub at line 77 of file RootSimHitWriter.cpp
References ACTS_VERBOSE, m_cfg(), and SUCCESS.
Referenced by BOOST_AUTO_TEST_CASE().
|
overrideprotectedvirtual |
Type-specific write implementation.
[in] | ctx | is the algorithm context |
[in] | hits | are the hits to be written |
Implements ActsExamples::WriterT< SimHitContainer >.
Definition at line 88 of file RootSimHitWriter.cpp.
View newest version in sPHENIX GitHub at line 88 of file RootSimHitWriter.cpp
References ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, and SUCCESS.
|
private |
Definition at line 95 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 95 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 93 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 93 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 71 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 71 of file RootSimHitWriter.hpp
Referenced by config(), and RootSimHitWriter().
|
private |
Definition at line 88 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 88 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
True change in particle four-momentum in GeV due to interactions.
Definition at line 88 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 88 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 88 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 88 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 88 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 88 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Event identifier.
Definition at line 76 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 76 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Hit surface identifier.
Definition at line 78 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 78 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Hit index along the particle trajectory.
Definition at line 90 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 90 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 94 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 94 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 73 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 73 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 74 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 74 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Event-unique particle identifier a.k.a. barcode.
Definition at line 80 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 80 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 96 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 96 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 86 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 86 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
True particle four-momentum in GeV at hit position before interaction.
Definition at line 86 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 86 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 86 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 86 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 86 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 86 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 84 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 84 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
True global hit position components in mm.
Definition at line 82 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 82 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 82 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 82 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 92 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 92 of file RootSimHitWriter.hpp
Referenced by RootSimHitWriter().
|
private |
Definition at line 72 of file RootSimHitWriter.hpp.
View newest version in sPHENIX GitHub at line 72 of file RootSimHitWriter.hpp