 |
ATLAS Offline Software
|
#include <LArNoisyROTool.h>
|
| std::unordered_map< unsigned int, unsigned int > | m_mapPSFEB |
| |
| ToolHandle< ILArHVMapTool > | m_hvMapTool {"LArHVMapTool"} |
| |
| const CaloCell_ID * | m_calo_id = nullptr |
| |
| const LArOnlineID * | m_onlineID = nullptr |
| |
| const LArElectrodeID * | m_elecID = nullptr |
| |
| SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this, "CablingKey", "LArOnOffIdMap", "key to read OnOff mapping"} |
| |
| Gaudi::Property< unsigned int > | m_CellQualityCut {this, "CellQualityCut", 4000, "Qfactor value above which a channel is considered bad"} |
| |
| Gaudi::Property< bool > | m_ignore_masked_cells {this, "IgnoreMaskedCells", false, "ignore masked cells"} |
| |
| Gaudi::Property< bool > | m_ignore_front_innerwheel_cells {this, "IgnoreFrontInnerWheelCells", true, "ignore front inner wheel cells ?"} |
| |
| Gaudi::Property< unsigned int > | m_BadChanPerFEB {this, "BadChanPerFEB", 30, "number of bad channels to declare a FEB noisy"} |
| |
| Gaudi::Property< unsigned int > | m_MinBadFEB {this, "BadFEBCut", 3, "min number of bad FEB to put LAr warning in event info"} |
| |
| Gaudi::Property< unsigned int > | m_SaturatedCellQualityCut |
| |
| Gaudi::Property< float > | m_SaturatedCellEnergyTightCut |
| |
| Gaudi::Property< unsigned int > | m_SaturatedCellTightCut {this, "SaturatedCellTightCut", 20, "min number of saturated Qfactor cells to declare an event bad"} |
| |
| Gaudi::Property< bool > | m_doHVline {this, "DoHVflag", true, "do HVline flagging"} |
| |
| Gaudi::Property< float > | m_BadChanFracPerHVline {this, "BadChanFracPerHVline", 0.25, "fraction of bad cells in one HV line"} |
| |
| Gaudi::Property< unsigned int > | m_MinBadHV {this, "BadHVCut", 3, " min number of bad HV lines"} |
| |
| Gaudi::Property< unsigned int > | m_MNBLooseCut {this, "MNBLooseCut", 5, "Loose cut on number of cells above CellQualityCut"} |
| |
| Gaudi::Property< unsigned int > | m_MNBTightCut {this, "MNBTightCut", 17, "Thight cut on number of cells above CellQualityCut"} |
| |
| Gaudi::Property< std::vector< unsigned int > > | m_MNBTight_PsVetoCut {this, "MNBTight_PsVetoCut", {13, 3}} |
| |
| std::array< uint8_t, 4 > | m_partitionMask |
| |
Definition at line 40 of file LArNoisyROTool.h.
◆ FEBEvtStatMap
◆ HVlinesStatMap
◆ ~LArNoisyROTool()
| virtual LArNoisyROTool::~LArNoisyROTool |
( |
| ) |
|
|
virtualdefault |
◆ initialize()
| StatusCode LArNoisyROTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 22 of file LArNoisyROTool.cxx.
25 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 !" );
26 return StatusCode::FAILURE;
30 ATH_MSG_FATAL(
"Configuration problem: LArNoisyROTool assumes that MNBLooseCut is smaller than MNBTightCut" );
31 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
◆ partitionNumber()
◆ process()
Definition at line 60 of file LArNoisyROTool.cxx.
64 if(doHVline && ( !nCellsperLine || !cddm || !hvid)) {
65 ATH_MSG_ERROR(
"HV line flagging asked, but missing ingrediences, switching off !!");
69 std::unique_ptr<LArNoisyROSummary> noisyRO=std::make_unique<LArNoisyROSummary>();
71 if(!cellContainer)
return noisyRO;
79 unsigned int NsaturatedTightCutBarrelA = 0;
80 unsigned int NsaturatedTightCutBarrelC = 0;
81 unsigned int NsaturatedTightCutEMECA = 0;
82 unsigned int NsaturatedTightCutEMECC = 0;
105 if (
sideA ) { NsaturatedTightCutBarrelA++; }
106 else { NsaturatedTightCutBarrelC++; }
110 if (
sideA ) { NsaturatedTightCutEMECA++; }
111 else { NsaturatedTightCutEMECC++; }
124 FEBStats[FEBindex].addBadChannel(
channel);
129 std::vector<HWIdentifier> hvlines;
131 for(
unsigned int i=0;
i<hvlines.size(); ++
i) {
132 if(HVStats.contains(hvlines[
i])) HVStats[hvlines[
i]] += 1;
else HVStats[hvlines[
i]]=1;
139 uint8_t SatTightPartitions = 0;
144 bool badSaturatedTightCut = (SatTightPartitions != 0);
145 if ( badSaturatedTightCut ) noisyRO-> SetSatTightFlaggedPartitions(SatTightPartitions);
149 for (
auto&
it : FEBStats) {
150 ATH_MSG_VERBOSE(
" candidate FEB " <<
it.first <<
" with " <<
it.second.badChannels() <<
" bad channels");
161 unsigned int associatedPSFEB = 0;
164 associatedPSFEB = assoc_it->second;
166 if (associatedPSFEB != 0){
181 unsigned int NBadFEBEMECA = 0;
unsigned int NBadFEBEMECA_W = 0;
182 unsigned int NBadFEBEMECC = 0;
unsigned int NBadFEBEMECC_W = 0;
183 unsigned int NBadFEBEMBA = 0;
unsigned int NBadFEBEMBA_W = 0;
184 unsigned int NBadFEBEMBC = 0;
unsigned int NBadFEBEMBC_W = 0;
186 const std::vector<HWIdentifier>& badfebs = noisyRO->
get_noisy_febs();
200 if (knownBadFEBs->find(int_id)!=knownBadFEBs->end())
weight=2;
205 NBadFEBEMBA_W = NBadFEBEMBA_W +
weight;
209 NBadFEBEMBC_W = NBadFEBEMBC_W +
weight;
216 NBadFEBEMECA_W = NBadFEBEMECA_W +
weight;
220 NBadFEBEMECC_W = NBadFEBEMECC_W +
weight;
231 if ( BadFEBPartitions != 0 ) noisyRO-> SetBadFEBFlaggedPartitions(BadFEBPartitions);
233 uint8_t BadFEBPartitions_W = 0;
238 if ( BadFEBPartitions_W != 0 ) noisyRO-> SetBadFEB_WFlaggedPartitions(BadFEBPartitions_W);
244 uint8_t MNBTight_PsVetoPartition=0;
247 std::array<unsigned,5> nTightMNBFEBSperPartition{};
248 std::array<unsigned,5> nTight_PsVetoMNBFEBSperPartition{};
249 std::array<unsigned,5> nLooseMNBFEBSperPartition{};
252 if (statIt!=FEBStats.end()) {
259 if (
unsigned int associatedPSFEB =
found->second; associatedPSFEB != 0){
260 if (FEBStats.count(associatedPSFEB) == 0) (nTight_PsVetoMNBFEBSperPartition[
partitionNumber(febid)])++;
273 for (
unsigned iP=0;iP<4;++iP) {
274 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nLooseMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBLooseCut <<
" bad-Q channels" );
275 ATH_MSG_DEBUG(
"Partition " << iP <<
": Found " << nTightMNBFEBSperPartition[iP] <<
" MNB FEBs with more than " <<
m_MNBTightCut <<
" bad-Q channels" );
276 if (nLooseMNBFEBSperPartition[iP]>0) MNBLoosePartition |=
m_partitionMask[iP];
277 if (nTightMNBFEBSperPartition[iP]>0) MNBTightPartition |=
m_partitionMask[iP];
278 if (nTight_PsVetoMNBFEBSperPartition[iP]>0) MNBTight_PsVetoPartition |=
m_partitionMask[iP];
286 if(!hvid || !nCellsperLine )
return noisyRO;
289 unsigned int NBadHVEMECA = 0;
290 unsigned int NBadHVEMECC = 0;
291 unsigned int NBadHVEMBA = 0;
292 unsigned int NBadHVEMBC = 0;
293 unsigned int NBadHVHECA = 0;
294 unsigned int NBadHVHECC = 0;
295 unsigned int NBadHVFCALA = 0;
296 unsigned int NBadHVFCALC = 0;
299 for ( HVlinesStatMap::const_iterator
it = HVStats.begin();
it != HVStats.end(); ++
it ) {
300 ATH_MSG_DEBUG(ctx.eventID().event_number()<<
" candidate HVline " <<
it->first <<
" with " <<
it->second <<
" bad channels, out of "<<nCellsperLine->
HVNcell(
HWIdentifier(
it->first))<<
" channels");
310 case 0:
case 1:{NBadHVEMBC += 1;
break;}
311 case 2:
case 3:{NBadHVEMECC += 1;
break;}
312 case 4: {NBadHVHECC += 1;
break;}
313 case 5: {NBadHVFCALC += 1;
break;}
318 case 0: {
switch(
part){
319 case 0:
case 1:{NBadHVEMBA += 1;
break;}
320 case 2:
case 3:{NBadHVEMECA += 1;
break;}
321 case 4: {NBadHVHECA += 1;
break;}
322 case 5: {NBadHVFCALA += 1;
break;}
341 if ( BadHVPartitions != 0 ) noisyRO-> SetBadHVlinesPartitions(BadHVPartitions);
◆ m_BadChanFracPerHVline
| Gaudi::Property<float> LArNoisyROTool::m_BadChanFracPerHVline {this, "BadChanFracPerHVline", 0.25, "fraction of bad cells in one HV line"} |
|
private |
◆ m_BadChanPerFEB
| Gaudi::Property<unsigned int> LArNoisyROTool::m_BadChanPerFEB {this, "BadChanPerFEB", 30, "number of bad channels to declare a FEB noisy"} |
|
private |
◆ m_cablingKey
◆ m_calo_id
◆ m_CellQualityCut
| Gaudi::Property<unsigned int> LArNoisyROTool::m_CellQualityCut {this, "CellQualityCut", 4000, "Qfactor value above which a channel is considered bad"} |
|
private |
◆ m_doHVline
| Gaudi::Property<bool> LArNoisyROTool::m_doHVline {this, "DoHVflag", true, "do HVline flagging"} |
|
private |
◆ m_elecID
◆ m_hvMapTool
| ToolHandle<ILArHVMapTool> LArNoisyROTool::m_hvMapTool {"LArHVMapTool"} |
|
private |
◆ m_ignore_front_innerwheel_cells
| Gaudi::Property<bool> LArNoisyROTool::m_ignore_front_innerwheel_cells {this, "IgnoreFrontInnerWheelCells", true, "ignore front inner wheel cells ?"} |
|
private |
◆ m_ignore_masked_cells
| Gaudi::Property<bool> LArNoisyROTool::m_ignore_masked_cells {this, "IgnoreMaskedCells", false, "ignore masked cells"} |
|
private |
◆ m_mapPSFEB
| std::unordered_map<unsigned int, unsigned int> LArNoisyROTool::m_mapPSFEB |
|
private |
◆ m_MinBadFEB
| Gaudi::Property<unsigned int> LArNoisyROTool::m_MinBadFEB {this, "BadFEBCut", 3, "min number of bad FEB to put LAr warning in event info"} |
|
private |
◆ m_MinBadHV
| Gaudi::Property<unsigned int> LArNoisyROTool::m_MinBadHV {this, "BadHVCut", 3, " min number of bad HV lines"} |
|
private |
◆ m_MNBLooseCut
| Gaudi::Property<unsigned int> LArNoisyROTool::m_MNBLooseCut {this, "MNBLooseCut", 5, "Loose cut on number of cells above CellQualityCut"} |
|
private |
◆ m_MNBTight_PsVetoCut
| Gaudi::Property<std::vector<unsigned int> > LArNoisyROTool::m_MNBTight_PsVetoCut {this, "MNBTight_PsVetoCut", {13, 3}} |
|
private |
◆ m_MNBTightCut
| Gaudi::Property<unsigned int> LArNoisyROTool::m_MNBTightCut {this, "MNBTightCut", 17, "Thight cut on number of cells above CellQualityCut"} |
|
private |
◆ m_onlineID
◆ m_partitionMask
| std::array<uint8_t, 4> LArNoisyROTool::m_partitionMask |
|
private |
◆ m_SaturatedCellEnergyTightCut
| Gaudi::Property<float> LArNoisyROTool::m_SaturatedCellEnergyTightCut |
|
private |
Initial value:{this, "SaturatedCellEnergyTightCut", 1000.,
"Count saturated Qfactor cells above this energy cut (absolute value)"}
Definition at line 111 of file LArNoisyROTool.h.
◆ m_SaturatedCellQualityCut
| Gaudi::Property<unsigned int> LArNoisyROTool::m_SaturatedCellQualityCut |
|
private |
Initial value:{this, "SaturatedCellQualityCut", 65535,
" Qfactor value above which (>=) a channel is considered with a saturated Qfactor"}
Definition at line 108 of file LArNoisyROTool.h.
◆ m_SaturatedCellTightCut
| Gaudi::Property<unsigned int> LArNoisyROTool::m_SaturatedCellTightCut {this, "SaturatedCellTightCut", 20, "min number of saturated Qfactor cells to declare an event bad"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
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.
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)
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)
bool isEMBchannel(const HWIdentifier id) const
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
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.