ATLAS Offline Software
Loading...
Searching...
No Matches
TileCellSelector Class Reference

#include <TileCellSelector.h>

Inheritance diagram for TileCellSelector:

Public Member Functions

 TileCellSelector (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TileCellSelector ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

int Are3FF (std::vector< float > &OptFilterDigits, int OptFilterGain, int ch_type)
void printCell (const TileCell *cell)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

unsigned int m_counter
unsigned int m_accept
unsigned int m_minCell
unsigned int m_maxCell
unsigned int m_minChan
unsigned int m_maxChan
unsigned int m_jump
unsigned int m_const
unsigned int m_overLG
unsigned int m_overHG
unsigned int m_underLG
unsigned int m_underHG
unsigned int m_dqerr
unsigned int m_dmuerr
unsigned int m_warnerr
const TileID * m_tileID
const TileHWID * m_tileHWID
const TileCablingService * m_cabling
ToolHandle< ITileBadChanTool > m_tileBadChanTool {this, "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey {this, "TileDQstatus", "TileDQstatus", "TileDQstatus key"}
ToolHandle< ITileDCSTool > m_tileDCS {this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"}
unsigned int m_runNum
unsigned int m_lumiBlock
unsigned int m_evtNum
unsigned int m_evtBCID
unsigned int m_tileFlag
unsigned int m_tileError
std::vector< bool > m_chanBad
std::vector< float > m_chanEne
std::vector< float > m_chanTime
std::vector< float > m_chanDsp
std::vector< float > m_chanTDsp
std::vector< float > m_chanQua
std::vector< bool > m_chanSel
std::vector< bool > m_chanToSkip
std::vector< bool > m_drawerToSkip
bool m_readCells
bool m_readRawChannels
bool m_readDigits
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
float m_minEneCell
float m_maxEneCell
float m_minEneChan [3] {}
float m_maxEneChan [3] {}
float m_minTimeCell
float m_maxTimeCell
float m_minTimeChan [3] {}
float m_maxTimeChan [3] {}
int m_ptnEneCell
int m_ptnEneChan [3] {}
int m_ptnTimeCell
int m_ptnTimeChan [3] {}
int m_selectGain
bool m_skipGain [2] {}
bool m_bitEneCell [ptnlength] {}
bool m_bitTimeCell [ptnlength] {}
bool m_bitEneChan [3][ptnlength] {}
bool m_bitTimeChan [3][ptnlength] {}
float m_secondMaxLevel
float m_jumpDeltaHG
float m_jumpDeltaLG
float m_pedDeltaHG
float m_pedDeltaLG
int m_constLength
int m_minBadDMU
int m_maxBadDMU
int m_minBadMB
bool m_skipEmpty
bool m_skipMasked
bool m_skipMBTS
bool m_checkDCS
bool m_checkJumps
bool m_checkDMUs
bool m_checkOverLG
bool m_checkOverHG
bool m_checkUnderLG
bool m_checkUnderHG
float m_overflowLG
float m_overflowHG
float m_underflowLG
float m_underflowHG
bool m_checkWarning
bool m_checkError
bool m_printOnly
std::vector< int > m_drawer
std::vector< int > m_drawerToCheck
std::vector< int > m_chanToCheck
int m_maxVerboseCnt
std::vector< int > m_nDrawerOff
std::string m_infoName
const TileInfo * m_tileInfo
float m_ADCmaxMinusEps = 0.0F
float m_ADCmaskValueMinusEps = 0.0F
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 40 of file TileCellSelector.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileCellSelector()

TileCellSelector::TileCellSelector ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 35 of file TileCellSelector.cxx.

36 : AthAlgorithm(name, pSvcLocator)
37 , m_counter(0)
38 , m_accept(0)
39 , m_minCell(0)
40 , m_maxCell(0)
41 , m_minChan(0)
42 , m_maxChan(0)
43 , m_jump(0)
44 , m_const(0)
45 , m_overLG(0)
46 , m_overHG(0)
47 , m_underLG(0)
48 , m_underHG(0)
49 , m_dqerr(0)
50 , m_dmuerr(0)
51 , m_warnerr(0)
52 , m_tileID(0)
53 , m_tileHWID(0)
54 , m_cabling(0)
55 , m_runNum(0)
56 , m_lumiBlock(0)
57 , m_evtNum(0)
58 , m_evtBCID(0)
59 , m_tileFlag(0)
60 , m_tileError(0)
61 , m_readCells(true)
62 , m_readRawChannels(true)
63 , m_readDigits(true)
64 , m_tileInfo(0)
65{
66
67 declareProperty( "MinEnergyCell", m_minEneCell = -5000.); // cut on cell energy
68 declareProperty( "MaxEnergyCell", m_maxEneCell = 1000000.); // cut on cell energy
69 declareProperty( "PtnEnergyCell", m_ptnEneCell = 101); // cell energy pattern, accept events only below min (+1), between min-max (+10), above max (+100)
70 declareProperty( "MinEnergyChan", m_minEneChan[0] = -5000.); // cut on channel energy
71 declareProperty( "MaxEnergyChan", m_maxEneChan[0] = 500000.); // cut on channel energy
72 declareProperty( "PtnEnergyChan", m_ptnEneChan[0] = 101); // channel energy pattern
73 declareProperty( "MinEnergyGap", m_minEneChan[1] = -10000.); // cut on channel energy
74 declareProperty( "MaxEnergyGap", m_maxEneChan[1] = 500000.); // cut on channel energy
75 declareProperty( "PtnEnergyGap", m_ptnEneChan[1] = 101); // channel energy pattern
76 declareProperty( "MinEnergyMBTS", m_minEneChan[2] = -10000.); // cut on channel energy
77 declareProperty( "MaxEnergyMBTS", m_maxEneChan[2] = 500000.); // cut on channel energy
78 declareProperty( "PtnEnergyMBTS", m_ptnEneChan[2] = 101); // channel energy pattern
79
80 declareProperty( "MinTimeCell", m_minTimeCell = -100.); // cut on cell time
81 declareProperty( "MaxTimeCell", m_maxTimeCell = 100.); // cut on cell time
82 declareProperty( "PtnTimeCell", m_ptnTimeCell = 10); // cell time pattern, accept events only below min (+1), between min-max (+10), above max (+100)
83 declareProperty( "MinTimeChan", m_minTimeChan[0] = -100.); // cut on channel time
84 declareProperty( "MaxTimeChan", m_maxTimeChan[0] = 100.); // cut on channel time
85 declareProperty( "PtnTimeChan", m_ptnTimeChan[0] = 10); // channel time pattern
86 declareProperty( "MinTimeGap", m_minTimeChan[1] = -100.); // cut on channel time
87 declareProperty( "MaxTimeGap", m_maxTimeChan[1] = 100.); // cut on channel time
88 declareProperty( "PtnTimeGap", m_ptnTimeChan[1] = 10); // channel time pattern
89 declareProperty( "MinTimeMBTS", m_minTimeChan[2] = -100.); // cut on channel time
90 declareProperty( "MaxTimeMBTS", m_maxTimeChan[2] = 100.); // cut on channel time
91 declareProperty( "PtnTimeMBTS", m_ptnTimeChan[2] = 10); // channel time pattern
92
93 declareProperty( "SelectGain", m_selectGain = 2); // 0 - select LG only, 1 - HG only, 2 - both gains
96
97 // pattern - decimal number with up to 5 digits
98 // only values 1(=true) and 0(=false) for every digit are used
99 // digit 0 set to 1 - accept event if value < min
100 // digit 1 set to 1 - accept event if min < value < max
101 // digit 2 set to 1 - accept event if value > max
102 // digit 3 set to 1 - accept ene only if quality is good
103 // or accept time if time != 0
104 // digit 4 set to 1 - accept ene only if quality is bad
105 // or accept time if time == 0
106
107 declareProperty( "SecondMaxLevel",m_secondMaxLevel = 0.3); // sample below max should be above (max-min)*m_secondMax
108 declareProperty( "JumpDeltaHG", m_jumpDeltaHG = 50.0); // minimal jump in high gain
109 declareProperty( "JumpDeltaLG", m_jumpDeltaLG = 10.0); // minimal jump in low gain
110 declareProperty( "PedDetlaHG", m_pedDeltaHG = 4.1); // max variation of "const" value in high gain
111 declareProperty( "PedDetlaLG", m_pedDeltaLG = 4.1); // max variation of "const" value in low gain
112 declareProperty( "ConstLength", m_constLength = 6); // min number of consecutive samples of the same value
113 declareProperty( "MinBadDMU", m_minBadDMU = 4); // min number of bad DMUs to accept event
114 declareProperty( "MaxBadDMU", m_maxBadDMU = 15); // max number of bad DMUs to accept event
115 declareProperty( "MinBadMB", m_minBadMB = 4); // min number of bad motherboards in a drawer to accept event
116 declareProperty( "SkipEmpty", m_skipEmpty = true); // ignore empty channels in selection or not
117 declareProperty( "SkipMasked", m_skipMasked = true); // ignore masked channels in selection or not
118 declareProperty( "SkipMBTS", m_skipMBTS = true); // ignore MBTS channels in selection or not
119 declareProperty( "CheckDCS", m_checkDCS = true); // additional check for DCS status
120 declareProperty( "DrawerToDump", m_drawer); // for which drawer all channels should be printed
121 declareProperty( "DrawerToCheck",m_drawerToCheck); // for which drawer all checks should be performed
122 declareProperty( "ChannelToCheck",m_chanToCheck); // for which channels all checks should be performed
123
124 declareProperty( "CheckJumps", m_checkJumps = true); // global flag which allows to swithc on/off all checks in digits
125 declareProperty( "CheckDMUs", m_checkDMUs = true); // global flag which allows to swithc on/off DMU checks
126 declareProperty( "CheckOverLG" ,m_checkOverLG = true); // select events with overflow in low gain
127 declareProperty( "CheckOverHG", m_checkOverHG = false); // select events with overflow in high gain
128 declareProperty( "CheckUnderLG", m_checkUnderLG = false); // select events with underflow in low gain
129 declareProperty( "CheckUnderHG", m_checkUnderHG = false); // select events with underflow in high gain
130 declareProperty( "OverflowLG", m_overflowLG = -0.1); // threshold for overflow in low gain (smaller than ADCmax by this value)
131 declareProperty( "OverflowHG", m_overflowHG = -1.1); // threshold for overflow in high gain (smaller than ADCmax by this value)
132 declareProperty( "UnderflowLG", m_underflowLG = 0.1); // threshold for underflow in low gain
133 declareProperty( "UnderflowHG", m_underflowHG = 2.1); // threshold for underflow in high gain
134
135 declareProperty( "CheckWarning", m_checkWarning = false); // select events with warning status in TileCal status word
136 declareProperty( "CheckError", m_checkError = false); // select events with error status in TileCal status word
137 declareProperty( "PrintOnly", m_printOnly = false); // only print acccepted events, but do not accept anything
138
139 declareProperty( "MaxVerboseCnt",m_maxVerboseCnt=20); // max number of verbose output lines about drawer off
140
141 declareProperty("TileInfoName", m_infoName = "TileInfo");
142}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const TileCablingService * m_cabling
std::vector< int > m_chanToCheck
unsigned int m_minCell
unsigned int m_jump
unsigned int m_runNum
unsigned int m_lumiBlock
unsigned int m_evtBCID
unsigned int m_evtNum
unsigned int m_warnerr
unsigned int m_const
unsigned int m_underLG
unsigned int m_dmuerr
std::vector< int > m_drawerToCheck
unsigned int m_underHG
unsigned int m_counter
unsigned int m_maxCell
std::vector< int > m_drawer
unsigned int m_tileFlag
unsigned int m_accept
unsigned int m_overLG
const TileHWID * m_tileHWID
unsigned int m_maxChan
unsigned int m_minChan
const TileInfo * m_tileInfo
unsigned int m_overHG
const TileID * m_tileID
unsigned int m_tileError
unsigned int m_dqerr

◆ ~TileCellSelector()

TileCellSelector::~TileCellSelector ( )
virtual

Definition at line 145 of file TileCellSelector.cxx.

145 {
146}

Member Function Documentation

◆ Are3FF()

int TileCellSelector::Are3FF ( std::vector< float > & OptFilterDigits,
int OptFilterGain,
int ch_type )
private

Definition at line 2109 of file TileCellSelector.cxx.

2109 {
2110 bool allSaturated = true;
2111 int error = 0;
2112
2113 unsigned int nSamp = OptFilterDigits.size();
2114 if (nSamp) {
2115 float dmin = OptFilterDigits[0];
2116 float dmax = dmin;
2117
2118 for (unsigned int i = 1; i < nSamp; ++i) {
2119 float dig = OptFilterDigits[i];
2120 if (dig > dmax) dmax = dig;
2121 else if (dig < dmin) dmin = dig;
2122 }
2123 allSaturated = (dmin > m_ADCmaxMinusEps);
2124
2125 // FIXME:: set these parameters from JobOptions
2126 // FIXME:: move this method to base class
2127 const float epsilon = 4.1; // allow +/- 2 counts fluctuations around const value
2128 const float delta[4] = {29.9, 29.9, 49.9, 99.9}; // jump levels between constLG, constHG, non-constLG, non-constHG
2129 const float level0 = 29.9; // jump from this level to zero is bad
2130 const float level1 = 99.9; // jump from this level to m_tileInfo->ADCmax() is bad
2131 const float level2 = 199.9; // base line at this level is bad
2132 const float delt = std::min(std::min(std::min(delta[0], delta[1]), std::min(delta[2], delta[3])), level0);
2133
2134 if (!allSaturated && (dmax - dmin) > delt) {
2135 float abovemin = dmax;
2136 float belowmax = dmin;
2137 unsigned int nmin = 0;
2138 unsigned int nmax = 0;
2139 unsigned int pmin = nSamp;
2140 unsigned int pmax = nSamp;
2141 for (unsigned int i = 0; i < nSamp; ++i) {
2142 float smp = OptFilterDigits[i];
2143 if (smp - dmin < epsilon) {
2144 ++nmin;
2145 pmin = i;
2146 }
2147 if (dmax - smp < epsilon) {
2148 ++nmax;
2149 pmax = i;
2150 }
2151 if (smp < abovemin && smp > dmin) {
2152 abovemin = smp;
2153 }
2154 if (smp > belowmax && smp < dmax) {
2155 belowmax = smp;
2156 }
2157 }
2158
2159 if (abovemin != dmax || belowmax != dmin) { // more than two different values
2160 gain += 2; // shift index by 2, i.e. use thresholds for non-const levels
2161 }
2162
2163 if (dmin < 0.01 && dmax > m_ADCmaxMinusEps) { // jump from zero to saturation
2164 error = 1;
2165 } else if (dmin < 0.01 && abovemin > level0 && nmin > 1) { // at least two samples at zero, others - above pedestal
2166 error = 2;
2167 } else if (dmax > m_ADCmaxMinusEps && belowmax < level1 && nmax > 1) { // at least two saturated. others - close to pedestal
2168 error = 3;
2169 } else if (dmin>level2 && (gain==0 || ch_type<2) ) { // baseline above threshold is bad
2170 error = 9; // but should not apply that to MBTS
2171 } else if (nmax+nmin==nSamp && (dmax-dmin) > delta[gain]) {
2172 if (nmax>1 && nmin>1) { // at least 2 samples at two distinct levels
2173 error = 4;
2174 } else if (nmax==1) {
2175 if (pmax>0 && pmax<nSamp-1) { // jump up in one sample, but not at the edge
2176 error = 5;
2177 }
2178 } else if (nmin==1) { // jump down in one sample
2179 error = 6;
2180 }
2181 }
2182 if (!error && (dmax - dmin) > delta[gain]) {
2183 float secondMax = (dmax - dmin) * m_secondMaxLevel;
2184 if (pmax > 0 && pmax < nSamp - 1
2185 && std::max(OptFilterDigits[pmax - 1], OptFilterDigits[pmax + 1]) < dmin + secondMax) {
2186
2187 error = 7; // jump up in one sample in the middle. which is much higher than all others
2188 } else if (pmin > 0 && pmin < nSamp - 1
2189 && std::min(OptFilterDigits[pmin - 1], OptFilterDigits[pmin + 1]) > dmax - secondMax) {
2190
2191 error = 8; // jump down in one sample. which is much lower than all others
2192 }
2193 }
2194 }
2195 }
2196
2197 if (allSaturated)
2198 return 99;
2199 else
2200 return error;
2201}
const int nmax(200)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TileCellSelector::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 374 of file TileCellSelector.cxx.

374 {
375 //ATH_MSG_DEBUG ("execute()");
376
377
378 ++m_counter;
379
380 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
381 if ( eventInfo.isValid() ) {
382 m_runNum = eventInfo->runNumber();
383 m_lumiBlock = eventInfo->lumiBlock();
384 m_evtNum = eventInfo->eventNumber();
385 m_evtBCID = eventInfo->bcid();
386 m_tileFlag = eventInfo->eventFlags(EventInfo::Tile);
387 m_tileError = eventInfo->errorState(EventInfo::Tile);
388 } else {
389 m_runNum = 0;
390 m_evtNum = 0;
391 m_lumiBlock = 0;
392 m_evtBCID = 0;
393 m_tileFlag = 0;
394 m_tileError = 0;
395 }
396
397 std::ostringstream evState;
398 evState << "Run "<< std::setw(6) << m_runNum
399 <<" LB "<< std::setw(4) << m_lumiBlock
400 <<" Evt "<< std::setw(9) << m_evtNum
401 <<" ErrState " << m_tileError
402 <<" Flags 0x" << std::hex << m_tileFlag << std::dec;
403
404 std::ostringstream evtnum;
405 evtnum << "Run "<< std::setw(6) << m_runNum
406 <<" LB "<< std::setw(4) << m_lumiBlock
407 <<" Evt "<< std::setw(9) << m_evtNum
408 <<" BCID "<< std::setw(4) << m_evtBCID;
409
410 std::ostringstream nevtnum;
411 nevtnum << evtnum.str()
412 <<" nevt "<< std::setw(6) << m_counter;
413
414 bool emptyBad = true;
415 bool badFromCell = false;
416 m_chanBad.clear();
417 m_chanBad.resize(1+TileHWID::NOT_VALID_HASH,true);
418 m_chanEne.clear();
420 m_chanTime.clear();
422 m_chanQua.clear();
424 m_chanSel.clear();
425 m_chanSel.resize(1+TileHWID::NOT_VALID_HASH,false);
426
427 IdContext chan_context = m_tileHWID->channel_context();
428 IdentifierHash hash;
429 for (size_t i=0; i<m_drawer.size(); ++i) {
430 HWIdentifier drawer_id = m_tileHWID->drawer_id(m_drawer[i]);
431 HWIdentifier ch_id = m_tileHWID->channel_id(drawer_id,0);
432 m_tileHWID->get_hash(ch_id, hash, &chan_context);
433 auto itr = m_chanSel.begin() + hash;
434 std::fill(itr,itr+48,true);
435 }
436
437 bool statusOk = (m_checkWarning && m_tileError == EventInfo::Warning) ||
439 if (statusOk) {
440 ++m_warnerr;
441
442 using namespace boost::local_time;
443 using namespace boost::posix_time;
444 static const time_zone_ptr gva_tz(new posix_time_zone((std::string)"CET+01CEST01:00:00,M3.5.0/02:00:00,M10.5.0/03:00:00"));
445 local_date_time gva_time(from_time_t(eventInfo->timeStamp()),gva_tz);
446 evState << " " << gva_time << " ";
447
448
449 const char * part[5] = { "UNK", "LBA", "LBC", "EBA", "EBC" };
451 int dn = (m_tileFlag >> 16) & 0xF;
452 int n1 = (m_tileFlag >> 20) & 0x3F;
453 int n2 = (n1 + dn - 1) % 64;
454 int rr = ((m_tileFlag >> 26) & 0x3) + 1;
455 evState << " " << part[rr] <<std::setw(2)<<std::setfill('0')<<n1+1
456 << " - " << part[rr] <<std::setw(2)<<std::setfill('0')<<n2+1
457 << " " << dn << " consec bad ";
458 }
459 else if (m_tileError == EventInfo::Error) {
460 int dn = (m_tileFlag >> 16) & 0xF;
461 int p0 = m_tileFlag & 0xF; // sends any data above threshold
462 int p1 = (m_tileFlag >> 20) & 0xF; // 16 drawers masked
463 int p2 = (m_tileFlag >> 24) & 0xF; // 16 drawers off
464 int pp = 1;
465 for (int rr = 1; rr < 5; ++rr) {
466 if ((p2 & pp) || (p1 & pp)) {
467 evState << " " << part[rr];
468 if (p2 & pp) {
469 if (p0 & pp) evState << " off";
470 else evState << " OFF";
471 }
472 if (p1 & pp) {
473 if (p0 & pp) evState << " mask";
474 else evState << " MASK";
475 }
476 }
477 pp <<= 1;
478 }
479 evState << " " << dn << " consec bad ";
480 }
481
482 if (m_checkDCS) {
483 int n1 = -1;
484 int n2 = -1;
485 int dn = 0;
486 int rr = 0;
487 int m1 = -1;
488 int m2 = -1;
489 int dm = -1;
490 std::vector<int> allmod;
491 std::vector<int> consec;
492 for (int ros = 1; ros < 5; ++ros) {
493 int drmax = 65;
494 for (int dr = 0; dr < drmax; ++dr) {
495 int drawer = dr % 64;
496 if (m_tileDCS->getDCSStatus(ros, drawer) == TileDCSState::ALERT_DRAWER) {
497 if (m1 < 0) m1 = dr;
498 m2 = dr;
499 if (dr < 64) allmod.push_back((ros << 8) + dr);
500 } else if (m1 >= 0) {
501 dm = m2 - m1 + 1;
502 if (m1 == 0) drmax += dm;
503 if (dm > dn) {
504 n1 = m1;
505 n2 = m2;
506 dn = dm;
507 rr = ros;
508 consec.clear();
509 consec.push_back((ros << 8) + m1);
510 } else if (dm == dn) {
511 if (m1 < 64) consec.push_back((ros << 8) + m1);
512 }
513 m1 = m2 = -1;
514 }
515 }
516 }
517 evState << " DCS " << allmod.size() << " off ";
518 if (dn > 1) {
519 evState << dn;
520 if (consec.size() > 1) evState << "*" << (consec.size());
521 evState << " consec "
522 << part[rr] << std::setw(2) << std::setfill('0') << (n1 % 64) + 1 << " - "
523 << part[rr] << std::setw(2) << std::setfill('0') << (n2 % 64) + 1 << " ";
524 n1 += (rr << 8);
525 n2 += (rr << 8);
526 for (size_t n = 1; n < consec.size(); ++n) {
527 m1 = consec[n];
528 m2 = m1 + dn - 1;
529 evState << part[m1 >> 8] << std::setw(2) << std::setfill('0') << (m1 % 64) + 1 << " - "
530 << part[m2 >> 8] << std::setw(2) << std::setfill('0') << (m2 % 64) + 1 << " ";
531 for (size_t m = 0; m < allmod.size(); ++m) {
532 int mm = allmod[m];
533 if (mm >= m1 && mm <= m2) {
534 allmod[m] += n1 - m1;
535 }
536 }
537 }
538 } else {
539 n1 = n2 = dn = 0;
540 }
541 if (allmod.size() > (size_t) dn) {
542 for (size_t m = 0; m < allmod.size(); ++m) {
543 int mm = allmod[m];
544 if (!(mm >= n1 && mm <= n2)) {
545 evState << part[mm >> 8] << std::setw(2) << std::setfill('0') << (mm % 64) + 1 << " ";
546 }
547 }
548 }
549 }
550
551 ATH_MSG_DEBUG (evState.str() << " accepted");
552 }
553
554 int rawdata = -1;
555 const TileCell* cellminCh = 0;
556 const TileCell* cellmaxCh = 0;
557 const TileCell* tcellminCh = 0;
558 const TileCell* tcellmaxCh = 0;
559
560 if (m_readCells) {
561
562 // Get Calo cell container
563 SG::ReadHandle<CaloCellContainer> cellContainer(m_cellContainerKey, ctx);
564
565 if (!cellContainer.isValid()) {
566
567 ATH_MSG_WARNING("Unable to read CaloCellContainer from EventStore, disable reading of this container");
568 m_readCells = false;
569
570 } else {
571
572 float emin = 0.;
573 float emax = 0.;
574 float tmin = 0.;
575 float tmax = 0.;
576 float chmin = 0.;
577 float chmax = 0.;
578 float tcmin = 0.;
579 float tcmax = 0.;
580 const TileCell* cellmin = 0;
581 const TileCell* cellmax = 0;
582 const TileCell* tcellmin = 0;
583 const TileCell* tcellmax = 0;
584
585 // special case - check overflow here if digits container is not available
586 // should be careful here, because in TileCell overflow bit is set to 1
587 // both for overflow and underflow and underflow is HG are very often in gap cells
588 // also, overflow in HG might be masked if quality is too bad, so we'll not select all overflows...
589 // that's why only overflow in LG are checked
590 bool checkOver = (m_checkOverLG && m_digitsContainerKey.key().empty());
591
592 for (const CaloCell* cell : *cellContainer) {
593
594 Identifier id = cell->ID();
595 if ( m_tileID->is_tile(id) ) {
596 const TileCell* tile_cell = dynamic_cast<const TileCell*> (cell);
597 if (tile_cell==0) continue;
598 const CaloDetDescrElement * caloDDE = cell->caloDDE();
599 IdentifierHash hash1 = caloDDE->onl1();
600 IdentifierHash hash2 = caloDDE->onl2();
601 if ( m_chanToSkip[hash1] && m_chanToSkip[hash2] ) continue;
602 int ch_type = (hash2 == TileHWID::NOT_VALID_HASH) ? 1 : 0;
603 if (rawdata < 0) {
604 rawdata = (tile_cell->qbit1() & TileCell::MASK_CMPC) ? 0 : 1;
605 }
606
607 bool bad1 = tile_cell->badch1();
608 bool bad2 = tile_cell->badch2();
609 float ene1 = tile_cell->ene1();
610 float ene2 = tile_cell->ene2();
611 float time1 = tile_cell->time1();
612 float time2 = tile_cell->time2();
613 m_chanBad[hash1] = bad1;
614 m_chanBad[hash2] = bad2;
615 m_chanEne[hash1] = ene1;
616 m_chanEne[hash2] = ene2;
617 m_chanTime[hash1] = time1;
618 m_chanTime[hash2] = time2;
619 m_chanQua[hash1] = tile_cell->qual1();
620 m_chanQua[hash2] = tile_cell->qual2();
621
622 float ene = tile_cell->energy();
623 bool eneOk = false;
624 if (ene < m_minEneCell) {
625 eneOk = m_bitEneCell[0];
626 } else if (ene > m_maxEneCell) {
627 eneOk = m_bitEneCell[2];
628 } else {
629 eneOk = m_bitEneCell[1];
630 }
631
632 if (eneOk) {
633 if (bad1 && bad2) {
634 if (m_bitEneCell[3]) eneOk = false; // request good cells only, but cell is bad
635 } else {
636 if (m_bitEneCell[4]) eneOk = false; // request bad cells only, but cell is good
637 }
638 }
639
640 float time = tile_cell->time();
641 bool timeOk = false;
642 if (time < m_minTimeCell) {
643 timeOk = m_bitTimeCell[0];
644 } else if (time > m_maxTimeCell ) {
645 timeOk = m_bitTimeCell[2];
646 } else {
647 timeOk = m_bitTimeCell[1];
648 }
649
650 if (timeOk) {
651 if (time != 0.) {
652 if (m_bitTimeCell[4]) timeOk = false; // request time==0 only, but time!=0
653 } else {
654 if (m_bitTimeCell[3]) timeOk = false; // request time!=0 only, but time==0
655 }
656 }
657
658 if (timeOk && eneOk) {
659
660 ATH_MSG_VERBOSE( evtnum.str()
661 << " cell " << std::left << std::setw(14) << m_tileID->to_string(id,-2)
662 << " ene = " << ene << " time = " << time);
663
664 m_chanSel[hash1] = true;
665 m_chanSel[hash2] = true;
666
667 if (ene < emin) {
668 emin = ene;
669 cellmin = tile_cell;
670 } else if (ene > emax) {
671 emax = ene;
672 cellmax = tile_cell;
673 }
674
675 if (time<tmin) {
676 tmin = time;
677 tcellmin = tile_cell;
678 }
679 else if (time>tmax) {
680 tmax = time;
681 tcellmax = tile_cell;
682 }
683 }
684
685 if ( !(bad1 && bad2) ) {
686
687 bool ene1Ok = false;
688 bool time1Ok = false;
689
690 if ( !(bad1 || m_skipGain[tile_cell->gain1()]) ) {
691 if (time1 < m_minTimeChan[ch_type] ) {
692 time1Ok = m_bitTimeChan[ch_type][0];
693 } else if (time1 > m_maxTimeChan[ch_type] ) {
694 time1Ok = m_bitTimeChan[ch_type][2];
695 } else {
696 time1Ok = m_bitTimeChan[ch_type][1];
697 }
698
699 if (ene1 < m_minEneChan[ch_type] ) {
700 ene1Ok = m_bitEneChan[ch_type][0];
701 } else if (ene1 > m_maxEneChan[ch_type] ) {
702 ene1Ok = m_bitEneChan[ch_type][2];
703 } else {
704 ene1Ok = m_bitEneChan[ch_type][1];
705 }
706
707 if (ene1Ok) {
708 if (m_bitEneChan[ch_type][4]) ene1Ok = false; // request bad chan only, but chan is good
709 }
710
711 if (time1Ok) {
712 if (time1 != 0.) {
713 if (m_bitTimeChan[ch_type][4]) time1Ok = false; // request time==0 only, but time!=0
714 } else {
715 if (m_bitTimeChan[ch_type][3]) time1Ok = false; // request time!=0 only, but time==0
716 }
717 }
718 }
719
720 bool ene2Ok = false;
721 bool time2Ok = false;
722
723 if ( !(bad2 || m_skipGain[tile_cell->gain2()]) ) {
724 if (ene2 < m_minEneChan[ch_type] ) {
725 ene2Ok = m_bitEneChan[ch_type][0];
726 } else if (ene2 > m_maxEneChan[ch_type] ) {
727 ene2Ok = m_bitEneChan[ch_type][2];
728 } else {
729 ene2Ok = m_bitEneChan[ch_type][1];
730 }
731
732 if (time2 < m_minTimeChan[ch_type] ) {
733 time2Ok = m_bitTimeChan[ch_type][0];
734 } else if (time2 > m_maxTimeChan[ch_type] ) {
735 time2Ok = m_bitTimeChan[ch_type][2];
736 } else {
737 time2Ok = m_bitTimeChan[ch_type][1];
738 }
739
740 if (ene2Ok) {
741 if (m_bitEneChan[ch_type][4]) ene2Ok = false; // request bad chan only, but chan is good
742 }
743
744 if (time2Ok) {
745 if (time2 != 0.) {
746 if (m_bitTimeChan[ch_type][4]) time2Ok = false; // request time==0 only, but time!=0
747 } else {
748 if (m_bitTimeChan[ch_type][3]) time2Ok = false; // request time!=0 only, but time==0
749 }
750 }
751 }
752
753 bool over1=false;
754 bool over2=false;
755 if (checkOver) {
756 over1 = ( (!bad1) && (tile_cell->qbit1() & TileCell::MASK_OVER) && tile_cell->gain1()==TileID::LOWGAIN);
757 over2 = ( (!bad2) && (tile_cell->qbit2() & TileCell::MASK_OVER) && tile_cell->gain2()==TileID::LOWGAIN);
758 }
759
760 if ((ene1Ok && time1Ok) || over1) {
761
762 ATH_MSG_VERBOSE( evtnum.str()
763 << " cell " << std::left << std::setw(14) << m_tileID->to_string(id,-2)
764 << " ch_ene1 = " << ene1 << " ch_t1 = " << time1
765 << ((over1)?" overflow":""));
766
767 m_chanSel[hash1] = true;
768 m_chanSel[hash2] = true;
769
770 if (ene1 < chmin) {
771 chmin = ene1;
772 cellminCh = tile_cell;
773 } else if (ene1 > chmax) {
774 chmax = ene1;
775 cellmaxCh = tile_cell;
776 }
777
778 if (time1 < tcmin) {
779 tcmin = time1;
780 tcellminCh = tile_cell;
781 } else if (time1 > tcmax) {
782 tcmax = time1;
783 tcellmaxCh = tile_cell;
784 }
785 }
786
787 if ((ene2Ok && time2Ok) || over2) {
788
789 ATH_MSG_VERBOSE( evtnum.str()
790 << " cell " << std::left << std::setw(14) << m_tileID->to_string(id,-2)
791 << " ch_ene2 = " << ene2 << " ch_t2 = " << time2
792 << ((over2)?" overflow":""));
793
794 m_chanSel[hash1] = true;
795 m_chanSel[hash2] = true;
796
797 if (ene2 < chmin) {
798 chmin = ene2;
799 cellminCh = tile_cell;
800 } else if (ene2 > chmax) {
801 chmax = ene2;
802 cellmaxCh = tile_cell;
803 }
804
805 if (time2 < tcmin) {
806 tcmin = time2;
807 tcellminCh = tile_cell;
808 } else if (time2 > tcmax) {
809 tcmax = time2;
810 tcellmaxCh = tile_cell;
811 }
812 }
813
814 }
815 }
816 }
817
818 if (tcellmin && tcellmin != cellmin && tcellmin != cellmax) {
819 ATH_MSG_DEBUG( nevtnum.str()
820 << " cell " << std::left << std::setw(14) << m_tileID->to_string(tcellmin->ID(),-2)
821 << " ene = " << tcellmin->energy()
822 << " tmin = " << tcellmin->time());
823 }
824 if (tcellmax && tcellmax != cellmin && tcellmax != cellmax) {
825 ATH_MSG_DEBUG( nevtnum.str()
826 << " cell " << std::left << std::setw(14) << m_tileID->to_string(tcellmax->ID(),-2)
827 << " ene = " << tcellmax->energy()
828 << " tmax = " << tcellmax->energy());
829 }
830
831 if (tcellminCh && tcellminCh != cellminCh && tcellminCh != cellmaxCh) {
832 ATH_MSG_DEBUG( nevtnum.str()
833 << " cell " << std::left << std::setw(14) << m_tileID->to_string(tcellminCh->ID(),-2)
834 << " ch_ene = " << tcellminCh->ene1() << " " << tcellminCh->ene2()
835 << " ch_tmin = " << tcellminCh->time1() << " " << tcellminCh->time2());
836 }
837 if (tcellmaxCh && tcellmaxCh != cellminCh && tcellmaxCh != cellmaxCh) {
838 ATH_MSG_DEBUG( nevtnum.str()
839 << " cell " << std::left << std::setw(14) << m_tileID->to_string(tcellmaxCh->ID(),-2)
840 << " ch_ene = " << tcellmaxCh->ene1() << " " << tcellmaxCh->ene2()
841 << " ch_tmax = " << tcellmaxCh->time1() << " " << tcellmaxCh->time2());
842 }
843
844 if (cellmin) {
845 ++m_minCell;
846 statusOk = true;
847 const char * tit = (tcellmin == cellmin) ? " tmin = ": ((tcellmax == cellmin) ? " tmax = ": " t = ");
848 if (cellminCh!=cellmin) {
849 ATH_MSG_DEBUG( nevtnum.str()
850 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellmin->ID(),-2)
851 << " emin = " << emin
852 << tit << cellmin->time()
853 << " accepted");
854
855 } else {
856 ATH_MSG_DEBUG( nevtnum.str()
857 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellmin->ID(),-2)
858 << " emin = " << emin
859 << " ch_emin = " << chmin
860 << tit << cellmin->time()
861 << " accepted");
862 }
863 }
864
865 if (cellminCh) {
866 ++m_minChan;
867 statusOk = true;
868 const char * tit = (tcellminCh == cellminCh) ? " tmin = ": ((tcellmaxCh == cellminCh) ? " tmax = ": " t = ");
869 if (cellminCh!=cellmin) {
870 ATH_MSG_DEBUG( nevtnum.str()
871 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellminCh->ID(),-2)
872 << " ch_emin = " << chmin
873 << tit << cellminCh->time()
874 << " accepted");
875 }
876 }
877
878 if (cellmax) {
879 ++m_maxCell;
880 statusOk = true;
881 const char * tit = (tcellmin == cellmax) ? " tmin = ": ((tcellmax == cellmax) ? " tmax = ": " t = ");
882 if (cellmaxCh!=cellmax) {
883 ATH_MSG_DEBUG( nevtnum.str()
884 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellmax->ID(),-2)
885 << " emax = " << emax
886 << tit << cellmax->time()
887 << " accepted");
888
889 } else {
890 ATH_MSG_DEBUG( nevtnum.str()
891 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellmax->ID(),-2)
892 << " emax = " << emax
893 << " ch_emax = " << chmax
894 << tit << cellmax->time()
895 << " accepted");
896 }
897 }
898
899 if (cellmaxCh) {
900 ++m_maxChan;
901 statusOk = true;
902 const char * tit = (tcellminCh == cellmaxCh) ? " tmin = ": ((tcellmaxCh == cellmaxCh) ? " tmax = ": " t = ");
903 if (cellmaxCh!=cellmax) {
904 ATH_MSG_DEBUG( nevtnum.str()
905 << " cell " << std::left << std::setw(14) << m_tileID->to_string(cellmaxCh->ID(),-2)
906 << " ch_emax = " << chmax
907 << tit << cellmaxCh->time()
908 << " accepted");
909 }
910 }
911
912 emptyBad = false;
913 badFromCell = true;
914 }
915 }
916
917 const TileDQstatus* DQstatus(0);
918
919 if (m_readRawChannels) {
920
921 // Get Tile RawChannel container
922 SG::ReadHandle<TileRawChannelContainer> rawChannelContainer(m_rawChannelContainerKey, ctx);
923
924 if ( !rawChannelContainer.isValid() ) {
925 ATH_MSG_WARNING("Unable to read TileRawChannelContainer from EventStore, disable reading of this container");
926 m_readRawChannels = false;
927
928 } else {
929
930 float chmin = 0; // m_minEneChan[0];
931 float chmax = 0; // m_maxEneChan[0];
932 float tcmin = 0.;
933 float tcmax = 0.;
934 const TileRawChannel* minCh = 0;
935 const TileRawChannel* maxCh = 0;
936 const TileRawChannel* tminCh = 0;
937 const TileRawChannel* tmaxCh = 0;
938 TileRawChannelUnit::UNIT rChUnit = rawChannelContainer->get_unit();
939 bool allowAmpCheck = ( ( rChUnit == TileRawChannelUnit::MegaElectronVolts || // allow MeV only as units
941 bool fillChanEne = ( !m_readCells && allowAmpCheck ); // use amplitude from channel if cell container was not checked
942 if (!fillChanEne) {
943 m_chanDsp.clear();
945 m_chanTDsp.clear();
947 }
948
950 DQstatus = SG::makeHandle (m_dqStatusKey, ctx).get();
951 else
952 rawdata = 0;
953
954 IdContext chan_context = m_tileHWID->channel_context();
955 IdentifierHash hash;
956 int index=0, pmt;
957
958 int nbadMax = 0;
959 int nbadMBMax = 0;
960 const TileRawChannelCollection * collMax = 0;
961 const TileRawChannelCollection * collMBMax = 0;
962
963 bool someDQerrors = false;
964
965 for (const TileRawChannelCollection* rawChannelCollection : *rawChannelContainer) {
966
967 int frag = rawChannelCollection->identify();
968 bool eb = (frag > 0x2ff);
969 bool ebsp = (frag == 0x30e || frag == 0x411);
970
971 int ros = frag >> 8;
972 int drawer = frag & 0x3F;
973 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
974 if ( m_drawerToSkip[drawerIdx] ) continue;
975
976 int chMBTS = -1;
977 if (eb) {
978 for (int ch: {12,4,0}) {
979 m_cabling->h2s_cell_id_index(ros,drawer,ch,index,pmt);
980 if (index == -2) {
981 chMBTS = ch;
982 break;
983 }
984 }
985 }
986
987 HWIdentifier ch_id = m_tileHWID->channel_id(ros,drawer,0);
988 m_tileHWID->get_hash(ch_id, hash, &chan_context);
989 int hashNext = index = (int)hash + 48; // hash ID of the channel after current drawer
990
991 // all error words contains information in last 16 bits only
992 // but they are stored in collection as 32 bit numbers
993 uint32_t RODBCID = rawChannelCollection->getRODBCID();
994 uint32_t DSPBCID = rawChannelCollection->getFragDSPBCID();
995 uint32_t GlobalCRCErr = rawChannelCollection->getFragGlobalCRC() & 0x1;
996 uint32_t FE_DMUmask = rawChannelCollection->getFragFEChipMask();
997 uint32_t ROD_DMUmask = rawChannelCollection->getFragRODChipMask();
998 uint32_t BCIDErr = rawChannelCollection->getFragBCID();
999 uint32_t MemoryParityErr = rawChannelCollection->getFragMemoryPar();
1000 uint32_t HeaderFormatErr = rawChannelCollection->getFragHeaderBit();
1001 uint32_t HeaderParityErr = rawChannelCollection->getFragHeaderPar();
1002 uint32_t SampleFormatErr = rawChannelCollection->getFragSampleBit();
1003 uint32_t SampleParityErr = rawChannelCollection->getFragSamplePar();
1004 uint32_t SingleStrobeErr = rawChannelCollection->getFragSstrobe();
1005 uint32_t DoubleStrobeErr = rawChannelCollection->getFragDstrobe();
1006
1007 if (RODBCID!=0 && RODBCID != m_evtBCID ) {
1008 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1009 ATH_MSG_VERBOSE( evtnum.str()
1010 << " drw " << drwname(rawChannelCollection->identify())
1011 << " ROD BCID " << RODBCID << " is wrong - skipping");
1012
1013 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1014 ATH_MSG_VERBOSE( nevtnum.str()
1015 << " suppressing further messages about drawer 0x" << std::hex << rawChannelCollection->identify()
1016 << std::dec << " being bad");
1017 }
1018 someDQerrors = true;
1019 continue;
1020 }
1021
1022 if (DSPBCID >= 0x7FFF
1023 && GlobalCRCErr
1024 && FE_DMUmask == 0xFFFF
1025 && ROD_DMUmask == 0xFFFF
1026 && BCIDErr == 0xFFFF
1027 && MemoryParityErr == 0xFFFF
1028 && HeaderFormatErr == 0xFFFF
1029 && HeaderParityErr == 0xFFFF
1030 && SampleFormatErr == 0xFFFF
1031 && SampleParityErr == 0xFFFF
1032 && SingleStrobeErr == 0xFFFF
1033 && DoubleStrobeErr == 0xFFFF) {
1034
1035 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1036 ATH_MSG_VERBOSE( evtnum.str()
1037 << " drw " << drwname(rawChannelCollection->identify())
1038 << " is OFF - skipping");
1039
1040 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1041 ATH_MSG_VERBOSE( nevtnum.str()
1042 << " suppressing further messages about drawer 0x" << std::hex
1043 << rawChannelCollection->identify()
1044 << std::dec << " being bad");
1045 }
1046 continue;
1047 }
1048
1049 if (DSPBCID == 0
1050 && GlobalCRCErr == 0
1051 && FE_DMUmask == 0
1052 && ROD_DMUmask == 0
1053 && BCIDErr == 0
1054 && MemoryParityErr == 0
1055 && HeaderFormatErr == 0
1056 && HeaderParityErr == 0
1057 && SampleFormatErr == 0
1058 && SampleParityErr == 0
1059 && SingleStrobeErr == 0
1060 && DoubleStrobeErr == 0) {
1061
1062 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1063 ATH_MSG_VERBOSE( evtnum.str()
1064 << " drw " << drwname(rawChannelCollection->identify())
1065 << " is MISSING - skipping");
1066
1067 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1068 ATH_MSG_VERBOSE( nevtnum.str()
1069 << " suppressing further messages about drawer 0x" << std::hex
1070 << rawChannelCollection->identify() << std::dec << " being bad");
1071 }
1072 continue;
1073 }
1074
1075 if (GlobalCRCErr) {
1076 GlobalCRCErr = 0xFFFF; // global error - all wrong
1077 if (m_maxBadDMU<16) {
1078 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1079 ATH_MSG_VERBOSE( evtnum.str()
1080 << " drw " << drwname(rawChannelCollection->identify())
1081 << " global CRC error - skipping");
1082
1083 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1084 ATH_MSG_VERBOSE( nevtnum.str()
1085 << " suppressing further messages about drawer 0x" << std::hex
1086 << rawChannelCollection->identify() << std::dec << " being bad");
1087 }
1088 someDQerrors = true;
1089 continue;
1090 }
1091 }
1092
1093 if (HeaderFormatErr || HeaderParityErr || SampleFormatErr || SampleParityErr ) {
1094 FE_DMUmask = 0xFFFF; // can not trust FE mask, assume that all DMUs are good
1095 } else {
1096 if (eb) { // extended barrel
1097 if (ebsp) FE_DMUmask<<=1; // shift by one DMU in EBA15 EBC18
1098 FE_DMUmask = (FE_DMUmask & 0xFF) | ((FE_DMUmask & 0xF00)<<2); // shift upper half by two DMUs
1099 }
1100 }
1101
1102 FE_DMUmask = ~FE_DMUmask & 0xFFFF; // inversion for FE CRC
1103 ROD_DMUmask = ~ROD_DMUmask & 0xFFFF; // inversion for ROD CRC
1104
1105 if (BCIDErr & 0x2) { // DMU1 (second DMU) is bad - can not trust others
1106 BCIDErr = 0xFFFF; // assume that all DMUs are bad
1107 if (m_maxBadDMU < 16) {
1108 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1109 ATH_MSG_VERBOSE( evtnum.str()
1110 << " drw " << drwname(rawChannelCollection->identify())
1111 << " BCID in DMU1 is bad - skipping");
1112
1113 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1114 ATH_MSG_VERBOSE( nevtnum.str()
1115 << " suppressing further messages about drawer 0x"
1116 << std::hex << rawChannelCollection->identify() << std::dec << " being bad");
1117 }
1118 someDQerrors = true;
1119 continue;
1120 }
1121
1122 } else {
1123 // additional check if DQ frag BCID is the same as event BCID
1124 if ( DSPBCID!=0xDEAD && DSPBCID!=m_evtBCID ) { // DSP BCID doesn't match! all wrong
1125 BCIDErr = 0xFFFF;
1126 if (m_maxBadDMU < 16) {
1127 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1128 ATH_MSG_VERBOSE( evtnum.str()
1129 << " drw " << drwname(rawChannelCollection->identify())
1130 << " DSP BCID is wrong - skipping");
1131
1132 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1133 ATH_MSG_VERBOSE( nevtnum.str()
1134 << " suppressing further messages about drawer 0x"
1135 << std::hex << rawChannelCollection->identify() << std::dec << " being bad");
1136 }
1137 someDQerrors = true;
1138 continue;
1139 }
1140 }
1141 }
1142
1143 uint32_t error = GlobalCRCErr | FE_DMUmask | ROD_DMUmask | BCIDErr | MemoryParityErr |
1144 HeaderFormatErr | HeaderParityErr | SampleFormatErr | SampleParityErr;
1145
1146 if (error==0xFFFF && m_maxBadDMU<16) {
1147 if (m_nDrawerOff[drawerIdx] < m_maxVerboseCnt) {
1148 ATH_MSG_VERBOSE( evtnum.str()
1149 << " drw " << drwname(rawChannelCollection->identify())
1150 << " whole drawer is bad - skipping");
1151
1152 if (++m_nDrawerOff[drawerIdx] == m_maxVerboseCnt)
1153 ATH_MSG_VERBOSE( nevtnum.str()
1154 << " suppressing further messages about drawer 0x"
1155 << std::hex << rawChannelCollection->identify() << std::dec << " being bad");
1156 }
1157 someDQerrors = true;
1158 continue;
1159 }
1160
1161 // no global error detected - wait m_max_verbose_cnt good events and eventually enable error messages again
1162 if (m_nDrawerOff[drawerIdx]>=m_maxVerboseCnt) {
1163 if (++m_nDrawerOff[drawerIdx] == 2*m_maxVerboseCnt) {
1164 m_nDrawerOff[drawerIdx] = 0;
1165 ATH_MSG_VERBOSE( nevtnum.str()
1166 << " enabling messages about drawer 0x" << std::hex
1167 << rawChannelCollection->identify()
1168 << std::dec << " being bad after " << m_maxVerboseCnt << " good events");
1169 }
1170 }
1171
1172 uint32_t errMB = BCIDErr;
1173 if (eb) { // do not count non-existing DMUs in EB
1174 if (ebsp) {
1175 errMB &= 0x3cfe;
1176 } else {
1177 errMB &= 0x3cff;
1178 }
1179 }
1180 int nbadMB = 0;
1181 while (errMB) {
1182 if (errMB & 0xF) ++nbadMB;
1183 errMB >>= 4;
1184 }
1185 someDQerrors = (nbadMB >= m_minBadMB);
1186 if (nbadMB > nbadMBMax) {
1187 nbadMBMax = nbadMB;
1188 collMBMax = rawChannelCollection;
1189 }
1190
1191 int nerr = 0;
1192 for (uint32_t i = 0x8000; i != 0; i >>= 1) {
1193 if (error&i) {
1194 ++nerr;
1195 index-=3;
1196 } else {
1197 if (emptyBad && nbadMB < 4) {
1198 m_chanBad[--index] = false;
1199 m_chanBad[--index] = false;
1200 m_chanBad[--index] = false;
1201 } else {
1202 index -= 3;
1203 }
1204 }
1205 }
1206 //if (chMBTS>=0) m_chanBad[index+chMBTS] = true; // ignore completely MBTS channel
1207 int nbad = ((ebsp) ? nerr-5 : ((eb) ? nerr-4 : nerr));
1208
1209 if (nbad >= m_minBadDMU && nerr <= m_maxBadDMU) {
1210 someDQerrors = true;
1211 if (nbad > nbadMax) {
1212 nbadMax = nbad;
1213 collMax = rawChannelCollection;
1214 }
1215 }
1216 if (someDQerrors) { // will print later samples for all channels in a drawer
1217 for ( ; index<hashNext; ++index) { // but if drawer was completely bad, this loop will be skipped
1218 m_chanSel[index] = true;
1219 }
1220 }
1221
1222 if (allowAmpCheck || emptyBad) {
1223
1224 for (const TileRawChannel* rawChannel : *rawChannelCollection) {
1225
1226 HWIdentifier adcId = rawChannel->adc_HWID();
1227 HWIdentifier chId = m_tileHWID->channel_id(adcId);
1228 m_tileHWID->get_hash(chId, hash, &chan_context);
1229 if ( m_chanToSkip[hash] ) continue;
1230 int adc = m_tileHWID->adc(adcId);
1231 int channel = m_tileHWID->channel(adcId);
1232 int ch_type = 0;
1233 if (channel == chMBTS) {
1234 ch_type = 2;
1235 } else if ( (ebsp && (channel == 18 || channel == 19 || channel == 12 || channel == 13) )
1236 || (eb && (channel == 0 || channel == 1 || channel == 12 || channel == 13) ) ) {
1237 ch_type = 1;
1238 }
1239 if (emptyBad && !m_chanBad[hash] ) {
1240 m_chanBad[hash] = m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc,ctx).isBad() ||
1241 (DQstatus && !DQstatus->isAdcDQgood(ros,drawer,channel,adc)) ||
1242 (m_checkDCS && m_tileDCS->getDCSStatus(ros, drawer, channel) > TileDCSState::WARNING);
1243 }
1244
1245 if (allowAmpCheck) {
1246
1247 float amp = rawChannel->amplitude();
1248 float time = rawChannel->time();
1249 if (fillChanEne) {
1250 m_chanEne[hash] = amp;
1251 m_chanTime[hash] = time;
1252 m_chanQua[hash] = rawChannel->quality();
1253 } else {
1254 m_chanDsp[hash] = amp;
1255 m_chanTDsp[hash] = time;
1256 }
1257
1258 if ( (m_skipMasked && m_chanBad[hash]) ||
1259 (m_skipMBTS && channel == chMBTS) ||
1260 (m_skipEmpty && TileDQstatus::isChEmpty(ros, drawer, channel) > 0) ||
1261 m_skipGain[adc] )
1262 continue;
1263
1264 bool ampOk = false;
1265 if (amp < m_minEneChan[ch_type] ) {
1266 ampOk = m_bitEneChan[ch_type][0];
1267 } else if (amp > m_maxEneChan[ch_type] ) {
1268 ampOk = m_bitEneChan[ch_type][2];
1269 } else {
1270 ampOk = m_bitEneChan[ch_type][1];
1271 }
1272
1273 bool timeOk = false;
1274 if (time < m_minTimeChan[ch_type] ) {
1275 timeOk = m_bitTimeChan[ch_type][0];
1276 } else if (time > m_maxTimeChan[ch_type] ) {
1277 timeOk = m_bitTimeChan[ch_type][2];
1278 } else {
1279 timeOk = m_bitTimeChan[ch_type][1];
1280 }
1281
1282 if (ampOk && timeOk) {
1283
1284 ATH_MSG_VERBOSE(evtnum.str()
1285 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(adcId)
1286 << " ch_ene = " << amp << " ch_t = " << time);
1287
1288 m_chanSel[hash] = true;
1289
1290 if (amp < chmin) {
1291 chmin = amp;
1292 minCh = rawChannel;
1293 } else if (amp > chmax) {
1294 chmax = amp;
1295 maxCh = rawChannel;
1296 }
1297
1298 if (time<tcmin) {
1299 tcmin = time;
1300 tminCh = rawChannel;
1301 }
1302 else if (time>tcmax) {
1303 tcmax = time;
1304 tmaxCh = rawChannel;
1305 }
1306 }
1307 }
1308 }
1309 }
1310
1311 for (index = hashNext - 48; index < hashNext; ++index) {
1312 if ((m_chanSel[index] && rawdata) || someDQerrors) {
1313 ATH_MSG_VERBOSE(evtnum.str()
1314 << " drw " << drwname(rawChannelCollection->identify())
1315 << " nBadMB = " << nbadMB
1316 << " nBadDMU = " << nbad
1317 << " EvtBCID = " << m_evtBCID
1318 << " DSPBCID = " << rawChannelCollection->getFragDSPBCID()
1319 << " GlobCRC = " << rawChannelCollection->getFragGlobalCRC() << " " << GlobalCRCErr
1320 << " error = 0x" << std::hex << error
1321 << " FE_CRC = 0x" << rawChannelCollection->getFragFEChipMask() << " 0x" << FE_DMUmask
1322 << " ROD_CRC = 0x" << rawChannelCollection->getFragRODChipMask() << " 0x" << ROD_DMUmask
1323 << " BCIDErr = 0x" << rawChannelCollection->getFragBCID() << " 0x" << BCIDErr
1324 << " MemPar = 0x" << rawChannelCollection->getFragMemoryPar()
1325 << " HeadForm = 0x"<< rawChannelCollection->getFragHeaderBit()
1326 << " HeadPar = 0x" << rawChannelCollection->getFragHeaderPar()
1327 << " SampForm = 0x"<< rawChannelCollection->getFragSampleBit()
1328 << " SampPar = 0x" << rawChannelCollection->getFragSamplePar()
1329 << std::dec);
1330 break;
1331 }
1332 }
1333 }
1334
1335 if (nbadMBMax >= m_minBadMB) {
1336 ++m_dqerr;
1337 statusOk = true;
1338 ATH_MSG_DEBUG( nevtnum.str()
1339 << " drw " << drwname((collMBMax) ? collMBMax->identify() : 0)
1340 << " nBadMB = " << nbadMBMax
1341 << " accepted");
1342
1343 } else if (nbadMax >= m_minBadDMU && nbadMax <= m_maxBadDMU) {
1344 ++m_dqerr;
1345 statusOk = true;
1346 ATH_MSG_DEBUG( nevtnum.str()
1347 << " drw " << drwname((collMax)?collMax->identify():0)
1348 << " nBadDMU = " << nbadMax
1349 << " accepted");
1350 }
1351
1352 if (tminCh && tminCh != minCh && tminCh != maxCh) {
1353 ATH_MSG_DEBUG(nevtnum.str()
1354 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(tminCh->adc_HWID())
1355 << " ch_e = " << tminCh->amplitude()
1356 << " tmin =" << tminCh->time());
1357 }
1358
1359 if (tmaxCh && tmaxCh != minCh && tmaxCh != maxCh) {
1360 ATH_MSG_DEBUG(nevtnum.str()
1361 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(tmaxCh->adc_HWID())
1362 << " ch_e = " << tmaxCh->amplitude()
1363 << " tmax = " << tmaxCh->time());
1364 }
1365
1366 if (minCh) {
1367 if (!cellminCh) ++m_minChan;
1368 statusOk = true;
1369 const char * tit = (tminCh == minCh) ? " tmin = ": ((tmaxCh == minCh) ? " tmax = ": " t = ");
1370 ATH_MSG_DEBUG(nevtnum.str()
1371 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(minCh->adc_HWID())
1372 << " ch_emin = " << chmin
1373 << tit << minCh->time()
1374 << " accepted");
1375 }
1376 if (maxCh) {
1377 if (!cellmaxCh) ++m_maxChan;
1378 statusOk = true;
1379 const char * tit = (tminCh == maxCh) ? " tmin = ": ((tmaxCh == maxCh) ? " tmax = ": " t = ");
1380 ATH_MSG_DEBUG(nevtnum.str()
1381 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(maxCh->adc_HWID())
1382 << " ch_emax = " << chmax
1383 << tit << maxCh->time()
1384 << " accepted");
1385 }
1386 emptyBad = false;
1387 }
1388 }
1389
1390
1391 if (m_readDigits) {
1392
1393 // Pointer to a Tile digits container
1394 SG::ReadHandle<TileDigitsContainer> digitsContainer(m_digitsContainerKey, ctx);
1395
1396 if (!digitsContainer.isValid()) {
1397 ATH_MSG_WARNING("Unable to read TileDigitsContainer from EventStore, disable reading of this container");
1398 m_readDigits = false;
1399
1400 } else {
1401
1402 IdContext chan_context = m_tileHWID->channel_context();
1403 IdentifierHash hash;
1404 int index,pmt;
1405 int nConst = 0;
1406 int nJump = 0;
1407 int nDmuErr = 0;
1408 int nOverLG = 0;
1409 int nOverHG = 0;
1410 int nUnderLG = 0;
1411 int nUnderHG = 0;
1412
1413 for (const TileDigitsCollection * digitsCollection : *digitsContainer) {
1414
1415 int frag = digitsCollection->identify();
1416 bool eb = (frag > 0x2ff);
1417 bool ebsp = (frag == 0x30e || frag == 0x411);
1418
1419 int ros = frag >> 8;
1420 int drawer = frag & 0x3F;
1421 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
1422 if ( m_drawerToSkip[drawerIdx] ) continue;
1423
1424 int chMBTS = -1;
1425 if (eb) {
1426 for (int ch: {12,4,0}) {
1427 m_cabling->h2s_cell_id_index(ros,drawer,ch,index,pmt);
1428 if (index == -2) {
1429 chMBTS = ch;
1430 break;
1431 }
1432 }
1433 }
1434
1435 int nChBadDB = 0;
1436 int nChBadNC = 0;
1437 int nChBad = 0;
1438 int nChTot = 0;
1439 int nChDmu[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
1440 int nChBadDmu[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
1441
1442 for (const TileDigits* tile_digits : *digitsCollection) {
1443
1444 ++nChTot;
1445
1446 HWIdentifier adcId = tile_digits->adc_HWID();
1447 HWIdentifier chId = m_tileHWID->channel_id(adcId);
1448 m_tileHWID->get_hash(chId, hash, &chan_context);
1449 if ( m_chanToSkip[hash] ) continue;
1450 int channel = m_tileHWID->channel(adcId);
1451 int dmu = channel/3;
1452 ++nChDmu[dmu];
1453 int chEmpty = TileDQstatus::isChEmpty(ros, drawer, channel);
1454 bool isConnected = (chEmpty < 2);
1455 if (!isConnected) ++nChBadNC;
1456 int adc = m_tileHWID->adc(adcId);
1457 const char *cellname = "";
1458 int ch_type = 0;
1459 if (channel == chMBTS) {
1460 cellname = " MBTS";
1461 ch_type = 2;
1462 } else if ( (ebsp && (channel == 18 || channel == 19 || channel == 12 || channel == 13) )
1463 || (eb && (channel == 0 || channel == 1 || channel == 12 || channel == 13) ) ) {
1464 cellname = " GAP";
1465 ch_type = 1;
1466 } else if (chEmpty > 0) {
1467 cellname = " EMPTY";
1468 }
1469
1470 const char *badname = "";
1471 if (DQstatus && !DQstatus->isAdcDQgood(ros,drawer,channel,adc)) {
1472 badname = " BADDQ";
1473 if (isConnected) {
1474 ++nChBad;
1475 ++nChBadDmu[dmu];
1476 }
1477 } else if (m_checkDCS && m_tileDCS->getDCSStatus(ros, drawer, channel) > TileDCSState::WARNING) {
1478 badname = " BADDCS";
1479 } else if (m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc,ctx).isBad()) {
1480 badname = " BADDB";
1481 if (isConnected) {
1482 ++nChBadDB;
1483 }
1484 } else if (m_chanBad[hash]) {
1485 if (badFromCell) {
1486 if (ch_type != 2) badname = " BADQUAL";
1487 m_chanQua[hash] = 999;
1488 if (isConnected && ch_type!=2) {
1489 ++nChBad;
1490 ++nChBadDmu[dmu];
1491 }
1492 } else {
1493 badname = " BADUNKN"; // should never see this
1494 }
1495 } else if (badFromCell && m_chanEne[hash] == 0.0) {
1496 badname = " BADDIGI"; // temporary fix, (for May-2012 ESD), should never get this
1497 if (isConnected) {
1498 ++nChBad;
1499 ++nChBadDmu[dmu];
1500 }
1501 }
1502 const char *enename = " ene = ";
1503 const char *timename = " time = ";
1504 const char *qualname = " qual = ";
1505 if (badFromCell && badname[0] != 0) {
1506 enename = " BAD = ";
1507 if (m_chanDsp.size()) {
1508 qualname = " eDSP = ";
1510 }
1511 if (m_chanTDsp.size()) {
1512 timename = " tDSP = ";
1514 }
1515 }
1516
1517 char badnm[30];
1518 sprintf(badnm," BADDIGIEX%s",badname);
1519 float dmin,dmax;
1520
1521 std::vector<float> samples = tile_digits->samples();
1522 int nSamp = samples.size();
1523 if (nSamp > 6) {
1524
1525 bool useCh= !( (m_skipMBTS && channel == chMBTS) ||
1526 (m_skipEmpty && chEmpty > 0) );
1527 bool checkCh = !( (m_skipMasked && m_chanBad[hash]) ) && useCh && m_checkJumps;
1528
1529 int err = TileRawChannelBuilder::CorruptedData(ros,drawer,channel,adc,samples,dmin,dmax,m_ADCmaxMinusEps,m_ADCmaskValueMinusEps);
1530
1531 if (badname[0]==0) {
1532 if (err && err>-3) { // do not consider all zeros in empty samples as error
1533 if (isConnected || err != -2) {
1534 if (checkCh) m_chanSel[hash] = true;
1535 badname = badnm;
1536 ++nChBad;
1537 ++nChBadDmu[dmu];
1538 if (!isConnected) --nChBadNC;
1539 }
1540 if (err > 0) {
1541 if (err < 10) {
1542 badnm[9] = 48+err;
1543 } else if (err < 36) {
1544 badnm[9] = 55+err;
1545 }
1546 } else {
1547 badnm[9] = 48;
1548 }
1549 } else {
1550 // old error types, used for tests in August 2012
1551 // expect to see only warningE7 and warningE8 for gap/crack
1552 int warn = Are3FF(samples, adc, ch_type);
1553 if (warn) {
1554 if (checkCh) m_chanSel[hash] = true;
1555 sprintf(badnm," warningE%d%s",warn,badname);
1556 badname = badnm;
1557 }
1558 }
1559 }
1560
1561 if ((!err) // channel without bad patterns
1562 && (useCh) // normal connected channel
1563 && (badname[0] == 0 || badname[1] == 'w' // no digital error
1564 || (badname[4] == 'Q' && !m_skipMasked))) { // error from TileCell but it is ignored
1565
1566 if (adc) { // HG
1567
1568 if (dmax > m_overflowHG) {
1569 m_chanSel[hash] = true; // always print overflows
1570 if (m_checkOverHG){
1571 ++nOverHG;
1572 }
1573 }
1574 if (dmin < m_underflowHG) {
1575 m_chanSel[hash] = true; // always print underflows
1576 if (m_checkUnderHG){
1577 ++nUnderHG;
1578 }
1579 }
1580
1581 } else { // LG
1582
1583 if (dmax > m_overflowLG) {
1584 m_chanSel[hash] = true; // always print overflows
1585 if (m_checkOverLG){
1586 ++nOverLG;
1587 }
1588 }
1589 if (dmin < m_underflowLG) {
1590 m_chanSel[hash] = true; // always print underflows
1591 if (m_checkUnderLG){
1592 ++nUnderLG;
1593 }
1594 }
1595 }
1596 }
1597
1598 bool someSampErrors = false;
1599
1600 if (m_checkJumps && (checkCh || m_chanSel[hash])) {
1601
1602 float pedDelta = (adc ? m_pedDeltaHG : m_pedDeltaLG);
1603 float jumpDelta = (adc ? m_jumpDeltaHG : m_jumpDeltaLG);
1604
1605 float ped = samples[0];
1606 float dmin = ped;
1607 float dmax = ped;
1608 int nped = 1;
1609 int npedmax = 1;
1610 bool cnstPed = true;
1611 bool cnstPedmax = true;
1612 for (int i = 1; i < nSamp; ++i) {
1613 float smp = samples[i];
1614 float dped = smp - ped;
1615 if (fabs(dped) < pedDelta) {
1616 ++nped;
1617 if (dped != 0.0) {
1618 cnstPed = false;
1619 ped += dped/nped;
1620 }
1621 } else {
1622 if (nped>npedmax) {
1623 npedmax=nped;
1624 cnstPedmax = cnstPed;
1625 }
1626 cnstPed = true;
1627 ped = smp;
1628 nped = 1;
1629 }
1630 if (smp<dmin) {
1631 dmin = smp;
1632 } else if (smp>dmax) {
1633 dmax = smp;
1634 }
1635 }
1636 if (nped>npedmax) {
1637 npedmax=nped;
1638 cnstPedmax = cnstPed;
1639 }
1640
1641 if (dmax - dmin >= jumpDelta) {
1642 bool accEmin = (m_chanEne[hash]<m_minEneChan[ch_type]);
1643 bool accEmax = (m_chanEne[hash]>m_maxEneChan[ch_type]);
1644 bool accCnst = false;
1645 bool accJump = false;
1646 bool cnstMin = true;
1647 bool cnstMax = true;
1648 bool jumpNeg = false;
1649 bool jumpPos = false;
1650 bool jumpEnd = false;
1651 bool jumpZer = false;
1652 bool jumpOve = false;
1653 bool narrowUp = false;
1654 bool narrowDown = false;
1655 if (npedmax >= m_constLength && ((dmax-ped) >= jumpDelta || (ped-dmin) >= jumpDelta) ) {
1656 ++nConst;
1657 accCnst = true;
1658 }
1659 int nmin = 0;
1660 int nmax = 0;
1661 int pmin = -1;
1662 int pmax = -1;
1663 float abovemin = dmax;
1664 float belowmax = dmin;
1665 for (int i = 0; i < nSamp; ++i) {
1666 float smp = samples[i];
1667 if (smp - dmin < pedDelta) {
1668 ++nmin;
1669 pmin = i;
1670 if (smp != dmin) cnstMin = false;
1671 }
1672 if (dmax - smp < pedDelta) {
1673 ++nmax;
1674 pmax = i;
1675 if (smp != dmax) cnstMax = false;
1676 }
1677 if (smp < abovemin && smp > dmin) {
1678 abovemin = smp;
1679 }
1680 if (smp > belowmax && smp < dmax) {
1681 belowmax = smp;
1682 }
1683 }
1684 if (nmax + nmin == nSamp) {
1685 if (nmax > 1 && nmin > 1) {
1686 ++nJump;
1687 accJump = true;
1688 } else if (nmax == 1) {
1689 if (pmax < nSamp - 1) { // ignore jump in last sample
1690 ++nJump;
1691 accJump = true;
1692 jumpPos = true;
1693 cnstMax = false;
1694 }
1695 if (pmax == 0 || pmax == nSamp - 1) {
1696 jumpEnd = true;
1697 }
1698 } else if (nmin == 1) {
1699 ++nJump;
1700 accJump = true;
1701 jumpNeg = true;
1702 cnstMin = false;
1703 if (pmin == 0 || pmin == nSamp - 1) {
1704 jumpEnd = true;
1705 }
1706 }
1707 }
1708 if (dmin == 0.0) {
1709 if (!accJump) {
1710 ++nJump;
1711 accJump = true;
1712 cnstMin = false;
1713 cnstMax = false;
1714 }
1715 jumpZer = true;
1716 }
1717 if (dmax > m_ADCmaxMinusEps) {
1718 if (!accJump) {
1719 ++nJump;
1720 accJump = true;
1721 cnstMin = false;
1722 cnstMax = false;
1723 }
1724 jumpOve = true;
1725 }
1726 float secondMax = (dmax-dmin)*m_secondMaxLevel;
1727 if (pmax > 0 && pmax < nSamp-1 && std::max(samples[pmax-1], samples[pmax+1]) < dmin+secondMax) {
1728 if (!accJump) {
1729 ++nJump;
1730 accJump = true;
1731 cnstMax = false;
1732 if (nmin + nmax != nSamp) {
1733 cnstMin = false;
1734 }
1735 }
1736 narrowUp = true;
1737 }
1738 if (pmin > 0 && pmin < nSamp - 1 && std::min(samples[pmin - 1], samples[pmin + 1]) > dmax - secondMax) {
1739 if (!accJump) {
1740 ++nJump;
1741 accJump = true;
1742 cnstMin = false;
1743 if (nmin + nmax != nSamp) {
1744 cnstMax = false;
1745 }
1746 }
1747 narrowDown = true;
1748 }
1749
1750 if (accEmin || accEmax || accCnst || accJump) {
1751 someSampErrors = true;
1752 ATH_MSG_VERBOSE (evtnum.str()
1753 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(adcId)
1754 << enename << m_chanEne[hash] << " samp = " << samples[0]
1755 << " " << samples[1] << " " << samples[2] << " " << samples[3]
1756 << " " << samples[4] << " " << samples[5] << " " << samples[6]
1757 << timename << m_chanTime[hash]
1758 << qualname << m_chanQua[hash]
1759 << cellname << badname
1760 << ((accEmin) ? " neg_e" : "")
1761 << ((accEmax) ? " pos_e" : "")
1762 << ((accCnst) ? " const" : "")
1763 << ((accCnst&&cnstPedmax) ? "Const" : "")
1764 << ((accJump) ? " jump" : "")
1765 << ((accJump&&jumpZer) ? "Zero" : "")
1766 << ((accJump&&jumpOve) ? "Over" : "")
1767 << ((accJump&&jumpPos) ? "SingleUp" : ((narrowUp) ? "NarrowUp" : "") )
1768 << ((accJump&&jumpNeg) ? "SingleDown" : ((narrowDown) ? "NarrowDown" : "") )
1769 << ((accJump&&jumpEnd) ? "AtEdge" : "")
1770 << ((accJump&&cnstMin) ? "ConstMin" : "")
1771 << ((accJump&&cnstMax) ? "ConstMax" : "")
1772 << " " << dmax-dmin);
1773 }
1774 }
1775 }
1776
1777 if (someSampErrors) {
1778 m_chanSel[hash] = true;
1779 } else if (m_chanSel[hash]) {
1780 bool accEmin = (m_chanEne[hash] < m_minEneChan[ch_type]);
1781 bool accEmax = (m_chanEne[hash] > m_maxEneChan[ch_type]);
1782 bool jumpOve = (dmax>m_ADCmaxMinusEps);
1783 bool jumpZer = (dmin < 0.01);
1784 ATH_MSG_VERBOSE(evtnum.str()
1785 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(adcId)
1786 << enename << m_chanEne[hash] << " samp = " << samples[0]
1787 << " " << samples[1] << " " << samples[2] << " " << samples[3]
1788 << " " << samples[4] << " " << samples[5] << " " << samples[6]
1789 << timename << m_chanTime[hash]
1790 << qualname << m_chanQua[hash]
1791 << cellname << badname
1792 << ((accEmin) ? " neg_e" : "")
1793 << ((accEmax) ? " pos_e" : "")
1794 <<((jumpZer) ? " underflow" : "")
1795 <<((jumpOve) ? " overflow" : "") );
1796 }
1797
1798 }
1799 }
1800 if (m_checkDMUs && nChBad > 1 && nChBad + nChBadDB + nChBadNC < nChTot) {
1801 int nChBad1 = 0;
1802 int nChBad2 = 0;
1803 int nDmuBad1 = 0;
1804 int nDmuBad2 = 0;
1805 int nDmuBad = 0;
1806 int nDmuTot = 0;
1807 bool has23 = false;
1808 for (int dmu = 0; dmu < 16; ++dmu) {
1809 if (nChDmu[dmu] > 0) {
1810 ++nDmuTot;
1811 if (nChBadDmu[dmu] > 0) {
1812 ++nDmuBad;
1813 if (dmu < 8) {
1814 nChBad1 += nChBadDmu[dmu];
1815 ++nDmuBad1;
1816 } else {
1817 nChBad2 += nChBadDmu[dmu];
1818 ++nDmuBad2;
1819 }
1820 if (nChBadDmu[dmu] == 2 && nChDmu[dmu] == 3) has23 = true;
1821 }
1822 }
1823 }
1824 if (nDmuBad == 1 /* && (!has23) */ ) continue;
1825 if (nDmuBad == 2 && nChBad < 3) continue;
1826
1827 if (nDmuBad>2 || nChBad > 9 || nChTot > 19 || has23) {
1828
1829 ++nDmuErr;
1830
1831 for (const TileDigits* tile_digits : *digitsCollection) {
1832
1833 HWIdentifier adcId = tile_digits->adc_HWID();
1834 HWIdentifier chId = m_tileHWID->channel_id(adcId);
1835 m_tileHWID->get_hash(chId, hash, &chan_context);
1836 if ( m_chanToSkip[hash] ) continue;
1837 std::vector<float> samples = tile_digits->samples();
1838
1839 if (!m_chanSel[hash] && samples.size()>6) {
1840 int channel = m_tileHWID->channel(adcId);
1841 int adc = m_tileHWID->adc(adcId);
1842 int chEmpty = TileDQstatus::isChEmpty(ros, drawer, channel);
1843 const char *cellname = "";
1844 int ch_type = 0;
1845 if (channel == chMBTS) {
1846 cellname = " MBTS";
1847 ch_type = 2;
1848 } else if ( (ebsp && (channel == 18 || channel == 19 || channel == 12 || channel == 13) )
1849 || (eb && (channel == 0 || channel == 1 || channel == 12 || channel == 13) ) ) {
1850 cellname = " GAP";
1851 ch_type = 1;
1852 } else if (chEmpty > 0) {
1853 cellname = " EMPTY";
1854 }
1855 const char *badname = "";
1856 if (m_tileBadChanTool->getAdcStatus(drawerIdx, channel, adc, ctx).isBad()) {
1857 badname = " BADDB";
1858 } else if (DQstatus && !DQstatus->isAdcDQgood(ros, drawer, channel, adc)) {
1859 badname = " BADDQ";
1860 } else if (m_checkDCS && m_tileDCS->getDCSStatus(ros, drawer, channel) > TileDCSState::WARNING) {
1861 badname = " BADDCS";
1862 } else if (m_chanBad[hash]) {
1863 if (badFromCell) {
1864 if (ch_type != 2) badname = " BADQUAL";
1865 m_chanQua[hash] = 999;
1866 } else {
1867 badname = " BADUNKN"; // should never see this
1868 }
1869 } else if (badFromCell && m_chanEne[hash] == 0.0) {
1870 badname = " BADDIGI"; // temporary fix, (for May-2012 ESD), should never get this
1871 }
1872
1873 char badnm[30];
1874 sprintf(badnm, " BADDIGIEX%s", badname);
1875 float dmin, dmax;
1876
1877 int err = TileRawChannelBuilder::CorruptedData(ros, drawer,
1878 channel, adc, samples, dmin, dmax, m_ADCmaxMinusEps,m_ADCmaskValueMinusEps);
1879 if (err) {
1880 bool isConnected = (chEmpty < 2);
1881 if (isConnected || err != -2) {
1882 badname = badnm;
1883 }
1884 if (err > 0) {
1885 if (err < 10) {
1886 badnm[9] = 48 + err;
1887 } else if (err < 36) {
1888 badnm[9] = 55 + err;
1889 }
1890 } else {
1891 badnm[9] = 48;
1892 }
1893 }
1894
1895 const char *enename = " ene = ";
1896 const char *timename = " time = ";
1897 const char *qualname = " qual = ";
1898 if (badFromCell && badname[0] != 0) {
1899 enename = " BAD = ";
1900 if (m_chanDsp.size()) {
1901 qualname = " eDSP = ";
1903 }
1904 if (m_chanTDsp.size()) {
1905 timename = " tDSP = ";
1907 }
1908 }
1909
1910 bool accEmin = (m_chanEne[hash]<m_minEneChan[ch_type]);
1911 bool accEmax = (m_chanEne[hash]>m_maxEneChan[ch_type]);
1912 bool jumpOve = (dmax > m_ADCmaxMinusEps);
1913 bool jumpZer = (dmin < 0.01);
1914
1915 ATH_MSG_VERBOSE(evtnum.str()
1916 << " chan " << std::left << std::setw(14) << m_tileHWID->to_string(adcId)
1917 << enename << m_chanEne[hash] << " samp = " << samples[0]
1918 << " " << samples[1] << " " << samples[2] << " " << samples[3]
1919 << " " << samples[4] << " " << samples[5] << " " << samples[6]
1920 << timename << m_chanTime[hash]
1921 << qualname << m_chanQua[hash]
1922 << cellname << badname
1923 << ((accEmin) ? " neg_e" : "")
1924 << ((accEmax) ? " pos_e" : "")
1925 << ((jumpZer) ? " underflow" : "")
1926 << ((jumpOve) ? " overflow" : "") );
1927
1928 }
1929 }
1930 }
1931
1932 std::ostringstream badstr;
1933 badstr << " ch: " << nChBad1 << " + " << nChBad2 << " = " << nChBad << " / " << nChTot << " = " << 100*nChBad/nChTot
1934 << " % dmu: " << nDmuBad1 << " + " << nDmuBad2 << " = " << nDmuBad << " / " << nDmuTot << " ";
1935 for (int dmu=0; dmu<16; ++dmu) {
1936 if (nChDmu[dmu]>0) {
1937 badstr << " " << std::hex << dmu << "=" << nChBadDmu[dmu] << "/" << nChDmu[dmu];
1938 }
1939 }
1940 ATH_MSG_VERBOSE (evtnum.str()
1941 << " drw " << drwname(digitsCollection->identify()) << badstr.str());
1942 }
1943 }
1944
1945 if (nConst) {
1946 ++m_const;
1947 statusOk = true;
1948 ATH_MSG_DEBUG( nevtnum.str()
1949 << " n_const_sample_errors = " << nConst
1950 << " accepted");
1951 }
1952 if (nJump) {
1953 ++m_jump;
1954 statusOk = true;
1955 ATH_MSG_DEBUG( nevtnum.str()
1956 << " n_jump_sample_errors = " << nJump
1957 << " accepted");
1958 }
1959 if (nOverLG) {
1960 ++m_overLG;
1961 statusOk = true;
1962 ATH_MSG_DEBUG( nevtnum.str()
1963 << " n_overflow_LG = " << nOverLG
1964 << " accepted");
1965 }
1966 if (nOverHG) {
1967 ++m_overHG;
1968 statusOk = true;
1969 ATH_MSG_DEBUG(nevtnum.str()
1970 << " n_overflow_HG = " << nOverHG
1971 << " accepted");
1972 }
1973 if (nUnderLG) {
1974 ++m_underLG;
1975 statusOk = true;
1976 ATH_MSG_DEBUG( nevtnum.str()
1977 << " n_underflow_LG = " << nUnderLG
1978 << " accepted");
1979 }
1980 if (nUnderHG) {
1981 ++m_underHG;
1982 statusOk = true;
1983 ATH_MSG_DEBUG(nevtnum.str()
1984 << " n_underflow_HG = " << nUnderHG
1985 << " accepted");
1986 }
1987 if (nDmuErr) {
1988 ++m_dmuerr;
1989 statusOk = true;
1990 ATH_MSG_DEBUG( nevtnum.str()
1991 << " n_DMU_errors = " << nDmuErr
1992 << " accepted");
1993 }
1994 }
1995 }
1996
1997 if (m_printOnly)
1998 this->setFilterPassed (false, ctx);
1999 else
2000 this->setFilterPassed (statusOk, ctx);
2001
2002 if (statusOk) {
2003 ++m_accept;
2004 //ATH_MSG_VERBOSE (nevtnum.str() << " accepted");
2005 } else {
2006 //ATH_MSG_VERBOSE (nevtnum.str() << " rejected");
2007 }
2008
2009 return StatusCode::SUCCESS;
2010}
const std::regex rr(r_r)
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
static std::string drwname(int id)
static const Attributes_t empty
virtual void setFilterPassed(bool state, const EventContext &ctx) const
float time() const
get time (data member)
Definition CaloCell.h:368
double energy() const
get energy (data member)
Definition CaloCell.h:327
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
std::vector< float > m_chanEne
bool m_bitTimeCell[ptnlength]
int Are3FF(std::vector< float > &OptFilterDigits, int OptFilterGain, int ch_type)
std::vector< float > m_chanDsp
bool m_bitEneChan[3][ptnlength]
ToolHandle< ITileBadChanTool > m_tileBadChanTool
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
std::vector< bool > m_chanSel
std::vector< bool > m_chanToSkip
ToolHandle< ITileDCSTool > m_tileDCS
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
std::vector< bool > m_chanBad
bool m_bitTimeChan[3][ptnlength]
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
std::vector< int > m_nDrawerOff
std::vector< float > m_chanTime
std::vector< bool > m_drawerToSkip
std::vector< float > m_chanTDsp
std::vector< float > m_chanQua
bool m_bitEneCell[ptnlength]
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
float time1(void) const
get time of first PMT
Definition TileCell.h:192
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition TileCell.h:209
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition TileCell.h:206
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200
float ene1(void) const
get energy of first PMT
Definition TileCell.h:187
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition TileCell.h:212
float time2(void) const
get time of second PMT
Definition TileCell.h:194
@ MASK_OVER
Definition TileCell.h:64
@ MASK_CMPC
Definition TileCell.h:66
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition TileCell.h:203
float ene2(void) const
get energy of second PMT
Definition TileCell.h:189
static int isChEmpty(int partition, int drawer, int ch)
True if channel is not fully implemented.
@ NOT_VALID_HASH
Definition TileHWID.h:314
static int CorruptedData(int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)
float time(int ind=0) const
float amplitude(int ind=0) const
HWIdentifier adc_HWID(void) const
Definition TileRawData.h:53
@ Tile
The Tile calorimeter.
@ Warning
The sub-detector issued a warning.
@ Error
The sub-detector issued an error.
time(flags, cells_name, *args, **kw)
str index
Definition DeMoScan.py:362
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
setEventNumber uint32_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TileCellSelector::finalize ( )
overridevirtual

Definition at line 2090 of file TileCellSelector.cxx.

2090 {
2091 //ATH_MSG_DEBUG ("finalize()");
2092
2093 ATH_MSG_INFO ("Processed " << m_counter << " events, accepted " << m_accept
2094 << " (" << m_minCell << "/" << m_minChan
2095 << "," << m_maxCell << "/" << m_maxChan
2096 << "," << m_jump << "/" << m_const
2097 << "," << m_overLG << "/" << m_overHG
2098 << "," << m_underLG << "/" << m_underHG
2099 << "," << m_dqerr << "/" << m_dmuerr
2100 << "," << m_warnerr << ") events.");
2101
2102 //ATH_MSG_DEBUG ("finalize() successful");
2103
2104 return StatusCode::SUCCESS;
2105}
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode TileCellSelector::initialize ( )
overridevirtual

Definition at line 151 of file TileCellSelector.cxx.

151 {
152 //ATH_MSG_DEBUG("in initialize()");
153
154 ATH_CHECK( m_eventInfoKey.initialize() );
155
156 ATH_CHECK(detStore()->retrieve(m_tileID, "TileID"));
157 ATH_CHECK(detStore()->retrieve(m_tileHWID, "TileHWID"));
158
160 m_ADCmaxMinusEps = m_tileInfo->ADCmax() - 0.01;
161 m_ADCmaskValueMinusEps = m_tileInfo->ADCmaskValue() - 0.01; // indicates channels which were masked in background dataset
162
164
165 ATH_CHECK(m_tileBadChanTool.retrieve());
166
167 if (m_checkDCS) {
168 ATH_CHECK(m_tileDCS.retrieve());
169 } else {
170 m_tileDCS.disable();
171 }
172
173 ATH_MSG_INFO( "Cell container "
174 << ((m_cellContainerKey.key().empty()) ? "NOT SET" : m_cellContainerKey.key()) );
175 ATH_MSG_INFO( "Digits container "
176 << ((m_digitsContainerKey.key().empty()) ? "NOT SET" : m_digitsContainerKey.key()));
177 ATH_MSG_INFO( "RawChannel container "
178 << ((m_rawChannelContainerKey.key().empty()) ? "NOT SET" : m_rawChannelContainerKey.key()));
179
180 ATH_MSG_INFO( "CheckJumps " << ((m_checkJumps) ? "true" : "false"));
181 ATH_MSG_INFO( "CheckDMUs " << ((m_checkDMUs) ? "true" : "false"));
182 ATH_MSG_INFO( "CheckOverLG " << ((m_checkOverLG) ? "true" : "false"));
183 ATH_MSG_INFO( "CheckOverHG " << ((m_checkOverHG) ? "true" : "false"));
184 ATH_MSG_INFO( "CheckUnderLG " << ((m_checkUnderLG) ? "true" : "false"));
185 ATH_MSG_INFO( "CheckUnderHG " << ((m_checkUnderHG) ? "true" : "false"));
186
187 if (m_overflowLG < 0) m_overflowLG += m_tileInfo->ADCmax();
188 if (m_overflowHG < 0) m_overflowHG += m_tileInfo->ADCmax();
189 ATH_MSG_INFO( "OverflowLG " << m_overflowLG);
190 ATH_MSG_INFO( "OverflowHG " << m_overflowHG);
191 ATH_MSG_INFO( "UnderflowLG " << m_underflowLG);
192 ATH_MSG_INFO( "UnderflowHG " << m_underflowHG);
193
194 ATH_MSG_INFO( "SkipEmpty " << ((m_skipEmpty) ? "true" : "false"));
195 ATH_MSG_INFO( "SkipMasked " << ((m_skipMasked) ? "true" : "false"));
196 ATH_MSG_INFO( "SkipMBTS " << ((m_skipMBTS) ? "true" : "false"));
197 ATH_MSG_INFO( "CheckDCS " << ((m_checkDCS) ? "true" : "false"));
198
199
200 m_readCells = !m_cellContainerKey.key().empty();
202 m_readDigits = !m_digitsContainerKey.key().empty();
203
204 if (m_readCells) {
205 ATH_MSG_INFO( "MinEnergyCell < " << m_minEneCell);
206 ATH_MSG_INFO( "MaxEnergyCell > " << m_maxEneCell);
207 ATH_MSG_INFO( "PtnEnergyCell = " << m_ptnEneCell);
208 ATH_MSG_INFO( "MinTimeCell < " << m_minTimeCell);
209 ATH_MSG_INFO( "MaxTimeCell > " << m_maxTimeCell);
210 ATH_MSG_INFO( "PtnTimeCell = " << m_ptnTimeCell);
211
212 ATH_CHECK( m_cellContainerKey.initialize() );
213 }
214
216 ATH_MSG_INFO( "MinEnergyChan < " << m_minEneChan[0]);
217 ATH_MSG_INFO( "MaxEnergyChan > " << m_maxEneChan[0]);
218 ATH_MSG_INFO( "PtnEnergyChan = " << m_ptnEneChan[0]);
219 ATH_MSG_INFO( "MinEnergyGap < " << m_minEneChan[1]);
220 ATH_MSG_INFO( "MaxEnergyGap > " << m_maxEneChan[1]);
221 ATH_MSG_INFO( "PtnEnergyGap = " << m_ptnEneChan[1]);
222 ATH_MSG_INFO( "MinTimeChan < " << m_minTimeChan[0]);
223 ATH_MSG_INFO( "MaxTimeChan > " << m_maxTimeChan[0]);
224 ATH_MSG_INFO( "PtnTimeChan = " << m_ptnTimeChan[0]);
225 ATH_MSG_INFO( "MinTimeGap < " << m_minTimeChan[1]);
226 ATH_MSG_INFO( "MaxTimeGap > " << m_maxTimeChan[1]);
227 ATH_MSG_INFO( "PtnTimeGap = " << m_ptnTimeChan[1]);
228 }
229
230 if (m_readRawChannels) {
231 ATH_MSG_INFO( "MinEnergyMBTS < " << m_minEneChan[2]);
232 ATH_MSG_INFO( "MaxEnergyMBTS > " << m_maxEneChan[2]);
233 ATH_MSG_INFO( "PtnEnergyMBTS = " << m_ptnEneChan[2]);
234 ATH_MSG_INFO( "MinTimeMBTS < " << m_minTimeChan[2]);
235 ATH_MSG_INFO( "MaxTimeMBTS > " << m_maxTimeChan[2]);
236 ATH_MSG_INFO( "PtnTimeMBTS = " << m_ptnTimeChan[2]);
237
238 ATH_CHECK( m_rawChannelContainerKey.initialize() );
239 }
240
241 switch (m_selectGain) {
242 case 0:
243 ATH_MSG_INFO( "Select Low gain channels only");
246 break;
247 case 1:
248 ATH_MSG_INFO( "Select High gain channels only");
251 break;
252 default:
253 ATH_MSG_INFO( "Select both gains");
254 break;
255 }
256
257 if (!m_digitsContainerKey.key().empty()) {
258 if (m_checkJumps) {
259 ATH_MSG_INFO( "JumpDeltaHG " << m_jumpDeltaHG);
260 ATH_MSG_INFO( "JumpDeltaLG " << m_jumpDeltaLG);
261 ATH_MSG_INFO( "PedDetlaHG " << m_pedDeltaHG);
262 ATH_MSG_INFO( "PedDetlaLG " << m_pedDeltaLG);
263 ATH_MSG_INFO( "ConstLength " << m_constLength);
264 }
265
266 ATH_CHECK( m_digitsContainerKey.initialize() );
267
268 }
269
270 if (!m_rawChannelContainerKey.key().empty()) {
271 if (m_checkDMUs) {
272 ATH_MSG_INFO( "MinBadDMU " << m_minBadDMU);
273 ATH_MSG_INFO( "MaxBadDMU " << m_maxBadDMU);
274 ATH_MSG_INFO( "MinBadMB " << m_minBadMB);
275 } else {
276 m_minBadDMU = 99;
277 m_maxBadDMU = -1;
278 m_minBadMB = 99;
279 }
280 ATH_MSG_INFO( "MaxVerboseCnt " << m_maxVerboseCnt);
281 }
282
283 ATH_MSG_INFO( "CheckWarning " << ((m_checkWarning)? "true" : "false"));
284 ATH_MSG_INFO( "CheckError " << ((m_checkError) ? "true" : "false"));
285 ATH_MSG_INFO( "PrintOnly " << ((m_printOnly) ? "true" : "false"));
286
287 if (m_drawer.size()>0) {
288 msg(MSG::INFO) << "Drawers which will be always printed:" << MSG::hex;
289 for (int frag: m_drawer) msg(MSG::INFO) << " 0x" << frag;
290 msg(MSG::INFO) << MSG::dec << endmsg;
291 }
292
293 if (m_drawerToCheck.size()>0) {
294 msg(MSG::INFO) << "Only those drawers will be checked:" << MSG::hex;
295 for (int frag: m_drawerToCheck) msg(MSG::INFO) << " 0x" << frag;
296 msg(MSG::INFO) << MSG::dec << endmsg;
297 }
298
299 if (m_chanToCheck.size()>0) {
300 msg(MSG::INFO) << "Only those channels will be checked:";
301 for (int ch: m_chanToCheck) msg(MSG::INFO) << " " << ch;
302 msg(MSG::INFO) << endmsg;
303 }
304
306
307 //ATH_MSG_DEBUG ("initialize() successful");
308
309 // convert patterns fo bolean arrays
310
311 int digit=1;
312 int scale=10;
313 for (int i=0; i<ptnlength; ++i) {
314
315 int bit=(m_ptnEneCell/digit)%scale;
316 m_bitEneCell[i] = (bit!=0);
317
318 bit=(m_ptnTimeCell/digit)%scale;
319 m_bitTimeCell[i] = (bit!=0);
320
321 for (int j=0; j<3; ++j) {
322
323 int bit=(m_ptnEneChan[j]/digit)%scale;
324 m_bitEneChan[j][i] = (bit!=0);
325
326 bit=(m_ptnTimeChan[j]/digit)%scale;
327 m_bitTimeChan[j][i] = (bit!=0);
328 }
329
330 digit *= scale;
331 }
332
333 m_chanToSkip.clear();
334 m_drawerToSkip.clear();
335 if (m_drawerToCheck.size()>0 || m_chanToCheck.size()>0 ) {
336 if (m_drawerToCheck.size()==0) {
337 m_drawerToCheck.resize(256);
338 auto itr = m_drawerToCheck.begin();
339 for (int frag : {0x100,0x200,0x300,0x400}) {
340 auto itr1 = itr+64;
341 std::iota(itr, itr1, frag);
342 itr = itr1;
343 }
344 } else if (m_chanToCheck.size()==0) {
345 m_chanToCheck.resize(48);
346 std::iota(m_chanToCheck.begin(), m_chanToCheck.end(), 0);
347 }
349 m_drawerToSkip.resize(1+TileCalibUtils::getDrawerIdx(4,63),true);
350 IdContext chan_context = m_tileHWID->channel_context();
351 IdentifierHash hash;
352 for (int frag : m_drawerToCheck) {
353 int ros = frag >> 8;
354 int drawer = frag & 0x3F;
355 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
356 m_drawerToSkip[drawerIdx] = false;
357 HWIdentifier ch_id = m_tileHWID->channel_id(ros,drawer,0);
358 m_tileHWID->get_hash(ch_id, hash, &chan_context);
359 for (int chan: m_chanToCheck)
360 m_chanToSkip[hash+chan] = false;
361 }
362 } else {
365 m_drawerToSkip.resize(1+TileCalibUtils::getDrawerIdx(4,63),false);
366 }
367
368 ATH_CHECK( m_dqStatusKey.initialize() );
369
370 return StatusCode::SUCCESS;
371}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ptnlength
const ServiceHandle< StoreGateSvc > & detStore() const
static const TileCablingService * getInstance()
get pointer to service instance
constexpr unsigned int bit(int n)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printCell()

void TileCellSelector::printCell ( const TileCell * cell)
private

Definition at line 2014 of file TileCellSelector.cxx.

2014 {
2015 if (tile_cell==0) return;
2016
2017 // int drw = 0; // drawer number, range 0-63, the same for both channels
2018 // int ch1 = -1, ch2 = -1; // channel number, range 0-47 or -1 for unknown
2019 int ros1 = 0, ros2 = 0;
2020
2021 const CaloDetDescrElement * caloDDE = tile_cell->caloDDE();
2022 //Identifier id = tile_cell->ID();
2023
2024 IdentifierHash hash1 = caloDDE->onl1();
2025 if (hash1 != TileHWID::NOT_VALID_HASH) {
2026 HWIdentifier hw1 = m_tileHWID->channel_id(hash1);
2027 //ch1 = m_tileHWID->channel(hw1);
2028 //drw = m_tileHWID->drawer(hw1);
2029 ros1 = m_tileHWID->ros(hw1);
2030 }
2031
2032 IdentifierHash hash2 = caloDDE->onl2();
2033 if (hash2 != TileHWID::NOT_VALID_HASH) {
2034 HWIdentifier hw2 = m_tileHWID->channel_id(hash2);
2035 //ch2 = m_tileHWID->channel(hw2);
2036 //drw = m_tileHWID->drawer(hw2);
2037 ros2 = m_tileHWID->ros(hw2);
2038 if (ros1 == 0) ros1=ros2;
2039 } else {
2040 ros2 = ros1;
2041 }
2042
2043 // something is wrong
2044 if (ros1 == 0) return;
2045 /*
2046 int module = m_tileID->module(id);
2047
2048 int samp = m_tileID->sample(id);
2049
2050 bool single_PMT_scin = (samp == TileID::SAMP_E);
2051 bool single_PMT_C10 = (m_tileID->section(id) == TileID::GAPDET &&
2052 samp == TileID::SAMP_C &&
2053 (! m_cabling->C10_connected(m_tileID->module(id))) );
2054
2055 // distinguish cells with one or two PMTs
2056 bool single_PMT = single_PMT_C10 || single_PMT_scin;
2057
2058 // distinguish normal cells and fantoms (e.g. non-existing D4 in EBA15, EBC18
2059 // or non-existing E3/E4 - they might appear in CaloCellContainer)
2060 bool real_cell = single_PMT_C10 || m_cabling->TileGap_connected(id);
2061
2062 // note that in single PMT cell both badch1() and badch2() are changed together
2063 bool badch1 = (tile_cell->badch1());
2064 bool badch2 = (tile_cell->badch2());
2065
2066 // 0 = both PMTs are good; 1= 1 PMT is bad; 2= both PMTs are bad, or PMT is bad for single PMT cell
2067 int cell_isbad = (int)badch1 + (int)badch2;
2068
2069 int gn1 = tile_cell->gain1(); // gain of first PMT
2070 int gn2 = tile_cell->gain2(); // gain of second PMT
2071
2072 bool ch1Ok = (ch1>-1 && gn1 != CaloGain::INVALIDGAIN);
2073 bool ch2Ok = (ch2>-1 && gn2 != CaloGain::INVALIDGAIN);
2074
2075 // get the cell energy, time and position info
2076 double energy = tile_cell->energy();
2077 double time = tile_cell->time();
2078 double eta = tile_cell->eta();
2079 double phi = tile_cell->phi();
2080 double ene1 = tile_cell->ene1();
2081 double ene2 = tile_cell->ene2();
2082 double ediff = (single_PMT) ? 0.0 : tile_cell->eneDiff();
2083 double eratio = (energy!=0.0) ? ediff/energy : 0.0;
2084 double t1 = tile_cell->time1();
2085 double t2 = tile_cell->time2();
2086 double tdiff = (single_PMT) ? 0.0 : tile_cell->timeDiff();
2087 */
2088}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_accept

unsigned int TileCellSelector::m_accept
private

Definition at line 55 of file TileCellSelector.h.

◆ m_ADCmaskValueMinusEps

float TileCellSelector::m_ADCmaskValueMinusEps = 0.0F
private

Definition at line 180 of file TileCellSelector.h.

◆ m_ADCmaxMinusEps

float TileCellSelector::m_ADCmaxMinusEps = 0.0F
private

Definition at line 179 of file TileCellSelector.h.

◆ m_bitEneCell

bool TileCellSelector::m_bitEneCell[ptnlength] {}
private

Definition at line 139 of file TileCellSelector.h.

139{};

◆ m_bitEneChan

bool TileCellSelector::m_bitEneChan[3][ptnlength] {}
private

Definition at line 141 of file TileCellSelector.h.

141{};

◆ m_bitTimeCell

bool TileCellSelector::m_bitTimeCell[ptnlength] {}
private

Definition at line 140 of file TileCellSelector.h.

140{};

◆ m_bitTimeChan

bool TileCellSelector::m_bitTimeChan[3][ptnlength] {}
private

Definition at line 142 of file TileCellSelector.h.

142{};

◆ m_cabling

const TileCablingService* TileCellSelector::m_cabling
private

Definition at line 72 of file TileCellSelector.h.

◆ m_cellContainerKey

SG::ReadHandleKey<CaloCellContainer> TileCellSelector::m_cellContainerKey
private
Initial value:
{this,"CellContainerName",
"AllCalo", "Input Calo cell container key"}

Definition at line 111 of file TileCellSelector.h.

111 {this,"CellContainerName",
112 "AllCalo", "Input Calo cell container key"};

◆ m_chanBad

std::vector<bool> TileCellSelector::m_chanBad
private

Definition at line 97 of file TileCellSelector.h.

◆ m_chanDsp

std::vector<float> TileCellSelector::m_chanDsp
private

Definition at line 100 of file TileCellSelector.h.

◆ m_chanEne

std::vector<float> TileCellSelector::m_chanEne
private

Definition at line 98 of file TileCellSelector.h.

◆ m_chanQua

std::vector<float> TileCellSelector::m_chanQua
private

Definition at line 102 of file TileCellSelector.h.

◆ m_chanSel

std::vector<bool> TileCellSelector::m_chanSel
private

Definition at line 103 of file TileCellSelector.h.

◆ m_chanTDsp

std::vector<float> TileCellSelector::m_chanTDsp
private

Definition at line 101 of file TileCellSelector.h.

◆ m_chanTime

std::vector<float> TileCellSelector::m_chanTime
private

Definition at line 99 of file TileCellSelector.h.

◆ m_chanToCheck

std::vector<int> TileCellSelector::m_chanToCheck
private

Definition at line 172 of file TileCellSelector.h.

◆ m_chanToSkip

std::vector<bool> TileCellSelector::m_chanToSkip
private

Definition at line 104 of file TileCellSelector.h.

◆ m_checkDCS

bool TileCellSelector::m_checkDCS
private

Definition at line 155 of file TileCellSelector.h.

◆ m_checkDMUs

bool TileCellSelector::m_checkDMUs
private

Definition at line 157 of file TileCellSelector.h.

◆ m_checkError

bool TileCellSelector::m_checkError
private

Definition at line 167 of file TileCellSelector.h.

◆ m_checkJumps

bool TileCellSelector::m_checkJumps
private

Definition at line 156 of file TileCellSelector.h.

◆ m_checkOverHG

bool TileCellSelector::m_checkOverHG
private

Definition at line 159 of file TileCellSelector.h.

◆ m_checkOverLG

bool TileCellSelector::m_checkOverLG
private

Definition at line 158 of file TileCellSelector.h.

◆ m_checkUnderHG

bool TileCellSelector::m_checkUnderHG
private

Definition at line 161 of file TileCellSelector.h.

◆ m_checkUnderLG

bool TileCellSelector::m_checkUnderLG
private

Definition at line 160 of file TileCellSelector.h.

◆ m_checkWarning

bool TileCellSelector::m_checkWarning
private

Definition at line 166 of file TileCellSelector.h.

◆ m_const

unsigned int TileCellSelector::m_const
private

Definition at line 61 of file TileCellSelector.h.

◆ m_constLength

int TileCellSelector::m_constLength
private

Definition at line 148 of file TileCellSelector.h.

◆ m_counter

unsigned int TileCellSelector::m_counter
private

Definition at line 54 of file TileCellSelector.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digitsContainerKey

SG::ReadHandleKey<TileDigitsContainer> TileCellSelector::m_digitsContainerKey
private
Initial value:
{this,"DigitsContainerName",
"TileDigitsFlt", "Input Tile digits container key"}

Definition at line 114 of file TileCellSelector.h.

114 {this,"DigitsContainerName",
115 "TileDigitsFlt", "Input Tile digits container key"};

◆ m_dmuerr

unsigned int TileCellSelector::m_dmuerr
private

Definition at line 67 of file TileCellSelector.h.

◆ m_dqerr

unsigned int TileCellSelector::m_dqerr
private

Definition at line 66 of file TileCellSelector.h.

◆ m_dqStatusKey

SG::ReadHandleKey<TileDQstatus> TileCellSelector::m_dqStatusKey {this, "TileDQstatus", "TileDQstatus", "TileDQstatus key"}
private

Definition at line 74 of file TileCellSelector.h.

74{this, "TileDQstatus", "TileDQstatus", "TileDQstatus key"};

◆ m_drawer

std::vector<int> TileCellSelector::m_drawer
private

Definition at line 170 of file TileCellSelector.h.

◆ m_drawerToCheck

std::vector<int> TileCellSelector::m_drawerToCheck
private

Definition at line 171 of file TileCellSelector.h.

◆ m_drawerToSkip

std::vector<bool> TileCellSelector::m_drawerToSkip
private

Definition at line 105 of file TileCellSelector.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> TileCellSelector::m_eventInfoKey
private
Initial value:
{this,"EventInfo",
"EventInfo", "Input event info key"}

Definition at line 121 of file TileCellSelector.h.

121 {this,"EventInfo",
122 "EventInfo", "Input event info key"};

◆ m_evtBCID

unsigned int TileCellSelector::m_evtBCID
private

Definition at line 80 of file TileCellSelector.h.

◆ m_evtNum

unsigned int TileCellSelector::m_evtNum
private

Definition at line 79 of file TileCellSelector.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_infoName

std::string TileCellSelector::m_infoName
private

Definition at line 177 of file TileCellSelector.h.

◆ m_jump

unsigned int TileCellSelector::m_jump
private

Definition at line 60 of file TileCellSelector.h.

◆ m_jumpDeltaHG

float TileCellSelector::m_jumpDeltaHG
private

Definition at line 144 of file TileCellSelector.h.

◆ m_jumpDeltaLG

float TileCellSelector::m_jumpDeltaLG
private

Definition at line 145 of file TileCellSelector.h.

◆ m_lumiBlock

unsigned int TileCellSelector::m_lumiBlock
private

Definition at line 78 of file TileCellSelector.h.

◆ m_maxBadDMU

int TileCellSelector::m_maxBadDMU
private

Definition at line 150 of file TileCellSelector.h.

◆ m_maxCell

unsigned int TileCellSelector::m_maxCell
private

Definition at line 57 of file TileCellSelector.h.

◆ m_maxChan

unsigned int TileCellSelector::m_maxChan
private

Definition at line 59 of file TileCellSelector.h.

◆ m_maxEneCell

float TileCellSelector::m_maxEneCell
private

Definition at line 125 of file TileCellSelector.h.

◆ m_maxEneChan

float TileCellSelector::m_maxEneChan[3] {}
private

Definition at line 127 of file TileCellSelector.h.

127{};

◆ m_maxTimeCell

float TileCellSelector::m_maxTimeCell
private

Definition at line 129 of file TileCellSelector.h.

◆ m_maxTimeChan

float TileCellSelector::m_maxTimeChan[3] {}
private

Definition at line 131 of file TileCellSelector.h.

131{};

◆ m_maxVerboseCnt

int TileCellSelector::m_maxVerboseCnt
private

Definition at line 174 of file TileCellSelector.h.

◆ m_minBadDMU

int TileCellSelector::m_minBadDMU
private

Definition at line 149 of file TileCellSelector.h.

◆ m_minBadMB

int TileCellSelector::m_minBadMB
private

Definition at line 151 of file TileCellSelector.h.

◆ m_minCell

unsigned int TileCellSelector::m_minCell
private

Definition at line 56 of file TileCellSelector.h.

◆ m_minChan

unsigned int TileCellSelector::m_minChan
private

Definition at line 58 of file TileCellSelector.h.

◆ m_minEneCell

float TileCellSelector::m_minEneCell
private

Definition at line 124 of file TileCellSelector.h.

◆ m_minEneChan

float TileCellSelector::m_minEneChan[3] {}
private

Definition at line 126 of file TileCellSelector.h.

126{};

◆ m_minTimeCell

float TileCellSelector::m_minTimeCell
private

Definition at line 128 of file TileCellSelector.h.

◆ m_minTimeChan

float TileCellSelector::m_minTimeChan[3] {}
private

Definition at line 130 of file TileCellSelector.h.

130{};

◆ m_nDrawerOff

std::vector<int> TileCellSelector::m_nDrawerOff
private

Definition at line 175 of file TileCellSelector.h.

◆ m_overflowHG

float TileCellSelector::m_overflowHG
private

Definition at line 163 of file TileCellSelector.h.

◆ m_overflowLG

float TileCellSelector::m_overflowLG
private

Definition at line 162 of file TileCellSelector.h.

◆ m_overHG

unsigned int TileCellSelector::m_overHG
private

Definition at line 63 of file TileCellSelector.h.

◆ m_overLG

unsigned int TileCellSelector::m_overLG
private

Definition at line 62 of file TileCellSelector.h.

◆ m_pedDeltaHG

float TileCellSelector::m_pedDeltaHG
private

Definition at line 146 of file TileCellSelector.h.

◆ m_pedDeltaLG

float TileCellSelector::m_pedDeltaLG
private

Definition at line 147 of file TileCellSelector.h.

◆ m_printOnly

bool TileCellSelector::m_printOnly
private

Definition at line 168 of file TileCellSelector.h.

◆ m_ptnEneCell

int TileCellSelector::m_ptnEneCell
private

Definition at line 132 of file TileCellSelector.h.

◆ m_ptnEneChan

int TileCellSelector::m_ptnEneChan[3] {}
private

Definition at line 133 of file TileCellSelector.h.

133{};

◆ m_ptnTimeCell

int TileCellSelector::m_ptnTimeCell
private

Definition at line 134 of file TileCellSelector.h.

◆ m_ptnTimeChan

int TileCellSelector::m_ptnTimeChan[3] {}
private

Definition at line 135 of file TileCellSelector.h.

135{};

◆ m_rawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileCellSelector::m_rawChannelContainerKey
private
Initial value:
{this,"RawChannelContainerName",
"TileRawChannelCnt",
"Input Tile raw channel container key"}

Definition at line 117 of file TileCellSelector.h.

117 {this,"RawChannelContainerName",
118 "TileRawChannelCnt",
119 "Input Tile raw channel container key"};

◆ m_readCells

bool TileCellSelector::m_readCells
private

Definition at line 107 of file TileCellSelector.h.

◆ m_readDigits

bool TileCellSelector::m_readDigits
private

Definition at line 109 of file TileCellSelector.h.

◆ m_readRawChannels

bool TileCellSelector::m_readRawChannels
private

Definition at line 108 of file TileCellSelector.h.

◆ m_runNum

unsigned int TileCellSelector::m_runNum
private

Definition at line 77 of file TileCellSelector.h.

◆ m_secondMaxLevel

float TileCellSelector::m_secondMaxLevel
private

Definition at line 143 of file TileCellSelector.h.

◆ m_selectGain

int TileCellSelector::m_selectGain
private

Definition at line 136 of file TileCellSelector.h.

◆ m_skipEmpty

bool TileCellSelector::m_skipEmpty
private

Definition at line 152 of file TileCellSelector.h.

◆ m_skipGain

bool TileCellSelector::m_skipGain[2] {}
private

Definition at line 137 of file TileCellSelector.h.

137{};

◆ m_skipMasked

bool TileCellSelector::m_skipMasked
private

Definition at line 153 of file TileCellSelector.h.

◆ m_skipMBTS

bool TileCellSelector::m_skipMBTS
private

Definition at line 154 of file TileCellSelector.h.

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> TileCellSelector::m_tileBadChanTool {this, "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}
private

Definition at line 73 of file TileCellSelector.h.

73{this, "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};

◆ m_tileDCS

ToolHandle<ITileDCSTool> TileCellSelector::m_tileDCS {this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"}
private

Definition at line 75 of file TileCellSelector.h.

75{this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"};

◆ m_tileError

unsigned int TileCellSelector::m_tileError
private

Definition at line 95 of file TileCellSelector.h.

◆ m_tileFlag

unsigned int TileCellSelector::m_tileFlag
private

Definition at line 93 of file TileCellSelector.h.

◆ m_tileHWID

const TileHWID* TileCellSelector::m_tileHWID
private

Definition at line 71 of file TileCellSelector.h.

◆ m_tileID

const TileID* TileCellSelector::m_tileID
private

Definition at line 70 of file TileCellSelector.h.

◆ m_tileInfo

const TileInfo* TileCellSelector::m_tileInfo
private

Definition at line 178 of file TileCellSelector.h.

◆ m_underflowHG

float TileCellSelector::m_underflowHG
private

Definition at line 165 of file TileCellSelector.h.

◆ m_underflowLG

float TileCellSelector::m_underflowLG
private

Definition at line 164 of file TileCellSelector.h.

◆ m_underHG

unsigned int TileCellSelector::m_underHG
private

Definition at line 65 of file TileCellSelector.h.

◆ m_underLG

unsigned int TileCellSelector::m_underLG
private

Definition at line 64 of file TileCellSelector.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.

◆ m_warnerr

unsigned int TileCellSelector::m_warnerr
private

Definition at line 68 of file TileCellSelector.h.


The documentation for this class was generated from the following files: