Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::RootMaterialTrackWriter Class Reference

Writes out MaterialTrack collections from a root file. More...

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

+ Inheritance diagram for ActsExamples::RootMaterialTrackWriter:
+ Collaboration diagram for ActsExamples::RootMaterialTrackWriter:

Classes

struct  Config
 

Public Member Functions

 RootMaterialTrackWriter (const Config &config, Acts::Logging::Level level=Acts::Logging::INFO)
 
 ~RootMaterialTrackWriter () override
 Virtual destructor.
 
ActsExamples::ProcessCode finalize () override
 Framework initialize method.
 
const Configconfig () const
 Readonly access to the config.
 
- Public Member Functions inherited from ActsExamples::WriterT< std::unordered_map< size_t, Acts::RecordedMaterialTrack > >
 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 std::unordered_map< size_t, Acts::RecordedMaterialTrack > &materialtracks) override
 
- Protected Member Functions inherited from ActsExamples::WriterT< std::unordered_map< size_t, Acts::RecordedMaterialTrack > >
const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 The config class.
 
std::mutex m_writeMutex
 mutex used to protect multi-threaded writes
 
TFile * m_outputFile = nullptr
 The output file name.
 
TTree * m_outputTree = nullptr
 The output tree name.
 
uint32_t m_eventId = 0
 Event identifier.
 
float m_v_x = 0
 start global x
 
float m_v_y = 0
 start global y
 
float m_v_z = 0
 start global z
 
float m_v_px = 0
 start global momentum x
 
float m_v_py = 0
 start global momentum y
 
float m_v_pz = 0
 start global momentum z
 
float m_v_phi = 0
 start phi direction
 
float m_v_eta = 0
 start eta direction
 
float m_tX0 = 0
 thickness in X0/L0
 
float m_tL0 = 0
 thickness in X0/L0
 
std::vector< float > m_step_sx
 step x (start) position (optional)
 
std::vector< float > m_step_sy
 step y (start) position (optional)
 
std::vector< float > m_step_sz
 step z (start) position (optional)
 
std::vector< float > m_step_x
 step x position
 
std::vector< float > m_step_y
 step y position
 
std::vector< float > m_step_z
 step z position
 
std::vector< float > m_step_ex
 step x (end) position (optional)
 
std::vector< float > m_step_ey
 step y (end) position (optional)
 
std::vector< float > m_step_ez
 step z (end) position (optional)
 
std::vector< float > m_step_dx
 step x direction
 
std::vector< float > m_step_dy
 step y direction
 
std::vector< float > m_step_dz
 step z direction
 
std::vector< float > m_step_length
 step length
 
std::vector< float > m_step_X0
 step material x0
 
std::vector< float > m_step_L0
 step material l0
 
std::vector< float > m_step_A
 step material A
 
std::vector< float > m_step_Z
 step material Z
 
std::vector< float > m_step_rho
 step material rho
 
std::vector< std::uint64_t > m_sur_id
 ID of the surface associated with the step.
 
std::vector< int32_t > m_sur_type
 Type of the surface associated with the step.
 
std::vector< float > m_sur_x
 
std::vector< float > m_sur_y
 
std::vector< float > m_sur_z
 
std::vector< float > m_sur_pathCorrection
 
std::vector< float > m_sur_range_min
 Min range of the surface associated with the step.
 
std::vector< float > m_sur_range_max
 Max range of the surface associated with the step.
 
std::vector< std::uint64_t > m_vol_id
 ID of the volume associated with the step.
 

Detailed Description

Writes out MaterialTrack collections from a root file.

This service is the root implementation of the IWriterT. It writes out a MaterialTrack which is usually generated from Geant4 material mapping

Definition at line 50 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 50 of file RootMaterialTrackWriter.hpp

Constructor & Destructor Documentation

ActsExamples::RootMaterialTrackWriter::~RootMaterialTrackWriter ( )
override

Virtual destructor.

Definition at line 111 of file RootMaterialTrackWriter.cpp.

View newest version in sPHENIX GitHub at line 111 of file RootMaterialTrackWriter.cpp

Member Function Documentation

const Config& ActsExamples::RootMaterialTrackWriter::config ( ) const
inline

Readonly access to the config.

Definition at line 86 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 86 of file RootMaterialTrackWriter.hpp

References m_cfg.

ActsExamples::ProcessCode ActsExamples::RootMaterialTrackWriter::finalize ( )
overridevirtual

Framework initialize method.

Implements ActsExamples::SequenceElement.

Definition at line 117 of file RootMaterialTrackWriter.cpp.

View newest version in sPHENIX GitHub at line 117 of file RootMaterialTrackWriter.cpp

References ACTS_INFO, m_cfg(), and SUCCESS.

+ Here is the call graph for this function:

ActsExamples::ProcessCode ActsExamples::RootMaterialTrackWriter::writeT ( const AlgorithmContext ctx,
const std::unordered_map< size_t, Acts::RecordedMaterialTrack > &  materialtracks 
)
overrideprotectedvirtual

Member Data Documentation

Config ActsExamples::RootMaterialTrackWriter::m_cfg
private

The config class.

Definition at line 101 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 101 of file RootMaterialTrackWriter.hpp

Referenced by config(), and RootMaterialTrackWriter().

uint32_t ActsExamples::RootMaterialTrackWriter::m_eventId = 0
private

Event identifier.

Definition at line 110 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 110 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

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

The output file name.

Definition at line 105 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 105 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

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

The output tree name.

Definition at line 107 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 107 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_A
private

step material A

Definition at line 138 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 138 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_dx
private

step x direction

Definition at line 132 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 132 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_dy
private

step y direction

Definition at line 133 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 133 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_dz
private

step z direction

Definition at line 134 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 134 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_ex
private

step x (end) position (optional)

Definition at line 129 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 129 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_ey
private

step y (end) position (optional)

Definition at line 130 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 130 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_ez
private

step z (end) position (optional)

Definition at line 131 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 131 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_L0
private

step material l0

Definition at line 137 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 137 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_length
private

step length

Definition at line 135 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 135 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_rho
private

step material rho

Definition at line 140 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 140 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_sx
private

step x (start) position (optional)

Definition at line 123 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 123 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_sy
private

step y (start) position (optional)

Definition at line 124 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 124 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_sz
private

step z (start) position (optional)

Definition at line 125 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 125 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_x
private

step x position

Definition at line 126 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 126 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_X0
private

step material x0

Definition at line 136 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 136 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_y
private

step y position

Definition at line 127 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 127 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_z
private

step z position

Definition at line 128 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 128 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_step_Z
private

step material Z

Definition at line 139 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 139 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<std::uint64_t> ActsExamples::RootMaterialTrackWriter::m_sur_id
private

ID of the surface associated with the step.

Definition at line 143 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 143 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_pathCorrection
private

path correction when associating material to the given surface

Definition at line 153 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 153 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_range_max
private

Max range of the surface associated with the step.

Definition at line 158 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 158 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_range_min
private

Min range of the surface associated with the step.

Definition at line 156 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 156 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<int32_t> ActsExamples::RootMaterialTrackWriter::m_sur_type
private

Type of the surface associated with the step.

Definition at line 145 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 145 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_x
private

x position of the center of the surface associated with the step

Definition at line 146 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 146 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_y
private

y position of the center of the surface associated with the step

Definition at line 148 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 148 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<float> ActsExamples::RootMaterialTrackWriter::m_sur_z
private

z position of the center of the surface associated with the step

Definition at line 150 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 150 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_tL0 = 0
private

thickness in X0/L0

Definition at line 121 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 121 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_tX0 = 0
private

thickness in X0/L0

Definition at line 120 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 120 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_eta = 0
private

start eta direction

Definition at line 119 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 119 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_phi = 0
private

start phi direction

Definition at line 118 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 118 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_px = 0
private

start global momentum x

Definition at line 115 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 115 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_py = 0
private

start global momentum y

Definition at line 116 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 116 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_pz = 0
private

start global momentum z

Definition at line 117 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 117 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_x = 0
private

start global x

Definition at line 112 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 112 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_y = 0
private

start global y

Definition at line 113 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 113 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

float ActsExamples::RootMaterialTrackWriter::m_v_z = 0
private

start global z

Definition at line 114 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 114 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::vector<std::uint64_t> ActsExamples::RootMaterialTrackWriter::m_vol_id
private

ID of the volume associated with the step.

Definition at line 161 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 161 of file RootMaterialTrackWriter.hpp

Referenced by RootMaterialTrackWriter().

std::mutex ActsExamples::RootMaterialTrackWriter::m_writeMutex
private

mutex used to protect multi-threaded writes

Definition at line 103 of file RootMaterialTrackWriter.hpp.

View newest version in sPHENIX GitHub at line 103 of file RootMaterialTrackWriter.hpp


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