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

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

+ Inheritance diagram for ActsExamples::RootSimHitWriter:
+ Collaboration diagram for ActsExamples::RootSimHitWriter:

Classes

struct  Config
 

Public Member Functions

 RootSimHitWriter (const Config &cfg, Acts::Logging::Level lvl)
 
 ~RootSimHitWriter () finaloverride
 Ensure underlying file is closed.
 
ProcessCode endRun () finaloverride
 End-of-run hook.
 
- Public Member Functions inherited from ActsExamples::WriterT< SimHitContainer >
 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 SimHitContainer &hits) finaloverride
 
- Protected Member Functions inherited from ActsExamples::WriterT< SimHitContainer >
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_geometryId
 Hit surface identifier.
 
uint64_t m_particleId
 Event-unique particle identifier a.k.a. barcode.
 
float m_tx
 True global hit position components in mm.
 
float m_ty
 
float m_tz
 
float m_tt
 
float m_tpx
 True particle four-momentum in GeV at hit position before interaction.
 
float m_tpy
 
float m_tpz
 
float m_te
 
float m_deltapx
 True change in particle four-momentum in GeV due to interactions.
 
float m_deltapy
 
float m_deltapz
 
float m_deltae
 
int32_t m_index
 Hit index along the particle trajectory.
 
uint32_t m_volumeId
 
uint32_t m_boundaryId
 
uint32_t m_layerId
 
uint32_t m_approachId
 
uint32_t m_sensitiveId
 

Detailed Description

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 31 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 31 of file RootSimHitWriter.hpp

Constructor & Destructor Documentation

ActsExamples::RootSimHitWriter::RootSimHitWriter ( const Config cfg,
Acts::Logging::Level  lvl 
)
ActsExamples::RootSimHitWriter::~RootSimHitWriter ( )
finaloverride

Ensure underlying file is closed.

Definition at line 65 of file RootSimHitWriter.cpp.

View newest version in sPHENIX GitHub at line 65 of file RootSimHitWriter.cpp

Member Function Documentation

ActsExamples::ProcessCode ActsExamples::RootSimHitWriter::endRun ( )
finaloverridevirtual

End-of-run hook.

Implements ActsExamples::IWriter.

Definition at line 71 of file RootSimHitWriter.cpp.

View newest version in sPHENIX GitHub at line 71 of file RootSimHitWriter.cpp

References ACTS_VERBOSE, and SUCCESS.

ActsExamples::ProcessCode ActsExamples::RootSimHitWriter::writeT ( const AlgorithmContext ctx,
const SimHitContainer hits 
)
finaloverrideprotectedvirtual

Type-specific write implementation.

Parameters
[in]ctxis the algorithm context
[in]hitsare the hits to be written

Implements ActsExamples::WriterT< SimHitContainer >.

Definition at line 81 of file RootSimHitWriter.cpp.

View newest version in sPHENIX GitHub at line 81 of file RootSimHitWriter.cpp

References ACTS_ERROR, ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, and SUCCESS.

Member Data Documentation

uint32_t ActsExamples::RootSimHitWriter::m_approachId
private

Definition at line 89 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 89 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint32_t ActsExamples::RootSimHitWriter::m_boundaryId
private

Definition at line 87 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 87 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

Config ActsExamples::RootSimHitWriter::m_cfg
private

Definition at line 65 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 65 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_deltae
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().

float ActsExamples::RootSimHitWriter::m_deltapx
private

True change in particle four-momentum in GeV due to interactions.

Definition at line 82 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 82 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_deltapy
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().

float ActsExamples::RootSimHitWriter::m_deltapz
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().

uint32_t ActsExamples::RootSimHitWriter::m_eventId
private

Event identifier.

Definition at line 70 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 70 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint64_t ActsExamples::RootSimHitWriter::m_geometryId
private

Hit surface identifier.

Definition at line 72 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 72 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

int32_t ActsExamples::RootSimHitWriter::m_index
private

Hit index along the particle trajectory.

Definition at line 84 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 84 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint32_t ActsExamples::RootSimHitWriter::m_layerId
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().

TFile* ActsExamples::RootSimHitWriter::m_outputFile = nullptr
private

Definition at line 67 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 67 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

TTree* ActsExamples::RootSimHitWriter::m_outputTree = nullptr
private

Definition at line 68 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 68 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint64_t ActsExamples::RootSimHitWriter::m_particleId
private

Event-unique particle identifier a.k.a. barcode.

Definition at line 74 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 74 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint32_t ActsExamples::RootSimHitWriter::m_sensitiveId
private

Definition at line 90 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 90 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_te
private

Definition at line 80 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 80 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tpx
private

True particle four-momentum in GeV at hit position before interaction.

Definition at line 80 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 80 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tpy
private

Definition at line 80 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 80 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tpz
private

Definition at line 80 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 80 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tt
private

Definition at line 78 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 78 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tx
private

True global hit position components in mm.

Definition at line 76 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 76 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_ty
private

Definition at line 76 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 76 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

float ActsExamples::RootSimHitWriter::m_tz
private

Definition at line 76 of file RootSimHitWriter.hpp.

View newest version in sPHENIX GitHub at line 76 of file RootSimHitWriter.hpp

Referenced by RootSimHitWriter().

uint32_t ActsExamples::RootSimHitWriter::m_volumeId
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().

std::mutex ActsExamples::RootSimHitWriter::m_writeMutex
private

Definition at line 66 of file RootSimHitWriter.hpp.

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


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