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

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

+ Inheritance diagram for ActsExamples::RootPlanarClusterWriter:
+ Collaboration diagram for ActsExamples::RootPlanarClusterWriter:

Classes

struct  Config
 

Public Member Functions

 RootPlanarClusterWriter (const Config &config, Acts::Logging::Level level)
 
 ~RootPlanarClusterWriter () override
 Virtual destructor.
 
ProcessCode finalize () override
 End-of-run hook.
 
const Configconfig () const
 Get readonly access to the config parameters.
 
- Public Member Functions inherited from ActsExamples::WriterT< GeometryIdMultimap< Acts::PlanarModuleCluster > >
 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 GeometryIdMultimap< Acts::PlanarModuleCluster > &clusters) override
 
- Protected Member Functions inherited from ActsExamples::WriterT< GeometryIdMultimap< Acts::PlanarModuleCluster > >
const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 the configuration object
 
std::mutex m_writeMutex
 protect multi-threaded writes
 
TFile * m_outputFile {nullptr}
 the output file
 
TTree * m_outputTree {nullptr}
 the output tree
 
int m_eventNr = 0
 the event number of
 
int m_volumeID = 0
 volume identifier
 
int m_layerID = 0
 layer identifier
 
int m_surfaceID = 0
 surface identifier
 
float m_x = 0
 global x
 
float m_y = 0
 global y
 
float m_z = 0
 global z
 
float m_t = 0
 global t
 
float m_lx = 0
 local lx
 
float m_ly = 0
 local ly
 
float m_cov_lx = 0
 local covariance lx
 
float m_cov_ly = 0
 local covariance ly
 
std::vector< int > m_cell_IDx
 cell ID in lx
 
std::vector< int > m_cell_IDy
 cell ID in ly
 
std::vector< float > m_cell_lx
 local cell position x
 
std::vector< float > m_cell_ly
 local cell position y
 
std::vector< float > m_cell_data
 local cell position y
 
std::vector< float > m_t_gx
 truth position global x
 
std::vector< float > m_t_gy
 truth position global y
 
std::vector< float > m_t_gz
 truth position global z
 
std::vector< float > m_t_gt
 truth time t
 
std::vector< float > m_t_lx
 truth position local x
 
std::vector< float > m_t_ly
 truth position local y
 
std::vector< uint64_t > m_t_barcode
 associated truth particle barcode
 
ReadDataHandle< SimHitContainerm_inputSimHits {this, "InputSimHits"}
 

Detailed Description

Write out a planar cluster collection into a root file to avoid immense long vectors, each cluster is one entry in the root file for optimised data writing speed The event number is part of the written data.

A common file can be provided for the writer to attach his TTree, this is done by setting the Config::rootFile pointer to an existing file

Safe to use from multiple writer threads - uses a std::mutex lock.

Definition at line 47 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 47 of file RootPlanarClusterWriter.hpp

Constructor & Destructor Documentation

ActsExamples::RootPlanarClusterWriter::RootPlanarClusterWriter ( const Config config,
Acts::Logging::Level  level 
)
ActsExamples::RootPlanarClusterWriter::~RootPlanarClusterWriter ( )
override

Virtual destructor.

Definition at line 97 of file RootPlanarClusterWriter.cpp.

View newest version in sPHENIX GitHub at line 97 of file RootPlanarClusterWriter.cpp

Member Function Documentation

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

Get readonly access to the config parameters.

Definition at line 74 of file RootPlanarClusterWriter.hpp.

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

References m_cfg.

ActsExamples::ProcessCode ActsExamples::RootPlanarClusterWriter::finalize ( )
overridevirtual

End-of-run hook.

Implements ActsExamples::SequenceElement.

Definition at line 103 of file RootPlanarClusterWriter.cpp.

View newest version in sPHENIX GitHub at line 103 of file RootPlanarClusterWriter.cpp

References ACTS_INFO, m_cfg(), and SUCCESS.

+ Here is the call graph for this function:

ActsExamples::ProcessCode ActsExamples::RootPlanarClusterWriter::writeT ( const AlgorithmContext ctx,
const GeometryIdMultimap< Acts::PlanarModuleCluster > &  clusters 
)
overrideprotectedvirtual

This implementation holds the actual writing method and is called by the WriterT<>::write interface

Parameters
ctxThe Algorithm context with per event information
clustersis the data to be written out

prepare for calculating the

Implements ActsExamples::WriterT< GeometryIdMultimap< Acts::PlanarModuleCluster > >.

Definition at line 115 of file RootPlanarClusterWriter.cpp.

View newest version in sPHENIX GitHub at line 115 of file RootPlanarClusterWriter.cpp

References ACTS_ERROR, ACTS_FATAL, Acts::Surface::associatedDetectorElement(), Acts::Segmentation::cellPosition(), Acts::PlanarModuleCluster::digitizationCells(), Acts::IdentifiedDetectorElement::digitizationModule(), Acts::eBoundLoc0, Acts::eBoundLoc1, entry, ActsExamples::AlgorithmContext::eventNumber, ActsExamples::AlgorithmContext::geoContext, Acts::SourceLink::get(), Acts::Surface::globalToLocal(), ActsExamples::groupByModule(), ambiguity_solver_full_chain::idx, it, Acts::Surface::localToGlobal(), m_cfg(), Acts::UnitConstants::ns, Dataset::parameters, Acts::Measurement< indices_t, kSize >::parameters(), Acts::Test::pos, Acts::Measurement< indices_t, kSize >::sourceLink(), SUCCESS, and writeMapConfig::surface.

+ Here is the call graph for this function:

Member Data Documentation

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_cell_data
private

local cell position y

Definition at line 107 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<int> ActsExamples::RootPlanarClusterWriter::m_cell_IDx
private

cell ID in lx

Definition at line 103 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<int> ActsExamples::RootPlanarClusterWriter::m_cell_IDy
private

cell ID in ly

Definition at line 104 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 104 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_cell_lx
private

local cell position x

Definition at line 105 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_cell_ly
private

local cell position y

Definition at line 106 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 106 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

Config ActsExamples::RootPlanarClusterWriter::m_cfg
private

the configuration object

Definition at line 87 of file RootPlanarClusterWriter.hpp.

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

Referenced by config(), and RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_cov_lx = 0
private

local covariance lx

Definition at line 101 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_cov_ly = 0
private

local covariance ly

Definition at line 102 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 102 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_eventNr = 0
private

the event number of

Definition at line 91 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 91 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

ReadDataHandle<SimHitContainer> ActsExamples::RootPlanarClusterWriter::m_inputSimHits {this, "InputSimHits"}
private

Definition at line 118 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_layerID = 0
private

layer identifier

Definition at line 93 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 93 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_lx = 0
private

local lx

Definition at line 99 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 99 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_ly = 0
private

local ly

Definition at line 100 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 100 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

TFile* ActsExamples::RootPlanarClusterWriter::m_outputFile {nullptr}
private

the output file

Definition at line 89 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

TTree* ActsExamples::RootPlanarClusterWriter::m_outputTree {nullptr}
private

the output tree

Definition at line 90 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_surfaceID = 0
private

surface identifier

Definition at line 94 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 94 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_t = 0
private

global t

Definition at line 98 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<uint64_t> ActsExamples::RootPlanarClusterWriter::m_t_barcode
private

associated truth particle barcode

Definition at line 116 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_gt
private

truth time t

Definition at line 113 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_gx
private

truth position global x

Definition at line 110 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_gy
private

truth position global y

Definition at line 111 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_gz
private

truth position global z

Definition at line 112 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_lx
private

truth position local x

Definition at line 114 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_ly
private

truth position local y

Definition at line 115 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_volumeID = 0
private

volume identifier

Definition at line 92 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::mutex ActsExamples::RootPlanarClusterWriter::m_writeMutex
private

protect multi-threaded writes

Definition at line 88 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 88 of file RootPlanarClusterWriter.hpp

float ActsExamples::RootPlanarClusterWriter::m_x = 0
private

global x

Definition at line 95 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_y = 0
private

global y

Definition at line 96 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 96 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_z = 0
private

global z

Definition at line 97 of file RootPlanarClusterWriter.hpp.

View newest version in sPHENIX GitHub at line 97 of file RootPlanarClusterWriter.hpp

Referenced by RootPlanarClusterWriter().


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