34 ATH_MSG_INFO(
"Configured to use GeoModel values of HV and Temp, not conditions");
39 return StatusCode::SUCCESS;
50 <<
" In theory this should not be called, but may happen"
51 <<
" if multiple concurrent events are being processed out of order.");
52 return StatusCode::SUCCESS;
59 if (readCdoTemp==
nullptr) {
61 return StatusCode::FAILURE;
69 if (readCdoHV==
nullptr) {
71 return StatusCode::FAILURE;
80 if (elements==
nullptr) {
82 return StatusCode::FAILURE;
87 std::unique_ptr<InDet::SiliconPropertiesVector> writeCdo{std::make_unique<InDet::SiliconPropertiesVector>()};
89 writeCdo->resize(wafer_hash_max);
93 double temperatureC{
m_siCondTool->temperature(elementHash, ctx)};
97 << temperatureC <<
" C. "
99 <<
"Detector element hash: " << elementHash);
103 double temperature{temperatureC + 273.15};
104 double deplVoltage{
m_siCondTool->depletionVoltage(elementHash, ctx) * CLHEP::volt};
105 double biasVoltage{
m_siCondTool->biasVoltage(elementHash, ctx) * CLHEP::volt};
108 double depletionDepth{element->
thickness()};
109 if (std::abs(biasVoltage)<std::abs(deplVoltage)) {
110 depletionDepth *= std::sqrt(std::abs(biasVoltage/deplVoltage));
112 double meanElectricField{0.};
113 if (depletionDepth>0.) {
114 meanElectricField = biasVoltage/depletionDepth;
117 writeCdo->setConditions(hash, temperature, meanElectricField);
121 if (writeHandle.
record(std::move(writeCdo)).isFailure()) {
123 <<
" with EventRange " << writeHandle.
getRange()
124 <<
" into Conditions Store");
125 return StatusCode::FAILURE;
127 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.
key() <<
" with range " << writeHandle.
getRange() <<
" into Conditions Store");
129 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
This is an Identifier helper class for the SCT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
Base class for conditions algorithms.
This is a "hash" representation of an Identifier.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
ToolHandle< ISiliconConditionsTool > m_siCondTool
const SCT_ID * m_pHelper
ID helper for SCT.
DoubleProperty m_temperatureMin
virtual StatusCode finalize() override final
SCTSiPropertiesCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteCondHandleKey< InDet::SiliconPropertiesVector > m_writeKey
DoubleProperty m_temperatureMax
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
DoubleProperty m_temperatureDefault
BooleanProperty m_forceGeoModel
virtual StatusCode initialize() override final
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_readKeyHV
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_readKeyTemp
virtual StatusCode execute(const EventContext &ctx) const override
Class for data object used in SCT_DCSConditions{HV,Temp}CondAlg, SCT_DCSConditionsTool,...
Identifier::size_type size_type
const_pointer_type retrieve()
const DataObjID & fullKey() const
const EventIDRange & getRange()
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const