|
ATLAS Offline Software
|
This class contains a Tool that reads SCT calibration data and makes it available to other algorithms.
More...
#include <SCT_ReadCalibDataTool.h>
|
Return whether this tool can report on the hierarchy level (e.g.
module, chip...)
|
SG::ReadCondHandleKey< SCT_CalibDefectData > | m_condKeyGain {this, "CondKeyGain", "SCT_CalibDefectNPtGain", "SCT defects due to NPtGain calibration"} |
|
SG::ReadCondHandleKey< SCT_CalibDefectData > | m_condKeyNoise {this, "CondKeyNoise", "SCT_CalibDefectNPtNoise", "SCT defects due to NPtNoise calibration"} |
|
SG::ReadCondHandleKey< SCT_AllGoodStripInfo > | m_condKeyInfo {this, "CondKeyInfo", "SCT_AllGoodStripInfo", "SCT good strips based on calibration defects"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"} |
|
ToolHandle< ISCT_CablingTool > | m_cabling {this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"} |
|
const SCT_ID * | m_id_sct {nullptr} |
| Handle to SCT ID helper. More...
|
|
virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
|
virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Summarise the result from the tool as good/bad. More...
|
|
virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
|
virtual bool | isGood (const IdentifierHash &) const override |
| same thing with id hash, introduced by shaun with dummy method for now More...
|
|
virtual bool | isGood (const IdentifierHash &hashId, const EventContext &) const override |
|
virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
|
virtual ISCT_ReadCalibDataTool::CalibDefectType | defectType (const Identifier &stripId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Return summary of defect type and values for a strip. More...
|
|
virtual ISCT_ReadCalibDataTool::CalibDefectType | defectType (const Identifier &stripId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Return summary of defect type and values for a strip. More...
|
|
virtual SCT_CalibDefectData::CalibModuleDefects | defectsSummary (const Identifier &moduleId, const std::string &scan, const EventContext &ctx) const override |
| Returns module summary of defect. More...
|
|
virtual SCT_CalibDefectData::CalibModuleDefects | defectsSummary (const Identifier &moduleId, const std::string &scan) const override |
| Returns module summary of defect. More...
|
|
virtual std::list< Identifier > | defectList (const std::string &defect, const EventContext &ctx) const override |
| Returns module summary of defect. More...
|
|
virtual std::list< Identifier > | defectList (const std::string &defect) const override |
| Returns module summary of defect. More...
|
|
const SCT_CalibDefectData * | getCondDataGain (const EventContext &ctx) const |
|
const SCT_CalibDefectData * | getCondDataNoise (const EventContext &ctx) const |
|
const SCT_AllGoodStripInfo * | getCondDataInfo (const EventContext &ctx) const |
|
const InDetDD::SiDetectorElement * | getDetectorElement (const IdentifierHash &waferHash, 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_ReadCalibDataTool.h.
◆ anonymous enum
◆ SCT_ReadCalibDataTool()
SCT_ReadCalibDataTool::SCT_ReadCalibDataTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_ReadCalibDataTool()
virtual SCT_ReadCalibDataTool::~SCT_ReadCalibDataTool |
( |
| ) |
|
|
virtualdefault |
◆ canReportAbout()
◆ defectList() [1/2]
std::list< Identifier > SCT_ReadCalibDataTool::defectList |
( |
const std::string & |
defect | ) |
const |
|
overridevirtual |
Returns module summary of defect.
Definition at line 400 of file SCT_ReadCalibDataTool.cxx.
401 const EventContext& ctx{Gaudi::Hive::currentContext()};
◆ defectList() [2/2]
std::list< Identifier > SCT_ReadCalibDataTool::defectList |
( |
const std::string & |
defect, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Returns module summary of defect.
Definition at line 313 of file SCT_ReadCalibDataTool.cxx.
318 if (condDataGain==
nullptr) {
319 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (gain) cannot be retrieved.");
323 if (condDataNoise==
nullptr) {
324 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (noise) cannot be retrieved.");
332 bool npDefect{
false};
333 bool noDefect{
false};
341 std::vector<std::uint32_t> listOfRODs;
345 for (; rodIter!=rodEnd; ++rodIter) {
346 std::vector<IdentifierHash> listOfHashes;
347 m_cabling->getHashesForRod(listOfHashes, *rodIter, ctx);
350 for (; hashIt != hashEnd; ++hashIt) {
354 if (
side!=0)
continue;
357 wantedDefects = condDataGain->findModule(moduleId);
358 }
else if (noDefect) {
359 wantedDefects = condDataNoise->findModule(moduleId);
362 for (
unsigned int i{0};
i < wantedDefects.
begDefects.size(); ++
i) {
365 int strip_beg{
static_cast<int>(wantedDefects.
begDefects[
i])};
366 int strip_end{
static_cast<int>(wantedDefects.
endDefects[
i])};
◆ defectsSummary() [1/2]
Returns module summary of defect.
Definition at line 305 of file SCT_ReadCalibDataTool.cxx.
306 const EventContext& ctx{Gaudi::Hive::currentContext()};
◆ defectsSummary() [2/2]
Returns module summary of defect.
Definition at line 279 of file SCT_ReadCalibDataTool.cxx.
284 if (
scan ==
"NPtGain") {
286 if (condDataGain==
nullptr) {
287 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (gain) cannot be retrieved.");
289 wantedDefects = condDataGain->findModule(moduleId);
291 }
else if (
scan ==
"NoiseOccupancy") {
293 if (condDataNoise==
nullptr) {
294 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (noise) cannot be retrieved.");
296 wantedDefects = condDataNoise->findModule(moduleId);
299 ATH_MSG_ERROR(
"defectsSummary(): Module defects for scan" <<
scan <<
" does not exist (only NPtGain or NoiseOccupancy).");
302 return wantedDefects;
◆ defectType() [1/2]
Return summary of defect type and values for a strip.
Definition at line 164 of file SCT_ReadCalibDataTool.cxx.
169 CalibDefectType theseSummaryDefects;
173 if (condDataGain==
nullptr) {
174 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (gain) cannot be retrieved.");
175 return theseSummaryDefects;
178 if (condDataNoise==
nullptr) {
179 ATH_MSG_ERROR(
"In defectType, SCT_CalibDefectData (noise) cannot be retrieved.");
180 return theseSummaryDefects;
185 ATH_MSG_DEBUG(
"Summary wanted for component: " << stripId <<
" on module: " << moduleId);
195 ATH_MSG_WARNING(
"summary(): Module defect summary is not applicable for Calibration data");
202 ATH_MSG_WARNING(
"summary(): Wafer defect summary is not applicable for Calibration data");
209 ATH_MSG_WARNING(
"summary(): Chip defect summary is not applicable for Calibration data");
219 unsigned int stripNum;
221 if (p_element->swapPhiReadoutDirection()) {
232 if (wantedNPGDefects.begDefects.empty()) {
235 for (
unsigned int i{0};
i<wantedNPGDefects.begDefects.size(); ++
i) {
236 if (stripNum>=wantedNPGDefects.begDefects[
i] and stripNum<=wantedNPGDefects.endDefects[
i]) {
237 theseSummaryDefects.scan.emplace_back(
"NPtGain");
238 theseSummaryDefects.defect.push_back(wantedNPGDefects.typeOfDefect[
i]);
239 theseSummaryDefects.value.push_back(wantedNPGDefects.parValue[
i]);
240 ATH_MSG_VERBOSE(
"NPtGain defect summary for strip " << stripNum <<
" filled");
245 if (wantedNODefects.begDefects.empty()) {
248 for (
unsigned int i{0};
i != wantedNODefects.begDefects.size(); ++
i) {
249 if (stripNum>=wantedNODefects.begDefects[
i] and stripNum <= wantedNODefects.endDefects[
i]) {
250 theseSummaryDefects.scan.emplace_back(
"NoiseOccupancy");
251 theseSummaryDefects.defect.push_back(wantedNODefects.typeOfDefect[
i]);
252 theseSummaryDefects.value.push_back(wantedNODefects.parValue[
i]);
253 ATH_MSG_VERBOSE(
"NoiseOccupancy defect summary for strip " << stripNum <<
" filled");
257 if (theseSummaryDefects.scan.empty()) {
258 ATH_MSG_VERBOSE(
"defectSummary(): can't retrieve the defects for this strip: " << stripNum <<
" since strip good");
264 ATH_MSG_INFO(
"Unknown component requested, should be one of Module/Side/Chip or Strip");
265 return theseSummaryDefects;
270 return theseSummaryDefects;
◆ defectType() [2/2]
Return summary of defect type and values for a strip.
Definition at line 273 of file SCT_ReadCalibDataTool.cxx.
274 const EventContext& ctx{Gaudi::Hive::currentContext()};
◆ finalize()
StatusCode SCT_ReadCalibDataTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCondDataGain()
◆ getCondDataInfo()
◆ getCondDataNoise()
◆ getDetectorElement()
Definition at line 431 of file SCT_ReadCalibDataTool.cxx.
433 if (not condData.isValid())
return nullptr;
434 return condData->getDetectorElement(waferHash);
◆ getDetectorElementStatus()
Definition at line 116 of file SCT_ReadCalibDataTool.cxx.
119 if (not condDataHandle.isValid()) {
131 std::vector<std::vector<unsigned short> > &bad_strips = element_status.
getBadCells();
132 if (bad_strips.empty()) {
133 bad_strips.resize(condDataInfo->size());
135 unsigned int element_i=0;
136 for(
const std::array<bool, SCT_ConditionsData::STRIPS_PER_WAFER> &good_strips : *condDataInfo) {
139 std::vector<unsigned short> &bad_module_strips = bad_strips[element_i];
141 for (
unsigned int strip_i=0; strip_i<good_strips.size(); ++strip_i) {
143 if (geoemtrical_chip_id != last_geoemtrical_chip_id) {
144 last_geoemtrical_chip_id=geoemtrical_chip_id;
145 if (!chip_status.empty() && !(chip_status.at(element_i) &
static_cast<InDet::ChipFlags_t>(1
ul<<geoemtrical_chip_id))) {
150 if (!good_strips[strip_i]) {
151 std::vector<unsigned short>::const_iterator iter = std::lower_bound(bad_module_strips.begin(),bad_module_strips.end(),strip_i);
152 if (iter == bad_module_strips.end() || *iter != strip_i) {
153 bad_module_strips.insert( iter, strip_i);
◆ initialize()
StatusCode SCT_ReadCalibDataTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isGood() [1/4]
Definition at line 60 of file SCT_ReadCalibDataTool.cxx.
68 if (condDataInfo==
nullptr) {
69 ATH_MSG_ERROR(
"In isGood, SCT_AllGoodStripInfo cannot be retrieved");
85 ATH_MSG_WARNING(
"summary(): Module good/bad is not applicable for Calibration data");
91 ATH_MSG_WARNING(
"summary(): Wafer good/bad is not applicable for Calibration data");
97 ATH_MSG_WARNING(
"summary(): Chip good/bad is not applicable for Calibration data");
102 ATH_MSG_INFO(
"Unknown component has been asked for, should be Module/Wafer/Chip or Strip; returning 'good' and continuing");
◆ isGood() [2/4]
Summarise the result from the tool as good/bad.
Definition at line 110 of file SCT_ReadCalibDataTool.cxx.
111 const EventContext& ctx{Gaudi::Hive::currentContext()};
113 return isGood(elementId, ctx,
h);
◆ isGood() [3/4]
same thing with id hash, introduced by shaun with dummy method for now
Definition at line 54 of file SCT_ReadCalibDataTool.h.
◆ isGood() [4/4]
◆ m_cabling
◆ m_condKeyGain
◆ m_condKeyInfo
◆ m_condKeyNoise
◆ m_id_sct
const SCT_ID* SCT_ReadCalibDataTool::m_id_sct {nullptr} |
|
private |
◆ m_SCTDetEleCollKey
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
constexpr unsigned int N_STRIPS_PER_CHIP
const std::vector< bool > & getElementStatus() const
const std::vector< std::vector< unsigned short > > & getBadCells() const
Container with a list of defects derived from calibration data and used in SCT_ReadCalibDataCondAlg a...
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
std::vector< unsigned int > begDefects
bool swapPhiReadoutDirection() const
Determine if readout direction between online and offline needs swapping.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
std::vector< std::string > typeOfDefect
StatusCode initialize(bool used=true)
void scan(TDirectory *td=0, int depth=0)
#define ATH_MSG_WARNING(x)
int strip(const Identifier &id) const
const std::vector< ChipFlags_t > & getElementChipStatus() const
constexpr unsigned int getGeometricalChipID(unsigned int strip)
Get the geometrical chip ID for the given strip.
std::array< SCT_WaferGoodStripInfo, SCT_ConditionsData::NUMBER_OF_WAFERS > SCT_AllGoodStripInfo
SCT_AllGoodStripInfo is std::array of SCT_WaferGoodStripInfo and is used in SCT_ReadCalibDataCondAlg ...
unsigned short ChipFlags_t
int side(const Identifier &id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
constexpr unsigned int N_CHIPS_PER_SIDE
std::vector< unsigned int > endDefects
void addDependency(const EventIDRange &range)
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.