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

Reads in MaterialTrack information from a root file and fills it into a format to be understood by the MaterialMapping algorithm. More...

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

+ Inheritance diagram for ActsExamples::RootMaterialTrackReader:
+ Collaboration diagram for ActsExamples::RootMaterialTrackReader:

Classes

struct  Config
 The nested configuration struct. More...
 

Public Member Functions

 RootMaterialTrackReader (const Config &config, Acts::Logging::Level level)
 
 ~RootMaterialTrackReader () override
 Destructor.
 
std::string name () const override
 Framework name() method.
 
std::pair< size_t, size_t > availableEvents () const override
 Return the available events range.
 
ProcessCode read (const ActsExamples::AlgorithmContext &context) override
 
const Configconfig () const
 Readonly access to the config.
 
- Public Member Functions inherited from ActsExamples::IReader
ProcessCode internalExecute (const AlgorithmContext &context) final
 
ProcessCode initialize () override
 Fulfill the algorithm interface.
 
ProcessCode finalize () override
 Fulfill 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
 

Private Member Functions

const Acts::Loggerlogger () const
 Private access to the logging instance.
 

Private Attributes

std::unique_ptr< const
Acts::Logger
m_logger
 The logger.
 
Config m_cfg
 The config class.
 
WriteDataHandle
< std::unordered_map< size_t,
Acts::RecordedMaterialTrack > > 
m_outputMaterialTracks {this, "OutputMaterialTracks"}
 
std::mutex m_read_mutex
 mutex used to protect multi-threaded reads
 
size_t m_events = 0
 The number of events.
 
size_t m_batchSize = 0
 The batch size (number of track per events)
 
TChain * m_inputChain = nullptr
 The input tree name.
 
uint32_t m_eventId = 0
 Event identifier.
 
std::vector< long long > m_entryNumbers = {}
 
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_x = new std::vector<float>
 step x position
 
std::vector< float > * m_step_y = new std::vector<float>
 step y position
 
std::vector< float > * m_step_z = new std::vector<float>
 step z position
 
std::vector< float > * m_step_dx = new std::vector<float>
 step x direction
 
std::vector< float > * m_step_dy = new std::vector<float>
 step y direction
 
std::vector< float > * m_step_dz = new std::vector<float>
 step z direction
 
std::vector< float > * m_step_length = new std::vector<float>
 step length
 
std::vector< float > * m_step_X0 = new std::vector<float>
 step material x0
 
std::vector< float > * m_step_L0 = new std::vector<float>
 step material l0
 
std::vector< float > * m_step_A = new std::vector<float>
 step material A
 
std::vector< float > * m_step_Z = new std::vector<float>
 step material Z
 
std::vector< float > * m_step_rho
 step material rho
 
std::vector< std::uint64_t > * m_sur_id
 
std::vector< float > * m_sur_x
 
std::vector< float > * m_sur_y
 
std::vector< float > * m_sur_z
 
std::vector< float > * m_sur_pathCorrection
 

Detailed Description

Reads in MaterialTrack information from a root file and fills it into a format to be understood by the MaterialMapping algorithm.

Definition at line 38 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 38 of file RootMaterialTrackReader.hpp

Constructor & Destructor Documentation

ActsExamples::RootMaterialTrackReader::RootMaterialTrackReader ( const Config config,
Acts::Logging::Level  level 
)

Constructor

Parameters
configThe Configuration struct
levelThe log level

Definition at line 26 of file RootMaterialTrackReader.cpp.

View newest version in sPHENIX GitHub at line 26 of file RootMaterialTrackReader.cpp

References Acts::getDefaultLogger(), and name().

+ Here is the call graph for this function:

ActsExamples::RootMaterialTrackReader::~RootMaterialTrackReader ( )
override

Destructor.

Definition at line 108 of file RootMaterialTrackReader.cpp.

View newest version in sPHENIX GitHub at line 108 of file RootMaterialTrackReader.cpp

Member Function Documentation

std::pair< size_t, size_t > ActsExamples::RootMaterialTrackReader::availableEvents ( ) const
overridevirtual

Return the available events range.

Implements ActsExamples::IReader.

Definition at line 136 of file RootMaterialTrackReader.cpp.

View newest version in sPHENIX GitHub at line 136 of file RootMaterialTrackReader.cpp

References physmon_ckf_tracking::u.

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

Readonly access to the config.

Definition at line 73 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 73 of file RootMaterialTrackReader.hpp

References m_cfg.

const Acts::Logger& ActsExamples::RootMaterialTrackReader::logger ( ) const
inlineprivate

Private access to the logging instance.

Definition at line 80 of file RootMaterialTrackReader.hpp.

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

References m_logger.

std::string ActsExamples::RootMaterialTrackReader::name ( ) const
overridevirtual

Framework name() method.

Implements ActsExamples::SequenceElement.

Definition at line 131 of file RootMaterialTrackReader.cpp.

View newest version in sPHENIX GitHub at line 131 of file RootMaterialTrackReader.cpp

Referenced by RootMaterialTrackReader().

+ Here is the caller graph for this function:

ActsExamples::ProcessCode ActsExamples::RootMaterialTrackReader::read ( const ActsExamples::AlgorithmContext context)
overridevirtual

Read out data from the input stream

Parameters
contextThe algorithm context

Fill the position & the material

Implements ActsExamples::IReader.

Definition at line 140 of file RootMaterialTrackReader.cpp.

View newest version in sPHENIX GitHub at line 140 of file RootMaterialTrackReader.cpp

References ACTS_DEBUG, ACTS_VERBOSE, Acts::MaterialInteraction::direction, entry, ActsExamples::AlgorithmContext::eventNumber, Acts::Material::fromMassDensity(), add_histos_bX::ib, Acts::MaterialInteraction::intersection, Acts::MaterialInteraction::intersectionID, m_cfg(), Acts::MaterialInteraction::materialSlab, testing::internal::move(), Acts::MaterialInteraction::pathCorrection, Acts::MaterialInteraction::position, physmon_simulation::s, and SUCCESS.

+ Here is the call graph for this function:

Member Data Documentation

size_t ActsExamples::RootMaterialTrackReader::m_batchSize = 0
private

The batch size (number of track per events)

Definition at line 95 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 95 of file RootMaterialTrackReader.hpp

Config ActsExamples::RootMaterialTrackReader::m_cfg
private

The config class.

Definition at line 83 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 83 of file RootMaterialTrackReader.hpp

Referenced by config().

std::vector<long long> ActsExamples::RootMaterialTrackReader::m_entryNumbers = {}
private

The entry numbers for accessing events in increased order (there could be multiple entries corresponding to one event number)

Definition at line 105 of file RootMaterialTrackReader.hpp.

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

uint32_t ActsExamples::RootMaterialTrackReader::m_eventId = 0
private

Event identifier.

Definition at line 101 of file RootMaterialTrackReader.hpp.

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

size_t ActsExamples::RootMaterialTrackReader::m_events = 0
private

The number of events.

Definition at line 92 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 92 of file RootMaterialTrackReader.hpp

TChain* ActsExamples::RootMaterialTrackReader::m_inputChain = nullptr
private

The input tree name.

Definition at line 98 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 98 of file RootMaterialTrackReader.hpp

std::unique_ptr<const Acts::Logger> ActsExamples::RootMaterialTrackReader::m_logger
private

The logger.

Definition at line 77 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 77 of file RootMaterialTrackReader.hpp

Referenced by logger().

WriteDataHandle<std::unordered_map<size_t, Acts::RecordedMaterialTrack> > ActsExamples::RootMaterialTrackReader::m_outputMaterialTracks {this, "OutputMaterialTracks"}
private

Definition at line 86 of file RootMaterialTrackReader.hpp.

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

std::mutex ActsExamples::RootMaterialTrackReader::m_read_mutex
private

mutex used to protect multi-threaded reads

Definition at line 89 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_A = new std::vector<float>
private

step material A

Definition at line 127 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_dx = new std::vector<float>
private

step x direction

Definition at line 121 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_dy = new std::vector<float>
private

step y direction

Definition at line 122 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 122 of file RootMaterialTrackReader.hpp

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_dz = new std::vector<float>
private

step z direction

Definition at line 123 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_L0 = new std::vector<float>
private

step material l0

Definition at line 126 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_length = new std::vector<float>
private

step length

Definition at line 124 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_rho
private
Initial value:
=
new std::vector<float>

step material rho

Definition at line 129 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_x = new std::vector<float>
private

step x position

Definition at line 118 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_X0 = new std::vector<float>
private

step material x0

Definition at line 125 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_y = new std::vector<float>
private

step y position

Definition at line 119 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_z = new std::vector<float>
private

step z position

Definition at line 120 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_step_Z = new std::vector<float>
private

step material Z

Definition at line 128 of file RootMaterialTrackReader.hpp.

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

std::vector<std::uint64_t>* ActsExamples::RootMaterialTrackReader::m_sur_id
private
Initial value:
=
new std::vector<std::uint64_t>

ID of the surface associated with the step

Definition at line 132 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_sur_pathCorrection
private
Initial value:
=
new std::vector<float>

path correction when associating material to the given surface

Definition at line 144 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 144 of file RootMaterialTrackReader.hpp

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_sur_x
private
Initial value:
=
new std::vector<float>

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

Definition at line 135 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_sur_y
private
Initial value:
=
new std::vector<float>

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

Definition at line 138 of file RootMaterialTrackReader.hpp.

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

std::vector<float>* ActsExamples::RootMaterialTrackReader::m_sur_z
private
Initial value:
=
new std::vector<float>

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

Definition at line 141 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 141 of file RootMaterialTrackReader.hpp

float ActsExamples::RootMaterialTrackReader::m_tL0 = 0
private

thickness in X0/L0

Definition at line 116 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_tX0 = 0
private

thickness in X0/L0

Definition at line 115 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_eta = 0
private

start eta direction

Definition at line 114 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_phi = 0
private

start phi direction

Definition at line 113 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_px = 0
private

start global momentum x

Definition at line 110 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_py = 0
private

start global momentum y

Definition at line 111 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 111 of file RootMaterialTrackReader.hpp

float ActsExamples::RootMaterialTrackReader::m_v_pz = 0
private

start global momentum z

Definition at line 112 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_x = 0
private

start global x

Definition at line 107 of file RootMaterialTrackReader.hpp.

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

float ActsExamples::RootMaterialTrackReader::m_v_y = 0
private

start global y

Definition at line 108 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 108 of file RootMaterialTrackReader.hpp

float ActsExamples::RootMaterialTrackReader::m_v_z = 0
private

start global z

Definition at line 109 of file RootMaterialTrackReader.hpp.

View newest version in sPHENIX GitHub at line 109 of file RootMaterialTrackReader.hpp


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