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()

python.TileConfigFlags._correctPedestalDifference ( prevFlags)
protected

Definition at line 160 of file TileConfigFlags.py.

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

◆ _correctTimeJumps()

python.TileConfigFlags._correctTimeJumps ( prevFlags)
protected

Definition at line 167 of file TileConfigFlags.py.

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

◆ _doExtraMethods()

python.TileConfigFlags._doExtraMethods ( prevFlags)
protected

Definition at line 112 of file TileConfigFlags.py.

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

◆ _doOpt2()

python.TileConfigFlags._doOpt2 ( prevFlags)
protected

Definition at line 121 of file TileConfigFlags.py.

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

◆ _doOpt2ByDefault()

python.TileConfigFlags._doOpt2ByDefault ( prevFlags)
protected

Definition at line 91 of file TileConfigFlags.py.

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

◆ _doOptATLAS()

python.TileConfigFlags._doOptATLAS ( prevFlags)
protected

Definition at line 136 of file TileConfigFlags.py.

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

◆ _getRawChannelContainer()

python.TileConfigFlags._getRawChannelContainer ( prevFlags)
protected

Definition at line 192 of file TileConfigFlags.py.

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

◆ _getRunType()

python.TileConfigFlags._getRunType ( prevFlags)
protected

Definition at line 174 of file TileConfigFlags.py.

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

◆ _useDCS()

python.TileConfigFlags._useDCS ( prevFlags)
protected

Definition at line 183 of file TileConfigFlags.py.

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

◆ _zeroAmplitudeWithoutDigits()

python.TileConfigFlags._zeroAmplitudeWithoutDigits ( prevFlags)
protected

Definition at line 151 of file TileConfigFlags.py.

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

◆ createTileConfigFlags()

python.TileConfigFlags.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.NoiseFilter', lambda prevFlags : -1 if prevFlags.Input.isMC else 1)
62 tcf.addFlag('Tile.RunType', _getRunType, type=TileRunType)
63 tcf.addFlag('Tile.correctTime', lambda prevFlags : not prevFlags.Input.isMC and not prevFlags.Overlay.DataOverlay and prevFlags.Beam.Type is BeamType.Collisions)
64 tcf.addFlag('Tile.correctTimeNI', True)
65 tcf.addFlag('Tile.correctAmplitude', True)
66 tcf.addFlag('Tile.AmpMinForAmpCorrection', 15.0)
67 tcf.addFlag('Tile.TimeMinForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / -2.))
68 tcf.addFlag('Tile.TimeMaxForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / 2.))
69 tcf.addFlag('Tile.OfcFromCOOL', True)
70 tcf.addFlag('Tile.BestPhaseFromCOOL', lambda prevFlags : not prevFlags.Input.isMC and not prevFlags.Overlay.DataOverlay and prevFlags.Beam.Type is BeamType.Collisions)
71 tcf.addFlag('Tile.readDigits', lambda prevFlags : not prevFlags.Input.isMC)
72 tcf.addFlag('Tile.doOverflowFit', True)
73 tcf.addFlag('Tile.zeroAmplitudeWithoutDigits', _zeroAmplitudeWithoutDigits)
74 tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference)
75 tcf.addFlag('Tile.correctTimeJumps', _correctTimeJumps)
76 tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer)
77 tcf.addFlag('Tile.useDCS', _useDCS)
78 tcf.addFlag('Tile.doTimingHistogramsForGain', -1) # Production of Tile timing histograms per channel (< 0: switched off)
79 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)
80 tcf.addFlag('Tile.useOnlineChannelStatus', True) # Use online DB with channel/adc status
81
82 def __tilesim():
83 from TileConfiguration.TileSimConfigFlags import createTileSimConfigFlags
84 return createTileSimConfigFlags()
85 tcf.addFlagsCategory('Tile.Sim', __tilesim, prefix=True)
86
87 return tcf
88
89
90

◆ getRawChannelContainerOptATLAS()

python.TileConfigFlags.getRawChannelContainerOptATLAS ( flags)

Definition at line 220 of file TileConfigFlags.py.

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

Variable Documentation

◆ Files

python.TileConfigFlags.Files

Definition at line 232 of file TileConfigFlags.py.

◆ flags

python.TileConfigFlags.flags = initConfigFlags()

Definition at line 231 of file TileConfigFlags.py.