ATLAS Offline Software
Loading...
Searching...
No Matches
CaloRecGPUFlags Namespace Reference

Functions

 createFlagsCaloRecGPU ()
 _createGlobalFlagsCaloRecGPU ()
 _createActiveConfigFlagsCaloRecGPU ()
 _createTriggerSubFlagsCaloRecGPU ()
 _createDefaultSubFlagsCaloRecGPU ()

Function Documentation

◆ _createActiveConfigFlagsCaloRecGPU()

CaloRecGPUFlags._createActiveConfigFlagsCaloRecGPU ( )
protected
Generate top-level flags for CaloRecGPU that are meant to be global
and independent of the ActiveConfig.

Definition at line 39 of file CaloRecGPUFlags.py.

39def _createActiveConfigFlagsCaloRecGPU():
40 """
41 Generate top-level flags for CaloRecGPU that are meant to be global
42 and independent of the ActiveConfig.
43 """
44 flags = AthConfigFlags()
45
46 flags.addFlag('MeasureTimes', False)
47
48 return flags
49

◆ _createDefaultSubFlagsCaloRecGPU()

CaloRecGPUFlags._createDefaultSubFlagsCaloRecGPU ( )
protected
Generate a new default CaloRecGPU flags domain

Generates a full suite of CaloRecGPU flags for a specific subdomain, the prefixing of the subdomain is handled by the caller.
Sets the most generic default parameters or default parameter lambda function logic for each flag, this can be overridden if needed by specific subdomains. 

Definition at line 107 of file CaloRecGPUFlags.py.

107def _createDefaultSubFlagsCaloRecGPU():
108 """
109 Generate a new default CaloRecGPU flags domain
110
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.
113 """
114 flags = AthConfigFlags()
115
116 #GPU SPECIFIC FLAGS WITH NO CPU EQUIVALENT
117
118 flags.addFlag('MeasureTimes', False)
119 #Output timing measurements,
120 #including the breakdown
121 #within the algorithms themselves.
122
123 flags.addFlag('FillMissingCells', False)
124 flags.addFlag('MissingCellsToFill', [])
125
126 flags.addFlag('NumPreAllocatedDataHolders', 0)
127
128 flags.addFlag('UseOriginalCriteria', lambda prevFlags: not prevFlags.Calo.TopoCluster.UseGPUCompatibleCriteria)
129 #Restore instantiated CPU tools to their original, GPU-disagreeing criteria.
130
131 #FLAGS THAT ENCAPSULATE CPU CONFIGURATION OPTIONS THAT ARE NOT FLAGS IN CPU CONFIGURATION
132 #(Most of them aren't strictly necessary and could be hard-coded in the Cfg,
133 # but CPU vs GPU testing benefits from having all this granularity.)
134
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')
142 #There is the "getClusterSize" function on the C++ code
143 #that tries to guess based on the thresholds,
144 #we could either rely on that or do it also in Python?
145
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)
152
153 flags.addFlag('GrowingTimeCutSeedThreshold',12.5*ns)
154
155 flags.addFlag('PostGrowingClusterCutClustersInAbsEt', True)
156 flags.addFlag('PostGrowingClusterEnergyCut', -1e-16*MeV)
157 #CPU has default 0, but since the comparison is not inclusive,
158 #it's better if we consider a negative value so that both CPU and GPU
159 #agree 100% when doing the comparison in absolute energy,
160 #because otherwise floating point making clusters have zero energy
161 #in one implementation and a tiny non-zero energy on another
162 #would mean different cuts, thus different cluster numbers,
163 #thus different splitting, and so on.
164 #This problem will remain for non-zero energy cuts,
165 #like other floating point agreement issues elsewhere.
166
167
168 flags.addFlag('SplittingNeighborOption',"super3D")
169 flags.addFlag('SplittingRestrictHECIWandFCalNeighbors',False)
170 flags.addFlag('SplittingTreatL1PredictedCellsAsGood',True)
171
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)
179
180 flags.addFlag('GPUSplittingRestrictPSNeighbors',False)
181 #The CPU code does not apply this restriction, mostly for testing purposes
182
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",
187 "FIRST_ETA",
188 "SECOND_R",
189 "SECOND_LAMBDA",
190 "DELTA_PHI",
191 "DELTA_THETA",
192 "DELTA_ALPHA",
193 "CENTER_X",
194 "CENTER_Y",
195 "CENTER_Z",
196 "CENTER_MAG",
197 "CENTER_LAMBDA",
198 "LATERAL",
199 "LONGITUDINAL",
200 "ENG_FRAC_EM",
201 "ENG_FRAC_MAX",
202 "ENG_FRAC_CORE",
203 "FIRST_ENG_DENS",
204 "SECOND_ENG_DENS",
205 "ISOLATION",
206 "ENG_BAD_CELLS",
207 "N_BAD_CELLS",
208 "N_BAD_CELLS_CORR",
209 "BAD_CELLS_CORR_E",
210 "BADLARQ_FRAC",
211 "ENG_POS",
212 "SIGNIFICANCE",
213 "CELL_SIGNIFICANCE",
214 "CELL_SIG_SAMPLING",
215 "AVG_LAR_Q",
216 "AVG_TILE_Q",
217 "PTD",
218 "MASS",
219 "SECOND_TIME",
220 "NCELL_SAMPLING" ]
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)
225
226 flags.addFlag('CalibrationUseAbsEnergy', lambda prevFlags: prevFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute)
227
228 #FLAGS THAT MIRROR CPU OPTIONS
229
230 flags.addFlag('doTwoGaussianNoise', lambda prevFlags: prevFlags.Calo.TopoCluster.doTwoGaussianNoise)
231
232
233 flags.addFlag('doTimeCut', lambda prevFlags: prevFlags.Calo.TopoCluster.doTimeCut)
234 flags.addFlag('extendTimeCut', lambda prevFlags: prevFlags.Calo.TopoCluster.extendTimeCut)
235
236 flags.addFlag('useUpperLimitForTimeCut', lambda prevFlags: prevFlags.Calo.TopoCluster.useUpperLimitForTimeCut)
237
238 flags.addFlag('timeCutUpperLimit', lambda prevFlags: prevFlags.Calo.TopoCluster.timeCutUpperLimit)
239
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)
251
252 flags.addFlag('doTopoClusterLocalCalib', lambda prevFlags: prevFlags.Calo.TopoCluster.doTopoClusterLocalCalib)
253 flags.addFlag('doCalibHitMoments', lambda prevFlags: prevFlags.Calo.TopoCluster.doCalibHitMoments)
254
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)
258
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)
262
263 return flags

◆ _createGlobalFlagsCaloRecGPU()

CaloRecGPUFlags._createGlobalFlagsCaloRecGPU ( )
protected
Generate top-level flags for CaloRecGPU that are meant to be global
and independent of the ActiveConfig.

Definition at line 27 of file CaloRecGPUFlags.py.

27def _createGlobalFlagsCaloRecGPU():
28 """
29 Generate top-level flags for CaloRecGPU that are meant to be global
30 and independent of the ActiveConfig.
31 """
32 flags = AthConfigFlags()
33
34 flags.addFlag('UseCaloRecGPU', False)
35 flags.addFlag('UseCPUToolsInstead', False)
36
37 return flags
38

◆ _createTriggerSubFlagsCaloRecGPU()

CaloRecGPUFlags._createTriggerSubFlagsCaloRecGPU ( )
protected
Generate CaloRecGPU flags for a particular flag subdomain (the trigger in this case)

Calls the function to generate a new set of default CaloRecGPU flags, and then updates the defaults as required for this specific subdomain.

Definition at line 50 of file CaloRecGPUFlags.py.

50def _createTriggerSubFlagsCaloRecGPU():
51 """
52 Generate CaloRecGPU flags for a particular flag subdomain (the trigger in this case)
53
54 Calls the function to generate a new set of default CaloRecGPU flags, and then updates the defaults as required for this specific subdomain.
55 """
56 flags = _createDefaultSubFlagsCaloRecGPU()
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',
65 'FIRST_ETA',
66 'SECOND_R' ,
67 'SECOND_LAMBDA',
68 'DELTA_PHI',
69 'DELTA_THETA',
70 'DELTA_ALPHA' ,
71 'CENTER_X',
72 'CENTER_Y',
73 'CENTER_Z',
74 'CENTER_MAG',
75 'CENTER_LAMBDA',
76 'LATERAL',
77 'LONGITUDINAL',
78 'FIRST_ENG_DENS',
79 'ENG_FRAC_EM',
80 'ENG_FRAC_MAX',
81 'ENG_FRAC_CORE' ,
82 'FIRST_ENG_DENS',
83 'SECOND_ENG_DENS',
84 'ISOLATION',
85 'ENG_BAD_CELLS',
86 'N_BAD_CELLS',
87 'N_BAD_CELLS_CORR',
88 'BAD_CELLS_CORR_E',
89 'BADLARQ_FRAC',
90 'ENG_POS',
91 'SIGNIFICANCE',
92 'CELL_SIGNIFICANCE',
93 'CELL_SIG_SAMPLING',
94 'AVG_LAR_Q',
95 'AVG_TILE_Q'
96 ]
97 flags.MomentsUseAbsEnergy = False
98 flags.doTopoClusterLocalCalib = False
99 return flags
100
101
102#def _createTriggerSubFlagsCaloRecGPUWithLC():
103# flags = _createTriggerSubFlagsCaloRecGPU()
104# flags.doTopoClusterLocalCalib = True
105# return flags
106

◆ createFlagsCaloRecGPU()

CaloRecGPUFlags.createFlagsCaloRecGPU ( )
Top level flag generator for CaloRecGPU

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.

The central hook to this comes from Control/AthenaConfiguration/python/AllConfigFlags.py

The CaloRecGPU package must be compiled otherwise this will silently fail.

All CaloRecGPU flag subdomains should be listed below. They will be similarly be populated only on-demand.

Definition at line 6 of file CaloRecGPUFlags.py.

6def createFlagsCaloRecGPU():
7 """
8 Top level flag generator for CaloRecGPU
9
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.
11
12 The central hook to this comes from Control/AthenaConfiguration/python/AllConfigFlags.py
13
14 The CaloRecGPU package must be compiled otherwise this will silently fail.
15
16 All CaloRecGPU flag subdomains should be listed below. They will be similarly be populated only on-demand.
17 """
18
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)
23 #flags.addFlagsCategory('Trigger.CaloRecGPU.LC', _createTriggerSubFlagsCaloRecGPUWithLC, prefix=True)
24 flags.addFlagsCategory('CaloRecGPU.ActiveConfig', _createActiveConfigFlagsCaloRecGPU, prefix=True)
25 return flags
26