|
ATLAS Offline Software
|
Go to the documentation of this file.
22 const std::string&
name,
23 const IInterface*
parent ) :
25 m_calo_id(nullptr), m_onlineID(nullptr),
28 declareInterface<ILArNoisyROTool >(
this);
29 declareProperty(
"BadChanPerFEB", m_BadChanPerFEB=30 );
30 declareProperty(
"CellQualityCut", m_CellQualityCut=4000 );
31 declareProperty(
"IgnoreMaskedCells", m_ignore_masked_cells=
false );
32 declareProperty(
"IgnoreFrontInnerWheelCells", m_ignore_front_innerwheel_cells=
true );
33 declareProperty(
"BadFEBCut", m_MinBadFEB=3 );
35 declareProperty(
"MNBLooseCut",m_MNBLooseCut=5,
"Number of cells above CellQualityCut");
36 declareProperty(
"MNBTightCut",m_MNBTightCut=17,
"Number of cells above CellQualityCut");
37 declareProperty(
"MNBTight_PsVetoCut",m_MNBTight_PsVetoCut={13,3},
"Number of cells above CellQualityCut");
38 declareProperty(
"SaturatedCellQualityCut", m_SaturatedCellQualityCut=65535);
39 declareProperty(
"SaturatedCellEnergyTightCut", m_SaturatedCellEnergyTightCut=1000.);
40 declareProperty(
"SaturatedCellTightCut", m_SaturatedCellTightCut=20);
42 declareProperty(
"DoHVflag", m_doHVline=
true );
43 declareProperty(
"BadChanFracPerHVline", m_BadChanFracPerHVline=0.25 );
44 declareProperty(
"BadHVCut", m_MinBadHV=3 );
54 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 !" );
55 return StatusCode::FAILURE;
59 ATH_MSG_FATAL(
"Configuration problem: LArNoisyROTool assumes that MNBLooseCut is smaller than MNBTightCut" );
60 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
93 if(doHVline && ( !nCellsperLine || !cddm || !hvid)) {
94 ATH_MSG_ERROR(
"HV line flagging asked, but missing ingrediences, switching off !!");
100 if(!cellContainer)
return noisyRO;
108 unsigned int NsaturatedTightCutBarrelA = 0;
109 unsigned int NsaturatedTightCutBarrelC = 0;
110 unsigned int NsaturatedTightCutEMECA = 0;
111 unsigned int NsaturatedTightCutEMECC = 0;
116 for ( ; cellItr != cellItrEnd; ++cellItr )
138 if (
sideA ) { NsaturatedTightCutBarrelA++; }
139 else { NsaturatedTightCutBarrelC++; }
143 if (
sideA ) { NsaturatedTightCutEMECA++; }
144 else { NsaturatedTightCutEMECC++; }
157 FEBStats[FEBindex].addBadChannel(
channel);
162 std::vector<HWIdentifier> hvlines;
164 for(
unsigned int i=0;
i<hvlines.size(); ++
i) {
165 if(HVStats.contains(hvlines[
i])) HVStats[hvlines[
i]] += 1;
else HVStats[hvlines[
i]]=1;
172 uint8_t SatTightPartitions = 0;
177 bool badSaturatedTightCut = (SatTightPartitions != 0);
178 if ( badSaturatedTightCut ) noisyRO-> SetSatTightFlaggedPartitions(SatTightPartitions);
183 ATH_MSG_VERBOSE(
" candidate FEB " <<
it->first <<
" with " <<
it->second.badChannels() <<
" bad channels");
194 unsigned int associatedPSFEB =
m_mapPSFEB.find(
it->first)->second;
195 if (associatedPSFEB != 0){
223 unsigned int NBadFEBEMECA = 0;
unsigned int NBadFEBEMECA_W = 0;
224 unsigned int NBadFEBEMECC = 0;
unsigned int NBadFEBEMECC_W = 0;
225 unsigned int NBadFEBEMBA = 0;
unsigned int NBadFEBEMBA_W = 0;
226 unsigned int NBadFEBEMBC = 0;
unsigned int NBadFEBEMBC_W = 0;
228 const std::vector<HWIdentifier>& badfebs = noisyRO->
get_noisy_febs();
241 const unsigned int int_id = febid.get_identifier32().get_compact();
242 if (knownBadFEBs->find(int_id)!=knownBadFEBs->end())
weight=2;
247 NBadFEBEMBA_W = NBadFEBEMBA_W +
weight;
251 NBadFEBEMBC_W = NBadFEBEMBC_W +
weight;
258 NBadFEBEMECA_W = NBadFEBEMECA_W +
weight;
262 NBadFEBEMECC_W = NBadFEBEMECC_W +
weight;
273 if ( BadFEBPartitions != 0 ) noisyRO-> SetBadFEBFlaggedPartitions(BadFEBPartitions);
275 uint8_t BadFEBPartitions_W = 0;
280 if ( BadFEBPartitions_W != 0 ) noisyRO-> SetBadFEB_WFlaggedPartitions(BadFEBPartitions_W);
286 uint8_t MNBTight_PsVetoPartition=0;
289 std::array<unsigned,5> nTightMNBFEBSperPartition{};
290 std::array<unsigned,5> nTight_PsVetoMNBFEBSperPartition{};
291 std::array<unsigned,5> nLooseMNBFEBSperPartition{};
294 if (statIt!=FEBStats.end()) {
301 if (
unsigned int associatedPSFEB =
found->second; associatedPSFEB != 0){
302 if (FEBStats.count(associatedPSFEB) == 0) (nTight_PsVetoMNBFEBSperPartition[
partitionNumber(febid)])++;
315 for (
unsigned iP=0;iP<4;++iP) {
316 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nLooseMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBLooseCut <<
" bad-Q channels" );
317 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nTightMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBTightCut <<
" bad-Q channels" );
318 if (nLooseMNBFEBSperPartition[iP]>0) MNBLoosePartition |=
m_partitionMask[iP];
319 if (nTightMNBFEBSperPartition[iP]>0) MNBTightPartition |=
m_partitionMask[iP];
320 if (nTight_PsVetoMNBFEBSperPartition[iP]>0) MNBTight_PsVetoPartition |=
m_partitionMask[iP];
328 if(!hvid || !nCellsperLine )
return noisyRO;
331 unsigned int NBadHVEMECA = 0;
332 unsigned int NBadHVEMECC = 0;
333 unsigned int NBadHVEMBA = 0;
334 unsigned int NBadHVEMBC = 0;
335 unsigned int NBadHVHECA = 0;
336 unsigned int NBadHVHECC = 0;
337 unsigned int NBadHVFCALA = 0;
338 unsigned int NBadHVFCALC = 0;
341 for ( HVlinesStatMap::const_iterator
it = HVStats.begin();
it != HVStats.end(); ++
it ) {
342 ATH_MSG_DEBUG(ctx.eventID().event_number()<<
" candidate HVline " <<
it->first <<
" with " <<
it->second <<
" bad channels, out of "<<nCellsperLine->
HVNcell(
HWIdentifier(
it->first))<<
" channels");
352 case 0:
case 1:{NBadHVEMBC += 1;
break;}
353 case 2:
case 3:{NBadHVEMECC += 1;
break;}
354 case 4: {NBadHVHECC += 1;
break;}
355 case 5: {NBadHVFCALC += 1;
break;}
360 case 0: {
switch(
part){
361 case 0:
case 1:{NBadHVEMBA += 1;
break;}
362 case 2:
case 3:{NBadHVEMECA += 1;
break;}
363 case 4: {NBadHVHECA += 1;
break;}
364 case 5: {NBadHVFCALA += 1;
break;}
383 if ( BadHVPartitions != 0 ) noisyRO-> SetBadHVlinesPartitions(BadHVPartitions);
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
void SetMNBLooseFlaggedPartitions(uint8_t bitpattern)
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
id_iterator feb_begin() const
Returns an iterator pointing to a feb identifier collection.
void SetMNBTight_PsVetoFlaggedPartitions(uint8_t bitpattern)
#define ATH_MSG_VERBOSE(x)
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
void add_MNBTight_feb(HWIdentifier febid)
value_type get_compact() const
Get the compact id.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
bool is_em(const Identifier id) const
test if the id belongs to LArEM
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
bool isEMECchannel(const HWIdentifier id) const override final
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
::StatusCode StatusCode
StatusCode definition for legacy code.
int zside(const HWIdentifier id) const
Return an integer corresponding to the side of an hardware electrode identifier.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
const std::vector< HWIdentifier > & get_noisy_febs() const
void add_MNBLoose_feb(HWIdentifier febid)
int detector(const HWIdentifier id) const
Return an integer corresponding to the detector of an hardware electrode identifier.
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
unsigned constexpr int sideA
void add_MNBTight_PsVeto_feb(HWIdentifier febid)
id_iterator feb_end() const
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
void add_noisy_hvline(HWIdentifier hvid)
void SetMNBTightFlaggedPartitions(uint8_t bitpattern)
StatusCode initialize(bool used=true)
Container class for CaloCell.
bool isEMBchannel(const HWIdentifier id) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
This class provides the client interface for accessing the detector description information common to...
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
short HVNcell(const HWIdentifier &chid) const
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
void add_noisy_feb(HWIdentifier febid)
const std::vector< HWIdentifier > & getLArElectrodeIDvec(HWIdentifier &hvlineId) const
Return a vector of LArElectrodeID corresponding to a given LArHVLineID.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Summary information for noisy LAr preamp / FEBs.