ATLAS Offline Software
Loading...
Searching...
No Matches
LArNoisyROSummaryConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentFactory import CompFactory
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from LArBadChannelTool.LArBadFebsConfig import LArKnownBadFebCfg, LArKnownMNBFebCfg
6from LArCabling.LArHVCablingConfig import LArHVCablingCfg
7from AthenaConfiguration.Enums import ProductionStep
8
9def LArNoisyROSummaryCfg(configFlags, **kwargs):
10
11 result=ComponentAccumulator()
12
13 isMC=configFlags.Input.isMC
14
15 if not isMC:
16 result.merge(LArKnownBadFebCfg(configFlags))
17 result.merge(LArKnownMNBFebCfg(configFlags))
18 if not configFlags.Common.isOnline:
19 result.merge(LArHVCablingCfg(configFlags))
20 result.addEventAlgo(CompFactory.LArHVlineMapAlg(keyOutput="LArHVNcells"))
21
22 # now configure the algorithm
23 LArNoisyROAlg,LArNoisyROTool=CompFactory.getComps("LArNoisyROAlg","LArNoisyROTool")
24 if configFlags.Common.ProductionStep in [ProductionStep.PileUpPretracking, ProductionStep.MinbiasPreprocessing]:
25 kwargs.setdefault('EventInfoKey', f"{configFlags.Overlay.BkgPrefix}EventInfo")
26
27 theLArNoisyROTool=LArNoisyROTool(CellQualityCut=configFlags.LAr.NoisyRO.CellQuality,
28 BadChanPerFEB=configFlags.LAr.NoisyRO.BadChanPerFEB,
29 BadFEBCut=configFlags.LAr.NoisyRO.BadFEBCut,
30 MNBLooseCut=configFlags.LAr.NoisyRO.MNBLooseCut,
31 MNBTightCut=configFlags.LAr.NoisyRO.MNBTightCut,
32 MNBTight_PsVetoCut=configFlags.LAr.NoisyRO.MNBTight_PsVetoCut,
33 BadHVCut=configFlags.LAr.NoisyRO.BadHVCut,
34 BadChanFracPerHVline=configFlags.LAr.NoisyRO.BadHVlineFrac,
35 DoHVflag=not (isMC or configFlags.Common.isOnline)
36 )
37
38 theLArNoisyROAlg=LArNoisyROAlg(isMC=isMC,Tool=theLArNoisyROTool, **kwargs)
39 if not isMC and not configFlags.Common.isOnline:
40 theLArNoisyROAlg.LArHVIdMapping="LArHVIdMap"
41 theLArNoisyROAlg.HVMapKey="LArHVNcells"
42 result.addEventAlgo(theLArNoisyROAlg)
43
44 toStore="LArNoisyROSummary#LArNoisyROSummary"
45 from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
46 result.merge(addToESD(configFlags,toStore))
47 result.merge(addToAOD(configFlags,toStore))
48
49
50 return result
51
Find list of suspicious preamplifiers and Front End Boards from cell collection.
LArNoisyROSummaryCfg(configFlags, **kwargs)