|
ATLAS Offline Software
|
This class contains a Tool that reads SCT calibration data and makes it available to other algorithms.
More...
#include <SCT_ReadCalibChipDataTool.h>
|
Return whether this service can report on the hierarchy level (e.g.
module, chip...)
|
enum | FolderType { NPTGAIN,
NOISEOCC,
UNKNOWN_FOLDER,
N_FOLDERTYPES
} |
|
const SCT_ID * | m_id_sct {nullptr} |
| Handle to SCT ID helper. More...
|
|
SG::ReadCondHandleKey< SCT_GainCalibData > | m_condKeyGain {this, "CondKeyGain", "SCT_GainCalibData", "SCT calibration data of gains of chips"} |
|
SG::ReadCondHandleKey< SCT_NoiseCalibData > | m_condKeyNoise {this, "CondKeyNoise", "SCT_NoiseCalibData", "SCT calibration data of noises of chips"} |
|
FloatProperty | m_noiseLevel {this, "NoiseLevel", 1800.0, "Noise Level for isGood if ever used"} |
|
virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
|
virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Summarise the result from the service as good/bad. More...
|
|
virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
|
virtual bool | isGood (const IdentifierHash &hashId, const EventContext &ctx) const override |
| same thing with id hash, introduced by shaun with dummy method for now More...
|
|
virtual bool | isGood (const IdentifierHash &hashId) const override |
|
virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
|
virtual std::vector< float > | getNPtGainData (const Identifier &moduleId, const int side, const std::string &datatype, const EventContext &ctx) const override |
| Get NPtGain data per wafer. More...
|
|
virtual std::vector< float > | getNPtGainData (const Identifier &moduleId, const int side, const std::string &datatype) const override |
| Get NPtGain data per wafer. More...
|
|
virtual std::vector< float > | getNoiseOccupancyData (const Identifier &moduleId, const int side, const std::string &datatype, const EventContext &ctx) const override |
| Get NoiseOccupancy data wafer. More...
|
|
virtual std::vector< float > | getNoiseOccupancyData (const Identifier &moduleId, const int side, const std::string &datatype) const override |
| Get NoiseOccupancy data wafer. More...
|
|
static int | nPtGainIndex (const std::string &dataName) |
|
static int | noiseOccIndex (const std::string &dataName) |
|
const SCT_GainCalibData * | getCondDataGain (const EventContext &ctx) const |
|
const SCT_NoiseCalibData * | getCondDataNoise (const EventContext &ctx) const |
|
This class contains a Tool that reads SCT calibration data and makes it available to other algorithms.
The current implementation reads the data from a COOL database.
Definition at line 34 of file SCT_ReadCalibChipDataTool.h.
◆ FolderType
◆ SCT_ReadCalibChipDataTool()
SCT_ReadCalibChipDataTool::SCT_ReadCalibChipDataTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_ReadCalibChipDataTool()
virtual SCT_ReadCalibChipDataTool::~SCT_ReadCalibChipDataTool |
( |
| ) |
|
|
virtualdefault |
◆ canReportAbout()
◆ finalize()
StatusCode SCT_ReadCalibChipDataTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCondDataGain()
◆ getCondDataNoise()
◆ getDetectorElementStatus()
Definition at line 101 of file SCT_ReadCalibChipDataTool.cxx.
104 if (not condDataHandle.isValid() ) {
116 unsigned int element_i=0;
120 ATH_MSG_ERROR(
"This NoiseOccupancy noise data does not exist");
125 for (
unsigned int side_i=0; side_i<2; ++side_i) {
128 unsigned int nChips{0};
131 for (; chip!=endChip; ++chip) {
132 float chipNoise{moduleNoiseData[chip]};
133 if (chipNoise!=0.0) {
138 const float meanNoiseValue{ nChips>0 ?
sum/nChips : 0.f};
◆ getNoiseOccupancyData() [1/2]
std::vector< float > SCT_ReadCalibChipDataTool::getNoiseOccupancyData |
( |
const Identifier & |
moduleId, |
|
|
const int |
side, |
|
|
const std::string & |
datatype |
|
) |
| const |
|
overridevirtual |
◆ getNoiseOccupancyData() [2/2]
std::vector< float > SCT_ReadCalibChipDataTool::getNoiseOccupancyData |
( |
const Identifier & |
moduleId, |
|
|
const int |
side, |
|
|
const std::string & |
datatype, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Get NoiseOccupancy data wafer.
Definition at line 225 of file SCT_ReadCalibChipDataTool.cxx.
228 std::vector<float> waferData;
232 if (condDataNoise==
nullptr) {
233 ATH_MSG_ERROR(
"In getNPtNoiseData, SCT_NoiseCalibData cannot be retrieved");
248 ATH_MSG_ERROR(
"This Noise Occupancy data: " << datatype <<
" does not exist");
254 SCT_ModuleCalibParameter::const_iterator
it{moduleNoise.begin() + startOffset};
255 SCT_ModuleCalibParameter::const_iterator
end{moduleNoise.begin() + endOffset};
257 if (*
it != *
it)
return waferData;
258 waferData.assign(
it,
end);
260 }
catch (
const std::out_of_range&
e) {
◆ getNPtGainData() [1/2]
std::vector< float > SCT_ReadCalibChipDataTool::getNPtGainData |
( |
const Identifier & |
moduleId, |
|
|
const int |
side, |
|
|
const std::string & |
datatype |
|
) |
| const |
|
overridevirtual |
◆ getNPtGainData() [2/2]
std::vector< float > SCT_ReadCalibChipDataTool::getNPtGainData |
( |
const Identifier & |
moduleId, |
|
|
const int |
side, |
|
|
const std::string & |
datatype, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Get NPtGain data per wafer.
Definition at line 176 of file SCT_ReadCalibChipDataTool.cxx.
179 std::vector<float> waferData;
183 if (condDataGain==
nullptr) {
184 ATH_MSG_ERROR(
"In getNPtGainData, SCT_GainCalibData cannot be retrieved");
198 ATH_MSG_ERROR(
"This N-point gain data: " << datatype <<
" does not exist");
204 SCT_ModuleCalibParameter::const_iterator
it{moduleGains.begin() + startOffset};
205 SCT_ModuleCalibParameter::const_iterator
end{moduleGains.begin() + endOffset};
207 if (*
it != *
it)
return waferData;
210 waferData.assign(
it,
end);
212 }
catch (
const std::out_of_range&
e) {
◆ initialize()
StatusCode SCT_ReadCalibChipDataTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isGood() [1/4]
◆ isGood() [2/4]
◆ isGood() [3/4]
◆ isGood() [4/4]
same thing with id hash, introduced by shaun with dummy method for now
Definition at line 60 of file SCT_ReadCalibChipDataTool.cxx.
63 if (condDataNoise==
nullptr) {
64 ATH_MSG_ERROR(
"In isGood, SCT_NoiseCalibData cannot be retrieved");
75 ATH_MSG_ERROR(
"This NoiseOccupancy noise data does not exist");
83 const int side{
static_cast<int>(elementHashId%2)};
88 for (; chip!=endChip; ++chip) {
89 float chipNoise{moduleNoiseData[chip]};
95 const float meanNoiseValue{
sum/nChips};
◆ noiseOccIndex()
int SCT_ReadCalibChipDataTool::noiseOccIndex |
( |
const std::string & |
dataName | ) |
|
|
staticprivate |
◆ nPtGainIndex()
int SCT_ReadCalibChipDataTool::nPtGainIndex |
( |
const std::string & |
dataName | ) |
|
|
staticprivate |
◆ m_condKeyGain
◆ m_condKeyNoise
◆ m_id_sct
const SCT_ID* SCT_ReadCalibChipDataTool::m_id_sct {nullptr} |
|
private |
◆ m_noiseLevel
FloatProperty SCT_ReadCalibChipDataTool::m_noiseLevel {this, "NoiseLevel", 1800.0, "Noise Level for isGood if ever used"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::array< SCT_ModuleCalibParameter, SCT_ConditionsData::N_NOISEOCC > SCT_ModuleNoiseCalibData
Typedef for data object used in SCT_ReadCalibChipNoiseCondAlg and SCT_ReadCalibChipDataTool.
std::array< SCT_ModuleNoiseCalibData, SCT_ConditionsData::NUMBER_OF_MODULES > SCT_NoiseCalibData
Class for data object used in SCT_ReadCalibChipNoiseCondAlg and SCT_ReadCalibChipDataTool.
const std::vector< bool > & getElementStatus() const
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::array< float, SCT_ConditionsData::CHIPS_PER_MODULE > SCT_ModuleCalibParameter
typedef for SCT_ReadCalibChipGainCondAlg, SCT_ReadCalibChipNoiseCondAlg, SCT_ReadCalibChipDataTool.
std::array< SCT_ModuleCalibParameter, SCT_ConditionsData::N_NPTGAIN > SCT_ModuleGainCalibData
Typedef for data object used in SCT_ReadCalibChipGainCondAlg and SCT_ReadCalibChipDataTool.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
const std::array< std::string, SCT_ConditionsData::N_NOISEOCC > noiseOccParameterNames
size_type wafer_hash_max(void) const
StatusCode initialize(bool used=true)
const std::array< std::string, SCT_ConditionsData::N_NPTGAIN > nPtGainParameterNames
#define ATH_MSG_WARNING(x)
std::array< SCT_ModuleGainCalibData, SCT_ConditionsData::NUMBER_OF_MODULES > SCT_GainCalibData
Typedef for data object used in SCT_ReadCalibChipGainCondAlg and SCT_ReadCalibChipDataTool.
void addDependency(const EventIDRange &range)