3 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
4 from AthenaConfiguration.Enums
import FlagEnum, LHCPeriod
5 from AthenaCommon.Logging
import logging
9 Calculated=
"Calculated"
16 lcf.addFlag(
"LAr.doAlign",
lambda prevFlags : prevFlags.GeoModel.Layout==
"atlas")
17 lcf.addFlag(
"LAr.doHVCorr",
lambda prevFlags :
not prevFlags.Input.isMC)
18 lcf.addFlag(
"LAr.doCellEmMisCalib",
lambda prevFlags : prevFlags.Input.isMC)
20 lcf.addFlag(
"LAr.RawChannelSource", _determineRawChannelSource, type=RawChannelSource)
22 lcf.addFlag(
"LAr.doCellNoiseMasking",
True)
23 lcf.addFlag(
"LAr.doCellSporadicNoiseMasking",
True)
24 lcf.addFlag(
"LAr.doBadFebMasking",
lambda prevFlags :
not prevFlags.Input.isMC)
25 lcf.addFlag(
"LAr.doDeadOTxCorr",
lambda prevFlags :
not prevFlags.Input.isMC
and prevFlags.GeoModel.Run >= LHCPeriod.Run3)
28 lcf.addFlag(
"LAr.UseMCShape",
True)
30 lcf.addFlag(
"LAr.ElecCalibSqlite",
"")
32 lcf.addFlag(
"LAr.LoadElecCalib",
True)
34 lcf.addFlag(
"LAr.OFCShapeFolder",
"")
36 lcf.addFlag(
"LAr.ForceIOVRunNumber",
"")
38 lcf.addFlag(
"LAr.UseShape",
True)
40 lcf.addFlag(
"LAr.DBConnection",
"")
43 lcf.addFlag(
"LAr.ROD.NumberOfCollisions",0)
45 lcf.addFlag(
"LAr.ROD.nSamples", 5)
47 lcf.addFlag(
"LAr.ROD.FirstSample", 0)
49 lcf.addFlag(
"LAr.ROD.nPreceedingSamples", 0)
52 lcf.addFlag(
"LAr.ROD.UseHighestGainAutoCorr",
False)
55 lcf.addFlag(
"LAr.ROD.DoOFCMixedOptimization",
False)
58 lcf.addFlag(
"LAr.ROD.UseDelta", 0)
60 lcf.addFlag(
"LAr.ROD.forceIter",
False)
62 lcf.addFlag(
"LAr.ROD.NNRawChannelBuilding",
False)
63 lcf.addFlag(
"LAr.ROD.nnJson",
"")
64 lcf.addFlag(
"LAr.ROD.nnOutputNode",
"")
65 lcf.addFlag(
"LAr.ROD.nnInputNode",
"")
67 lcf.addFlag(
"LAr.LATOME.DTInfoForL1",
"SC_ET_ID")
69 lcf.addFlag(
"LAr.DT.storeET_ID",
False)
70 lcf.addFlag(
"LAr.DT.ET_IDKey",
"SCell")
71 lcf.addFlag(
"LAr.DT.doSCMasking",
True)
73 lcf.addFlag(
"LAr.DT.storeET_additional",
False)
74 lcf.addFlag(
"LAr.DT.ET_PlusKey",
"SCellPlus")
75 lcf.addFlag(
"LAr.DT.ET_MinusKey",
"SCellMinus")
79 lcf.addFlag(
"LAr.NoisyRO.CellQuality", 4000)
81 lcf.addFlag(
"LAr.NoisyRO.BadChanPerFEB", 30)
83 lcf.addFlag(
"LAr.NoisyRO.BadFEBCut", 5)
85 lcf.addFlag(
"LAr.NoisyRO.MNBLooseCut", 5)
87 lcf.addFlag(
"LAr.NoisyRO.MNBTightCut", 17)
89 lcf.addFlag(
"LAr.NoisyRO.MNBTight_PsVetoCut", [13,3])
91 lcf.addFlag(
"LAr.NoisyRO.BadHVCut", 3)
93 lcf.addFlag(
"LAr.NoisyRO.BadHVlineFrac", 0.25)
101 log = logging.getLogger(
'LArConfigFlags.getLArRunInfo')
103 if _lArRunInfo
is None:
105 runnbr=prevFlags.Input.RunNumbers[0]
106 dbStr=
"COOLONL_LAR/"+prevFlags.IOVDb.DatabaseInstance
108 log.info(
"Got LArRunInfo for run %d",runnbr)
113 log = logging.getLogger(
'LArConfigFlags.determineRawChannelSource')
114 if prevFlags.Input.isMC
or prevFlags.Overlay.DataOverlay:
115 return RawChannelSource.Input
119 if lri
is None or lri.runType
is None:
120 log.warning(
"WARNING do not have LArRunInfo !")
121 return RawChannelSource.Both
122 log.info(
"runType %d",lri.runType())
123 if (lri.runType()==0):
124 return RawChannelSource.Calculated
125 elif (lri.runType()==1
or lri.runType()==2):
126 return RawChannelSource.Both
128 log.warning(
"Unknown LAr run type %i",lri.runType())
129 return RawChannelSource.Both