ATLAS Offline Software
Loading...
Searching...
No Matches
python.TileConfigFlags Namespace Reference

Classes

class  TileRunType

Functions

 createTileConfigFlags ()
 _doOpt2ByDefault (prevFlags)
 _doExtraMethods (prevFlags)
 _doOpt2 (prevFlags)
 _doOptATLAS (prevFlags)
 _zeroAmplitudeWithoutDigits (prevFlags)
 _correctPedestalDifference (prevFlags)
 _correctTimeJumps (prevFlags)
 _getRunType (prevFlags)
 _useDCS (prevFlags)
 _getRawChannelContainer (prevFlags)
 getRawChannelContainerOptATLAS (flags)

Variables

 flags = initConfigFlags()
 Files

Function Documentation

◆ _correctPedestalDifference()

_correctPedestalDifference ( prevFlags)
protected

Definition at line 161 of file TileConfigFlags.py.

161def _correctPedestalDifference(prevFlags):
162 if not prevFlags.Common.isOnline:
163 return _zeroAmplitudeWithoutDigits(prevFlags)
164 else:
165 return False
166
167

◆ _correctTimeJumps()

_correctTimeJumps ( prevFlags)
protected

Definition at line 168 of file TileConfigFlags.py.

168def _correctTimeJumps(prevFlags):
169 if not (prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay) and prevFlags.Input.Format is Format.BS:
170 return True
171 else:
172 return False
173
174

◆ _doExtraMethods()

_doExtraMethods ( prevFlags)
protected

Definition at line 113 of file TileConfigFlags.py.

113def _doExtraMethods(prevFlags):
114 # Check if any Optimal Filter, but Opt2 and OptATLAS, is already scheduled
115 if (prevFlags.Tile.doQIE or prevFlags.Tile.doManyAmps or prevFlags.Tile.doFlat
116 or prevFlags.Tile.doFit or prevFlags.Tile.doFitCOOL or prevFlags.Tile.doMF
117 or prevFlags.Tile.doOF1 or prevFlags.Tile.doWiener):
118 return True
119 else:
120 return False
121

◆ _doOpt2()

_doOpt2 ( prevFlags)
protected

Definition at line 122 of file TileConfigFlags.py.

122def _doOpt2(prevFlags):
123 # Do not run Opt2 method if any Optimal Filter is already scheduled
124 if _doExtraMethods(prevFlags) :
125 return False
126 # If no extra Optimal Filters are scheduled yet check if Opt2 should be used by default
127 else:
128 if _doOpt2ByDefault(prevFlags):
129 _flags = prevFlags.clone()
130 _flags.Tile.doOpt2 = True
131 # Opt2 should be run by default, but check if OptATLAS is already scheduled
132 return not _flags.Tile.doOptATLAS
133 else:
134 return False
135
136

◆ _doOpt2ByDefault()

_doOpt2ByDefault ( prevFlags)
protected

Definition at line 92 of file TileConfigFlags.py.

92def _doOpt2ByDefault(prevFlags):
93 #For online operation don't check run number
94 if prevFlags.Common.isOnline:
95 if prevFlags.Beam.Type is BeamType.Collisions:
96 return False # Use OF without iterations for collisions
97 else:
98 return True
99
100 runNumber = prevFlags.Input.RunNumbers[0]
101 # Run Optimal Filter with iterations (Opt2) by default,
102 # both for cosmics and collisions data before 2011
103 if not prevFlags.Input.isMC and runNumber > 0 and runNumber < 171194:
104 return True
105 # Run Optimal Filter without iterations (OptATLAS)
106 # for collisions (data in 2011 and later and MC)
107 elif prevFlags.Beam.Type is BeamType.Collisions:
108 return False # Use OF without iterations for collisions
109 else:
110 return True
111
112

◆ _doOptATLAS()

_doOptATLAS ( prevFlags)
protected

Definition at line 137 of file TileConfigFlags.py.

137def _doOptATLAS(prevFlags):
138 # Do not run OptATLAS method if any Optimal Filter is alredy scheduled
139 if _doExtraMethods(prevFlags) :
140 return False
141 # If no Optimal Filters are scheduled yet check if OptATLAS should be used by default
142 else:
143 if not _doOpt2ByDefault(prevFlags):
144 # OptATLAS should be run by default, but check if Opt2 is already scheduled
145 _flags = prevFlags.clone()
146 _flags.Tile.doOptATLAS = True
147 return not _flags.Tile.doOpt2
148 else:
149 return False
150
151

◆ _getRawChannelContainer()

_getRawChannelContainer ( prevFlags)
protected

Definition at line 193 of file TileConfigFlags.py.

193def _getRawChannelContainer(prevFlags):
194
195 rawChannelContainer = 'UNDEFINED'
196
197 if prevFlags.Tile.doQIE:
198 rawChannelContainer = 'TileRawChannelQIE'
199 if prevFlags.Tile.doManyAmps:
200 rawChannelContainer = 'TileRawChannelManyAmp'
201 if prevFlags.Tile.doFlat:
202 rawChannelContainer = 'TileRawChannelFlat'
203 if prevFlags.Tile.doFit:
204 rawChannelContainer = 'TileRawChannelFit'
205 if prevFlags.Tile.doFitCOOL:
206 rawChannelContainer = 'TileRawChannelFitCool'
207 if prevFlags.Tile.doMF:
208 rawChannelContainer = 'TileRawChannelMF'
209 if prevFlags.Tile.doOF1:
210 rawChannelContainer = 'TileRawChannelOF1'
211 if prevFlags.Tile.doWiener:
212 rawChannelContainer = 'TileRawChannelWiener'
213 if prevFlags.Tile.doOpt2:
214 rawChannelContainer = 'TileRawChannelOpt2'
215 if prevFlags.Tile.doOptATLAS:
216 rawChannelContainer = getRawChannelContainerOptATLAS(prevFlags)
217
218 return rawChannelContainer
219
220

◆ _getRunType()

_getRunType ( prevFlags)
protected

Definition at line 175 of file TileConfigFlags.py.

175def _getRunType(prevFlags):
176 # Tile run types: UNDEFINED, PHY, PED, LAS, BILAS, CIS, MONOCIS
177 from AthenaConfiguration.AutoConfigFlags import GetFileMD
178 if not prevFlags.Input.isMC and 'calibration_Tile' in GetFileMD(prevFlags.Input.Files).get('triggerStreamOfFile', ''):
179 return TileRunType.UNDEFINED
180 else:
181 return TileRunType.PHY
182
183
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132

◆ _useDCS()

_useDCS ( prevFlags)
protected

Definition at line 184 of file TileConfigFlags.py.

184def _useDCS(prevFlags):
185 if not (prevFlags.Common.isOnline or prevFlags.Input.isMC):
186 runNumber = prevFlags.Input.RunNumbers[0]
187 # Use Tile DCS only for 2011 data and later, excluding shutdown period
188 return (runNumber > 171194 and runNumber < 222222) or runNumber > 232498
189 else:
190 return False
191
192

◆ _zeroAmplitudeWithoutDigits()

_zeroAmplitudeWithoutDigits ( prevFlags)
protected

Definition at line 152 of file TileConfigFlags.py.

152def _zeroAmplitudeWithoutDigits(prevFlags):
153 if not prevFlags.Input.isMC:
154 runNumber = prevFlags.Input.RunNumbers[0]
155 # Use OF1 corrections only for years 2015 - 2016
156 return runNumber > 269101 and runNumber < 324320
157 else:
158 return False
159
160

◆ createTileConfigFlags()

createTileConfigFlags ( )

Definition at line 47 of file TileConfigFlags.py.

47def createTileConfigFlags():
48
49 tcf = AthConfigFlags()
50
51 tcf.addFlag('Tile.doQIE', False)
52 tcf.addFlag('Tile.doManyAmps', False)
53 tcf.addFlag('Tile.doFlat', False)
54 tcf.addFlag('Tile.doFit', False)
55 tcf.addFlag('Tile.doFitCOOL', False)
56 tcf.addFlag('Tile.doMF', False)
57 tcf.addFlag('Tile.doOF1', False)
58 tcf.addFlag('Tile.doWiener', False)
59 tcf.addFlag('Tile.doOpt2', _doOpt2)
60 tcf.addFlag('Tile.doOptATLAS', _doOptATLAS)
61 tcf.addFlag('Tile.doTileNN', False)
62 tcf.addFlag('Tile.NoiseFilter', lambda prevFlags : -1 if prevFlags.Input.isMC else 1)
63 tcf.addFlag('Tile.RunType', _getRunType, type=TileRunType)
64 tcf.addFlag('Tile.correctTime', lambda prevFlags : not prevFlags.Input.isMC and not prevFlags.Overlay.DataOverlay and prevFlags.Beam.Type is BeamType.Collisions)
65 tcf.addFlag('Tile.correctTimeNI', True)
66 tcf.addFlag('Tile.correctAmplitude', True)
67 tcf.addFlag('Tile.AmpMinForAmpCorrection', 15.0)
68 tcf.addFlag('Tile.TimeMinForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / -2.))
69 tcf.addFlag('Tile.TimeMaxForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / 2.))
70 tcf.addFlag('Tile.OfcFromCOOL', True)
71 tcf.addFlag('Tile.BestPhaseFromCOOL', lambda prevFlags : not prevFlags.Input.isMC and not prevFlags.Overlay.DataOverlay and prevFlags.Beam.Type is BeamType.Collisions)
72 tcf.addFlag('Tile.readDigits', lambda prevFlags : not prevFlags.Input.isMC)
73 tcf.addFlag('Tile.doOverflowFit', True)
74 tcf.addFlag('Tile.zeroAmplitudeWithoutDigits', _zeroAmplitudeWithoutDigits)
75 tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference)
76 tcf.addFlag('Tile.correctTimeJumps', _correctTimeJumps)
77 tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer)
78 tcf.addFlag('Tile.useDCS', _useDCS)
79 tcf.addFlag('Tile.doTimingHistogramsForGain', -1) # Production of Tile timing histograms per channel (< 0: switched off)
80 tcf.addFlag('Tile.doTimingHistogramsForCell', {'LBA14':['A4','B6','D1'],'LBA22':['A4','B6','D1'],'EBA22':['A13','B12','D5']}) # Production of Tile timing histograms per selected cells ({}: switched off)
81 tcf.addFlag('Tile.useOnlineChannelStatus', True) # Use online DB with channel/adc status
82
83 def __tilesim():
84 from TileConfiguration.TileSimConfigFlags import createTileSimConfigFlags
85 return createTileSimConfigFlags()
86 tcf.addFlagsCategory('Tile.Sim', __tilesim, prefix=True)
87
88 return tcf
89
90
91

◆ getRawChannelContainerOptATLAS()

getRawChannelContainerOptATLAS ( flags)

Definition at line 221 of file TileConfigFlags.py.

221def getRawChannelContainerOptATLAS(flags):
222 if not flags.Overlay.DataOverlay and flags.Input.Files and flags.Input.Format is Format.BS:
223 return 'TileRawChannelFixed'
224 else:
225 return 'TileRawChannelCnt'
226
227

Variable Documentation

◆ Files

python.TileConfigFlags.Files

Definition at line 233 of file TileConfigFlags.py.

◆ flags

python.TileConfigFlags.flags = initConfigFlags()

Definition at line 232 of file TileConfigFlags.py.