![]() |
EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#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::Logger & | logger () 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 | |
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
| ActsExamples::RootPlanarClusterWriter::RootPlanarClusterWriter | ( | const Config & | cfg, |
| Acts::Logging::Level | lvl | ||
| ) |
Constructor with
| cfg | configuration struct |
| output | logging level |
Definition at line 28 of file RootPlanarClusterWriter.cpp.
View newest version in sPHENIX GitHub at line 28 of file RootPlanarClusterWriter.cpp
References ActsExamples::RootPlanarClusterWriter::Config::fileMode, ActsExamples::RootPlanarClusterWriter::Config::filePath, ActsExamples::RootPlanarClusterWriter::Config::inputSimulatedHits, 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_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, and ActsExamples::RootPlanarClusterWriter::Config::treeName.
|
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
|
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
|
finaloverrideprotectedvirtual |
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 97 of file RootPlanarClusterWriter.cpp.
View newest version in sPHENIX GitHub at line 97 of file RootPlanarClusterWriter.cpp
References ACTS_FATAL, Acts::Segmentation::cellPosition(), Acts::PlanarModuleCluster::digitizationCells(), Acts::IdentifiedDetectorElement::digitizationModule(), Acts::eBoundLoc0, Acts::eBoundLoc1, ActsExamples::AlgorithmContext::eventNumber, ActsExamples::AlgorithmContext::eventStore, ActsExamples::AlgorithmContext::geoContext, ActsExamples::WhiteBoard::get(), it, Acts::GeometryIdentifier::layer(), charm_jet_coverage::mom, Acts::UnitConstants::ns, Dataset::parameters, Acts::Measurement< source_link_t, parameter_indices_t, params >::parameters(), pos(), Acts::Measurement< source_link_t, parameter_indices_t, params >::referenceObject(), Acts::GeometryIdentifier::sensitive(), Acts::Measurement< source_link_t, parameter_indices_t, params >::sourceLink(), SUCCESS, and Acts::GeometryIdentifier::volume().
Here is the call graph for this function:
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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
|
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().
|
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().
|
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().