![]() |
Analysis Software
Documentation for sPHENIX simulation software
|
#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 Config & | config () 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::Logger & | logger () 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< SimHitContainer > | m_inputSimHits {this, "InputSimHits"} |
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
| ActsExamples::RootPlanarClusterWriter::RootPlanarClusterWriter | ( | const Config & | config, |
| Acts::Logging::Level | level | ||
| ) |
Constructor with
| config | configuration struct |
| level | logging level |
Definition at line 41 of file RootPlanarClusterWriter.cpp.
View newest version in sPHENIX GitHub at line 41 of file RootPlanarClusterWriter.cpp
References ActsExamples::RootPlanarClusterWriter::Config::fileMode, ActsExamples::RootPlanarClusterWriter::Config::filePath, ActsExamples::ReadDataHandle< T >::initialize(), ActsExamples::RootPlanarClusterWriter::Config::inputSimHits, m_cell_data, m_cell_IDx, m_cell_IDy, m_cell_lx, m_cell_ly, m_cfg, m_cov_lx, m_cov_ly, m_eventNr, m_inputSimHits, m_layerID, m_lx, m_ly, m_outputFile, m_outputTree, m_surfaceID, m_t, m_t_barcode, m_t_gt, m_t_gx, m_t_gy, m_t_gz, m_t_lx, m_t_ly, m_volumeID, m_x, m_y, m_z, ActsExamples::RootPlanarClusterWriter::Config::trackingGeometry, and ActsExamples::RootPlanarClusterWriter::Config::treeName.
Here is the call graph for this function:
|
override |
Virtual destructor.
Definition at line 97 of file RootPlanarClusterWriter.cpp.
View newest version in sPHENIX GitHub at line 97 of file RootPlanarClusterWriter.cpp
|
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.
|
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:
|
overrideprotectedvirtual |
This implementation holds the actual writing method and is called by the WriterT<>::write interface
| ctx | The Algorithm context with per event information |
| clusters | is 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:
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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
|
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().
|
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().
|
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().