ATLAS Offline Software
TileCellSelector.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TILERECALGS_TILESELECTOR_H
8 #define TILERECALGS_TILESELECTOR_H
9 
10 // Tile includes
13 #include "TileEvent/TileDQstatus.h"
16 
17 // Calo includes
19 
20 // Atlas includes
24 
25 // Gaudi incldues
26 #include "GaudiKernel/ToolHandle.h"
27 
28 #include <string>
29 #include <vector>
30 
31 class TileID;
32 class TileHWID;
33 class TileCell;
34 class TileCablingService;
35 class TileInfo;
36 
37 
39 
41  public:
42  TileCellSelector(const std::string& name, ISvcLocator* pSvcLocator);
43  virtual ~TileCellSelector();
44 
45  virtual StatusCode initialize() override;
46  virtual StatusCode execute() override;
47  virtual StatusCode finalize() override;
48 
49  private:
50 
51  int Are3FF(std::vector<float> & OptFilterDigits, int OptFilterGain, int ch_type);
52  void printCell(const TileCell * cell);
53 
54  unsigned int m_counter;
55  unsigned int m_accept;
56  unsigned int m_minCell;
57  unsigned int m_maxCell;
58  unsigned int m_minChan;
59  unsigned int m_maxChan;
60  unsigned int m_jump;
61  unsigned int m_const;
62  unsigned int m_overLG;
63  unsigned int m_overHG;
64  unsigned int m_underLG;
65  unsigned int m_underHG;
66  unsigned int m_dqerr;
67  unsigned int m_dmuerr;
68  unsigned int m_warnerr;
69 
70  const TileID* m_tileID;
73  ToolHandle<ITileBadChanTool> m_tileBadChanTool{this, "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
74  SG::ReadHandleKey<TileDQstatus> m_dqStatusKey{this, "TileDQstatus", "TileDQstatus", "TileDQstatus key"};
75  ToolHandle<ITileDCSTool> m_tileDCS{this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"};
76 
77  unsigned int m_runNum;
78  unsigned int m_lumiBlock;
79  unsigned int m_evtNum;
80  unsigned int m_evtBCID;
81  // flag will contain status of a given event
82  // every 4 bits - status of partitions LBA,LBC,EBA,EBC
83  // bits 0-3 - there is a signal above threshold in partitions
84  // bits 4-7 - there are channels with underflow (sample=0) in partition (since rel 17.2.6.4)
85  // bits 8-11 - there are channels with overflow (sample=1023) in partition (since rel 17.2.6.4)
86  // bits 12-15 - there are at least 16 drawers with bad quality in partition
87  // bits 16-19 - maximal length of consecutive bad area (since rel 17.2.6.5)
88  // bits 20-23 - there are at least 16 drawers which are completely masked in partition
89  // bits 24-27 - there are at least 16 drawers which do not send data in partition
90  // bits 28-31 - reserved for global good/warning/bad status
91  // bits 20-27 are also used for module number which gives warning status (since release 17.2.6.5)
92  // in case of warning we are sure that bits which indicates error are not filled
93  unsigned int m_tileFlag;
94  // global status: 0=OK, 1=warning, 2=error
95  unsigned int m_tileError;
96 
97  std::vector<bool> m_chanBad;
98  std::vector<float> m_chanEne;
99  std::vector<float> m_chanTime;
100  std::vector<float> m_chanDsp;
101  std::vector<float> m_chanTDsp;
102  std::vector<float> m_chanQua;
103  std::vector<bool> m_chanSel;
104  std::vector<bool> m_chanToSkip;
105  std::vector<bool> m_drawerToSkip;
106 
110 
112  "AllCalo", "Input Calo cell container key"};
113 
115  "TileDigitsFlt", "Input Tile digits container key"};
116 
118  "TileRawChannelCnt",
119  "Input Tile raw channel container key"};
120 
122  "EventInfo", "Input event info key"};
123 
126  float m_minEneChan[3]{};
127  float m_maxEneChan[3]{};
130  float m_minTimeChan[3]{};
131  float m_maxTimeChan[3]{};
133  int m_ptnEneChan[3]{};
135  int m_ptnTimeChan[3]{};
137  bool m_skipGain[2]{};
138 #define ptnlength 5
169 
170  std::vector<int> m_drawer;
171  std::vector<int> m_drawerToCheck;
172  std::vector<int> m_chanToCheck;
173 
175  std::vector<int> m_nDrawerOff;
176 
177  std::string m_infoName;
179  float m_ADCmaxMinusEps = 0.0F;
181 };
182 
183 #endif // TILERECALGS_TILESELECTOR_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TileCell
Definition: TileCell.h:57
TileCellSelector::m_skipMasked
bool m_skipMasked
Definition: TileCellSelector.h:153
TileCellSelector::m_drawerToSkip
std::vector< bool > m_drawerToSkip
Definition: TileCellSelector.h:105
TileCellSelector::m_ptnTimeChan
int m_ptnTimeChan[3]
Definition: TileCellSelector.h:135
TileCellSelector::m_minBadMB
int m_minBadMB
Definition: TileCellSelector.h:151
TileCellSelector::m_overflowLG
float m_overflowLG
Definition: TileCellSelector.h:162
TileCellSelector::m_warnerr
unsigned int m_warnerr
Definition: TileCellSelector.h:68
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TileCellSelector::m_maxTimeChan
float m_maxTimeChan[3]
Definition: TileCellSelector.h:131
TileCellSelector::m_runNum
unsigned int m_runNum
Definition: TileCellSelector.h:77
TileCellSelector::m_drawer
std::vector< int > m_drawer
Definition: TileCellSelector.h:170
TileCellSelector::m_jumpDeltaLG
float m_jumpDeltaLG
Definition: TileCellSelector.h:145
TileCellSelector::m_dqerr
unsigned int m_dqerr
Definition: TileCellSelector.h:66
TileCellSelector::m_pedDeltaLG
float m_pedDeltaLG
Definition: TileCellSelector.h:147
TileCellSelector::printCell
void printCell(const TileCell *cell)
Definition: TileCellSelector.cxx:2016
ptnlength
#define ptnlength
Definition: TileCellSelector.h:138
TileCellSelector::m_minChan
unsigned int m_minChan
Definition: TileCellSelector.h:58
TileCellSelector::m_jumpDeltaHG
float m_jumpDeltaHG
Definition: TileCellSelector.h:144
TileCellSelector::m_maxVerboseCnt
int m_maxVerboseCnt
Definition: TileCellSelector.h:174
TileCellSelector::m_chanEne
std::vector< float > m_chanEne
Definition: TileCellSelector.h:98
TileCellSelector::m_checkDCS
bool m_checkDCS
Definition: TileCellSelector.h:155
TileInfo
Definition: TileInfo.h:49
TileCellSelector::initialize
virtual StatusCode initialize() override
Definition: TileCellSelector.cxx:152
TileCellSelector::m_dmuerr
unsigned int m_dmuerr
Definition: TileCellSelector.h:67
SG::ReadHandleKey< TileDQstatus >
TileCellSelector::m_pedDeltaHG
float m_pedDeltaHG
Definition: TileCellSelector.h:146
TileCellSelector::m_counter
unsigned int m_counter
Definition: TileCellSelector.h:54
TileCellSelector::m_checkUnderLG
bool m_checkUnderLG
Definition: TileCellSelector.h:160
TileCellSelector::m_evtNum
unsigned int m_evtNum
Definition: TileCellSelector.h:79
TileCellSelector::finalize
virtual StatusCode finalize() override
Definition: TileCellSelector.cxx:2092
TileCellSelector::m_minTimeCell
float m_minTimeCell
Definition: TileCellSelector.h:128
TileCellSelector::m_constLength
int m_constLength
Definition: TileCellSelector.h:148
TileCellSelector::m_maxCell
unsigned int m_maxCell
Definition: TileCellSelector.h:57
TileCellSelector::m_underflowLG
float m_underflowLG
Definition: TileCellSelector.h:164
TileCellSelector::execute
virtual StatusCode execute() override
Definition: TileCellSelector.cxx:375
TileCellSelector::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: TileCellSelector.h:121
TileCellSelector::m_checkDMUs
bool m_checkDMUs
Definition: TileCellSelector.h:157
AthAlgorithm.h
TileRawChannelContainer.h
TileCellSelector::m_chanSel
std::vector< bool > m_chanSel
Definition: TileCellSelector.h:103
TileCellSelector::m_skipGain
bool m_skipGain[2]
Definition: TileCellSelector.h:137
TileCellSelector::m_secondMaxLevel
float m_secondMaxLevel
Definition: TileCellSelector.h:143
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileCellSelector::m_chanToCheck
std::vector< int > m_chanToCheck
Definition: TileCellSelector.h:172
TileCellSelector::m_tileDCS
ToolHandle< ITileDCSTool > m_tileDCS
Definition: TileCellSelector.h:75
TileCellSelector::m_maxEneChan
float m_maxEneChan[3]
Definition: TileCellSelector.h:127
TileCellSelector::m_maxBadDMU
int m_maxBadDMU
Definition: TileCellSelector.h:150
TileCellSelector::m_tileID
const TileID * m_tileID
Definition: TileCellSelector.h:70
TileCellSelector::m_minTimeChan
float m_minTimeChan[3]
Definition: TileCellSelector.h:130
TileCellSelector::m_printOnly
bool m_printOnly
Definition: TileCellSelector.h:168
TileCellSelector::m_nDrawerOff
std::vector< int > m_nDrawerOff
Definition: TileCellSelector.h:175
TileCellSelector::m_cellContainerKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Definition: TileCellSelector.h:111
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
TileDigitsContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileCellSelector::m_chanTime
std::vector< float > m_chanTime
Definition: TileCellSelector.h:99
TileCellSelector::m_checkWarning
bool m_checkWarning
Definition: TileCellSelector.h:166
TileCellSelector::m_ptnTimeCell
int m_ptnTimeCell
Definition: TileCellSelector.h:134
TileCellSelector::m_checkOverLG
bool m_checkOverLG
Definition: TileCellSelector.h:158
TileCellSelector::m_const
unsigned int m_const
Definition: TileCellSelector.h:61
TileCellSelector::m_accept
unsigned int m_accept
Definition: TileCellSelector.h:55
TileCellSelector::m_drawerToCheck
std::vector< int > m_drawerToCheck
Definition: TileCellSelector.h:171
TileCellSelector::m_skipEmpty
bool m_skipEmpty
Definition: TileCellSelector.h:152
TileCablingService
Definition: TileCablingService.h:23
TileCellSelector::~TileCellSelector
virtual ~TileCellSelector()
Definition: TileCellSelector.cxx:146
TileCellSelector::m_bitTimeCell
bool m_bitTimeCell[ptnlength]
Definition: TileCellSelector.h:140
TileDQstatus.h
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
AthAlgorithm
Definition: AthAlgorithm.h:47
ITileDCSTool.h
TileCellSelector::m_checkJumps
bool m_checkJumps
Definition: TileCellSelector.h:156
TileCellSelector::m_bitTimeChan
bool m_bitTimeChan[3][ptnlength]
Definition: TileCellSelector.h:142
TileCellSelector::m_bitEneCell
bool m_bitEneCell[ptnlength]
Definition: TileCellSelector.h:139
TileCellSelector::m_maxEneCell
float m_maxEneCell
Definition: TileCellSelector.h:125
TileCellSelector::m_chanQua
std::vector< float > m_chanQua
Definition: TileCellSelector.h:102
TileCellSelector::m_underflowHG
float m_underflowHG
Definition: TileCellSelector.h:165
TileCellSelector::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileCellSelector.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TileCellSelector::m_readCells
bool m_readCells
Definition: TileCellSelector.h:107
TileCellSelector::m_lumiBlock
unsigned int m_lumiBlock
Definition: TileCellSelector.h:78
TileCellSelector::m_overHG
unsigned int m_overHG
Definition: TileCellSelector.h:63
TileCellSelector::m_overLG
unsigned int m_overLG
Definition: TileCellSelector.h:62
TileCellSelector::m_tileFlag
unsigned int m_tileFlag
Definition: TileCellSelector.h:93
CaloCellContainer.h
TileCellSelector::m_selectGain
int m_selectGain
Definition: TileCellSelector.h:136
TileCellSelector::m_ADCmaskValueMinusEps
float m_ADCmaskValueMinusEps
Definition: TileCellSelector.h:180
EventInfo.h
TileCellSelector::m_minEneCell
float m_minEneCell
Definition: TileCellSelector.h:124
TileCellSelector::m_checkUnderHG
bool m_checkUnderHG
Definition: TileCellSelector.h:161
TileCellSelector::m_underHG
unsigned int m_underHG
Definition: TileCellSelector.h:65
TileCellSelector::m_chanToSkip
std::vector< bool > m_chanToSkip
Definition: TileCellSelector.h:104
TileCellSelector::m_minEneChan
float m_minEneChan[3]
Definition: TileCellSelector.h:126
TileCellSelector::m_overflowHG
float m_overflowHG
Definition: TileCellSelector.h:163
TileCellSelector::Are3FF
int Are3FF(std::vector< float > &OptFilterDigits, int OptFilterGain, int ch_type)
Definition: TileCellSelector.cxx:2111
TileCellSelector::m_tileError
unsigned int m_tileError
Definition: TileCellSelector.h:95
TileCellSelector::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileCellSelector.h:71
TileCellSelector::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileCellSelector.h:114
TileCellSelector::m_maxTimeCell
float m_maxTimeCell
Definition: TileCellSelector.h:129
TileCellSelector::m_chanBad
std::vector< bool > m_chanBad
Definition: TileCellSelector.h:97
TileCellSelector::m_checkError
bool m_checkError
Definition: TileCellSelector.h:167
TileCellSelector::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileCellSelector.h:117
TileCellSelector::m_readRawChannels
bool m_readRawChannels
Definition: TileCellSelector.h:108
TileCellSelector::m_maxChan
unsigned int m_maxChan
Definition: TileCellSelector.h:59
TileCellSelector::m_minCell
unsigned int m_minCell
Definition: TileCellSelector.h:56
TileCellSelector::m_ptnEneChan
int m_ptnEneChan[3]
Definition: TileCellSelector.h:133
TileCellSelector::m_chanTDsp
std::vector< float > m_chanTDsp
Definition: TileCellSelector.h:101
TileCellSelector::m_readDigits
bool m_readDigits
Definition: TileCellSelector.h:109
TileCellSelector::m_chanDsp
std::vector< float > m_chanDsp
Definition: TileCellSelector.h:100
TileCellSelector
Definition: TileCellSelector.h:40
TileCellSelector::m_ADCmaxMinusEps
float m_ADCmaxMinusEps
Definition: TileCellSelector.h:179
TileCellSelector::m_underLG
unsigned int m_underLG
Definition: TileCellSelector.h:64
ITileBadChanTool.h
TileCellSelector::m_skipMBTS
bool m_skipMBTS
Definition: TileCellSelector.h:154
TileCellSelector::m_bitEneChan
bool m_bitEneChan[3][ptnlength]
Definition: TileCellSelector.h:141
TileCellSelector::m_tileBadChanTool
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Definition: TileCellSelector.h:73
TileCellSelector::m_tileInfo
const TileInfo * m_tileInfo
Definition: TileCellSelector.h:178
TileCellSelector::TileCellSelector
TileCellSelector(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TileCellSelector.cxx:36
TileCellSelector::m_cabling
const TileCablingService * m_cabling
Definition: TileCellSelector.h:72
TileCellSelector::m_jump
unsigned int m_jump
Definition: TileCellSelector.h:60
TileCellSelector::m_minBadDMU
int m_minBadDMU
Definition: TileCellSelector.h:149
TileCellSelector::m_evtBCID
unsigned int m_evtBCID
Definition: TileCellSelector.h:80
TileCellSelector::m_checkOverHG
bool m_checkOverHG
Definition: TileCellSelector.h:159
TileCellSelector::m_infoName
std::string m_infoName
Definition: TileCellSelector.h:177
TileCellSelector::m_ptnEneCell
int m_ptnEneCell
Definition: TileCellSelector.h:132