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

#include <acts/blob/sPHENIX/Plugins/DD4hep/include/Acts/Plugins/DD4hep/DD4hepDetectorSurfaceFactory.hpp>

+ Collaboration diagram for Acts::DD4hepDetectorSurfaceFactory:

Classes

struct  Cache
 Nested cache that records the conversion status. More...
 
struct  Options
 Nested options struct to steer the conversion. More...
 

Public Types

using DD4hepSensitiveSurface = std::tuple< std::shared_ptr< DD4hepDetectorElement >, std::shared_ptr< Surface >>
 Collect the sensitive surface & detector element.
 
using DD4hepPassiveSurface = std::tuple< std::shared_ptr< Surface >, bool >
 

Public Member Functions

 DD4hepDetectorSurfaceFactory (std::unique_ptr< const Logger > mlogger=getDefaultLogger("DD4hepDetectorSurfaceFactory", Acts::Logging::INFO))
 
void construct (Cache &cache, const dd4hep::DetElement &dd4hepElement, const Options &options)
 

Private Member Functions

const Loggerlogger () const
 Private access to the logger.
 
void recursiveConstruct (Cache &cache, const dd4hep::DetElement &dd4hepElement, const Options &options, int level)
 
DD4hepSensitiveSurface constructSensitiveComponents (const dd4hep::DetElement &dd4hepElement, const Options &options) const
 
DD4hepPassiveSurface constructPassiveComponents (const dd4hep::DetElement &dd4hepElement, const Options &options) const
 
void attachSurfaceMaterial (const dd4hep::DetElement &dd4hepElement, Acts::Surface &surface, ActsScalar thickness, const Options &options) const
 

Private Attributes

std::unique_ptr< const Loggerm_logger
 Logging instance.
 

Static Private Attributes

static constexpr ActsScalar unitLength
 auto-calculate the unit length conversion
 

Detailed Description

A factory to convert DD4hep DetectorElements into sensitive of passive surfaces which are filled into a Cache object, also the create DD4hepDetector elements are provided

Definition at line 39 of file DD4hepDetectorSurfaceFactory.hpp.

View newest version in sPHENIX GitHub at line 39 of file DD4hepDetectorSurfaceFactory.hpp

Member Typedef Documentation

using Acts::DD4hepDetectorSurfaceFactory::DD4hepPassiveSurface = std::tuple<std::shared_ptr<Surface>, bool>

Collect the passive surfaces, bool whether it should be added as an "always try, i.e. assignToAll=true" surface

Definition at line 48 of file DD4hepDetectorSurfaceFactory.hpp.

View newest version in sPHENIX GitHub at line 48 of file DD4hepDetectorSurfaceFactory.hpp

using Acts::DD4hepDetectorSurfaceFactory::DD4hepSensitiveSurface = std::tuple<std::shared_ptr<DD4hepDetectorElement>, std::shared_ptr<Surface>>

Collect the sensitive surface & detector element.

Definition at line 44 of file DD4hepDetectorSurfaceFactory.hpp.

View newest version in sPHENIX GitHub at line 44 of file DD4hepDetectorSurfaceFactory.hpp

Constructor & Destructor Documentation

Acts::DD4hepDetectorSurfaceFactory::DD4hepDetectorSurfaceFactory ( std::unique_ptr< const Logger mlogger = getDefaultLogger(          "DD4hepDetectorSurfaceFactory", Acts::Logging::INFO))

The DD4hep detector element factory

Parameters
mloggera screen output logger

Definition at line 24 of file DD4hepDetectorSurfaceFactory.cpp.

View newest version in sPHENIX GitHub at line 24 of file DD4hepDetectorSurfaceFactory.cpp

References ACTS_DEBUG, and unitLength.

Member Function Documentation

void Acts::DD4hepDetectorSurfaceFactory::attachSurfaceMaterial ( const dd4hep::DetElement &  dd4hepElement,
Acts::Surface surface,
ActsScalar  thickness,
const Options options 
) const
private

Attach surface material if present

Parameters
dd4hepElementthe detector element
surfacethe surface to attach the material to
thicknessthe thickness of the condensed component
optionsto steer the conversion
Note
void function that also checks the options if the attachment should be applied

Definition at line 124 of file DD4hepDetectorSurfaceFactory.cpp.

View newest version in sPHENIX GitHub at line 124 of file DD4hepDetectorSurfaceFactory.cpp

References Acts::Surface::assignSurfaceMaterial(), Acts::DD4hepDetectorSurfaceFactory::Options::convertMaterial, Acts::TGeoMaterialConverter::materialSlab(), testing::internal::move(), Acts::DD4hepDetectorSurfaceFactory::Options::surfaceMaterialThickness, and Acts::TGeoMaterialConverter::Options::unitLengthScalor.

+ Here is the call graph for this function:

void Acts::DD4hepDetectorSurfaceFactory::construct ( Cache cache,
const dd4hep::DetElement &  dd4hepElement,
const Options options 
)

Construction method of the detector elements

Parameters
cache[in,out] into which the Elements are filled
dd4hepElementthe detector element representing the super structure
optionsto steer the conversion
Note
this method will call the recursive construction

Definition at line 30 of file DD4hepDetectorSurfaceFactory.cpp.

View newest version in sPHENIX GitHub at line 30 of file DD4hepDetectorSurfaceFactory.cpp

References ACTS_DEBUG, Acts::DD4hepDetectorSurfaceFactory::Options::convertPassive, Acts::DD4hepDetectorSurfaceFactory::Options::convertSensitive, Acts::DD4hepDetectorSurfaceFactory::Cache::passiveSurfaces, and Acts::DD4hepDetectorSurfaceFactory::Cache::sensitiveSurfaces.

Acts::DD4hepDetectorSurfaceFactory::DD4hepPassiveSurface Acts::DD4hepDetectorSurfaceFactory::constructPassiveComponents ( const dd4hep::DetElement &  dd4hepElement,
const Options options 
) const
private

Method to convert a single sensitive detector element

Parameters
dd4hepElementthe detector element
optionsto steer the conversion
Returns
a created surface

Definition at line 106 of file DD4hepDetectorSurfaceFactory.cpp.

View newest version in sPHENIX GitHub at line 106 of file DD4hepDetectorSurfaceFactory.cpp

References ckf::options, pSurface, thickness, and Acts::TGeoSurfaceConverter::toSurface().

+ Here is the call graph for this function:

Acts::DD4hepDetectorSurfaceFactory::DD4hepSensitiveSurface Acts::DD4hepDetectorSurfaceFactory::constructSensitiveComponents ( const dd4hep::DetElement &  dd4hepElement,
const Options options 
) const
private

Method to convert a single sensitive detector element

Parameters
dd4hepElementthe detector element
optionsto steer the conversion
Returns
a created detector element and surface

Definition at line 88 of file DD4hepDetectorSurfaceFactory.cpp.

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

References ckf::options.

const Logger& Acts::DD4hepDetectorSurfaceFactory::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 106 of file DD4hepDetectorSurfaceFactory.hpp.

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

References m_logger.

void Acts::DD4hepDetectorSurfaceFactory::recursiveConstruct ( Cache cache,
const dd4hep::DetElement &  dd4hepElement,
const Options options,
int  level 
)
private

Construction method of the detector elements - recursive walk down

Parameters
cache[in,out] into which the Elements are filled
dd4hepElementthe detector element representing the super structure
optionsto steer the conversion
levelthe current level of the tree, used for log message output
Note
this method is called recursively

Definition at line 48 of file DD4hepDetectorSurfaceFactory.cpp.

View newest version in sPHENIX GitHub at line 48 of file DD4hepDetectorSurfaceFactory.cpp

References Acts::ACTS_VERBOSE(), Acts::DD4hepDetectorSurfaceFactory::Cache::binnings, gtest_filter_unittest::child, Acts::convertBinning(), Acts::DD4hepDetectorSurfaceFactory::Options::convertPassive, Acts::DD4hepDetectorSurfaceFactory::Options::convertSensitive, Acts::DD4hepDetectorSurfaceFactory::Cache::passiveSurfaces, pSurface, and Acts::DD4hepDetectorSurfaceFactory::Cache::sensitiveSurfaces.

+ Here is the call graph for this function:

Member Data Documentation

std::unique_ptr<const Logger> Acts::DD4hepDetectorSurfaceFactory::m_logger
private

Logging instance.

Definition at line 103 of file DD4hepDetectorSurfaceFactory.hpp.

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

constexpr ActsScalar Acts::DD4hepDetectorSurfaceFactory::unitLength
staticprivate
Initial value:
=
Acts::UnitConstants::mm / dd4hep::millimeter

auto-calculate the unit length conversion

Definition at line 99 of file DD4hepDetectorSurfaceFactory.hpp.

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

Referenced by DD4hepDetectorSurfaceFactory().


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