Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <SCT_ConfigurationConditionsTool.h>
|
| SCT_ConfigurationConditionsTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~SCT_ConfigurationConditionsTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
| Can the tool report about the given component? (chip, module...) More...
|
|
virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Is the detector element good? More...
|
|
virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
|
virtual bool | isGood (const IdentifierHash &hashId) const override |
| Is it good?, using wafer hash. More...
|
|
virtual bool | isGood (const IdentifierHash &hashId, const EventContext &ctx) const override |
|
virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
|
virtual const std::set< Identifier > * | badModules (const EventContext &ctx) const override |
| List of bad modules. More...
|
|
virtual const std::set< Identifier > * | badModules () const override |
|
virtual void | badStrips (std::set< Identifier > &strips, const EventContext &ctx, bool ignoreBadModules=false, bool ignoreBadChips=false) const override |
| List of bad strips. More...
|
|
virtual void | badStrips (std::set< Identifier > &strips, bool ignoreBadModules=false, bool ignoreBadChips=false) const override |
|
virtual void | badStrips (const Identifier &moduleId, std::set< Identifier > &strips, const EventContext &ctx, bool ignoreBadModules=false, bool ignoreBadChips=false) const override |
| List of bad strips for a given module. More...
|
|
virtual void | badStrips (const Identifier &moduleId, std::set< Identifier > &strips, bool ignoreBadModules=false, bool ignoreBadChips=false) const override |
|
virtual std::pair< bool, bool > | badLinks (const IdentifierHash &hash, const EventContext &ctx) const override |
| List of bad links. More...
|
|
virtual std::pair< bool, bool > | badLinks (const IdentifierHash &hash) const override |
|
virtual const std::map< IdentifierHash, std::pair< bool, bool > > * | badLinks (const EventContext &ctx) const override |
| Bad links for a given module. More...
|
|
virtual const std::map< IdentifierHash, std::pair< bool, bool > > * | badLinks () const override |
|
virtual const std::map< Identifier, unsigned int > * | badChips (const EventContext &ctx) const override |
| List of bad chips. More...
|
|
virtual const std::map< Identifier, unsigned int > * | badChips () const override |
|
virtual unsigned int | badChips (const Identifier &moduleId, const EventContext &ctx) const override |
| Bad chips for a given module. More...
|
|
virtual unsigned int | badChips (const Identifier &moduleId) const override |
|
virtual int | getChip (const Identifier &stripId, const EventContext &ctx) const override |
| Get the chip number containing a particular strip. More...
|
|
virtual int | getChip (const Identifier &stripId) const override |
|
Service that keeps track of configuration conditions
Tool which reads SCT_Configuration from the database Deals with bad modules, bad links, strips out of the readout and bad strips
Definition at line 41 of file SCT_ConfigurationConditionsTool.h.
◆ anonymous enum
◆ SCT_ConfigurationConditionsTool()
SCT_ConfigurationConditionsTool::SCT_ConfigurationConditionsTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_ConfigurationConditionsTool()
virtual SCT_ConfigurationConditionsTool::~SCT_ConfigurationConditionsTool |
( |
| ) |
|
|
virtualdefault |
◆ badChips() [1/4]
const std::map< Identifier, unsigned int > * SCT_ConfigurationConditionsTool::badChips |
( |
| ) |
const |
|
overridevirtual |
◆ badChips() [2/4]
const std::map< Identifier, unsigned int > * SCT_ConfigurationConditionsTool::badChips |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ badChips() [3/4]
unsigned int SCT_ConfigurationConditionsTool::badChips |
( |
const Identifier & |
moduleId | ) |
const |
|
overridevirtual |
◆ badChips() [4/4]
unsigned int SCT_ConfigurationConditionsTool::badChips |
( |
const Identifier & |
moduleId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Bad chips for a given module.
Definition at line 345 of file SCT_ConfigurationConditionsTool.cxx.
348 if (condData==
nullptr) {
349 ATH_MSG_ERROR(
"In badChips, SCT_ConfigurationCondData pointer cannot be retrieved");
353 return condData->getBadChips(moduleId);
◆ badLinks() [1/4]
const std::map< IdentifierHash, std::pair< bool, bool > > * SCT_ConfigurationConditionsTool::badLinks |
( |
| ) |
const |
|
overridevirtual |
◆ badLinks() [2/4]
const std::map< IdentifierHash, std::pair< bool, bool > > * SCT_ConfigurationConditionsTool::badLinks |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ badLinks() [3/4]
std::pair< bool, bool > SCT_ConfigurationConditionsTool::badLinks |
( |
const IdentifierHash & |
hash | ) |
const |
|
overridevirtual |
◆ badLinks() [4/4]
std::pair< bool, bool > SCT_ConfigurationConditionsTool::badLinks |
( |
const IdentifierHash & |
hash, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
List of bad links.
Definition at line 298 of file SCT_ConfigurationConditionsTool.cxx.
302 if (condData==
nullptr) {
303 ATH_MSG_ERROR(
"In badLinks, SCT_ConfigurationCondData pointer cannot be retrieved");
304 return std::pair<bool, bool>{
false,
false};
307 return condData->areBadLinks(
hash);
◆ badModules() [1/2]
const std::set< Identifier > * SCT_ConfigurationConditionsTool::badModules |
( |
| ) |
const |
|
overridevirtual |
◆ badModules() [2/2]
const std::set< Identifier > * SCT_ConfigurationConditionsTool::badModules |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ badStrips() [1/4]
void SCT_ConfigurationConditionsTool::badStrips |
( |
const Identifier & |
moduleId, |
|
|
std::set< Identifier > & |
strips, |
|
|
bool |
ignoreBadModules = false , |
|
|
bool |
ignoreBadChips = false |
|
) |
| const |
|
overridevirtual |
◆ badStrips() [2/4]
void SCT_ConfigurationConditionsTool::badStrips |
( |
const Identifier & |
moduleId, |
|
|
std::set< Identifier > & |
strips, |
|
|
const EventContext & |
ctx, |
|
|
bool |
ignoreBadModules = false , |
|
|
bool |
ignoreBadChips = false |
|
) |
| const |
|
overridevirtual |
List of bad strips for a given module.
Definition at line 267 of file SCT_ConfigurationConditionsTool.cxx.
269 if (condData==
nullptr) {
270 ATH_MSG_ERROR(
"In badStrips, SCT_ConfigurationCondData pointer cannot be retrieved");
275 if (ignoreBadModules) {
277 if (condData->isBadModuleId(moduleId))
return;
280 for (
const Identifier& badStripId: *(condData->getBadStripIds())) {
281 if (ignoreBadChips) {
283 const int chip{
getChip(badStripId)};
285 unsigned int chipStatusWord{condData->getBadChips(moduleId)};
286 if ((chipStatusWord & (1 << chip)) != 0)
continue;
◆ badStrips() [3/4]
void SCT_ConfigurationConditionsTool::badStrips |
( |
std::set< Identifier > & |
strips, |
|
|
bool |
ignoreBadModules = false , |
|
|
bool |
ignoreBadChips = false |
|
) |
| const |
|
overridevirtual |
◆ badStrips() [4/4]
void SCT_ConfigurationConditionsTool::badStrips |
( |
std::set< Identifier > & |
strips, |
|
|
const EventContext & |
ctx, |
|
|
bool |
ignoreBadModules = false , |
|
|
bool |
ignoreBadChips = false |
|
) |
| const |
|
overridevirtual |
List of bad strips.
Definition at line 361 of file SCT_ConfigurationConditionsTool.cxx.
363 if (condData==
nullptr) {
364 ATH_MSG_ERROR(
"In badStrips, SCT_ConfigurationCondData pointer cannot be retrieved");
368 if (!ignoreBadModules and !ignoreBadChips) {
369 const std::set<Identifier>& bad_strips = *condData->getBadStripIds();
370 std::copy(bad_strips.begin(), bad_strips.end(), std::inserter(strips,strips.begin()));
373 for (
const Identifier& badStripId: *(condData->getBadStripIds())) {
376 if (ignoreBadModules) {
377 if (condData->isBadModuleId(moduleId))
continue;
380 if (ignoreBadChips) {
381 const int chip{
getChip(badStripId)};
383 unsigned int chipStatusWord{condData->getBadChips(moduleId)};
384 if ((chipStatusWord & (1 << chip)) != 0)
continue;
387 strips.insert(badStripId);
◆ canReportAbout()
◆ getChip() [1/2]
int SCT_ConfigurationConditionsTool::getChip |
( |
const Identifier & |
stripId | ) |
const |
|
overridevirtual |
◆ getChip() [2/2]
int SCT_ConfigurationConditionsTool::getChip |
( |
const Identifier & |
stripId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
◆ getCondData()
◆ getDetectorElement()
◆ getDetectorElementStatus()
Definition at line 72 of file SCT_ConfigurationConditionsTool.cxx.
75 if (not condDataHandle.isValid() ) {
83 const std::set<Identifier>* bad_wafers = condData->
getBadWaferIds();
91 constexpr
unsigned int N_SIDES = 2;
94 if (chip_status.empty()) {
95 chip_status.resize(
status.size(), all_flags_set);
97 for (
const Identifier &a_bad_wafer : *bad_wafers) {
102 const std::set<Identifier>* bad_modules = condData->getBadModuleIds();
104 for (
const Identifier &a_bad_module : *bad_modules) {
105 for (
unsigned int side_i=0; side_i<
N_SIDES; ++side_i) {
112 chip_status.at(
hash.value()) = 0;
117 if (condData->getBadChips()) {
118 std::array<unsigned int,N_SIDES> side_mask{0x3F, 0xFC0};
119 for (
const std::pair<const Identifier, unsigned int> &a_bad_module : *(condData->getBadChips()) ) {
120 for (
unsigned int side_i=0; side_i<
N_SIDES; ++side_i) {
121 if (a_bad_module.second & side_mask[side_i]) {
134 if (condData->getBadStripIds()) {
135 std::vector<std::vector<unsigned short> > &bad_strips = element_status.
getBadCells();
136 if (bad_strips.empty()) {
137 bad_strips.resize(
status.size());
139 for (
const Identifier &bad_strip : *(condData->getBadStripIds()) ) {
145 std::vector<unsigned short> &bad_module_strips_combined = bad_strips.at(
hash);
146 std::vector<unsigned short>::const_iterator iter = std::lower_bound(bad_module_strips_combined.begin(),bad_module_strips_combined.end(),strip_i);
147 if (iter == bad_module_strips_combined.end() || *iter != strip_i) {
148 bad_module_strips_combined.insert( iter, strip_i);
◆ initialize()
StatusCode SCT_ConfigurationConditionsTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isGood() [1/4]
◆ isGood() [2/4]
◆ isGood() [3/4]
◆ isGood() [4/4]
◆ isGoodChip()
bool SCT_ConfigurationConditionsTool::isGoodChip |
( |
const Identifier & |
stripId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Is a chip with this Identifier good?
Definition at line 173 of file SCT_ConfigurationConditionsTool.cxx.
177 if (not moduleId.is_valid()) {
178 ATH_MSG_WARNING(
"moduleId obtained from stripId " << stripId <<
" is invalid.");
183 const unsigned int v_badChips{
badChips(moduleId, ctx)};
191 if (v_badChips==0)
return true;
198 if ((
side==0 and (v_badChips & 0x3F)==0) or (
side==1 and (v_badChips & 0xFC0)==0))
return true;
200 int chip{
getChip(stripId, ctx)};
201 if (chip<0 or chip>=12) {
207 const bool badChip{
static_cast<bool>(v_badChips & (1<<chip))};
209 return (not badChip);
◆ isStripInBadModule()
◆ isWaferInBadModule()
bool SCT_ConfigurationConditionsTool::isWaferInBadModule |
( |
const Identifier & |
waferId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Is a wafer in a bad module.
Definition at line 224 of file SCT_ConfigurationConditionsTool.cxx.
226 if (condData==
nullptr) {
227 ATH_MSG_ERROR(
"In isWaferInBadModule, SCT_ConfigurationCondData pointer cannot be retrieved");
232 return condData->isBadModuleId(moduleId);
◆ m_checkStripsInsideModules
BooleanProperty SCT_ConfigurationConditionsTool::m_checkStripsInsideModules {this, "checkStripsInsideModule", true, " Do we want to check if a strip is bad because it is inside a bad module"} |
|
private |
◆ m_condKey
◆ m_pHelper
const SCT_ID* SCT_ConfigurationConditionsTool::m_pHelper {nullptr} |
|
private |
◆ m_SCTDetEleCollKey
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const std::vector< bool > & getElementStatus() const
constexpr unsigned int getChip(unsigned int side, bool swap, unsigned int strip)
Get the physical chip ID for the given strip.
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
constexpr unsigned int N_SIDES
const std::vector< std::vector< unsigned short > > & getBadCells() const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
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.
bool isBadModuleId(const Identifier &moduleId) const
Check if a module identifier is bad one.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
size_type wafer_hash_max(void) const
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
#define ATH_MSG_WARNING(x)
int strip(const Identifier &id) const
const std::vector< ChipFlags_t > & getElementChipStatus() const
int eta_module(const Identifier &id) const
unsigned short ChipFlags_t
int side(const Identifier &id) const
constexpr unsigned int getGeometricalFromPhysicalChipFlags(unsigned int side, bool swap, unsigned int physical_chip_flags)
Convert a word in which each bit represents the status of a certain physical chip to a word in which ...
const std::set< Identifier > * getBadWaferIds() const
Get all bad wafer identifiers.
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
void addDependency(const EventIDRange &range)