ATLAS Offline Software
Loading...
Searching...
No Matches
SCTSiLorentzAngleCondAlg Class Reference

This class prepares SiLorentAngleCondData using SCT_SiliconConditionsTool. More...

#include <SCTSiLorentzAngleCondAlg.h>

Inheritance diagram for SCTSiLorentzAngleCondAlg:
Collaboration diagram for SCTSiLorentzAngleCondAlg:

Public Member Functions

 SCTSiLorentzAngleCondAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~SCTSiLorentzAngleCondAlg ()=default
virtual StatusCode initialize () override final
virtual StatusCode execute (const EventContext &ctx) const override final
virtual StatusCode finalize () override final
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Amg::Vector3D getMagneticField (MagField::AtlasFieldCache &fieldCache, const InDetDD::SiDetectorElement *element) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< SCT_DCSFloatCondDatam_readKeyTemp {this, "ReadKeyTemp", "SCT_SiliconTempCondData", "Key of input SCT temperature"}
SG::ReadCondHandleKey< SCT_DCSFloatCondDatam_readKeyHV {this, "ReadKeyHV", "SCT_SiliconBiasVoltCondData", "Key of input SCT HV"}
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCondObjInputKey
SG::WriteCondHandleKey< SiLorentzAngleCondDatam_writeKey {this, "WriteKey", "SCTSiLorentzAngleCondData", "Key of output SiLorentzAngleCondData"}
ToolHandle< ISiliconConditionsToolm_siConditionsTool {this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"}
DoubleProperty m_temperature {this, "Temperature", -7., "Default temperature in Celcius."}
DoubleProperty m_temperatureMin {this, "TemperatureMin", -80., "Minimum temperature allowed in Celcius."}
DoubleProperty m_temperatureMax {this, "TemperatureMax", 100., "Maximum temperature allowed in Celcius."}
DoubleProperty m_deplVoltage {this, "DepletionVoltage", 70., "Default depletion voltage in Volt."}
DoubleProperty m_biasVoltage {this, "BiasVoltage", 150., "Default bias voltage in Volt."}
DoubleProperty m_nominalField {this, "NominalField", 2.0834*Gaudi::Units::tesla}
BooleanProperty m_useMagFieldCache {this, "UseMagFieldCache", true}
BooleanProperty m_useMagFieldDcs {this, "UseMagFieldDcs", true}
BooleanProperty m_sctDefaults {this, "useSctDefaults", false}
BooleanProperty m_useGeoModel {this, "UseGeoModel", false}
unsigned int m_maxHash
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

This class prepares SiLorentAngleCondData using SCT_SiliconConditionsTool.

Definition at line 36 of file SCTSiLorentzAngleCondAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SCTSiLorentzAngleCondAlg()

SCTSiLorentzAngleCondAlg::SCTSiLorentzAngleCondAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 23 of file SCTSiLorentzAngleCondAlg.cxx.

23 :
24 ::AthCondAlgorithm(name, pSvcLocator),
25 m_maxHash{0}
26{
27}

◆ ~SCTSiLorentzAngleCondAlg()

virtual SCTSiLorentzAngleCondAlg::~SCTSiLorentzAngleCondAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode SCTSiLorentzAngleCondAlg::execute ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 58 of file SCTSiLorentzAngleCondAlg.cxx.

59{
60 // Write Cond Handle
61 SG::WriteCondHandle<SiLorentzAngleCondData> writeHandle{m_writeKey, ctx};
62 // Do we have a valid Write Cond Handle for current time?
63 if (writeHandle.isValid()) {
64 ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
65 << " In theory this should not be called, but may happen"
66 << " if multiple concurrent events are being processed out of order.");
67 return StatusCode::SUCCESS;
68 }
69
70 // Get SCT_DetectorElementCollection
71 SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey, ctx);
72 const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
73 if (elements==nullptr) {
74 ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
75 return StatusCode::FAILURE;
76 }
77 writeHandle.addDependency(sctDetEle); // Run-LB IOV
78
79 if ((not m_sctDefaults.value()) and (not m_useGeoModel.value())) {
80 // Read Cond Handle (temperature)
81 SG::ReadCondHandle<SCT_DCSFloatCondData> readHandleTemp{m_readKeyTemp, ctx};
82 const SCT_DCSFloatCondData* readCdoTemp{*readHandleTemp};
83 if (readCdoTemp==nullptr) {
84 ATH_MSG_FATAL("Null pointer to the read conditions object");
85 return StatusCode::FAILURE;
86 }
87 writeHandle.addDependency(readHandleTemp);
88 ATH_MSG_INFO("Input is " << readHandleTemp.fullKey() << " with the range of " << readHandleTemp.getRange());
89
90 // Read Cond Handle (HV)
91 SG::ReadCondHandle<SCT_DCSFloatCondData> readHandleHV{m_readKeyHV, ctx};
92 const SCT_DCSFloatCondData* readCdoHV{*readHandleHV};
93 if (readCdoHV==nullptr) {
94 ATH_MSG_FATAL("Null pointer to the read conditions object");
95 return StatusCode::FAILURE;
96 }
97 writeHandle.addDependency(readHandleHV);
98 ATH_MSG_INFO("Input is " << readHandleHV.fullKey() << " with the range of " << readHandleHV.getRange());
99 }
100
101 MagField::AtlasFieldCache fieldCache;
102 if (m_useMagFieldCache.value()) {
103 // Get field cache object
104 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
105 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
106
107 if (fieldCondObj==nullptr) {
108 ATH_MSG_FATAL("Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
109 return StatusCode::FAILURE;
110 }
111 writeHandle.addDependency(readHandle);
112 fieldCondObj->getInitializedCache(fieldCache);
113 }
114
115 // Construct the output Cond Object and fill it in
116 std::unique_ptr<SiLorentzAngleCondData> writeCdo{std::make_unique<SiLorentzAngleCondData>()};
117 writeCdo->resize(m_maxHash);
118 // SiLorentzAngleCondData myData;
119
120 for (unsigned int hash{0}; hash<m_maxHash; hash++) {
121 const IdentifierHash elementHash{hash};
122
123 double temperatureC{0.0};
124 double deplVoltage{0.0};
125 double biasVoltage{0.0};
126
127 if (m_sctDefaults.value()) {
128 temperatureC = m_temperature.value();
129 deplVoltage = m_deplVoltage.value() * CLHEP::volt;
130 biasVoltage = m_biasVoltage.value() * CLHEP::volt;
131 } else {
132 temperatureC = m_siConditionsTool->temperature(elementHash, ctx);
133 deplVoltage = m_siConditionsTool->depletionVoltage(elementHash, ctx) * CLHEP::volt;
134 biasVoltage = m_siConditionsTool->biasVoltage(elementHash, ctx) * CLHEP::volt;
135 ATH_MSG_DEBUG("SCT Hash = " << elementHash << " Temperature = " << temperatureC << " [deg C], BiasV = " << biasVoltage << " DeplV = " << deplVoltage);
136 }
137
138 // Protect against invalid temperature
139 if (not ((temperatureC>m_temperatureMin) and (temperatureC<m_temperatureMax))) {
140 temperatureC = m_temperature.value();
141 ATH_MSG_DEBUG("Invalid temperature: " << temperatureC << " C. " << "Setting to " << m_temperature.value() << " C. " << "Detector element hash: " << elementHash);
142 }
143 double temperature{temperatureC + Gaudi::Units::STP_Temperature}; // C -> K
144
145 // Calculate depletion depth. If biasVoltage is less than depletionVoltage
146 // the detector is not fully depleted and we need to take this into account.
147 // We take absolute values just in case voltages are signed.
148 const InDetDD::SiDetectorElement* element{elements->getDetectorElement(elementHash)};
149 double depletionDepth{element->thickness()};
150 if (deplVoltage==0.0) {
151 ATH_MSG_WARNING("Depletion voltage in "<<__FILE__<<" is zero, which might be a bug.");
152 }
153 if (std::abs(biasVoltage) < std::abs(deplVoltage)) {
154 depletionDepth *= std::sqrt(std::abs(biasVoltage / deplVoltage));
155 }
156
157 double meanElectricField{0.};
158 if (depletionDepth>0.) {
159 meanElectricField = biasVoltage / depletionDepth;
160 }
161 InDet::SiliconProperties siProperties;
162 siProperties.setConditions(temperature, meanElectricField);
163 double mobility{siProperties.signedHallMobility(element->carrierType())};
164
165 // Get magnetic field. This first checks that field cache is valid.
166 Amg::Vector3D magneticField{getMagneticField(fieldCache, element)};
167
168 // The angles are in the hit frame. This is because that is what is needed by the digization and also
169 // gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped).
170 // The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0
171 // The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0
172 double tanLorentzAnglePhi{element->design().readoutSide() * mobility * element->hitDepthDirection()
173 * element->hitPhiDirection() * (element->normal().cross(magneticField)).dot(element->phiAxis())};
174 writeCdo->setTanLorentzAngle(elementHash, tanLorentzAnglePhi);
175
176 // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection()
177 // as the angle above is in the hit frame.
178 double lorentzCorrectionPhi{-0.5 * element->hitPhiDirection() * tanLorentzAnglePhi * depletionDepth};
179 writeCdo->setLorentzShift(elementHash, lorentzCorrectionPhi);
180
181 // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
182 // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip.
183 double tanLorentzAngleEta{element->design().readoutSide() * mobility * element->hitDepthDirection()
184 * element->hitEtaDirection() * (element->normal().cross(magneticField)).dot(element->etaAxis())};
185 writeCdo->setTanLorentzAngleEta(elementHash, tanLorentzAngleEta);
186 double lorentzCorrectionEta{-0.5 * element->hitPhiDirection() * tanLorentzAngleEta * depletionDepth};
187 writeCdo->setLorentzShiftEta(elementHash, lorentzCorrectionEta);
188
189 // Monitoring value
190 writeCdo->setBiasVoltage(elementHash, biasVoltage/CLHEP::volt);
191 writeCdo->setTemperature(elementHash, temperatureC);
192 writeCdo->setDepletionVoltage(elementHash, deplVoltage/CLHEP::volt);
193
194 ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << "Depletion depth = " << depletionDepth);
195 ATH_MSG_VERBOSE("Temperature (C), bias voltage, depletion voltage: " << temperatureC << ", " << biasVoltage/CLHEP::volt << ", " << deplVoltage/CLHEP::volt);
196 ATH_MSG_VERBOSE("Depletion depth: " << depletionDepth/CLHEP::mm);
197 ATH_MSG_VERBOSE("Mobility (cm2/V/s): " << mobility/(CLHEP::cm2/CLHEP::volt/CLHEP::s));
198 ATH_MSG_VERBOSE("Magnetic Field (tesla): " << "(" << magneticField.x()/CLHEP::tesla << "," << magneticField.y()/CLHEP::tesla << "," << magneticField.z()/CLHEP::tesla << ")");
199 ATH_MSG_VERBOSE("LorentzShift, tanLorentzAngle = " << writeCdo->getLorentzShift(elementHash) << ", " << writeCdo->getTanLorentzAngle(elementHash));
200 ATH_MSG_VERBOSE("LorentzShiftEta, tanLorentzAngleEta = " << writeCdo->getLorentzShiftEta(elementHash) << ", " << writeCdo->getTanLorentzAngleEta(elementHash));
201 }
202
203 // Record the output cond object
204 if (writeHandle.record(std::move(writeCdo)).isFailure()) {
205 ATH_MSG_FATAL("Could not record SiLorentzAngleCondData " << writeHandle.key()
206 << " with EventRange " << writeHandle.getRange() << " into Conditions Store");
207 return StatusCode::FAILURE;
208 }
209 ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
210
211 return StatusCode::SUCCESS;
212}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
int readoutSide() const
ReadoutSide.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
InDetDD::CarrierType carrierType() const
carrier type for readout.
double hitPhiDirection() const
See previous method.
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
double hitDepthDirection() const
Directions of hit depth,phi,eta axes relative to reconstruction local position axes (LocalPosition).
double hitEtaDirection() const
See previous method.
void setConditions(double temperature, double electricField)
double signedHallMobility(InDetDD::CarrierType carrier) const
Amg::Vector3D getMagneticField(MagField::AtlasFieldCache &fieldCache, const InDetDD::SiDetectorElement *element) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
SG::WriteCondHandleKey< SiLorentzAngleCondData > m_writeKey
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_readKeyHV
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
ToolHandle< ISiliconConditionsTool > m_siConditionsTool
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_readKeyTemp
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
Eigen::Matrix< double, 3, 1 > Vector3D

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode SCTSiLorentzAngleCondAlg::finalize ( )
finaloverridevirtual

Definition at line 214 of file SCTSiLorentzAngleCondAlg.cxx.

215{
216 return StatusCode::SUCCESS;
217}

◆ getMagneticField()

Amg::Vector3D SCTSiLorentzAngleCondAlg::getMagneticField ( MagField::AtlasFieldCache & fieldCache,
const InDetDD::SiDetectorElement * element ) const
private

Definition at line 219 of file SCTSiLorentzAngleCondAlg.cxx.

219 {
220
221 if (m_useMagFieldCache.value()) {
222 Amg::Vector3D pointvec{element->center()};
223
224 ATH_MSG_VERBOSE("Getting magnetic field from MT magnetic field service.");
225
226 double point[3];
227 point[0] = pointvec[0];
228 point[1] = pointvec[1];
229 point[2] = pointvec[2];
230 double field[3];
231 fieldCache.getField(point, field);
232 return Amg::Vector3D(field[0], field[1], field[2]);
233 } else {
234 ATH_MSG_VERBOSE("Using Nominal Field");
235 return Amg::Vector3D(0., 0., m_nominalField);
236 }
237}
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...

◆ initialize()

StatusCode SCTSiLorentzAngleCondAlg::initialize ( )
finaloverridevirtual

Definition at line 29 of file SCTSiLorentzAngleCondAlg.cxx.

30{
31 if (m_siConditionsTool.empty()) m_sctDefaults.setValue(true);
32
33 if (not m_sctDefaults.value()) {
34 // SCTSiliconConditionsTool
35 ATH_CHECK(m_siConditionsTool.retrieve());
36 } else {
37 m_siConditionsTool.disable();
38 }
39 // Read Cond handle
40 ATH_CHECK(m_readKeyTemp.initialize((not m_sctDefaults.value()) and (not m_useGeoModel.value())));
41 ATH_CHECK(m_readKeyHV.initialize((not m_sctDefaults.value()) and (not m_useGeoModel.value())));
42
44
45 ATH_CHECK(m_SCTDetEleCollKey.initialize());
46
47 // Write Cond Handle
48 ATH_CHECK(m_writeKey.initialize());
49
50 // Get maximum hash for vector sizes. We need the idhelper for this.
51 const SCT_ID* idHelper{nullptr};
52 ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID"));
53 m_maxHash = idHelper->wafer_hash_max();
54
55 return StatusCode::SUCCESS;
56}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
size_type wafer_hash_max() const
Definition SCT_ID.cxx:621
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ isReEntrant()

virtual bool AthCondAlgorithm::isReEntrant ( ) const
inlineoverridevirtualinherited

Avoid scheduling algorithm multiple times.

With multiple concurrent events, conditions objects often expire simultaneously for all slots. To avoid that the scheduler runs the CondAlg in each slot, we declare it as "non-reentrant". This ensures that the conditions objects are only created once.

In case a particular CondAlg should behave differently, it can override this method again and return true.

See also
ATEAM-836

Definition at line 39 of file AthCondAlgorithm.h.

39{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_biasVoltage

DoubleProperty SCTSiLorentzAngleCondAlg::m_biasVoltage {this, "BiasVoltage", 150., "Default bias voltage in Volt."}
private

Definition at line 63 of file SCTSiLorentzAngleCondAlg.h.

63{this, "BiasVoltage", 150., "Default bias voltage in Volt."};

◆ m_deplVoltage

DoubleProperty SCTSiLorentzAngleCondAlg::m_deplVoltage {this, "DepletionVoltage", 70., "Default depletion voltage in Volt."}
private

Definition at line 62 of file SCTSiLorentzAngleCondAlg.h.

62{this, "DepletionVoltage", 70., "Default depletion voltage in Volt."};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fieldCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> SCTSiLorentzAngleCondAlg::m_fieldCondObjInputKey
private
Initial value:
{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}

Definition at line 51 of file SCTSiLorentzAngleCondAlg.h.

51 {this, "AtlasFieldCacheCondObj", "fieldCondObj",
52 "Name of the Magnetic Field conditions object key"};

◆ m_maxHash

unsigned int SCTSiLorentzAngleCondAlg::m_maxHash
private

Definition at line 69 of file SCTSiLorentzAngleCondAlg.h.

◆ m_nominalField

DoubleProperty SCTSiLorentzAngleCondAlg::m_nominalField {this, "NominalField", 2.0834*Gaudi::Units::tesla}
private

Definition at line 64 of file SCTSiLorentzAngleCondAlg.h.

64{this, "NominalField", 2.0834*Gaudi::Units::tesla};

◆ m_readKeyHV

SG::ReadCondHandleKey<SCT_DCSFloatCondData> SCTSiLorentzAngleCondAlg::m_readKeyHV {this, "ReadKeyHV", "SCT_SiliconBiasVoltCondData", "Key of input SCT HV"}
private

Definition at line 47 of file SCTSiLorentzAngleCondAlg.h.

47{this, "ReadKeyHV", "SCT_SiliconBiasVoltCondData", "Key of input SCT HV"};

◆ m_readKeyTemp

SG::ReadCondHandleKey<SCT_DCSFloatCondData> SCTSiLorentzAngleCondAlg::m_readKeyTemp {this, "ReadKeyTemp", "SCT_SiliconTempCondData", "Key of input SCT temperature"}
private

Definition at line 46 of file SCTSiLorentzAngleCondAlg.h.

46{this, "ReadKeyTemp", "SCT_SiliconTempCondData", "Key of input SCT temperature"};

◆ m_sctDefaults

BooleanProperty SCTSiLorentzAngleCondAlg::m_sctDefaults {this, "useSctDefaults", false}
private

Definition at line 67 of file SCTSiLorentzAngleCondAlg.h.

67{this, "useSctDefaults", false};

◆ m_SCTDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SCTSiLorentzAngleCondAlg::m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
private

Definition at line 49 of file SCTSiLorentzAngleCondAlg.h.

49{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};

◆ m_siConditionsTool

ToolHandle<ISiliconConditionsTool> SCTSiLorentzAngleCondAlg::m_siConditionsTool {this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"}
private

Definition at line 55 of file SCTSiLorentzAngleCondAlg.h.

55{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"};

◆ m_temperature

DoubleProperty SCTSiLorentzAngleCondAlg::m_temperature {this, "Temperature", -7., "Default temperature in Celcius."}
private

Definition at line 59 of file SCTSiLorentzAngleCondAlg.h.

59{this, "Temperature", -7., "Default temperature in Celcius."};

◆ m_temperatureMax

DoubleProperty SCTSiLorentzAngleCondAlg::m_temperatureMax {this, "TemperatureMax", 100., "Maximum temperature allowed in Celcius."}
private

Definition at line 61 of file SCTSiLorentzAngleCondAlg.h.

61{this, "TemperatureMax", 100., "Maximum temperature allowed in Celcius."};

◆ m_temperatureMin

DoubleProperty SCTSiLorentzAngleCondAlg::m_temperatureMin {this, "TemperatureMin", -80., "Minimum temperature allowed in Celcius."}
private

Definition at line 60 of file SCTSiLorentzAngleCondAlg.h.

60{this, "TemperatureMin", -80., "Minimum temperature allowed in Celcius."};

◆ m_useGeoModel

BooleanProperty SCTSiLorentzAngleCondAlg::m_useGeoModel {this, "UseGeoModel", false}
private

Definition at line 68 of file SCTSiLorentzAngleCondAlg.h.

68{this, "UseGeoModel", false};

◆ m_useMagFieldCache

BooleanProperty SCTSiLorentzAngleCondAlg::m_useMagFieldCache {this, "UseMagFieldCache", true}
private

Definition at line 65 of file SCTSiLorentzAngleCondAlg.h.

65{this, "UseMagFieldCache", true};

◆ m_useMagFieldDcs

BooleanProperty SCTSiLorentzAngleCondAlg::m_useMagFieldDcs {this, "UseMagFieldDcs", true}
private

Definition at line 66 of file SCTSiLorentzAngleCondAlg.h.

66{this, "UseMagFieldDcs", true};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<SiLorentzAngleCondData> SCTSiLorentzAngleCondAlg::m_writeKey {this, "WriteKey", "SCTSiLorentzAngleCondData", "Key of output SiLorentzAngleCondData"}
private

Definition at line 53 of file SCTSiLorentzAngleCondAlg.h.

53{this, "WriteKey", "SCTSiLorentzAngleCondData", "Key of output SiLorentzAngleCondData"};

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