Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::DigitizationAlgorithm Exception Referencefinal

Algorithm that turns simulated hits into measurements by truth smearing. More...

#include <acts/blob/sPHENIX/Examples/Algorithms/Digitization/include/ActsExamples/Digitization/DigitizationAlgorithm.hpp>

+ Inheritance diagram for ActsExamples::DigitizationAlgorithm:
+ Collaboration diagram for ActsExamples::DigitizationAlgorithm:

Classes

struct  CombinedDigitizer
 

Public Member Functions

 DigitizationAlgorithm (DigitizationConfig config, Acts::Logging::Level level)
 
ProcessCode execute (const AlgorithmContext &ctx) const override
 
const DigitizationConfigconfig () const
 Get const access to the config.
 
- Public Member Functions inherited from ActsExamples::IAlgorithm
 IAlgorithm (std::string name, Acts::Logging::Level level=Acts::Logging::INFO)
 
std::string name () const override
 The algorithm name.
 
ProcessCode internalExecute (const AlgorithmContext &context) final
 
ProcessCode initialize () override
 Initialize the algorithm.
 
ProcessCode finalize () override
 Finalize the algorithm.
 

Private Types

using Digitizer = std::variant< CombinedDigitizer< 0 >, CombinedDigitizer< 1 >, CombinedDigitizer< 2 >, CombinedDigitizer< 3 >, CombinedDigitizer< 4 >>
 

Private Member Functions

std::vector
< ActsFatras::Channelizer::ChannelSegment
channelizing (const GeometricConfig &geoCfg, const SimHit &hit, const Acts::Surface &surface, const Acts::GeometryContext &gctx, RandomEngine &rng) const
 
DigitizedParameters localParameters (const GeometricConfig &geoCfg, const std::vector< ActsFatras::Channelizer::ChannelSegment > &channels, RandomEngine &rng) const
 

Static Private Member Functions

template<size_t kSmearDIM>
static Digitizer makeDigitizer (const DigiComponentsConfig &cfg)
 

Private Attributes

DigitizationConfig m_cfg
 Configuration of the Algorithm.
 
Acts::GeometryHierarchyMap
< Digitizer
m_digitizers
 Digitizers within geometry hierarchy.
 
ActsFatras::PlanarSurfaceDrift m_surfaceDrift
 Geometric digtizers.
 
ActsFatras::PlanarSurfaceMask m_surfaceMask
 
ActsFatras::Channelizer m_channelizer
 
ReadDataHandle< SimHitContainerm_simContainerReadHandle
 
WriteDataHandle
< IndexSourceLinkContainer
m_sourceLinkWriteHandle
 
WriteDataHandle
< MeasurementContainer
m_measurementWriteHandle
 
WriteDataHandle< ClusterContainerm_clusterWriteHandle {this, "Clusters"}
 
WriteDataHandle< IndexMultimap
< ActsFatras::Barcode > > 
m_measurementParticlesMapWriteHandle {this, "MeasurementParticlesMap"}
 
WriteDataHandle< IndexMultimap
< Index > > 
m_measurementSimHitsMapWriteHandle
 

Additional Inherited Members

- Protected Member Functions inherited from ActsExamples::IAlgorithm
const Acts::Loggerlogger () const
 

Detailed Description

Algorithm that turns simulated hits into measurements by truth smearing.

Definition at line 54 of file DigitizationAlgorithm.hpp.

View newest version in sPHENIX GitHub at line 54 of file DigitizationAlgorithm.hpp

Member Typedef Documentation

Definition at line 110 of file DigitizationAlgorithm.hpp.

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

Constructor & Destructor Documentation

ActsExamples::DigitizationAlgorithm::DigitizationAlgorithm ( DigitizationConfig  config,
Acts::Logging::Level  level 
)

Construct the smearing algorithm.

Parameters
configis the algorithm configuration
levelis the logging level

Definition at line 39 of file DigitizationAlgorithm.cpp.

View newest version in sPHENIX GitHub at line 39 of file DigitizationAlgorithm.cpp

References ActsExamples::DigitizationConfig::digitizationConfigs, Acts::GeometryHierarchyMap< value_t >::empty(), gcf, i, Acts::GeometryHierarchyMap< value_t >::idAt(), ActsExamples::GeometricConfig::indices, ActsExamples::WriteDataHandle< T >::initialize(), ActsExamples::ReadDataHandle< T >::initialize(), ActsExamples::DigitizationConfig::inputSimHits, m_cfg, m_clusterWriteHandle, m_digitizers, m_measurementParticlesMapWriteHandle, m_measurementSimHitsMapWriteHandle, m_measurementWriteHandle, m_simContainerReadHandle, m_sourceLinkWriteHandle, ActsExamples::DigitizationConfig::outputClusters, ActsExamples::DigitizationConfig::outputMeasurementParticlesMap, ActsExamples::DigitizationConfig::outputMeasurements, ActsExamples::DigitizationConfig::outputMeasurementSimHitsMap, ActsExamples::DigitizationConfig::outputSourceLinks, ActsExamples::DigitizationConfig::randomNumbers, Acts::GeometryHierarchyMap< value_t >::size(), Acts::Experimental::detail::BlueprintHelper::sort(), ActsExamples::DigitizationConfig::trackingGeometry, physmon_ckf_tracking::u, and Acts::GeometryHierarchyMap< value_t >::valueAt().

+ Here is the call graph for this function:

Member Function Documentation

std::vector< ActsFatras::Channelizer::ChannelSegment > ActsExamples::DigitizationAlgorithm::channelizing ( const GeometricConfig geoCfg,
const SimHit hit,
const Acts::Surface surface,
const Acts::GeometryContext gctx,
RandomEngine rng 
) const
private

Helper method for the geometric channelizing part

Parameters
geoCfgis the geometric digitization configuration
hitthe Simultated hit
surfacethe Surface on which this is supposed to happen
gctxthe Geometry context
rngthe Random number engine for the drift smearing
Returns
the list of channels

Definition at line 296 of file DigitizationAlgorithm.cpp.

View newest version in sPHENIX GitHub at line 296 of file DigitizationAlgorithm.cpp

References ActsFatras::Hit::direction(), ActsExamples::GeometricConfig::drift(), ActsFatras::Hit::position(), conftest::rng(), ActsExamples::GeometricConfig::segmentation, and ActsExamples::GeometricConfig::thickness.

+ Here is the call graph for this function:

const DigitizationConfig& ActsExamples::DigitizationAlgorithm::config ( ) const
inline

Get const access to the config.

Definition at line 69 of file DigitizationAlgorithm.hpp.

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

References m_cfg.

Referenced by Acts::Python::addDigitization().

+ Here is the caller graph for this function:

ActsExamples::ProcessCode ActsExamples::DigitizationAlgorithm::execute ( const AlgorithmContext ctx) const
overridevirtual

Build measurement from simulation hits at input.

Parameters
ctxis the algorithm context with event information
Returns
a process code indication success or failure

Implements ActsExamples::IAlgorithm.

Definition at line 132 of file DigitizationAlgorithm.cpp.

View newest version in sPHENIX GitHub at line 132 of file DigitizationAlgorithm.cpp

References ACTS_DEBUG, ACTS_ERROR, ACTS_VERBOSE, ACTS_WARNING, ActsExamples::ModuleClusters::add(), clusters, Acts::Test::cov, ActsExamples::createMeasurement(), ActsExamples::ModuleClusters::digitizedParameters(), ActsExamples::AlgorithmContext::geoContext, ActsExamples::groupByModule(), h, ActsExamples::DigitizedParameters::indices, m_cfg(), testing::internal::move(), conftest::rng(), SUCCESS, ActsExamples::DigitizedParameters::values, and ActsExamples::DigitizedParameters::variances.

+ Here is the call graph for this function:

ActsExamples::DigitizedParameters ActsExamples::DigitizationAlgorithm::localParameters ( const GeometricConfig geoCfg,
const std::vector< ActsFatras::Channelizer::ChannelSegment > &  channels,
RandomEngine rng 
) const
private

Helper method for creating digitized parameters from clusters

Parameters
geoCfgis the geometric digitization configuration
channelsare the input channels
rngthe Random number engine for the charge generation smearing
Returns
the list of digitized parameters

Definition at line 316 of file DigitizationAlgorithm.cpp.

View newest version in sPHENIX GitHub at line 316 of file DigitizationAlgorithm.cpp

References b1, Acts::BinUtility::binningData(), ActsExamples::Cluster::channels, ActsExamples::GeometricConfig::charge(), charge(), ActsExamples::DigitizedParameters::cluster, ActsExamples::GeometricConfig::digital, ambiguity_solver_full_chain::idx, ActsExamples::DigitizedParameters::indices, ActsExamples::GeometricConfig::indices, Acts::UnitConstants::m, Acts::UnitConstants::min, ActsExamples::GeometricConfig::segmentation, ActsExamples::Cluster::sizeLoc0, ActsExamples::Cluster::sizeLoc1, ActsExamples::GeometricConfig::threshold, ActsExamples::DigitizedParameters::values, ActsExamples::DigitizedParameters::variances, ActsExamples::GeometricConfig::variances(), and width.

+ Here is the call graph for this function:

template<size_t kSmearDIM>
static Digitizer ActsExamples::DigitizationAlgorithm::makeDigitizer ( const DigiComponentsConfig cfg)
inlinestaticprivate

Construct a fixed-size smearer from a configuration.

It's templated on the smearing dimension given by

Template Parameters
kSmearDIM
Parameters
cfgIs the digitization configuration input
Returns
a variant of a Digitizer

Definition at line 142 of file DigitizationAlgorithm.hpp.

View newest version in sPHENIX GitHub at line 142 of file DigitizationAlgorithm.hpp

References ActsExamples::DigitizationAlgorithm::CombinedDigitizer< kSmearDIM >::geometric, ActsExamples::DigiComponentsConfig::geometricDigiConfig, i, ActsFatras::BoundParametersSmearer< generator_t, kSize >::indices, ActsFatras::BoundParametersSmearer< generator_t, kSize >::smearFunctions, ActsExamples::DigitizationAlgorithm::CombinedDigitizer< kSmearDIM >::smearing, and ActsExamples::DigiComponentsConfig::smearingDigiConfig.

Member Data Documentation

DigitizationConfig ActsExamples::DigitizationAlgorithm::m_cfg
private

Configuration of the Algorithm.

Definition at line 113 of file DigitizationAlgorithm.hpp.

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

Referenced by config(), and DigitizationAlgorithm().

ActsFatras::Channelizer ActsExamples::DigitizationAlgorithm::m_channelizer
private

Definition at line 119 of file DigitizationAlgorithm.hpp.

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

WriteDataHandle<ClusterContainer> ActsExamples::DigitizationAlgorithm::m_clusterWriteHandle {this, "Clusters"}
private

Definition at line 128 of file DigitizationAlgorithm.hpp.

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

Referenced by DigitizationAlgorithm().

Acts::GeometryHierarchyMap<Digitizer> ActsExamples::DigitizationAlgorithm::m_digitizers
private

Digitizers within geometry hierarchy.

Definition at line 115 of file DigitizationAlgorithm.hpp.

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

Referenced by DigitizationAlgorithm().

WriteDataHandle<IndexMultimap<ActsFatras::Barcode> > ActsExamples::DigitizationAlgorithm::m_measurementParticlesMapWriteHandle {this, "MeasurementParticlesMap"}
private

Definition at line 130 of file DigitizationAlgorithm.hpp.

View newest version in sPHENIX GitHub at line 130 of file DigitizationAlgorithm.hpp

Referenced by DigitizationAlgorithm().

WriteDataHandle<IndexMultimap<Index> > ActsExamples::DigitizationAlgorithm::m_measurementSimHitsMapWriteHandle
private
Initial value:
{
this, "MeasurementSimHitsMap"}

Definition at line 131 of file DigitizationAlgorithm.hpp.

View newest version in sPHENIX GitHub at line 131 of file DigitizationAlgorithm.hpp

Referenced by DigitizationAlgorithm().

WriteDataHandle<MeasurementContainer> ActsExamples::DigitizationAlgorithm::m_measurementWriteHandle
private
Initial value:
{
this, "Measurements"}

Definition at line 126 of file DigitizationAlgorithm.hpp.

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

Referenced by DigitizationAlgorithm().

ReadDataHandle<SimHitContainer> ActsExamples::DigitizationAlgorithm::m_simContainerReadHandle
private
Initial value:
{this,
"SimHitContainer"}

Definition at line 121 of file DigitizationAlgorithm.hpp.

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

Referenced by DigitizationAlgorithm().

WriteDataHandle<IndexSourceLinkContainer> ActsExamples::DigitizationAlgorithm::m_sourceLinkWriteHandle
private
Initial value:
{
this, "SourceLinks"}

Definition at line 124 of file DigitizationAlgorithm.hpp.

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

Referenced by DigitizationAlgorithm().

ActsFatras::PlanarSurfaceDrift ActsExamples::DigitizationAlgorithm::m_surfaceDrift
private

Geometric digtizers.

Definition at line 117 of file DigitizationAlgorithm.hpp.

View newest version in sPHENIX GitHub at line 117 of file DigitizationAlgorithm.hpp

ActsFatras::PlanarSurfaceMask ActsExamples::DigitizationAlgorithm::m_surfaceMask
private

Definition at line 118 of file DigitizationAlgorithm.hpp.

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


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