ATLAS Offline Software
SCT_MonitoringNumbers.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 /*@file SCTHitsNoiseMonTool.cxx
8  * Header file containing scoped 'magic numbers' for use in SCT_Monitoring
9  * @author Shaun Roe
10  **/
11 #ifndef SCT_MonitoringNumbers_H
12 #define SCT_MonitoringNumbers_H
13 #include "TString.h"
14 #include <string>
15 #include <vector>
16 
17 namespace SCT_Monitoring{
23  static const std::vector<Bec> index2BecArray={ENDCAP_C, BARREL, ENDCAP_A, GENERAL};
25  inline unsigned int bec2Index(const int becVal) {
26  return (becVal/2) + 1;
27  }
29  inline Bec index2Bec(const unsigned int i) {
30  return i < N_REGIONS_INC_GENERAL ? (index2BecArray[i]) : INVALID_SYSTEM;
31  }
32 
35  N_BINS = 6*128,
49  N_MOD_ENDCAPS = 988, N_MOD_BARREL = 2112, FIRST_MOD_EC = 0, FIRST_MOD_B = 988, FIRST_MOD_EA = 3100,
50  N_SIDES = 2,
51  N_WAFERS = 8176
52  };
53 
55 
56  static const std::vector<std::string> CategoryErrorsNames = {"MaskedLinkALL", "Errors", "BadErrors", "LinkLevelErrors", "RODLevelErrors", "MaskedChipALL", "ByteStreamParseError", "TimeOutError", "BCIDError", "LVL1IDError", "PreambleError", "FormatterError", "TrailerError", "TrailerOverflowError", "HeaderTrailerLimitError", "ABCDError", "RawError", "MaskedLink", "RODClockError", "TruncatedROD", "ROBFragmentError", "MissingLinkHeaderError", "MaskedROD", "ABCDError_Chip0", "ABCDError_Chip1", "ABCDError_Chip2", "ABCDError_Chip3", "ABCDError_Chip4", "ABCDError_Chip5", "ABCDError_Error1", "ABCDError_Error2", "ABCDError_Error4", "TempMaskedChip0", "TempMaskedChip1", "TempMaskedChip2", "TempMaskedChip3", "TempMaskedChip4", "TempMaskedChip5", "ABCDError_Error7", "ABCDError_Invalid", "RODSimulatedData"};
57 
59  allRegion, //All SCT module for counting good module
60  disabled, //Disabled
61  badLinkError, //BadLinkLevelError
62  badRODError, //BadRODLevelError
63  badError, //BadError = BadLinkLevelError + BadRODLevelError
64  psTripDCS, //Power supply trip using SCT_DCSConditionsSvc
65  summary, //Total coverage using SCT_ConditionsSummarySvc
67  };
68 
70 
71  static const std::vector<int> n_layers = {N_DISKS, N_BARRELS, N_DISKS, 2 * N_DISKS + N_BARRELS};
72  static const std::vector<int> n_etabins = {N_ETA_BINS_EC, N_ETA_BINS, N_ETA_BINS_EC};
73  static const std::vector<int> n_phibins = {N_PHI_BINS_EC, N_PHI_BINS, N_PHI_BINS_EC};
74  static const std::vector<int> f_etabin = {FIRST_ETA_BIN_EC, FIRST_ETA_BIN, FIRST_ETA_BIN_EC};
75  static const std::vector<int> l_etabin = {LAST_ETA_BIN_EC, LAST_ETA_BIN, LAST_ETA_BIN_EC};
76  static const std::vector<int> f_phibin = {FIRST_PHI_BIN_EC, FIRST_PHI_BIN, FIRST_PHI_BIN_EC};
77  static const std::vector<int> l_phibin = {LAST_PHI_BIN_EC, LAST_PHI_BIN, LAST_PHI_BIN_EC};
78  static const std::vector<int> n_mod = {N_MOD_ENDCAPS, N_MOD_BARREL, N_MOD_ENDCAPS, N_MOD_BARREL + 2 * N_MOD_ENDCAPS};
79  static const std::vector<int> f_mod = {FIRST_MOD_EC, FIRST_MOD_B, FIRST_MOD_EA};
80  static const std::vector<TString> layerName = {" disk ", " layer ", " disk "};
81  static const std::vector<TString> subDetName = {"Endcap C", "Barrel", "Endcap A", "General"};
82  static const std::vector<TString> subDetNameShort = {"EC", "B", "EA", "ALL"};
83 
84  static const long NBINS_LBs = 3000;
85 
86  static const std::vector<std::string> coverageVarNames = {
87  "", // All (not used)
88  "OfEnabledLinks", // All - Disabled
89  "WithNoBadLinkLevelError", // All - BadLinkLevelError
90  "WithNoBadRODLevelError", // All - BadRODLevelError
91  "WithNoBadError", // All - BadError
92  "WithNoPSTrip", // All - PSTrip (DCS)
93  "OfLinksWithNoBadProblem" // All - Summary
94  };
95 
96  //====================================================================================================
97  // SCTErrMonTool :: getNumModules, Daniel Damiani 16/8/2010
98  //====================================================================================================
99  inline int getNumModules(const int reg,const int layer) {
100  if (reg==BARREL) {
101  if (layer<2) return 384;
102  else if (layer<4) return 480;
103  else if (layer<6) return 576;
104  else if (layer<8) return 672;
105  else return 0;
106  } else {
107  if (layer<2) return 92;
108  else if (layer<12) return 132;
109  else if (layer<16) return 92;
110  else if (layer<18) return 52;
111  else return 0;
112  }
113  return 0;
114  }
115 
116  // Ensure that the enums are available from ROOT
118 }//namespace
119 
120 #endif
SCT_Monitoring::ENDCAP_C_INDEX
@ ENDCAP_C_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::BADERR
@ BADERR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::badLinkError
@ badLinkError
Definition: SCT_MonitoringNumbers.h:61
SCT_Monitoring::HistogramNumbers
HistogramNumbers
Numbers to use in histograms.
Definition: SCT_MonitoringNumbers.h:34
SCT_Monitoring::FIRST_DISK
@ FIRST_DISK
Definition: SCT_MonitoringNumbers.h:44
SCT_Monitoring::BCIDERROR
@ BCIDERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::BecIndex
BecIndex
what array indices mean when looping over subsystems
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::ABCDERROR_CHIP4
@ ABCDERROR_CHIP4
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::TEMPMASKEDCHIP1
@ TEMPMASKEDCHIP1
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::RODSIMULATEDDATA
@ RODSIMULATEDDATA
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_REGIONS
@ N_REGIONS
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::PREAMBLEERROR
@ PREAMBLEERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_ENDCAPSx2
@ N_ENDCAPSx2
Definition: SCT_MonitoringNumbers.h:46
SCT_Monitoring::N_WAFERS
@ N_WAFERS
Definition: SCT_MonitoringNumbers.h:51
SCT_Monitoring::FIRST_NOISE_HIT_BIN
@ FIRST_NOISE_HIT_BIN
Definition: SCT_MonitoringNumbers.h:40
SCT_Monitoring::INVALID_SYSTEM
@ INVALID_SYSTEM
Definition: SCT_MonitoringNumbers.h:21
SCT_Monitoring::TEMPMASKEDCHIP3
@ TEMPMASKEDCHIP3
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_HIT_BIN
@ LAST_HIT_BIN
Definition: SCT_MonitoringNumbers.h:39
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
SCT_Monitoring::INVALID_INDEX
@ INVALID_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::LAST_BARREL
@ LAST_BARREL
Definition: SCT_MonitoringNumbers.h:43
SCT_Monitoring::N_ENDCAPS
@ N_ENDCAPS
Definition: SCT_MonitoringNumbers.h:46
SCT_Monitoring::allRegion
@ allRegion
Definition: SCT_MonitoringNumbers.h:59
SCT_Monitoring::MASKEDCHIP
@ MASKEDCHIP
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::FIRST_CHIP
@ FIRST_CHIP
Definition: SCT_MonitoringNumbers.h:37
SCT_Monitoring::N_ERRCATEGORY
@ N_ERRCATEGORY
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::ABCDERROR_ERROR1
@ ABCDERROR_ERROR1
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_CHIP
@ LAST_CHIP
Definition: SCT_MonitoringNumbers.h:37
SCT_Monitoring::LAST_ETA_BIN
@ LAST_ETA_BIN
Definition: SCT_MonitoringNumbers.h:41
SCT_Monitoring::LINKLEVEL
@ LINKLEVEL
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::FIRST_PHI_BIN_EC
@ FIRST_PHI_BIN_EC
Definition: SCT_MonitoringNumbers.h:48
SCT_Monitoring::FIRST_MOD_EC
@ FIRST_MOD_EC
Definition: SCT_MonitoringNumbers.h:49
SCT_Monitoring::TRAILERERROR
@ TRAILERERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::BARREL
@ BARREL
Definition: SCT_MonitoringNumbers.h:21
SCT_Monitoring::N_BARRELSx2
@ N_BARRELSx2
Definition: SCT_MonitoringNumbers.h:43
SCT_Monitoring::MASKEDROD
@ MASKEDROD
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::ABCDERROR_INVALID
@ ABCDERROR_INVALID
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_HIT_BINS
@ N_HIT_BINS
Definition: SCT_MonitoringNumbers.h:39
SCT_Monitoring::BARREL_INDEX
@ BARREL_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::FIRST_HIT_BIN
@ FIRST_HIT_BIN
Definition: SCT_MonitoringNumbers.h:39
SCT_Monitoring::ConfbinsOnline
@ ConfbinsOnline
Definition: SCT_MonitoringNumbers.h:69
SCT_Monitoring::N_STRIPS
@ N_STRIPS
Definition: SCT_MonitoringNumbers.h:36
SCT_Monitoring::ABCDERROR
@ ABCDERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::badRODError
@ badRODError
Definition: SCT_MonitoringNumbers.h:62
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
SCT_Monitoring::N_PHI_BINS
@ N_PHI_BINS
Definition: SCT_MonitoringNumbers.h:42
SCT_Monitoring::FIRST_MOD_EA
@ FIRST_MOD_EA
Definition: SCT_MonitoringNumbers.h:49
SCT_Monitoring::N_TIME_BINS
@ N_TIME_BINS
Definition: SCT_MonitoringNumbers.h:38
SCT_Monitoring::ABCDERROR_ERROR2
@ ABCDERROR_ERROR2
Definition: SCT_MonitoringNumbers.h:54
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
SCT_Monitoring::numberOfProblemForCoverage
@ numberOfProblemForCoverage
Definition: SCT_MonitoringNumbers.h:66
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::LAST_STRIP
@ LAST_STRIP
Definition: SCT_MonitoringNumbers.h:36
SCT_Monitoring::ProblemForCoverage
ProblemForCoverage
Definition: SCT_MonitoringNumbers.h:58
SCT_Monitoring::N_BARRELS
@ N_BARRELS
Definition: SCT_MonitoringNumbers.h:43
SCT_Monitoring::GENERAL
@ GENERAL
Definition: SCT_MonitoringNumbers.h:21
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
SCT_Monitoring::CHIPS_PER_MODULE
@ CHIPS_PER_MODULE
Definition: SCT_MonitoringNumbers.h:37
SCT_Monitoring::FIRST_MOD_B
@ FIRST_MOD_B
Definition: SCT_MonitoringNumbers.h:49
SCT_Monitoring::LAST_ENDCAP
@ LAST_ENDCAP
Definition: SCT_MonitoringNumbers.h:46
SCT_Monitoring::psTripDCS
@ psTripDCS
Definition: SCT_MonitoringNumbers.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT_Monitoring::CategoryErrors
CategoryErrors
Definition: SCT_MonitoringNumbers.h:54
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
SCT_Monitoring::TRAILEROVERFLOWERROR
@ TRAILEROVERFLOWERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::bec2Index
unsigned int bec2Index(const int becVal)
Conversion bec->index.
Definition: SCT_MonitoringNumbers.h:25
SCT_Monitoring::SUMMARY
@ SUMMARY
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_MOD_ENDCAPS
@ N_MOD_ENDCAPS
Definition: SCT_MonitoringNumbers.h:49
SCT_Monitoring::RODCLOCKERROR
@ RODCLOCKERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
SCT_Monitoring::N_LAYERS_TOTAL
@ N_LAYERS_TOTAL
Definition: SCT_MonitoringNumbers.h:45
SCT_Monitoring::ENDCAP_A
@ ENDCAP_A
Definition: SCT_MonitoringNumbers.h:21
SCT_Monitoring::ConfigurationBins
ConfigurationBins
Definition: SCT_MonitoringNumbers.h:69
SCT_Monitoring::ABCDERROR_ERROR7
@ ABCDERROR_ERROR7
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_ETA_BINS_EC
@ N_ETA_BINS_EC
Definition: SCT_MonitoringNumbers.h:47
SCT_Monitoring::FIRST_STRIP
@ FIRST_STRIP
Definition: SCT_MonitoringNumbers.h:36
SCT_Monitoring::N_NOISE_HIT_BINS
@ N_NOISE_HIT_BINS
Definition: SCT_MonitoringNumbers.h:40
SCT_Monitoring::LAST_NOISE_HIT_BIN
@ LAST_NOISE_HIT_BIN
Definition: SCT_MonitoringNumbers.h:40
SCT_Monitoring::N_SIDES
@ N_SIDES
Definition: SCT_MonitoringNumbers.h:50
SCT_Monitoring::GENERAL_INDEX
@ GENERAL_INDEX
Definition: SCT_MonitoringNumbers.h:19
SCT_Monitoring::FIRST_PHI_BIN
@ FIRST_PHI_BIN
Definition: SCT_MonitoringNumbers.h:42
SCT_Monitoring::TEMPMASKEDCHIP5
@ TEMPMASKEDCHIP5
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_PHI_BIN
@ LAST_PHI_BIN
Definition: SCT_MonitoringNumbers.h:42
SCT_Monitoring::ENDCAP_C
@ ENDCAP_C
Definition: SCT_MonitoringNumbers.h:21
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
SCT_Monitoring::N_ETA_BINS
@ N_ETA_BINS
Definition: SCT_MonitoringNumbers.h:41
SCT_Monitoring::FIRST_BARREL
@ FIRST_BARREL
Definition: SCT_MonitoringNumbers.h:43
SCT_Monitoring::ABCDERROR_CHIP1
@ ABCDERROR_CHIP1
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_PHI_BINS_EC
@ N_PHI_BINS_EC
Definition: SCT_MonitoringNumbers.h:48
SCT_Monitoring::ABCDERROR_ERROR4
@ ABCDERROR_ERROR4
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::MISSINGLINKHEADERERROR
@ MISSINGLINKHEADERERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::FIRST_TIME_BIN
@ FIRST_TIME_BIN
Definition: SCT_MonitoringNumbers.h:38
SCT_Monitoring::ROOT6_NamespaceAutoloadHook
Definition: SCT_MonitoringNumbers.h:117
SCT_Monitoring::N_CHIPS
@ N_CHIPS
Definition: SCT_MonitoringNumbers.h:37
SCT_Monitoring::LAST_DISK
@ LAST_DISK
Definition: SCT_MonitoringNumbers.h:44
SCT_Monitoring::N_DISKS
@ N_DISKS
Definition: SCT_MonitoringNumbers.h:44
SCT_Monitoring::FIRST_ENDCAP
@ FIRST_ENDCAP
Definition: SCT_MonitoringNumbers.h:46
SCT_Monitoring::LVL1IDERROR
@ LVL1IDERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_PHI_BIN_EC
@ LAST_PHI_BIN_EC
Definition: SCT_MonitoringNumbers.h:48
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
SCT_Monitoring::TIMEOUTERROR
@ TIMEOUTERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::LAST_TIME_BIN
@ LAST_TIME_BIN
Definition: SCT_MonitoringNumbers.h:38
SCT_Monitoring::N_MOD_BARREL
@ N_MOD_BARREL
Definition: SCT_MonitoringNumbers.h:49
SCT_Monitoring::ConfbinsSummary
@ ConfbinsSummary
Definition: SCT_MonitoringNumbers.h:69
SCT_Monitoring::badError
@ badError
Definition: SCT_MonitoringNumbers.h:63
SCT_Monitoring::ABCDERROR_CHIP0
@ ABCDERROR_CHIP0
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::FORMATTERERROR
@ FORMATTERERROR
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::N_BINS
@ N_BINS
Definition: SCT_MonitoringNumbers.h:35
SCT_Monitoring::N_DISKSx2
@ N_DISKSx2
Definition: SCT_MonitoringNumbers.h:44
SCT_Monitoring::Bec
Bec
Possible values of the 'BEC' (Barrel or EndCap) value.
Definition: SCT_MonitoringNumbers.h:21
SCT_Monitoring::ABCDERROR_CHIP5
@ ABCDERROR_CHIP5
Definition: SCT_MonitoringNumbers.h:54
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65