ATLAS Offline Software
SCT_SiliconConditionsTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
15 #ifndef SCT_SiliconConditionsTool_h
16 #define SCT_SiliconConditionsTool_h
17 
19 #include "GaudiKernel/ServiceHandle.h"
21 
26 
27 class SCT_ID;
28 
36 class SCT_SiliconConditionsTool: public extends<AthAlgTool, ISiliconConditionsTool> {
37  public:
38 
40  SCT_SiliconConditionsTool(const std::string& type, const std::string& name, const IInterface* parent);
42  virtual ~SCT_SiliconConditionsTool() = default;
43 
45  virtual StatusCode initialize() override;
47  virtual StatusCode finalize() override;
48 
50  virtual float temperature(const Identifier& elementId, const EventContext& ctx) const override;
52  virtual float biasVoltage(const Identifier& elementId, const EventContext& ctx) const override;
54  virtual float depletionVoltage(const Identifier& elementId, const EventContext& ctx) const override;
55 
57  virtual float temperature(const IdentifierHash& elementHash, const EventContext& ctx) const override;
59  virtual float biasVoltage(const IdentifierHash& elementHash, const EventContext& ctx) const override;
61  virtual float depletionVoltage(const IdentifierHash& elementHash, const EventContext& ctx) const override;
62 
63  private:
64 
66 
67  FloatProperty m_defaultTemperature{this, "Temperature", 10., "Default temperature (non-DB)"};
68  FloatProperty m_defaultBiasVoltage{this, "BiasVoltage", 150., "Default bias voltage (non-DB)"};
69  FloatProperty m_defaultDepletionVoltage{this, "DepletionVoltage", 70., "Default depletion voltage (non-DB)"};
70  BooleanProperty m_useDB{this, "UseDB", true, "Whether to used the conditions DB or not"};
71  BooleanProperty m_checkGeoModel{this, "CheckGeoModel", true};
72  BooleanProperty m_forceUseGeoModel{this, "ForceUseGeoModel", false};
73 
74  ServiceHandle<IGeoModelSvc> m_geoModelSvc{this, "GeoModelSvc", "GeoModelSvc"};
75  ServiceHandle<IRDBAccessSvc> m_rdbSvc{this, "RDBAccessSvc", "RDBAccessSvc"};
76 
80  bool m_useGeoModel{false};
81 
82  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_condKeyHV{this, "CondKeyHV", "SCT_SiliconBiasVoltCondData", "SCT silicon bias voltage"};
83  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_condKeyTemp{this, "CondKeyTemp", "SCT_SiliconTempCondData", "SCT silicon temperature"};
84 
85  const SCT_ID* m_sct_id{nullptr};
86 
87  const SCT_DCSFloatCondData* getCondDataHV(const EventContext& ctx) const;
88  const SCT_DCSFloatCondData* getCondDataTemp(const EventContext& ctx) const;
89  };
90 
91 #endif // SCT_SiliconConditionsTool_h
SCT_SiliconConditionsTool::m_sct_id
const SCT_ID * m_sct_id
Definition: SCT_SiliconConditionsTool.h:85
SCT_DCSFloatCondData
Class for data object used in SCT_DCSConditions{HV,Temp}CondAlg, SCT_DCSConditionsTool,...
Definition: SCT_DCSFloatCondData.h:30
SCT_SiliconConditionsTool::initialize
virtual StatusCode initialize() override
Initialise.
Definition: SCT_SiliconConditionsTool.cxx:25
SCT_SiliconConditionsTool::m_geoModelBiasVoltage
float m_geoModelBiasVoltage
Definition: SCT_SiliconConditionsTool.h:78
SCT_SiliconConditionsTool::m_useDB
BooleanProperty m_useDB
Definition: SCT_SiliconConditionsTool.h:70
SCT_SiliconConditionsTool::getCondDataTemp
const SCT_DCSFloatCondData * getCondDataTemp(const EventContext &ctx) const
Definition: SCT_SiliconConditionsTool.cxx:172
SCT_SiliconConditionsTool::SCT_SiliconConditionsTool
SCT_SiliconConditionsTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: SCT_SiliconConditionsTool.cxx:15
SCT_SiliconConditionsTool::m_defaultTemperature
FloatProperty m_defaultTemperature
Definition: SCT_SiliconConditionsTool.h:67
SCT_SiliconConditionsTool::m_geoModelTemperature
float m_geoModelTemperature
Definition: SCT_SiliconConditionsTool.h:77
SCT_SiliconConditionsTool::finalize
virtual StatusCode finalize() override
Finalise.
Definition: SCT_SiliconConditionsTool.cxx:59
SCT_SiliconConditionsTool::m_forceUseGeoModel
BooleanProperty m_forceUseGeoModel
Definition: SCT_SiliconConditionsTool.h:72
SCT_SiliconConditionsTool::m_geoModelSvc
ServiceHandle< IGeoModelSvc > m_geoModelSvc
Definition: SCT_SiliconConditionsTool.h:74
SCT_SiliconConditionsTool::m_useGeoModel
bool m_useGeoModel
Definition: SCT_SiliconConditionsTool.h:80
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
SCT_SiliconConditionsTool::temperature
virtual float temperature(const Identifier &elementId, const EventContext &ctx) const override
Silicon temperature by Identifier.
Definition: SCT_SiliconConditionsTool.cxx:65
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
SCT_DCSFloatCondData.h
header file for data object for SCT_DCSConditions{HV,Temp}CondAlg, SCT_DCSConditionsTool,...
SCT_SiliconConditionsTool
Definition: SCT_SiliconConditionsTool.h:36
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SCT_SiliconConditionsTool::m_defaultDepletionVoltage
FloatProperty m_defaultDepletionVoltage
Definition: SCT_SiliconConditionsTool.h:69
SCT_SiliconConditionsTool::m_geoModelDepletionVoltage
float m_geoModelDepletionVoltage
Definition: SCT_SiliconConditionsTool.h:79
SCT_SiliconConditionsTool::~SCT_SiliconConditionsTool
virtual ~SCT_SiliconConditionsTool()=default
Destructor.
SCT_SiliconConditionsTool::m_checkGeoModel
BooleanProperty m_checkGeoModel
Definition: SCT_SiliconConditionsTool.h:71
ReadCondHandleKey.h
SCT_SiliconConditionsTool::m_defaultBiasVoltage
FloatProperty m_defaultBiasVoltage
Definition: SCT_SiliconConditionsTool.h:68
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_SiliconConditionsTool::depletionVoltage
virtual float depletionVoltage(const Identifier &elementId, const EventContext &ctx) const override
Silicon depletion voltage by Identifier.
Definition: SCT_SiliconConditionsTool.cxx:77
SCT_SiliconConditionsTool::getCondDataHV
const SCT_DCSFloatCondData * getCondDataHV(const EventContext &ctx) const
Definition: SCT_SiliconConditionsTool.cxx:163
SG::ReadCondHandleKey< SCT_DCSFloatCondData >
SCT_ID
Definition: SCT_ID.h:68
SCT_SiliconConditionsTool::m_rdbSvc
ServiceHandle< IRDBAccessSvc > m_rdbSvc
Definition: SCT_SiliconConditionsTool.h:75
SCT_SiliconConditionsTool::setConditionsFromGeoModel
bool setConditionsFromGeoModel()
Definition: SCT_SiliconConditionsTool.cxx:120
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ISiliconConditionsTool.h
SCT_SiliconConditionsTool::m_condKeyTemp
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_condKeyTemp
Definition: SCT_SiliconConditionsTool.h:83
SCT_SiliconConditionsTool::biasVoltage
virtual float biasVoltage(const Identifier &elementId, const EventContext &ctx) const override
Silicon bias voltage by Identifier.
Definition: SCT_SiliconConditionsTool.cxx:71
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
IGeoModelSvc.h
SCT_SiliconConditionsTool::m_condKeyHV
SG::ReadCondHandleKey< SCT_DCSFloatCondData > m_condKeyHV
Definition: SCT_SiliconConditionsTool.h:82
ServiceHandle< IGeoModelSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14