ATLAS Offline Software
Classes | Functions | Variables
python.TileConfigFlags Namespace Reference

Classes

class  TileRunType
 

Functions

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

Variables

 flags
 
 Files
 

Function Documentation

◆ _correctPedestalDifference()

def python.TileConfigFlags._correctPedestalDifference (   prevFlags)
private

Definition at line 149 of file TileConfigFlags.py.

149 def _correctPedestalDifference(prevFlags):
150  if not prevFlags.Common.isOnline:
151  return _zeroAmplitudeWithoutDigits(prevFlags)
152  else:
153  return False
154 
155 

◆ _correctTimeJumps()

def python.TileConfigFlags._correctTimeJumps (   prevFlags)
private

Definition at line 156 of file TileConfigFlags.py.

156 def _correctTimeJumps(prevFlags):
157  if not (prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay) and prevFlags.Input.Format is Format.BS:
158  return True
159  else:
160  return False
161 
162 

◆ _doExtraMethods()

def python.TileConfigFlags._doExtraMethods (   prevFlags)
private

Definition at line 101 of file TileConfigFlags.py.

101 def _doExtraMethods(prevFlags):
102  # Check if any Optimal Filter, but Opt2 and OptATLAS, is already scheduled
103  if (prevFlags.Tile.doQIE or prevFlags.Tile.doManyAmps or prevFlags.Tile.doFlat
104  or prevFlags.Tile.doFit or prevFlags.Tile.doFitCOOL or prevFlags.Tile.doMF
105  or prevFlags.Tile.doOF1 or prevFlags.Tile.doWiener):
106  return True
107  else:
108  return False
109 

◆ _doOpt2()

def python.TileConfigFlags._doOpt2 (   prevFlags)
private

Definition at line 110 of file TileConfigFlags.py.

110 def _doOpt2(prevFlags):
111  # Do not run Opt2 method if any Optimal Filter is already scheduled
112  if _doExtraMethods(prevFlags) :
113  return False
114  # If no extra Optimal Filters are scheduled yet check if Opt2 should be used by default
115  else:
116  if _doOpt2ByDefault(prevFlags):
117  _flags = prevFlags.clone()
118  _flags.Tile.doOpt2 = True
119  # Opt2 should be run by default, but check if OptATLAS is already scheduled
120  return not _flags.Tile.doOptATLAS
121  else:
122  return False
123 
124 

◆ _doOpt2ByDefault()

def python.TileConfigFlags._doOpt2ByDefault (   prevFlags)
private

Definition at line 80 of file TileConfigFlags.py.

80 def _doOpt2ByDefault(prevFlags):
81  #For online operation don't check run number
82  if prevFlags.Common.isOnline:
83  if prevFlags.Beam.Type is BeamType.Collisions:
84  return False # Use OF without iterations for collisions
85  else:
86  return True
87 
88  runNumber = prevFlags.Input.RunNumbers[0]
89  # Run Optimal Filter with iterations (Opt2) by default,
90  # both for cosmics and collisions data before 2011
91  if not prevFlags.Input.isMC and runNumber > 0 and runNumber < 171194:
92  return True
93  # Run Optimal Filter without iterations (OptATLAS)
94  # for collisions (data in 2011 and later and MC)
95  elif prevFlags.Beam.Type is BeamType.Collisions:
96  return False # Use OF without iterations for collisions
97  else:
98  return True
99 
100 

◆ _doOptATLAS()

def python.TileConfigFlags._doOptATLAS (   prevFlags)
private

Definition at line 125 of file TileConfigFlags.py.

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

◆ _getRawChannelContainer()

def python.TileConfigFlags._getRawChannelContainer (   prevFlags)
private

Definition at line 181 of file TileConfigFlags.py.

181 def _getRawChannelContainer(prevFlags):
182 
183  rawChannelContainer = 'UNDEFINED'
184 
185  if prevFlags.Tile.doQIE:
186  rawChannelContainer = 'TileRawChannelQIE'
187  if prevFlags.Tile.doManyAmps:
188  rawChannelContainer = 'TileRawChannelManyAmp'
189  if prevFlags.Tile.doFlat:
190  rawChannelContainer = 'TileRawChannelFlat'
191  if prevFlags.Tile.doFit:
192  rawChannelContainer = 'TileRawChannelFit'
193  if prevFlags.Tile.doFitCOOL:
194  rawChannelContainer = 'TileRawChannelFitCool'
195  if prevFlags.Tile.doMF:
196  rawChannelContainer = 'TileRawChannelMF'
197  if prevFlags.Tile.doOF1:
198  rawChannelContainer = 'TileRawChannelOF1'
199  if prevFlags.Tile.doWiener:
200  rawChannelContainer = 'TileRawChannelWiener'
201  if prevFlags.Tile.doOpt2:
202  rawChannelContainer = 'TileRawChannelOpt2'
203  if prevFlags.Tile.doOptATLAS:
204  if not (prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay) and prevFlags.Input.Format is Format.BS:
205  rawChannelContainer = 'TileRawChannelFixed'
206  else:
207  rawChannelContainer = 'TileRawChannelCnt'
208 
209  return rawChannelContainer
210 
211 

◆ _getRunType()

def python.TileConfigFlags._getRunType (   prevFlags)
private

Definition at line 163 of file TileConfigFlags.py.

163 def _getRunType(prevFlags):
164  # Tile run types: UNDEFINED, PHY, PED, LAS, BILAS, CIS, MONOCIS
165  from AthenaConfiguration.AutoConfigFlags import GetFileMD
166  if not prevFlags.Input.isMC and 'calibration_Tile' in GetFileMD(prevFlags.Input.Files).get('triggerStreamOfFile', ''):
167  return TileRunType.UNDEFINED
168  else:
169  return TileRunType.PHY
170 
171 

◆ _useDCS()

def python.TileConfigFlags._useDCS (   prevFlags)
private

Definition at line 172 of file TileConfigFlags.py.

172 def _useDCS(prevFlags):
173  if not (prevFlags.Common.isOnline or prevFlags.Input.isMC):
174  runNumber = prevFlags.Input.RunNumbers[0]
175  # Use Tile DCS only for 2011 data and later, excluding shutdown period
176  return (runNumber > 171194 and runNumber < 222222) or runNumber > 232498
177  else:
178  return False
179 
180 

◆ _zeroAmplitudeWithoutDigits()

def python.TileConfigFlags._zeroAmplitudeWithoutDigits (   prevFlags)
private

Definition at line 140 of file TileConfigFlags.py.

140 def _zeroAmplitudeWithoutDigits(prevFlags):
141  if not prevFlags.Input.isMC:
142  runNumber = prevFlags.Input.RunNumbers[0]
143  # Use OF1 corrections only for years 2015 - 2016
144  return runNumber > 269101 and runNumber < 324320
145  else:
146  return False
147 
148 

◆ createTileConfigFlags()

def python.TileConfigFlags.createTileConfigFlags ( )

Definition at line 42 of file TileConfigFlags.py.

43 
44  tcf = AthConfigFlags()
45 
46  tcf.addFlag('Tile.doQIE', False)
47  tcf.addFlag('Tile.doManyAmps', False)
48  tcf.addFlag('Tile.doFlat', False)
49  tcf.addFlag('Tile.doFit', False)
50  tcf.addFlag('Tile.doFitCOOL', False)
51  tcf.addFlag('Tile.doMF', False)
52  tcf.addFlag('Tile.doOF1', False)
53  tcf.addFlag('Tile.doWiener', False)
54  tcf.addFlag('Tile.doOpt2', _doOpt2)
55  tcf.addFlag('Tile.doOptATLAS', _doOptATLAS)
56  tcf.addFlag('Tile.NoiseFilter', lambda prevFlags : -1 if prevFlags.Input.isMC else 1)
57  tcf.addFlag('Tile.RunType', _getRunType, type=TileRunType)
58  tcf.addFlag('Tile.correctTime', lambda prevFlags : not prevFlags.Input.isMC and prevFlags.Beam.Type is BeamType.Collisions)
59  tcf.addFlag('Tile.correctTimeNI', True)
60  tcf.addFlag('Tile.correctAmplitude', True)
61  tcf.addFlag('Tile.AmpMinForAmpCorrection', 15.0)
62  tcf.addFlag('Tile.TimeMinForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / -2.))
63  tcf.addFlag('Tile.TimeMaxForAmpCorrection', lambda prevFlags : (prevFlags.Beam.BunchSpacing / 2.))
64  tcf.addFlag('Tile.OfcFromCOOL', True)
65  tcf.addFlag('Tile.BestPhaseFromCOOL', lambda prevFlags : not prevFlags.Input.isMC and prevFlags.Beam.Type is BeamType.Collisions)
66  tcf.addFlag('Tile.readDigits', lambda prevFlags : not prevFlags.Input.isMC)
67  tcf.addFlag('Tile.doOverflowFit', True)
68  tcf.addFlag('Tile.zeroAmplitudeWithoutDigits', _zeroAmplitudeWithoutDigits)
69  tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference)
70  tcf.addFlag('Tile.correctTimeJumps', _correctTimeJumps)
71  tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer)
72  tcf.addFlag('Tile.useDCS', _useDCS)
73  tcf.addFlag('Tile.doTimingHistogramsForGain', -1) # Production of Tile timing histograms per channel (< 0: switched off)
74  tcf.addFlag('Tile.useOnlineChannelStatus', True) # Use online DB with channel/adc status
75 
76  return tcf
77 
78 
79 

Variable Documentation

◆ Files

python.TileConfigFlags.Files

Definition at line 217 of file TileConfigFlags.py.

◆ flags

python.TileConfigFlags.flags

Definition at line 216 of file TileConfigFlags.py.

python.TileConfigFlags._doExtraMethods
def _doExtraMethods(prevFlags)
Definition: TileConfigFlags.py:101
python.TileConfigFlags._getRawChannelContainer
def _getRawChannelContainer(prevFlags)
Definition: TileConfigFlags.py:181
python.TileConfigFlags._correctTimeJumps
def _correctTimeJumps(prevFlags)
Definition: TileConfigFlags.py:156
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True)
Definition: AutoConfigFlags.py:51
python.TileConfigFlags._useDCS
def _useDCS(prevFlags)
Definition: TileConfigFlags.py:172
python.TileConfigFlags.createTileConfigFlags
def createTileConfigFlags()
Definition: TileConfigFlags.py:42
python.TileConfigFlags._zeroAmplitudeWithoutDigits
def _zeroAmplitudeWithoutDigits(prevFlags)
Definition: TileConfigFlags.py:140
python.TileConfigFlags._correctPedestalDifference
def _correctPedestalDifference(prevFlags)
Definition: TileConfigFlags.py:149
python.TileConfigFlags._doOpt2
def _doOpt2(prevFlags)
Definition: TileConfigFlags.py:110
python.TileConfigFlags._getRunType
def _getRunType(prevFlags)
Definition: TileConfigFlags.py:163
python.TileConfigFlags._doOpt2ByDefault
def _doOpt2ByDefault(prevFlags)
Definition: TileConfigFlags.py:80
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
python.TileConfigFlags._doOptATLAS
def _doOptATLAS(prevFlags)
Definition: TileConfigFlags.py:125