3 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
8 Top level flag generator for CaloRecGPU
10 The list of available CaloRecGPU flag subdomains is populated below the first time flags.CaloRecGPU is called to either set or get any sub-flag.
12 The central hook to this comes from Control/AthenaConfiguration/python/AllConfigFlags.py
14 The CaloRecGPU package must be compiled otherwise this will silently fail.
16 All CaloRecGPU flag subdomains should be listed below. They will be similarly be populated only on-demand.
19 flags = AthConfigFlags()
20 flags.addFlagsCategory(
'CaloRecGPU.GlobalFlags', _createGlobalFlagsCaloRecGPU, prefix=
True)
21 flags.addFlagsCategory(
'CaloRecGPU.Default', _createDefaultSubFlagsCaloRecGPU, prefix=
True)
22 flags.addFlagsCategory(
'Trigger.CaloRecGPU.Default', _createTriggerSubFlagsCaloRecGPU, prefix=
True)
24 flags.addFlagsCategory(
'CaloRecGPU.ActiveConfig', _createActiveConfigFlagsCaloRecGPU, prefix=
True)
29 Generate top-level flags for CaloRecGPU that are meant to be global
30 and independent of the ActiveConfig.
32 flags = AthConfigFlags()
34 flags.addFlag(
'UseCaloRecGPU',
False)
35 flags.addFlag(
'UseCPUToolsInstead',
False)
41 Generate top-level flags for CaloRecGPU that are meant to be global
42 and independent of the ActiveConfig.
44 flags = AthConfigFlags()
46 flags.addFlag(
'MeasureTimes',
False)
52 Generate CaloRecGPU flags for a particular flag subdomain (the trigger in this case)
54 Calls the function to generate a new set of default CaloRecGPU flags, and then updates the defaults as required for this specific subdomain.
57 flags.UseOriginalCriteria =
False
58 flags.GrowingRestrictPSNeighbors =
False
59 flags.GPUSplittingRestrictPSNeighbors =
False
60 flags.doTimeCut =
lambda prevFlags: prevFlags.Trigger.Calo.TopoCluster.doTimeCut
61 flags.extendTimeCut =
lambda prevFlags: prevFlags.Trigger.Calo.TopoCluster.extendTimeCut
62 flags.useUpperLimitForTimeCut =
lambda prevFlags: prevFlags.Trigger.Calo.TopoCluster.useUpperLimitForTimeCut
63 flags.timeCutUpperLimit =
lambda prevFlags: prevFlags.Trigger.Calo.TopoCluster.timeCutUpperLimit
64 flags.MomentsToCalculate = [
'FIRST_PHI',
97 flags.MomentsUseAbsEnergy =
False
98 flags.doTopoClusterLocalCalib =
False
109 Generate a new default CaloRecGPU flags domain
111 Generates a full suite of CaloRecGPU flags for a specific subdomain, the prefixing of the subdomain is handled by the caller.
112 Sets the most generic default parameters or default parameter lambda function logic for each flag, this can be overridden if needed by specific subdomains.
114 flags = AthConfigFlags()
118 flags.addFlag(
'MeasureTimes',
False)
123 flags.addFlag(
'FillMissingCells',
False)
124 flags.addFlag(
'MissingCellsToFill', [])
126 flags.addFlag(
'NumPreAllocatedDataHolders', 0)
128 flags.addFlag(
'UseOriginalCriteria',
lambda prevFlags:
not prevFlags.Calo.TopoCluster.UseGPUCompatibleCriteria)
135 flags.addFlag(
'SeedThreshold',4.0)
136 flags.addFlag(
'GrowThreshold',2.0)
137 flags.addFlag(
'TermThreshold',0.0)
138 flags.addFlag(
'UseAbsSeedThreshold',
True)
139 flags.addFlag(
'UseAbsGrowThreshold',
True)
140 flags.addFlag(
'UseAbsTermThreshold',
True)
141 flags.addFlag(
'ClusterSize',
'Topo_420')
146 flags.addFlag(
'GrowingCalorimeterNames', [
"LAREM",
"LARHEC",
"LARFCAL",
"TILE"])
147 flags.addFlag(
'GrowingSeedSamplingNames', [
"PreSamplerB",
"EMB1",
"EMB2",
"EMB3",
"PreSamplerE",
"EME1",
"EME2",
"EME3",
"HEC0",
"HEC1",
"HEC2",
"HEC3",
"TileBar0",
"TileBar1",
"TileBar2",
"TileExt0",
"TileExt1",
"TileExt2",
"TileGap1",
"TileGap2",
"TileGap3",
"FCAL0",
"FCAL1",
"FCAL2"])
148 flags.addFlag(
'GrowingNeighborOption',
"super3D")
149 flags.addFlag(
'GrowingRestrictHECIWandFCalNeighbors',
False)
150 flags.addFlag(
'GrowingRestrictPSNeighbors',
True)
151 flags.addFlag(
'GrowingTreatL1PredictedCellsAsGood',
True)
153 flags.addFlag(
'GrowingTimeCutSeedThreshold',12.5*ns)
155 flags.addFlag(
'PostGrowingClusterCutClustersInAbsEt',
True)
156 flags.addFlag(
'PostGrowingClusterEnergyCut', -1e-16*MeV)
168 flags.addFlag(
'SplittingNeighborOption',
"super3D")
169 flags.addFlag(
'SplittingRestrictHECIWandFCalNeighbors',
False)
170 flags.addFlag(
'SplittingTreatL1PredictedCellsAsGood',
True)
172 flags.addFlag(
'SplittingNumberOfCellsCut', 4)
173 flags.addFlag(
'SplittingEnergyCut', 500 * MeV)
174 flags.addFlag(
'SplittingSamplingNames',[
"EMB2",
"EMB3",
"EME2",
"EME3",
"FCAL0"])
175 flags.addFlag(
'SplittingSecondarySamplingNames',[
"EMB1",
"EME1",
"TileBar0",
"TileBar1",
"TileBar2",
"TileExt0",
"TileExt1",
"TileExt2",
"HEC0",
"HEC1",
"HEC2",
"HEC3",
"FCAL1",
"FCAL2"])
176 flags.addFlag(
'SplittingShareBorderCells',
True)
177 flags.addFlag(
'SplittingEMShowerScale',5.0*cm)
178 flags.addFlag(
'SplittingUseNegativeClusters',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute)
180 flags.addFlag(
'GPUSplittingRestrictPSNeighbors',
False)
183 flags.addFlag(
'MomentsUseAbsEnergy',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute)
184 flags.addFlag(
'MomentsMaxAxisAngle',20*deg)
185 flags.addFlag(
'MomentsMinBadLArQuality',4000)
186 MomentsToCalculateOnline=[
"FIRST_PHI",
221 MomentsToCalculateOffline = MomentsToCalculateOnline + [
"ENG_BAD_HV_CELLS",
"N_BAD_HV_CELLS"]
222 flags.addFlag(
'MomentsToCalculate',
lambda prevFlags: MomentsToCalculateOnline
if prevFlags.Common.isOnline
else MomentsToCalculateOffline )
223 flags.addFlag(
'MomentsMinRLateral',4*cm)
224 flags.addFlag(
'MomentsMinLLongitudinal',10*cm)
226 flags.addFlag(
'CalibrationUseAbsEnergy',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute)
230 flags.addFlag(
'doTwoGaussianNoise',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTwoGaussianNoise)
233 flags.addFlag(
'doTimeCut',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTimeCut)
234 flags.addFlag(
'extendTimeCut',
lambda prevFlags: prevFlags.Calo.TopoCluster.extendTimeCut)
236 flags.addFlag(
'useUpperLimitForTimeCut',
lambda prevFlags: prevFlags.Calo.TopoCluster.useUpperLimitForTimeCut)
238 flags.addFlag(
'timeCutUpperLimit',
lambda prevFlags: prevFlags.Calo.TopoCluster.timeCutUpperLimit)
240 flags.addFlag(
'xtalkEM2',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEM2)
241 flags.addFlag(
'xtalkEM2D',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEM2D)
242 flags.addFlag(
'xtalkEM2n',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEM2n)
243 flags.addFlag(
'xtalkEM3',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEM3)
244 flags.addFlag(
'xtalkEMEta',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEMEta)
245 flags.addFlag(
'xtalkDeltaT',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkDeltaT)
246 flags.addFlag(
'xtalk2Eratio1',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalk2Eratio1)
247 flags.addFlag(
'xtalk2Eratio2',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalk2Eratio2)
248 flags.addFlag(
'xtalk3Eratio',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalk3Eratio)
249 flags.addFlag(
'xtalkEtaEratio',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalkEtaEratio)
250 flags.addFlag(
'xtalk2DEratio',
lambda prevFlags: prevFlags.Calo.TopoCluster.xtalk2DEratio)
252 flags.addFlag(
'doTopoClusterLocalCalib',
lambda prevFlags: prevFlags.Calo.TopoCluster.doTopoClusterLocalCalib)
253 flags.addFlag(
'doCalibHitMoments',
lambda prevFlags: prevFlags.Calo.TopoCluster.doCalibHitMoments)
255 flags.addFlag(
'skipWriteList',
lambda prevFlags: prevFlags.Calo.TopoCluster.skipWriteList)
256 flags.addFlag(
'writeExtendedClusterMoments',
lambda prevFlags: prevFlags.Calo.TopoCluster.writeExtendedClusterMoments)
257 flags.addFlag(
'writeCalibHitClusterMoments',
lambda prevFlags: prevFlags.Calo.TopoCluster.writeCalibHitClusterMoments)
259 flags.addFlag(
'addCalibrationHitDecoration',
lambda prevFlags: prevFlags.Calo.TopoCluster.addCalibrationHitDecoration)
260 flags.addFlag(
'CalibrationHitDecorationName',
lambda prevFlags: prevFlags.Calo.TopoCluster.CalibrationHitDecorationName)
261 flags.addFlag(
'addCPData',
lambda prevFlags: prevFlags.Calo.TopoCluster.addCPData)