ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
SiPropertiesTool Class Reference

#include <SiPropertiesTool.h>

Inheritance diagram for SiPropertiesTool:
Collaboration diagram for SiPropertiesTool:

Public Member Functions

 SiPropertiesTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SiPropertiesTool ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual const InDet::SiliconPropertiesgetSiProperties (const IdentifierHash &elementHash, const EventContext &ctx) const override
 Get properties for the detector element. More...
 

Private Attributes

std::string m_detectorName
 
SG::ReadCondHandleKey< InDet::SiliconPropertiesVectorm_propertiesVector
 

Static Private Attributes

static const InDet::SiliconProperties s_defaultProperties {}
 

Detailed Description

Concrete class for service providing silicon properties (mobility, etc). for each detector element. These depend on conditions such as temperature.

Definition at line 23 of file SiPropertiesTool.h.

Constructor & Destructor Documentation

◆ SiPropertiesTool()

SiPropertiesTool::SiPropertiesTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 7 of file SiPropertiesTool.cxx.

7  :
8  base_class(type, name, parent),
9  m_propertiesVector{"SCTSiliconPropertiesVector"}
10 {
11  declareProperty("DetectorName", m_detectorName="SCT", "Dectector name: Pixel, SCT or PLR");
12  declareProperty("ReadKey", m_propertiesVector, "Key of SiliconPropertiesVector");
13 }

◆ ~SiPropertiesTool()

virtual SiPropertiesTool::~SiPropertiesTool ( )
virtualdefault

Member Function Documentation

◆ finalize()

StatusCode SiPropertiesTool::finalize ( )
overridevirtual

Definition at line 30 of file SiPropertiesTool.cxx.

31 {
32  return StatusCode::SUCCESS;
33 }

◆ getSiProperties()

const InDet::SiliconProperties & SiPropertiesTool::getSiProperties ( const IdentifierHash elementHash,
const EventContext &  ctx 
) const
overridevirtual

Get properties for the detector element.

Definition at line 36 of file SiPropertiesTool.cxx.

36  {
38  if (handle.isValid()) {
39  const InDet::SiliconPropertiesVector* vector{*handle};
40  if (vector) {
41  return vector->getSiProperties(elementHash);
42  }
43  }
44 
45  ATH_MSG_WARNING("SG::ReadCondHandle<InDet::SiliconPropertiesVector> is not valid. " <<
46  "Return default InDet::SiliconProperties for IdentifierHash for " <<
47  elementHash);
48  return s_defaultProperties;
49 }

◆ initialize()

StatusCode SiPropertiesTool::initialize ( )
overridevirtual

Definition at line 16 of file SiPropertiesTool.cxx.

17 {
18  ATH_MSG_INFO("SiPropertiesTool Initialized");
19 
20  if ((m_detectorName != "Pixel") and (m_detectorName != "SCT") and (m_detectorName != "PLR")) {
21  ATH_MSG_FATAL("Invalid detector name: " << m_detectorName << ". Must be Pixel, SCT or PLR.");
22  return StatusCode::FAILURE;
23  }
25 
26  return StatusCode::SUCCESS;
27 }

Member Data Documentation

◆ m_detectorName

std::string SiPropertiesTool::m_detectorName
private

Definition at line 37 of file SiPropertiesTool.h.

◆ m_propertiesVector

SG::ReadCondHandleKey<InDet::SiliconPropertiesVector> SiPropertiesTool::m_propertiesVector
private

Definition at line 38 of file SiPropertiesTool.h.

◆ s_defaultProperties

const InDet::SiliconProperties SiPropertiesTool::s_defaultProperties {}
staticprivate

Definition at line 40 of file SiPropertiesTool.h.


The documentation for this class was generated from the following files:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SiPropertiesTool::m_propertiesVector
SG::ReadCondHandleKey< InDet::SiliconPropertiesVector > m_propertiesVector
Definition: SiPropertiesTool.h:38
SiPropertiesTool::s_defaultProperties
static const InDet::SiliconProperties s_defaultProperties
Definition: SiPropertiesTool.h:40
vector
Definition: MultiHisto.h:13
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::SiliconPropertiesVector
Definition: SiliconPropertiesVector.h:20
SiPropertiesTool::m_detectorName
std::string m_detectorName
Definition: SiPropertiesTool.h:37