34 ATH_MSG_INFO(
"Configured to use GeoModel values of HV and Temp, not conditions");
39 return StatusCode::SUCCESS;
48 if (writeHandle.isValid()) {
49 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
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;
63 writeHandle.addDependency(readHandleTemp);
64 ATH_MSG_INFO(
"Input is " << readHandleTemp.fullKey() <<
" with the range of " << readHandleTemp.getRange());
69 if (readCdoHV==
nullptr) {
71 return StatusCode::FAILURE;
73 writeHandle.addDependency(readHandleHV);
74 ATH_MSG_INFO(
"Input is " << readHandleHV.fullKey() <<
" with the range of " << readHandleHV.getRange());
80 if (elements==
nullptr) {
82 return StatusCode::FAILURE;
84 writeHandle.addDependency(sctDetEle);
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};
108 double depletionDepth{element->
thickness()};
109 if (std::abs(biasVoltage)<std::abs(deplVoltage)) {
110 depletionDepth *= 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()) {
122 ATH_MSG_FATAL(
"Could not record SCT_DCSFloatCondData " << writeHandle.key()
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;