EIC 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 &cfg, Acts::Logging::Level lvl)
 
 ~RootPlanarClusterWriter () override
 Virtual destructor.
 
ProcessCode endRun () finaloverride
 End-of-run hook.
 
- 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 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 GeometryIdMultimap< Acts::PlanarModuleCluster > &clusters) finaloverride
 
- 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
 the output file
 
TTree * m_outputTree
 the output tree
 
int m_eventNr
 the event number of
 
int m_volumeID
 volume identifier
 
int m_layerID
 layer identifier
 
int m_surfaceID
 surface identifier
 
float m_x
 global x
 
float m_y
 global y
 
float m_z
 global z
 
float m_t
 global t
 
float m_lx
 local lx
 
float m_ly
 local ly
 
float m_cov_lx
 local covariance lx
 
float m_cov_ly
 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< unsigned long > m_t_barcode
 associated truth particle barcode
 

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 to 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 33 of file RootPlanarClusterWriter.hpp.

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

Constructor & Destructor Documentation

ActsExamples::RootPlanarClusterWriter::~RootPlanarClusterWriter ( )
override

Virtual destructor.

Close the file if it's yours

Definition at line 81 of file RootPlanarClusterWriter.cpp.

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

Member Function Documentation

ActsExamples::ProcessCode ActsExamples::RootPlanarClusterWriter::endRun ( )
finaloverridevirtual

End-of-run hook.

Implements ActsExamples::IWriter.

Definition at line 88 of file RootPlanarClusterWriter.cpp.

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

References ACTS_INFO, and SUCCESS.

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

Member Data Documentation

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

local cell position y

Definition at line 89 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

cell ID in lx

Definition at line 85 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

cell ID in ly

Definition at line 86 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

local cell position x

Definition at line 87 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

local cell position y

Definition at line 88 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

Config ActsExamples::RootPlanarClusterWriter::m_cfg
private

the configuration object

Definition at line 69 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_cov_lx
private

local covariance lx

Definition at line 83 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_cov_ly
private

local covariance ly

Definition at line 84 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_eventNr
private

the event number of

Definition at line 73 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_layerID
private

layer identifier

Definition at line 75 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_lx
private

local lx

Definition at line 81 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_ly
private

local ly

Definition at line 82 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

TFile* ActsExamples::RootPlanarClusterWriter::m_outputFile
private

the output file

Definition at line 71 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

TTree* ActsExamples::RootPlanarClusterWriter::m_outputTree
private

the output tree

Definition at line 72 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_surfaceID
private

surface identifier

Definition at line 76 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_t
private

global t

Definition at line 80 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

std::vector<unsigned long> ActsExamples::RootPlanarClusterWriter::m_t_barcode
private

associated truth particle barcode

Definition at line 99 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

truth time t

Definition at line 95 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

truth position global x

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::vector<float> ActsExamples::RootPlanarClusterWriter::m_t_gy
private

truth position global y

Definition at line 93 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

truth position global z

Definition at line 94 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

truth position local x

Definition at line 96 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

truth position local y

Definition at line 97 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

int ActsExamples::RootPlanarClusterWriter::m_volumeID
private

volume identifier

Definition at line 74 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

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

protect multi-threaded writes

Definition at line 70 of file RootPlanarClusterWriter.hpp.

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

float ActsExamples::RootPlanarClusterWriter::m_x
private

global x

Definition at line 77 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_y
private

global y

Definition at line 78 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().

float ActsExamples::RootPlanarClusterWriter::m_z
private

global z

Definition at line 79 of file RootPlanarClusterWriter.hpp.

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

Referenced by RootPlanarClusterWriter().


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