ATLAS Offline Software
LArNoisyROSummaryConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from LArBadChannelTool.LArBadFebsConfig import LArKnownBadFebCfg, LArKnownMNBFebCfg
6 from AthenaConfiguration.Enums import ProductionStep
7 
8 def LArNoisyROSummaryCfg(configFlags, **kwargs):
9 
10  result=ComponentAccumulator()
11 
12  isMC=configFlags.Input.isMC
13 
14  if not isMC:
15  result.merge(LArKnownBadFebCfg(configFlags))
16  result.merge(LArKnownMNBFebCfg(configFlags))
17 
18  # now configure the algorithm
19  LArNoisyROAlg,LArNoisyROTool=CompFactory.getComps("LArNoisyROAlg","LArNoisyROTool")
20  if configFlags.Common.ProductionStep is ProductionStep.PileUpPretracking:
21  kwargs.setdefault('EventInfoKey', "Bkg_EventInfo")
22 
23  theLArNoisyROTool=LArNoisyROTool(CellQualityCut=configFlags.LAr.NoisyRO.CellQuality,
24  BadChanPerFEB=configFlags.LAr.NoisyRO.BadChanPerFEB,
25  BadFEBCut=configFlags.LAr.NoisyRO.BadFEBCut,
26  MNBLooseCut=configFlags.LAr.NoisyRO.MNBLooseCut,
27  MNBTightCut=configFlags.LAr.NoisyRO.MNBTightCut,
28  MNBTight_PsVetoCut=configFlags.LAr.NoisyRO.MNBTight_PsVetoCut
29  )
30 
31  theLArNoisyROAlg=LArNoisyROAlg(isMC=isMC,Tool=theLArNoisyROTool, **kwargs)
32  result.addEventAlgo(theLArNoisyROAlg)
33 
34  toStore="LArNoisyROSummary#LArNoisyROSummary"
35  from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
36  result.merge(addToESD(configFlags,toStore))
37  result.merge(addToAOD(configFlags,toStore))
38 
39 
40  return result
41 
python.LArBadFebsConfig.LArKnownMNBFebCfg
def LArKnownMNBFebCfg(configFlags, tag=None)
Definition: LArBadFebsConfig.py:25
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArNoisyROAlg
Find list of suspicious preamplifiers and Front End Boards from cell collection.
Definition: LArNoisyROAlg.h:34
python.LArBadFebsConfig.LArKnownBadFebCfg
def LArKnownBadFebCfg(configFlags, tag=None)
Definition: LArBadFebsConfig.py:11
LArNoisyROTool
Definition: LArNoisyROTool.h:38
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
LArNoisyROSummaryConfig.LArNoisyROSummaryCfg
def LArNoisyROSummaryCfg(configFlags, **kwargs)
Definition: LArNoisyROSummaryConfig.py:8
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142