ATLAS Offline Software
SCTErrMonAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "SCTErrMonAlg.h"
6 
10 #include "StoreGate/ReadHandle.h"
11 
12 using namespace SCT_Monitoring;
13 
14 SCTErrMonAlg::SCTErrMonAlg(const std::string& name, ISvcLocator* pSvcLocator)
15  :AthMonitorAlgorithm(name,pSvcLocator){
16  for (int reg{0}; reg<N_REGIONS_INC_GENERAL; reg++) {
17  m_nMaskedLinks[reg] = 0;
18  }
19 }
20 
22  ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID"));
23  ATH_CHECK(m_byteStreamErrTool.retrieve());
24  ATH_CHECK(m_configurationTool.retrieve());
25  if (m_useDCS) ATH_CHECK(m_dcsTool.retrieve());
26  else m_dcsTool.disable();
27  ATH_CHECK(m_pSummaryTool.retrieve());
28  ATH_CHECK(m_flaggedTool.retrieve());
29  // Retrieve geometrical information
30  const InDetDD::SCT_DetectorManager* sctManager{nullptr};
31  ATH_CHECK(detStore()->retrieve(sctManager, "SCT"));
32  const unsigned int maxHash{static_cast<unsigned int>(m_pSCTHelper->wafer_hash_max())}; // 8176
33  moduleGeo_t moduleGeo; // dummy value
34  m_geo.resize(maxHash, moduleGeo);
35  double rz{0.};
36  const double deltaZ{0.};
37  for (unsigned int i{0}; i<maxHash; i++) {
38  IdentifierHash hash{i};
39  const InDetDD::SiDetectorElement* newElement{sctManager->getDetectorElement(hash)};
40  newElement->getEtaPhiRegion(deltaZ,
41  moduleGeo.first.first, moduleGeo.first.second,
42  moduleGeo.second.first, moduleGeo.second.second,
43  rz);
44  m_geo[i] = moduleGeo;
45  }
46 
48 }
49 
50 StatusCode SCTErrMonAlg::fillHistograms(const EventContext& ctx) const {
52  if (not pEvent.isValid()) {
53  ATH_MSG_WARNING("Could not retrieve event info!");
54  return StatusCode::SUCCESS;
55  }
56 
57  bool sctFlag{false};
58  if (pEvent->errorState(xAOD::EventInfo::SCT) == xAOD::EventInfo::Error) {
59  sctFlag = true;
60  }
63  auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
64  auto is1DAcc{Monitored::Scalar<bool>("is1D", true)};
65  auto sctFlagAcc{Monitored::Scalar<bool>("sctFlag", sctFlag)};
66  fill("SCTErrMonitor", lumiBlockAcc, is1DAcc, sctFlagAcc);
67 
68  // Check wafers with many fired strips (event dependent) using SCT_FlaggedConditionTool.
69  std::array<int, N_REGIONS_INC_GENERAL> flaggedWafersIndices
71  std::array<int, N_REGIONS_INC_GENERAL> nFlaggedWafers{};
72  nFlaggedWafers.fill(0);
73  const unsigned int wafer_hash_max{static_cast<unsigned int>(m_pSCTHelper->wafer_hash_max())};
74  for (unsigned int iHash{0}; iHash<wafer_hash_max; iHash++) {
75  const IdentifierHash hash{iHash};
76  if (not m_flaggedTool->isGood(hash)) {
77  const Identifier wafer_id{m_pSCTHelper->wafer_id(hash)};
78  const unsigned barrel_ec{bec2Index(m_pSCTHelper->barrel_ec(wafer_id))};
79  nFlaggedWafers[barrel_ec]++;
80  nFlaggedWafers[GENERAL_INDEX]++;
81  }
82  }
83  auto flaggedWwafersIndicesAcc{Monitored::Collection("flaggedWafersIndices", flaggedWafersIndices)};
84  auto nFlaggedWafersAcc{Monitored::Collection("nFlaggedWafers", nFlaggedWafers)};
85  fill("SCTErrMonitor", flaggedWwafersIndicesAcc, nFlaggedWafersAcc);
86 
87  if (sctFlag) {
88  return StatusCode::SUCCESS;
89  }
90 
91  // The numbers of disabled modules, links, strips do not change during a run.
92  { //scope for lock
93  std::lock_guard<std::mutex> glock{m_mutex};
97  }
98  }
99 
101 
103  // TODO: fill only at the end of a LB
104  if (m_makeConfHisto) {
105  int moduleOut{0};
108  for (; waferIterator not_eq waferEnd; ++waferIterator) {
109  Identifier waferId{*waferIterator};
110  int layer{m_pSCTHelper->layer_disk(waferId)};
111  int side{m_pSCTHelper->side(waferId)};
112  int eta{m_pSCTHelper->eta_module(waferId)};
113  int phi{m_pSCTHelper->phi_module(waferId)};
114  int barrel_ec{m_pSCTHelper->barrel_ec(waferId)};
115 
116  int reg{BARREL_INDEX};
117  if (barrel_ec == ENDCAP_A) reg = ENDCAP_A_INDEX;
118  if (barrel_ec == ENDCAP_C) reg = ENDCAP_C_INDEX;
119 
120  int IN{m_configurationTool->isGood(waferId, InDetConditions::SCT_SIDE) ? 0 : 1};
121  if (m_pSCTHelper->side(waferId) == 0) { // Use only side 0 to check module level
122  if (IN == 1) {
123  moduleOut++;
124  auto mEtaAcc{Monitored::Scalar<int>("eta_out", eta)};
125  auto mPhiAcc{Monitored::Scalar<int>("phi_out", phi)};
126  auto mOutAcc{Monitored::Scalar<int>(std::string("modulemap")+subDetNameShort[reg].Data()+std::to_string(layer)+"_"+std::to_string(side), IN)};
127  fill("SCTErrMonitor", mEtaAcc, mPhiAcc, mOutAcc);
128  }
129  }
130  }
131  auto moduleOutBinAcc{Monitored::Scalar<int>("moduleOutBin", 0)};
132  auto moduleOutAcc{Monitored::Scalar<int>("moduleOut", moduleOut)};
133  fill("SCTErrMonitor", moduleOutBinAcc, moduleOutAcc);
134  }
135 
136  return StatusCode::SUCCESS;
137 }
138 
142  std::array<int, N_REGIONS_INC_GENERAL> maskedLinksBin{ENDCAP_C_INDEX, BARREL_INDEX, ENDCAP_A_INDEX, GENERAL_INDEX};
143  auto maskedLinksBinAcc{Monitored::Collection("maskedLinksBin", maskedLinksBin)};
144  auto maskedLinksAcc{Monitored::Collection("maskedLinks", m_nMaskedLinks)};
145  fill("SCTErrMonitor", maskedLinksBinAcc, maskedLinksAcc);
146 
147  return StatusCode::SUCCESS;
148 }
149 
151 SCTErrMonAlg::fillConfigurationDetails(const EventContext& ctx) const {
152  ATH_MSG_DEBUG("Inside fillConfigurationDetails()");
153  unsigned int nBadMods{static_cast<unsigned int>(m_configurationTool->badModules()->size())}; // bad modules
154  const std::map<IdentifierHash, std::pair<bool, bool>>* badLinks{m_configurationTool->badLinks(ctx)}; // bad links
155  unsigned int nBadLink0{0}, nBadLink1{0}, nBadLinkBoth{0};
156  for (const std::pair<const IdentifierHash, std::pair<bool, bool>>& link: *badLinks) {
157  std::pair<bool, bool> status{link.second};
158  if ((status.first == false) and (status.second == true)) {
159  ++nBadLink0;
160  }
161  if ((status.first == true) and (status.second == false)) {
162  ++nBadLink1;
163  }
164  if ((status.first == false) and (status.second == false)) {
165  ++nBadLinkBoth;
166  }
167  }
168 
169  const std::map<Identifier, unsigned int>* badChips{m_configurationTool->badChips(ctx)}; // bad chips
170  unsigned int nBadChips{0};
171  for (const std::pair<const Identifier, unsigned int>& chip : *badChips) {
172  unsigned int status{chip.second};
173  for (unsigned int i{0}; i < CHIPS_PER_MODULE; i++) {
174  nBadChips += ((status & (1 << i)) == 0 ? 0 : 1);
175  }
176  }
177 
178  std::set<Identifier> badStripsAll; // bad strips
179  m_configurationTool->badStrips(badStripsAll, ctx);
180  unsigned int nBadStrips{static_cast<unsigned int>(badStripsAll.size())};
181 
182  std::set<Identifier> badStripsExclusive; // bad strips w/o bad modules and chips
183  m_configurationTool->badStrips(badStripsExclusive, ctx, true, true);
184  int nBadStripsExclusive{static_cast<int>(badStripsExclusive.size())};
185  int nBadStripsExclusiveBEC[N_REGIONS] = {
186  0, 0, 0
187  };
188  for (const Identifier& strip: badStripsExclusive) {
189  int bec{m_pSCTHelper->barrel_ec(strip)};
190  nBadStripsExclusiveBEC[bec2Index(bec)] += 1;
191  }
192 
194  std::vector<int> vDetailedConfBin(ConfbinsDetailed);
195  std::vector<double> vNBad(ConfbinsDetailed);
196  for (unsigned int i{0}; i<ConfbinsDetailed; i++) {
197  vDetailedConfBin[i] = i;
198  if (i==0) vNBad[i] = nBadMods;
199  else if (i==1) vNBad[i] = nBadLink0;
200  else if (i==2) vNBad[i] = nBadLink1;
201  else if (i==3) vNBad[i] = nBadChips;
202  else if (i==4) vNBad[i] = static_cast<double>(nBadStripsExclusive) / 100.;
203  }
204  auto detailedConfBinAcc{Monitored::Collection("detailedConfBin", vDetailedConfBin)};
205  auto nBadAcc{Monitored::Collection("nBad", vNBad)};
206  fill("SCTErrMonitor", detailedConfBinAcc, nBadAcc);
207 
208  ATH_MSG_DEBUG("-----------------------------------------------------------------------");
209  ATH_MSG_DEBUG("Number of bad modules = " << nBadMods);
210  ATH_MSG_DEBUG("Number of bad link 0 = " << nBadLink0);
211  ATH_MSG_DEBUG("Number of bad link 1 = " << nBadLink1);
212  ATH_MSG_DEBUG("Number of bad link both = " << nBadLinkBoth);
213  ATH_MSG_DEBUG("Number of bad chips = " << nBadChips);
214  ATH_MSG_DEBUG("Number of bad strips = " << nBadStrips);
215  ATH_MSG_DEBUG("Number of bad strips exclusive = " << nBadStripsExclusive);
216  ATH_MSG_DEBUG("Number of bad strips exclusive (ECC, B, ECA) = "
217  << nBadStripsExclusiveBEC[ENDCAP_C_INDEX] << ", "
218  << nBadStripsExclusiveBEC[BARREL_INDEX] << ", "
219  << nBadStripsExclusiveBEC[ENDCAP_A_INDEX] << ", ");
220  ATH_MSG_DEBUG("-----------------------------------------------------------------------");
221 
222  return StatusCode::SUCCESS;
223 }
224 
226 SCTErrMonAlg::fillByteStreamErrors(const EventContext& ctx) const {
228  if (not pEvent.isValid()) {
229  ATH_MSG_WARNING("Could not retrieve event info!");
230  return StatusCode::SUCCESS;
231  }
232 
233  //--- Fill 1D histograms (vs LumiBlock) for each BS
234  for (int errType{0}; errType < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++errType) {
235  int nBSErrors{0};
236  // get number of BS errors
237  numByteStreamErrors(m_byteStreamErrTool->getErrorSet(errType, ctx), nBSErrors);
239  auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
240  auto nBSErrorsAcc{Monitored::Scalar<int>("n_"+SCT_ByteStreamErrors::ErrorTypeDescription[errType], nBSErrors)};
241  fill("SCTErrMonitor", lumiBlockAcc, nBSErrorsAcc);
242  }
243 
244  categoryErrorMap_t categoryErrorMap;
245  std::array<int, N_REGIONS_INC_GENERAL> nMaskedLinks{};
246  nMaskedLinks.fill(0);
247  for (int errType{0}; errType < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++errType) {
248  fillByteStreamErrorsHelper(m_byteStreamErrTool->getErrorSet(errType, ctx), errType, categoryErrorMap, nMaskedLinks);
249  }
250  for (int reg{0}; reg<N_REGIONS_INC_GENERAL; reg++) {
251  m_nMaskedLinks[reg] = nMaskedLinks[reg];
252  }
254  std::vector<int> vEta;
255  std::vector<int> vPhi;
256  std::vector<bool> vHasError;
257  for (int errCate{0}; errCate < CategoryErrors::N_ERRCATEGORY; ++errCate) {
258  auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
259  auto nCategoryErrorsAcc{Monitored::Scalar<int>("n_"+CategoryErrorsNames[errCate],
260  categoryErrorMap.count(errCate))};
261  fill("SCTErrMonitor", lumiBlockAcc, nCategoryErrorsAcc);
262 
263  for (int iReg{0}; iReg<N_REGIONS; iReg++) {
264  const int maxLayer{iReg==BARREL_INDEX ? N_BARRELSx2 : N_ENDCAPSx2};
265  const int firstEta{iReg==BARREL_INDEX ? FIRST_ETA_BIN : FIRST_ETA_BIN_EC};
266  const int lastEta{iReg==BARREL_INDEX ? LAST_ETA_BIN : LAST_ETA_BIN_EC};
267  const int firstPhi{iReg==BARREL_INDEX ? FIRST_PHI_BIN : FIRST_PHI_BIN_EC};
268  const int lastPhi{iReg==BARREL_INDEX ? LAST_PHI_BIN : LAST_PHI_BIN_EC};
269  const size_t size{static_cast<size_t>((lastEta-firstEta+1)*(lastPhi-firstPhi+1))};
270  for (int iLay{0}; iLay<maxLayer; iLay++) {
271  vEta.resize(size);
272  vPhi.resize(size);
273  vHasError.resize(size);
274  for (int eta{firstEta}; eta<=lastEta; eta++) {
275  const int iEta{eta-firstEta};
276  for (int phi{firstPhi}; phi<=lastPhi; phi++) {
277  const int iPhi{phi-firstPhi};
278  size_t index{static_cast<size_t>(iEta*(lastPhi-firstPhi+1)+iPhi)};
279  vEta[index] = eta;
280  vPhi[index] = phi;
281  vHasError[index] = categoryErrorMap[errCate][iReg][iLay][iEta][iPhi];
282  }
283  }
284  auto etaAcc{Monitored::Collection("eta", vEta)};
285  auto phiAcc{Monitored::Collection("phi", vPhi)};
286  auto hasErrorAcc{Monitored::Collection("hasError_"+CategoryErrorsNames[errCate]+"_"+subDetNameShort[iReg].Data()+"_"+std::to_string(iLay/2)+"_"+std::to_string(iLay%2),
287  vHasError)};
288  fill("SCTErrMonitor", etaAcc, phiAcc, hasErrorAcc);
289 
290  if (m_doOnline and CategoryErrorsNames[errCate] == "Errors"){
291  auto hasErrorRecentAcc{Monitored::Collection("hasError_"+CategoryErrorsNames[errCate]+"_recent_"+subDetNameShort[iReg].Data()+"_"+std::to_string(iLay/2)+"_"+std::to_string(iLay%2),vHasError)};
292  fill("SCTErrMonitor", etaAcc, phiAcc, hasErrorRecentAcc);
293  }
294  }
295  }
296  }
297 
298 
299  bool doCoverage = false;
300  {
301  std::lock_guard<std::mutex> lock(m_mutex);
302  if (not (m_procLB.find(pEvent->lumiBlock()) != m_procLB.end() and m_coverageCheckOnlyFirtsEventOfLB) ) {
303  m_procLB.insert(pEvent->lumiBlock());
304  doCoverage = m_coverageCheck;
305  }
306  }
307 
308  // Coverage check is time consuming and run at the first event of each lumi block.
309  if (doCoverage) {
310  ATH_MSG_DEBUG("Detector Coverage calculation starts" );
311 
312  static const std::string names[numberOfProblemForCoverage] = {
313  "SCT_AllRegion", // All
314  "SCT_MapOfDisabledLinks", // Disabled
315  "SCT_MapOfLinksWithBadLinkLevelErrors", // BadLinkLevelError
316  "SCT_MapOfLinksWithBadRODLevelErrors", // BadRODLevelError
317  "SCT_MapOfLinksWithBadErrors", // BadError
318  "SCT_MapOfLinksWithPSTrip", // PSTrip (DCS)
319  "SCT_MapOfLinksWithAnyProbelm" // Summary
320  };
321  static const std::string titles[numberOfProblemForCoverage] = {
322  "Map of All Region", // All
323  "Map of Disabled Links", // Disabled
324  "Map of Links with bad LinkLevelErrors", // BadLinkLevelError
325  "Map of Links with Bad RODLevelErrors", // BadRODLevelError
326  "Map of Links with Bad Errors", // BadError
327  "Map of Links Affected by PS Trip", // PSTrip (DCS)
328  "Map of Links with Any Bad Problem" // Summary
329  };
330 
331  std::lock_guard<std::mutex> lock{m_mutex};
332  CacheEntry* ent{m_cache.get(ctx)};
333  if (ent->m_evt!=ctx.evt()) { // New event in this slot
334  if (ent->m_mapSCT.empty()) { // First event
335  for (int iProblem{0}; iProblem<numberOfProblemForCoverage; iProblem++) {
336  ent->m_mapSCT.emplace_back(names[iProblem].c_str(), titles[iProblem].c_str(),
338  ent->m_mapSCT[iProblem].GetXaxis()->SetTitle("#eta");
339  ent->m_mapSCT[iProblem].GetYaxis()->SetTitle("#phi");
340  }
341  } else {
342  for (int iProblem{0}; iProblem<numberOfProblemForCoverage; iProblem++) {
343  ent->m_mapSCT[iProblem].Reset(); // Initialize histograms every event
344  }
345  }
346  ent->m_evt = ctx.evt();
347  }
348 
349  std::set<IdentifierHash> sctHash[numberOfProblemForCoverage]{{}};
350  disabledSCT(sctHash[disabled]);
351  errorSCT(sctHash[badLinkError], sctHash[badRODError], sctHash[badError]);
352  summarySCT(sctHash[allRegion], sctHash[summary]);
353  float psTripModules{0.};
354  psTripDCSSCT(sctHash[psTripDCS], psTripModules);
355 
356  sctHash[summary].clear();
357  sctHash[summary].insert(sctHash[disabled].begin(),sctHash[disabled].end()); // disabled
358  sctHash[summary].insert(sctHash[badError].begin(),sctHash[badError].end()); // bad error = bad link error + bad rod error
359  sctHash[summary].insert(sctHash[psTripDCS].begin(),sctHash[psTripDCS].end()); // pstrip
360 
361  for (int iProblem{0}; iProblem<numberOfProblemForCoverage; iProblem++) {
362  for (const IdentifierHash& hash: sctHash[iProblem]) {
363  fillWafer(m_geo[hash], ent->m_mapSCT[iProblem]);
364  }
365 
366  if (iProblem==allRegion) continue;
367 
368  double detector_coverage{calculateDetectorCoverage(ent->m_mapSCT[iProblem], ent->m_mapSCT[allRegion])};
370  auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
371  auto detectorCoverageAcc{Monitored::Scalar<double>("detectorCoverage"+coverageVarNames[iProblem], detector_coverage)};
372  fill("SCTErrMonitor", lumiBlockAcc, detectorCoverageAcc);
373  }
374 
376  // Modules affected by PS Tirp
377  auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
378  auto psTripModulesAcc{Monitored::Scalar<int>("psTripModules", psTripModules)};
379  fill("SCTErrMonitor", lumiBlockAcc, psTripModulesAcc);
380  }
381 
382  return StatusCode::SUCCESS;
383 }
384 
385 int
386 SCTErrMonAlg::fillByteStreamErrorsHelper(const std::set<IdentifierHash>& errors,
387  int err_type,
388  categoryErrorMap_t& categoryErrorMap,
389  std::array<int, N_REGIONS_INC_GENERAL>& nMaskedLinks) const {
390  //--- Check categories of the BS error
391  std::array<bool, CategoryErrors::N_ERRCATEGORY> b_category{};
392  b_category.fill(false);
393 
394  // Error summaries
395  b_category[CategoryErrors::MASKEDLINKALL] =
396  (err_type == SCT_ByteStreamErrors::MaskedLink) or (err_type == SCT_ByteStreamErrors::MaskedROD);
397 
398  b_category[CategoryErrors::SUMMARY] = true;
399 
400  b_category[CategoryErrors::BADERR] = false;
401  for (SCT_ByteStreamErrors::ErrorType tmpBadError: SCT_ByteStreamErrors::BadErrors) {
402  if (err_type == tmpBadError) {
403  b_category[CategoryErrors::BADERR] = true;
404  break;
405  }
406  }
407 
408  b_category[CategoryErrors::LINKLEVEL] = false;
409  for (SCT_ByteStreamErrors::ErrorType linkLevelError: SCT_ByteStreamErrors::LinkLevelErrors) {
410  if (err_type == linkLevelError) {
411  b_category[CategoryErrors::LINKLEVEL] = true;
412  break;
413  }
414  }
415 
416  b_category[CategoryErrors::RODLEVEL] = false;
417  for (SCT_ByteStreamErrors::ErrorType rodLevelError: SCT_ByteStreamErrors::RodLevelErrors) {
418  if (err_type == rodLevelError) {
419  b_category[CategoryErrors::RODLEVEL] = true;
420  break;
421  }
422  }
423 
424  b_category[CategoryErrors::MASKEDCHIP] =
425  (err_type == SCT_ByteStreamErrors::TempMaskedChip0) or (err_type == SCT_ByteStreamErrors::TempMaskedChip1) or
426  (err_type == SCT_ByteStreamErrors::TempMaskedChip2) or (err_type == SCT_ByteStreamErrors::TempMaskedChip3) or
427  (err_type == SCT_ByteStreamErrors::TempMaskedChip4) or (err_type == SCT_ByteStreamErrors::TempMaskedChip5);
428 
429  // Each error
430  b_category[CategoryErrors::BYTESTREAMPARSEERROR] = (err_type == SCT_ByteStreamErrors::ByteStreamParseError);
431  b_category[CategoryErrors::TIMEOUTERROR] = (err_type == SCT_ByteStreamErrors::TimeOutError);
433  b_category[CategoryErrors::LVL1IDERROR] = (err_type == SCT_ByteStreamErrors::LVL1IDError);
434  b_category[CategoryErrors::PREAMBLEERROR] = (err_type == SCT_ByteStreamErrors::PreambleError);
435  b_category[CategoryErrors::FORMATTERERROR] = (err_type == SCT_ByteStreamErrors::FormatterError);
436  b_category[CategoryErrors::TRAILERERROR] = (err_type == SCT_ByteStreamErrors::TrailerError);
437  b_category[CategoryErrors::TRAILEROVERFLOWERROR] = (err_type == SCT_ByteStreamErrors::TrailerOverflowError);
438  b_category[CategoryErrors::HEADERTRAILERLIMITERROR] = (err_type == SCT_ByteStreamErrors::HeaderTrailerLimitError);
439  b_category[CategoryErrors::ABCDERROR] = (err_type == SCT_ByteStreamErrors::ABCDError);
440  b_category[CategoryErrors::RAWERROR] = (err_type == SCT_ByteStreamErrors::RawError);
441  b_category[CategoryErrors::MASKEDLINK] = (err_type == SCT_ByteStreamErrors::MaskedLink);
442  b_category[CategoryErrors::RODCLOCKERROR] = (err_type == SCT_ByteStreamErrors::RODClockError);
443  b_category[CategoryErrors::TRUNCATEDROD] = (err_type == SCT_ByteStreamErrors::TruncatedROD);
444  b_category[CategoryErrors::ROBFRAGMENTERROR] = (err_type == SCT_ByteStreamErrors::ROBFragmentError);
445  b_category[CategoryErrors::MISSINGLINKHEADERERROR] = (err_type == SCT_ByteStreamErrors::MissingLinkHeaderError);
446  b_category[CategoryErrors::MASKEDROD] = (err_type == SCT_ByteStreamErrors::MaskedROD);
447  b_category[CategoryErrors::ABCDERROR_CHIP0] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip0);
448  b_category[CategoryErrors::ABCDERROR_CHIP1] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip1);
449  b_category[CategoryErrors::ABCDERROR_CHIP2] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip2);
450  b_category[CategoryErrors::ABCDERROR_CHIP3] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip3);
451  b_category[CategoryErrors::ABCDERROR_CHIP4] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip4);
452  b_category[CategoryErrors::ABCDERROR_CHIP5] = (err_type == SCT_ByteStreamErrors::ABCDError_Chip5);
453  b_category[CategoryErrors::ABCDERROR_ERROR1] = (err_type == SCT_ByteStreamErrors::ABCDError_Error1);
454  b_category[CategoryErrors::ABCDERROR_ERROR2] = (err_type == SCT_ByteStreamErrors::ABCDError_Error2);
455  b_category[CategoryErrors::ABCDERROR_ERROR4] = (err_type == SCT_ByteStreamErrors::ABCDError_Error4);
456  b_category[CategoryErrors::TEMPMASKEDCHIP0] = (err_type == SCT_ByteStreamErrors::TempMaskedChip0);
457  b_category[CategoryErrors::TEMPMASKEDCHIP1] = (err_type == SCT_ByteStreamErrors::TempMaskedChip1);
458  b_category[CategoryErrors::TEMPMASKEDCHIP2] = (err_type == SCT_ByteStreamErrors::TempMaskedChip2);
459  b_category[CategoryErrors::TEMPMASKEDCHIP3] = (err_type == SCT_ByteStreamErrors::TempMaskedChip3);
460  b_category[CategoryErrors::TEMPMASKEDCHIP4] = (err_type == SCT_ByteStreamErrors::TempMaskedChip4);
461  b_category[CategoryErrors::TEMPMASKEDCHIP5] = (err_type == SCT_ByteStreamErrors::TempMaskedChip5);
462  b_category[CategoryErrors::ABCDERROR_ERROR7] = (err_type == SCT_ByteStreamErrors::ABCDError_Error7);
463  b_category[CategoryErrors::ABCDERROR_INVALID] = (err_type == SCT_ByteStreamErrors::ABCDError_Invalid);
464  b_category[CategoryErrors::RODSIMULATEDDATA] = (err_type == SCT_ByteStreamErrors::RODSimulatedData);
465 
466  std::vector<int> numErrorsPerLumi[N_REGIONS];
467  if (m_doPerLumiErrors) {
468  for (int reg{0}; reg<N_REGIONS; reg++) {
469  const int nLayers{n_layers[reg]*2};
470  numErrorsPerLumi[reg].resize(nLayers, 0);
471  }
472  }
473 
474  //--- Count BS errors
475  int nerrors{0};
476  for (const auto& hash: errors) {
477  nerrors++;
478  if (not hash.is_valid()) continue;
479 
480  //--- FIll module information with BS error
481  const Identifier fitId{m_pSCTHelper->wafer_id(hash)};
482  int layer{m_pSCTHelper->layer_disk(fitId)};
483  int side{m_pSCTHelper->side(fitId)};
484  int barrel_ec{m_pSCTHelper->barrel_ec(fitId)};
485  int ieta{m_pSCTHelper->eta_module(fitId)};
486  int iphi{m_pSCTHelper->phi_module(fitId)};
487  layer = layer * 2 + side;
488  // barrel_ec = {ENDCAP_C=-2, BARREL=0, ENDCAP_A=2}
489  // -> regionIndex = {ENDCAP_C_INDEX=0, BARREL_INDEX=1, ENDCAP_A_INDEX=2, GENERAL_INDEX=3}
490  int regionIndex{GENERAL_INDEX};
491  if ((barrel_ec == BARREL) and (layer >= 0) and (layer < N_BARRELSx2)) regionIndex = BARREL_INDEX;
492  else if (barrel_ec == ENDCAP_A) regionIndex = ENDCAP_A_INDEX;
493  else if (barrel_ec == ENDCAP_C) regionIndex = ENDCAP_C_INDEX;
494 
495  // Take into account offsets
496  ieta -= ((regionIndex==BARREL_INDEX) ? FIRST_ETA_BIN : FIRST_ETA_BIN_EC);
497  iphi -= ((regionIndex==BARREL_INDEX) ? FIRST_PHI_BIN : FIRST_PHI_BIN_EC);
498 
499  if (b_category[CategoryErrors::MASKEDLINKALL]) {
500  nMaskedLinks[GENERAL_INDEX]++;
501  if (regionIndex!=GENERAL_INDEX) {
502  nMaskedLinks[regionIndex]++;
503  }
504  }
505 
506  if (m_doPerLumiErrors) numErrorsPerLumi[regionIndex][layer]++;
507 
508  for (int errCate{0}; errCate < CategoryErrors::N_ERRCATEGORY; ++errCate) {
509  if (b_category[errCate] and regionIndex!=GENERAL_INDEX) {
510  categoryErrorMap[errCate][regionIndex][layer][ieta][iphi] = true;
511  }
512  }
513  }
514 
515  if (m_doPerLumiErrors) {
516  std::size_t size{static_cast<size_t>(N_REGIONS*n_layers[ENDCAP_C_INDEX]*N_SIDES)};
517  std::vector<int> vErrorType;
518  std::vector<int> vLayerSide;
519  std::vector<float> vErrorFraction;
520  std::vector<bool> vIsEC;
521  std::vector<bool> vIsB;
522  std::vector<bool> vIsEA;
523  vErrorType.reserve(size);
524  vLayerSide.reserve(size);
525  vErrorFraction.reserve(size);
526  vIsEC.reserve(size);
527  vIsB.reserve(size);
528  vIsEA.reserve(size);
529  for (int reg{0}; reg<N_REGIONS; reg++) {
530  const int nLayers{n_layers[reg]*N_SIDES};
531  for (int layerSide{0}; layerSide<nLayers; layerSide++) {
532  float num_modules{static_cast<float>(getNumModules(index2Bec(reg), layerSide))};
533  if (num_modules==0.) continue;
534  vErrorType.push_back(err_type);
535  vLayerSide.push_back(layerSide);
536  vErrorFraction.push_back(static_cast<float>(numErrorsPerLumi[reg][layerSide])/num_modules);
537  vIsEC.push_back(reg==ENDCAP_C_INDEX);
538  vIsB.push_back(reg==BARREL_INDEX);
539  vIsEA.push_back(reg==ENDCAP_A_INDEX);
540  }
541  }
543  auto errorTypeAcc{Monitored::Collection("errorType", vErrorType)};
544  auto layerSideAcc{Monitored::Collection("layerSide", vLayerSide)};
545  auto errorFractionAcc{Monitored::Collection("errorFraction", vErrorFraction)};
546  auto isECAcc{Monitored::Collection("isEC", vIsEC)};
547  auto isBAcc{Monitored::Collection("isB", vIsB)};
548  auto isEAAcc{Monitored::Collection("isEA", vIsEA)};
549  fill("SCTErrMonitor", errorTypeAcc, layerSideAcc, errorFractionAcc, isECAcc, isBAcc, isEAAcc);
550  }
551 
552  if (b_category[CategoryErrors::SUMMARY]) return nerrors;
553  return 0;
554 }
555 
556 void
557 SCTErrMonAlg::numByteStreamErrors(const std::set<IdentifierHash>& errors, int& ntot) const {
558  for (const auto& fit: errors) {
559  if (fit.is_valid()) {
560  ntot++;
561  }
562  }
563 }
564 
565 bool SCTErrMonAlg::disabledSCT(std::set<IdentifierHash>& sctHashDisabled) const {
566  bool altered{false};
567  sctHashDisabled.clear();
568  const std::set<Identifier>* badModules{m_configurationTool->badModules()};
569 
570  for (const Identifier& badModule: *badModules) {
571  altered = true;
572  IdentifierHash hashSide0{m_pSCTHelper->wafer_hash(badModule)};
573  IdentifierHash hashSide1;
574  m_pSCTHelper->get_other_side(hashSide0, hashSide1);
575  sctHashDisabled.insert(hashSide0);
576  sctHashDisabled.insert(hashSide1);
577  }
578  return altered;
579 }
580 
581 bool SCTErrMonAlg::errorSCT(std::set<IdentifierHash>& sctHashBadLinkError,
582  std::set<IdentifierHash>& sctHashBadRODError,
583  std::set<IdentifierHash>& sctHashBadError) const {
584  sctHashBadLinkError.clear();
585  sctHashBadRODError.clear();
586  sctHashBadError.clear();
587  const EventContext& ctx{Gaudi::Hive::currentContext()};
588  //BadLinkLevelError
589  for (SCT_ByteStreamErrors::ErrorType linkLevelBadErrors: SCT_ByteStreamErrors::LinkLevelBadErrors) {
590  const std::set<IdentifierHash> sctErrors{m_byteStreamErrTool->getErrorSet( linkLevelBadErrors, ctx )};
591  for (const IdentifierHash& waferHash : sctErrors) {
592  sctHashBadLinkError.insert(waferHash);
593  }
594  }
595 
596  //BadRODLevelError
597  for (SCT_ByteStreamErrors::ErrorType RodLevelBadErrors: SCT_ByteStreamErrors::RodLevelBadErrors) {
598  const std::set<IdentifierHash> sctErrors{m_byteStreamErrTool->getErrorSet( RodLevelBadErrors, ctx )};
599  for (const IdentifierHash& waferHash : sctErrors) {
600  sctHashBadRODError.insert(waferHash);
601  }
602  }
603 
604  //BadError = BadLinkLevelError + BadRODLevelError
605  for (SCT_ByteStreamErrors::ErrorType tmpBadError: SCT_ByteStreamErrors::BadErrors) {
606  const std::set<IdentifierHash> sctErrors{m_byteStreamErrTool->getErrorSet( tmpBadError, ctx )};
607  for (const IdentifierHash& waferHash : sctErrors) {
608  sctHashBadError.insert(waferHash);
609  }
610  }
611  return true;
612 }
613 
614 // Total (SCT_ConditionsSummaryTool)
615 bool SCTErrMonAlg::summarySCT(std::set<IdentifierHash>& sctHashAll, std::set<IdentifierHash>& sctHashSummary) const {
616  bool altered{false};
617  sctHashAll.clear();//All
618  sctHashSummary.clear();
619 
620  const EventContext& ctx{Gaudi::Hive::currentContext()};
621 
622  const unsigned int maxHash{static_cast<unsigned int>(m_pSCTHelper->wafer_hash_max())}; // 8176
623  for (unsigned int i{0}; i<maxHash; i++) {
624  IdentifierHash hash{i};
625  sctHashAll.insert(hash);//All
626  if (not m_pSummaryTool->isGood(hash, ctx)) {
627  sctHashSummary.insert(hash);
628  }
629  }
630  return altered;
631 }
632 
633 // Power supply trip (SCT_DCSConditionsTool)
634 bool SCTErrMonAlg::psTripDCSSCT(std::set<IdentifierHash>& sctHashPSTripDCS, float& psTripModules) const {
635  bool altered{false};
636  sctHashPSTripDCS.clear();
637 
638  const unsigned int maxHash{static_cast<unsigned int>(m_pSCTHelper->wafer_hash_max())}; // 8176
639  int npsw{0};
640  for (unsigned int i{0}; i<maxHash; i++) {
641  IdentifierHash hash{i};
642  if (m_useDCS and (not m_dcsTool->isGood(hash))) {
643  npsw++; //Counting the number of PS sides
644  altered = true;
645  sctHashPSTripDCS.insert(hash);
646  }
647  }
648  psTripModules = npsw/2.;
649  return altered;
650 }
651 
653  double etaMin{module.first.first}, etaMax{module.first.second};
654  double phiMin{module.second.first}, phiMax{module.second.second};
655  unsigned int nRep{1};
656  if (etaMin<-s_rangeEta) { etaMin = -s_rangeEta; }
657  if (etaMax> s_rangeEta) { etaMax = s_rangeEta; }
658  if (phiMin>phiMax) {
659  phiMin = -M_PI;
660  nRep=2;
661  }
662  for (unsigned int iRep{0}; iRep<nRep; iRep++) {
663  if (iRep==1) {
664  phiMin = module.second.first;
665  phiMax = M_PI;
666  }
667  const int ixMin{static_cast<int>((etaMin/s_rangeEta+1.)*s_nBinsEta/2)+1};
668  const int ixMax{static_cast<int>((etaMax/s_rangeEta+1.)*s_nBinsEta/2)};
669  const int iyMin{static_cast<int>((phiMin/M_PI+1.)*s_nBinsPhi/2)+1};
670  const int iyMax{static_cast<int>((phiMax/M_PI+1.)*s_nBinsPhi/2)};
671  const double xMin{(static_cast<double>(ixMin)/s_nBinsEta*2-1.)*s_rangeEta};
672  const double xMax{(static_cast<double>(ixMax)/s_nBinsEta*2-1.)*s_rangeEta};
673  const double yMin{(static_cast<double>(iyMin)/s_nBinsPhi*2-1.)*M_PI};
674  const double yMax{(static_cast<double>(iyMax)/s_nBinsPhi*2-1.)*M_PI};
675  const double wxMin{(xMin-etaMin)/s_rangeEta*s_nBinsEta/2};
676  const double wxMax{(etaMax-xMax)/s_rangeEta*s_nBinsEta/2};
677  const double wxOne{(etaMax-etaMin)/s_rangeEta*s_nBinsEta/2};
678  const double wyMin{(yMin-phiMin)/M_PI*s_nBinsPhi/2};
679  const double wyMax{(phiMax-yMax)/M_PI*s_nBinsPhi/2};
680  const double wyOne{(phiMax-phiMin)/M_PI*s_nBinsPhi/2};
681  for (int ix{ixMin}; ix<=ixMax+1; ix++) {
682  double weightx{1.};
683  if (ixMin==ixMax+1) weightx = wxOne;
684  else if (ix==ixMin) weightx = wxMin;
685  else if (ix==ixMax+1) weightx = wxMax;
686  for (int iy{iyMin}; iy<=iyMax+1; iy++) {
687  double weight{weightx};
688  if (iyMin==iyMax+1) weight *= wyOne;
689  else if (iy==iyMin) weight *= wyMin;
690  else if (iy==iyMax+1) weight *= wyMax;
691  histo.SetBinContent(ix, iy, histo.GetBinContent(ix,iy)+weight); //Fill(ix, iy, weight);//
692  }
693  }
694  }
695  return;
696 }
697 
698 double SCTErrMonAlg::calculateDetectorCoverage(const TH2F& histo, const TH2F& histoAll) const {
699  double occupancy{0.};
700 
701  for (unsigned int i{0}; i < s_nBinsEta; i++) {
702  for (unsigned int j{0}; j < s_nBinsPhi; j++) {
703  double waferCell{histoAll.GetBinContent(i+1, j+1) - histo.GetBinContent(i+1, j+1)};
704 
705  if (waferCell >= s_wafersThreshold) {
706  occupancy += 1.0;
707  } else if (waferCell > s_wafersThreshold - 1.0 ) {
708  occupancy += waferCell - (s_wafersThreshold - 1.0);
709  //Calculating the bin occupancy which has less than 1.
710  //For example, bin have a 2.3. In this case, we can understand that 30% of the bin is coverd by 3 sides/wafers and 70% of the bin is coverd by 2 sides/wafers.
711  //And it means that occupancy of the bin is 0.3 So, in this line, I take difference between s_wafersThreshold(3)-1 and waferCell, and add it to the occupancy.
712  }
713  }
714  }
715  double detector_coverage{100. * occupancy / ( static_cast<double>( s_nBinsEta ) * static_cast<double>( s_nBinsPhi ) )};
716  return detector_coverage;
717 }
718 
719 const unsigned int SCTErrMonAlg::s_nBinsEta = 100;
720 const double SCTErrMonAlg::s_rangeEta = 2.5;
721 const unsigned int SCTErrMonAlg::s_nBinsPhi = 100;
722 const double SCTErrMonAlg::s_wafersThreshold = 4.0;
SCT_Monitoring::ENDCAP_C_INDEX
@ ENDCAP_C_INDEX
Definition: SCT_MonitoringNumbers.h:19
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SCT_Monitoring::BADERR
@ BADERR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::badLinkError
@ badLinkError
Definition: SCT_MonitoringNumbers.h:61
SCT_CalibAlgs::bec2Index
unsigned int bec2Index(const int bec)
Definition: SCT_CalibUtilities.cxx:60
SCT_Monitoring::BCIDERROR
@ BCIDERROR
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::categoryErrorMap_t
Definition: SCTErrMonAlg.h:45
SCT_Monitoring::ABCDERROR_CHIP4
@ ABCDERROR_CHIP4
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::TEMPMASKEDCHIP1
@ TEMPMASKEDCHIP1
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::moduleGeo_t
std::pair< std::pair< double, double >, std::pair< double, double > > moduleGeo_t
Definition: SCTErrMonAlg.h:42
SCTErrMonAlg::m_isFirstConfigurationDetails
std::atomic_bool m_isFirstConfigurationDetails
Definition: SCTErrMonAlg.h:86
SCT_Monitoring::RODSIMULATEDDATA
@ RODSIMULATEDDATA
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::categoryErrorMap_t::count
int count(int errCate)
Definition: SCTErrMonAlg.h:59
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
SCT_Monitoring::PREAMBLEERROR
@ PREAMBLEERROR
Definition: SCT_MonitoringNumbers.h:54
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
SCT_Monitoring::N_ENDCAPSx2
@ N_ENDCAPSx2
Definition: SCT_MonitoringNumbers.h:46
SCTErrMonAlg::m_dcsTool
ToolHandle< ISCT_DCSConditionsTool > m_dcsTool
Definition: SCTErrMonAlg.h:102
SCTErrMonAlg::m_pSummaryTool
ToolHandle< IInDetConditionsTool > m_pSummaryTool
Definition: SCTErrMonAlg.h:103
SCT_ConditionsData::N_REGIONS
@ N_REGIONS
Definition: SCT_ConditionsParameters.h:28
SCT_Monitoring::TEMPMASKEDCHIP3
@ TEMPMASKEDCHIP3
Definition: SCT_MonitoringNumbers.h:54
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
SCT_Monitoring::FIRST_ETA_BIN_EC
@ FIRST_ETA_BIN_EC
Definition: SCT_MonitoringNumbers.h:47
SCT_Monitoring::HEADERTRAILERLIMITERROR
@ HEADERTRAILERLIMITERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::TEMPMASKEDCHIP4
@ TEMPMASKEDCHIP4
Definition: SCT_MonitoringNumbers.h:54
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
Data
@ Data
Definition: BaseObject.h:11
SCT_Monitoring::allRegion
@ allRegion
Definition: SCT_MonitoringNumbers.h:59
SCT_Monitoring::MASKEDCHIP
@ MASKEDCHIP
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg.h
SCT_Monitoring::N_ERRCATEGORY
@ N_ERRCATEGORY
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::ABCDERROR_ERROR1
@ ABCDERROR_ERROR1
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::fillByteStreamErrorsHelper
int fillByteStreamErrorsHelper(const std::set< IdentifierHash > &errors, int err_type, categoryErrorMap_t &categoryErrorMap, std::array< int, SCT_Monitoring::N_REGIONS_INC_GENERAL > &nMaskedLinks) const
Used in fillByteStreamErrors()
Definition: SCTErrMonAlg.cxx:386
AthMonitorAlgorithm::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
Definition: AthMonitorAlgorithm.h:362
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
SCTErrMonAlg::fillWafer
void fillWafer(moduleGeo_t module, TH2F &histo) const
Definition: SCTErrMonAlg.cxx:652
SCT::N_SIDES
constexpr unsigned int N_SIDES
Definition: SCT_ChipUtils.h:16
SCT_ID::wafer_begin
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
Definition: SCT_ID.cxx:645
SCT_Monitoring::LAST_ETA_BIN
@ LAST_ETA_BIN
Definition: SCT_MonitoringNumbers.h:41
SCT_Monitoring::LINKLEVEL
@ LINKLEVEL
Definition: SCT_MonitoringNumbers.h:54
M_PI
#define M_PI
Definition: ActiveFraction.h:11
SCT_Monitoring::FIRST_PHI_BIN_EC
@ FIRST_PHI_BIN_EC
Definition: SCT_MonitoringNumbers.h:48
SCT_Monitoring::TRAILERERROR
@ TRAILERERROR
Definition: SCT_MonitoringNumbers.h:54
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
SCT_Monitoring::N_BARRELSx2
@ N_BARRELSx2
Definition: SCT_MonitoringNumbers.h:43
SCTErrMonAlg::errorSCT
bool errorSCT(std::set< IdentifierHash > &sctHashBadLinkError, std::set< IdentifierHash > &sctHashBadRODError, std::set< IdentifierHash > &sctHashBadError) const
Definition: SCTErrMonAlg.cxx:581
SCT_Monitoring::MASKEDROD
@ MASKEDROD
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::ABCDERROR_INVALID
@ ABCDERROR_INVALID
Definition: SCT_MonitoringNumbers.h:54
SCT_ID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: SCT_ID.h:73
SCTErrMonAlg::m_pSCTHelper
const SCT_ID * m_pSCTHelper
Definition: SCTErrMonAlg.h:106
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_Monitoring::BARREL_INDEX
@ BARREL_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
SCTErrMonAlg::CacheEntry
Definition: SCTErrMonAlg.h:74
SCTErrMonAlg::psTripDCSSCT
bool psTripDCSSCT(std::set< IdentifierHash > &sctHashPSTripDCS, float &PSTripModules) const
Definition: SCTErrMonAlg.cxx:634
InDetDD::SolidStateDetectorElementBase::getEtaPhiRegion
void getEtaPhiRegion(double deltaZ, double &etaMin, double &etaMax, double &phiMin, double &phiMax, double &rz) const
Method for building up region of interest table.
Definition: SolidStateDetectorElementBase.cxx:140
SCT_Monitoring::ABCDERROR
@ ABCDERROR
Definition: SCT_MonitoringNumbers.h:54
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
SCT_Monitoring::badRODError
@ badRODError
Definition: SCT_MonitoringNumbers.h:62
SCTErrMonAlg::CacheEntry::m_mapSCT
std::vector< TH2F > m_mapSCT
Definition: SCTErrMonAlg.h:76
SCT_Monitoring
Definition: SCT_MonitoringNumbers.h:17
SCT_Monitoring::TEMPMASKEDCHIP2
@ TEMPMASKEDCHIP2
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::BYTESTREAMPARSEERROR
@ BYTESTREAMPARSEERROR
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::disabledSCT
bool disabledSCT(std::set< IdentifierHash > &sctHashDisabled) const
Definition: SCTErrMonAlg.cxx:565
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SCTErrMonAlg::m_mutex
std::mutex m_mutex
Definition: SCTErrMonAlg.h:87
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
SCTErrMonAlg::s_wafersThreshold
static const double s_wafersThreshold
Definition: SCTErrMonAlg.h:82
SCT_Monitoring::ABCDERROR_ERROR2
@ ABCDERROR_ERROR2
Definition: SCT_MonitoringNumbers.h:54
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
TRT::Hit::side
@ side
Definition: HitInfo.h:83
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
SCT_Monitoring::RAWERROR
@ RAWERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::index2Bec
Bec index2Bec(const unsigned int i)
Conversion index->bec.
Definition: SCT_MonitoringNumbers.h:29
SCT_Monitoring::ENDCAP_A_INDEX
@ ENDCAP_A_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCTErrMonAlg::m_geo
std::vector< moduleGeo_t > m_geo
Definition: SCTErrMonAlg.h:84
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.PyAthena.module
module
Definition: PyAthena.py:131
SCT_Monitoring::numberOfProblemForCoverage
@ numberOfProblemForCoverage
Definition: SCT_MonitoringNumbers.h:66
SCTErrMonAlg::m_doPerLumiErrors
BooleanProperty m_doPerLumiErrors
Definition: SCTErrMonAlg.h:97
SCT_Monitoring::ROBFRAGMENTERROR
@ ROBFRAGMENTERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_REGIONS_INC_GENERAL
@ N_REGIONS_INC_GENERAL
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::ABCDERROR_CHIP3
@ ABCDERROR_CHIP3
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_ETA_BIN_EC
@ LAST_ETA_BIN_EC
Definition: SCT_MonitoringNumbers.h:47
SCTErrMonAlg::stop
virtual StatusCode stop() override final
Definition: SCTErrMonAlg.cxx:140
SCT_Monitoring::psTripDCS
@ psTripDCS
Definition: SCT_MonitoringNumbers.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT_Monitoring::ABCDERROR_CHIP2
@ ABCDERROR_CHIP2
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::TRUNCATEDROD
@ TRUNCATEDROD
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::RODLEVEL
@ RODLEVEL
Definition: SCT_MonitoringNumbers.h:54
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.subdetectors.mmg.names
names
Definition: mmg.py:8
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
SCT_Monitoring::TRAILEROVERFLOWERROR
@ TRAILEROVERFLOWERROR
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::fillByteStreamErrors
StatusCode fillByteStreamErrors(const EventContext &ctx) const
Definition: SCTErrMonAlg.cxx:226
SCT_Monitoring::SUMMARY
@ SUMMARY
Definition: SCT_MonitoringNumbers.h:54
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCTErrMonAlg::numByteStreamErrors
void numByteStreamErrors(const std::set< IdentifierHash > &errors, int &ntot) const
Definition: SCTErrMonAlg.cxx:557
SCT_Monitoring::RODCLOCKERROR
@ RODCLOCKERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
SCTErrMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Definition: SCTErrMonAlg.cxx:50
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
SCT_ID::get_other_side
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
Definition: SCT_ID.cxx:434
SCT_Monitoring::ENDCAP_A
@ ENDCAP_A
Definition: SCT_MonitoringNumbers.h:21
SCTErrMonAlg::m_doOnline
BooleanProperty m_doOnline
Definition: SCTErrMonAlg.h:98
SCT_Monitoring::ABCDERROR_ERROR7
@ ABCDERROR_ERROR7
Definition: SCT_MonitoringNumbers.h:54
TRTByteStreamErrors::BCIDError
@ BCIDError
Definition: ITRT_ByteStream_ConditionsSvc.h:19
MuonValidation_CreateResolutionProfiles.fit
def fit(h, emin, emax)
Definition: MuonValidation_CreateResolutionProfiles.py:69
SCTErrMonAlg::summarySCT
bool summarySCT(std::set< IdentifierHash > &sctHashAll, std::set< IdentifierHash > &sctHashSummary) const
Definition: SCTErrMonAlg.cxx:615
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
SCTErrMonAlg::m_coverageCheck
BooleanProperty m_coverageCheck
Definition: SCTErrMonAlg.h:94
SCT_Monitoring::GENERAL_INDEX
@ GENERAL_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::FIRST_PHI_BIN
@ FIRST_PHI_BIN
Definition: SCT_MonitoringNumbers.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:636
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
SCT_ByteStreamErrors::ErrorType
ErrorType
SCT byte stream error type enums used in SCT_RodDecoder, SCT_ByteStreamErrorsTool,...
Definition: SCT_ByteStreamErrors.h:178
SCT_Monitoring::TEMPMASKEDCHIP5
@ TEMPMASKEDCHIP5
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_PHI_BIN
@ LAST_PHI_BIN
Definition: SCT_MonitoringNumbers.h:42
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
SCT_Monitoring::ENDCAP_C
@ ENDCAP_C
Definition: SCT_MonitoringNumbers.h:21
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SCTErrMonAlg::s_nBinsEta
static const unsigned int s_nBinsEta
Definition: SCTErrMonAlg.h:79
SCT_Monitoring::ConfbinsDetailed
@ ConfbinsDetailed
Definition: SCT_MonitoringNumbers.h:69
SCT_Monitoring::MASKEDLINK
@ MASKEDLINK
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::TEMPMASKEDCHIP0
@ TEMPMASKEDCHIP0
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::MASKEDLINKALL
@ MASKEDLINKALL
Definition: SCT_MonitoringNumbers.h:54
SiDetectorElement.h
SCT_Monitoring::ABCDERROR_CHIP1
@ ABCDERROR_CHIP1
Definition: SCT_MonitoringNumbers.h:54
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
SCT_Monitoring::ABCDERROR_ERROR4
@ ABCDERROR_ERROR4
Definition: SCT_MonitoringNumbers.h:54
DeMoScan.index
string index
Definition: DeMoScan.py:364
SCTErrMonAlg::m_flaggedTool
ToolHandle< ISCT_FlaggedConditionTool > m_flaggedTool
Definition: SCTErrMonAlg.h:104
SCT_Monitoring::MISSINGLINKHEADERERROR
@ MISSINGLINKHEADERERROR
Definition: SCT_MonitoringNumbers.h:54
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCTErrMonAlg::s_rangeEta
static const double s_rangeEta
Definition: SCTErrMonAlg.h:80
SCTErrMonAlg::calculateDetectorCoverage
double calculateDetectorCoverage(const TH2F &histo, const TH2F &histoAll) const
Definition: SCTErrMonAlg.cxx:698
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SCT_FlaggedCondEnum::NUM_ERROR_TYPES
@ NUM_ERROR_TYPES
Definition: SCT_FlaggedCondEnum.h:28
SCTErrMonAlg::fillConfigurationDetails
StatusCode fillConfigurationDetails(const EventContext &ctx) const
Used in fillHistograms()
Definition: SCTErrMonAlg.cxx:151
SCT_Monitoring::LVL1IDERROR
@ LVL1IDERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
SCTErrMonAlg::m_coverageCheckOnlyFirtsEventOfLB
BooleanProperty m_coverageCheckOnlyFirtsEventOfLB
Definition: SCTErrMonAlg.h:95
BARREL
@ BARREL
Definition: TRTRadiatorParameters.h:10
SCTErrMonAlg::m_byteStreamErrTool
ToolHandle< ISCT_ByteStreamErrorsTool > m_byteStreamErrTool
Definition: SCTErrMonAlg.h:100
SCT_Monitoring::LAST_PHI_BIN_EC
@ LAST_PHI_BIN_EC
Definition: SCT_MonitoringNumbers.h:48
SCTErrMonAlg::SCTErrMonAlg
SCTErrMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCTErrMonAlg.cxx:14
SCTErrMonAlg::m_useDCS
BooleanProperty m_useDCS
Definition: SCTErrMonAlg.h:96
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
SCT_ID::wafer_end
const_id_iterator wafer_end(void) const
Definition: SCT_ID.cxx:649
SCT_Monitoring::getNumModules
int getNumModules(const int reg, const int layer)
Definition: SCT_MonitoringNumbers.h:99
SCT_Monitoring::FIRST_ETA_BIN
@ FIRST_ETA_BIN
Definition: SCT_MonitoringNumbers.h:41
merge.status
status
Definition: merge.py:17
SCT_Monitoring::TIMEOUTERROR
@ TIMEOUTERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_ConditionsData::CHIPS_PER_MODULE
@ CHIPS_PER_MODULE
Definition: SCT_ConditionsParameters.h:20
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
ReadHandle.h
Handle class for reading from StoreGate.
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
SCT_DetectorManager.h
makeComparison.deltaZ
int deltaZ
Definition: makeComparison.py:46
SCTErrMonAlg::m_configurationTool
ToolHandle< ISCT_ConfigurationConditionsTool > m_configurationTool
Definition: SCTErrMonAlg.h:101
InDetConditions::SCT_SIDE
@ SCT_SIDE
Definition: InDetHierarchy.h:14
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
SCT_Monitoring::badError
@ badError
Definition: SCT_MonitoringNumbers.h:63
SCTErrMonAlg::m_makeConfHisto
BooleanProperty m_makeConfHisto
Definition: SCTErrMonAlg.h:93
SCT_Monitoring::ABCDERROR_CHIP0
@ ABCDERROR_CHIP0
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: SCTErrMonAlg.cxx:21
SCT_Monitoring::FORMATTERERROR
@ FORMATTERERROR
Definition: SCT_MonitoringNumbers.h:54
SCTErrMonAlg::s_nBinsPhi
static const unsigned int s_nBinsPhi
Definition: SCTErrMonAlg.h:81
xAOD::EventInfo_v1::SCT
@ SCT
The SCT.
Definition: EventInfo_v1.h:333
SCT_Monitoring::ABCDERROR_CHIP5
@ ABCDERROR_CHIP5
Definition: SCT_MonitoringNumbers.h:54
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65