20 const std::string&
name,
21 const IInterface*
parent ) :
23 m_calo_id(nullptr), m_onlineID(nullptr),
26 declareInterface<ILArNoisyROTool >(
this);
27 declareProperty(
"BadChanPerFEB", m_BadChanPerFEB=30 );
28 declareProperty(
"CellQualityCut", m_CellQualityCut=4000 );
29 declareProperty(
"IgnoreMaskedCells", m_ignore_masked_cells=
false );
30 declareProperty(
"IgnoreFrontInnerWheelCells", m_ignore_front_innerwheel_cells=
true );
31 declareProperty(
"BadFEBCut", m_MinBadFEB=3 );
33 declareProperty(
"MNBLooseCut",m_MNBLooseCut=5,
"Number of cells above CellQualityCut");
34 declareProperty(
"MNBTightCut",m_MNBTightCut=17,
"Number of cells above CellQualityCut");
35 declareProperty(
"MNBTight_PsVetoCut",m_MNBTight_PsVetoCut={13,3},
"Number of cells above CellQualityCut");
36 declareProperty(
"SaturatedCellQualityCut", m_SaturatedCellQualityCut=65535);
37 declareProperty(
"SaturatedCellEnergyTightCut", m_SaturatedCellEnergyTightCut=1000.);
38 declareProperty(
"SaturatedCellTightCut", m_SaturatedCellTightCut=20);
51 ATH_MSG_FATAL(
"Configuration problem: LArNoisyROTool assumes that the QFactor cut to declare a channel noisy is softer than the QFactor cut to declare the quality saturated !" );
52 return StatusCode::FAILURE;
56 ATH_MSG_FATAL(
"Configuration problem: LArNoisyROTool assumes that MNBLooseCut is smaller than MNBTightCut" );
57 return StatusCode::FAILURE;
81 return StatusCode::SUCCESS;
89 if(!cellContainer)
return noisyRO;
97 unsigned int NsaturatedTightCutBarrelA = 0;
98 unsigned int NsaturatedTightCutBarrelC = 0;
99 unsigned int NsaturatedTightCutEMECA = 0;
100 unsigned int NsaturatedTightCutEMECC = 0;
105 for ( ; cellItr != cellItrEnd; ++cellItr )
127 if (
sideA ) { NsaturatedTightCutBarrelA++; }
128 else { NsaturatedTightCutBarrelC++; }
132 if (
sideA ) { NsaturatedTightCutEMECA++; }
133 else { NsaturatedTightCutEMECC++; }
146 FEBStats[FEBindex].addBadChannel(
channel);
151 uint8_t SatTightPartitions = 0;
156 bool badSaturatedTightCut = (SatTightPartitions != 0);
157 if ( badSaturatedTightCut ) noisyRO-> SetSatTightFlaggedPartitions(SatTightPartitions);
162 ATH_MSG_VERBOSE(
" candidate FEB " <<
it->first <<
" with " <<
it->second.badChannels() <<
" bad channels");
173 unsigned int associatedPSFEB =
m_mapPSFEB.find(
it->first)->second;
174 if (associatedPSFEB != 0){
202 unsigned int NBadFEBEMECA = 0;
unsigned int NBadFEBEMECA_W = 0;
203 unsigned int NBadFEBEMECC = 0;
unsigned int NBadFEBEMECC_W = 0;
204 unsigned int NBadFEBEMBA = 0;
unsigned int NBadFEBEMBA_W = 0;
205 unsigned int NBadFEBEMBC = 0;
unsigned int NBadFEBEMBC_W = 0;
207 const std::vector<HWIdentifier>& badfebs = noisyRO->
get_noisy_febs();
220 const unsigned int int_id = febid.get_identifier32().get_compact();
221 if (knownBadFEBs->find(int_id)!=knownBadFEBs->end())
weight=2;
226 NBadFEBEMBA_W = NBadFEBEMBA_W +
weight;
230 NBadFEBEMBC_W = NBadFEBEMBC_W +
weight;
237 NBadFEBEMECA_W = NBadFEBEMECA_W +
weight;
241 NBadFEBEMECC_W = NBadFEBEMECC_W +
weight;
252 bool badFEBFlag = (BadFEBPartitions != 0);
253 if ( badFEBFlag ) noisyRO-> SetBadFEBFlaggedPartitions(BadFEBPartitions);
255 uint8_t BadFEBPartitions_W = 0;
260 bool badFEBFlag_W = (BadFEBPartitions_W != 0);
261 if ( badFEBFlag_W ) noisyRO-> SetBadFEB_WFlaggedPartitions(BadFEBPartitions_W);
267 uint8_t MNBTight_PsVetoPartition=0;
270 std::array<unsigned,5> nTightMNBFEBSperPartition({{0,0,0,0,0}});
271 std::array<unsigned,5> nTight_PsVetoMNBFEBSperPartition({{0,0,0,0,0}});
272 std::array<unsigned,5> nLooseMNBFEBSperPartition({{0,0,0,0,0}});
276 if (statIt!=FEBStats.end()) {
281 unsigned int associatedPSFEB =
m_mapPSFEB.find(statIt->first)->second;
282 if (associatedPSFEB != 0){
283 if (FEBStats.count(associatedPSFEB) == 0) (nTight_PsVetoMNBFEBSperPartition[
partitionNumber(febid)])++;
295 for (
unsigned iP=0;iP<4;++iP) {
296 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nLooseMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBLooseCut <<
" bad-Q channels" );
297 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nTightMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBTightCut <<
" bad-Q channels" );
298 if (nLooseMNBFEBSperPartition[iP]>0) MNBLoosePartition |=
m_partitionMask[iP];
299 if (nTightMNBFEBSperPartition[iP]>0) MNBTightPartition |=
m_partitionMask[iP];
300 if (nTight_PsVetoMNBFEBSperPartition[iP]>0) MNBTight_PsVetoPartition |=
m_partitionMask[iP];
313 return StatusCode::SUCCESS;