Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 155 of file TileConfigFlags.py.

155 def _correctPedestalDifference(prevFlags):
156  if not prevFlags.Common.isOnline:
157  return _zeroAmplitudeWithoutDigits(prevFlags)
158  else:
159  return False
160 
161 

◆ _correctTimeJumps()

def python.TileConfigFlags._correctTimeJumps (   prevFlags)
private

Definition at line 162 of file TileConfigFlags.py.

162 def _correctTimeJumps(prevFlags):
163  if not (prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay) and prevFlags.Input.Format is Format.BS:
164  return True
165  else:
166  return False
167 
168 

◆ _doExtraMethods()

def python.TileConfigFlags._doExtraMethods (   prevFlags)
private

Definition at line 107 of file TileConfigFlags.py.

107 def _doExtraMethods(prevFlags):
108  # Check if any Optimal Filter, but Opt2 and OptATLAS, is already scheduled
109  if (prevFlags.Tile.doQIE or prevFlags.Tile.doManyAmps or prevFlags.Tile.doFlat
110  or prevFlags.Tile.doFit or prevFlags.Tile.doFitCOOL or prevFlags.Tile.doMF
111  or prevFlags.Tile.doOF1 or prevFlags.Tile.doWiener):
112  return True
113  else:
114  return False
115 

◆ _doOpt2()

def python.TileConfigFlags._doOpt2 (   prevFlags)
private

Definition at line 116 of file TileConfigFlags.py.

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

◆ _doOpt2ByDefault()

def python.TileConfigFlags._doOpt2ByDefault (   prevFlags)
private

Definition at line 86 of file TileConfigFlags.py.

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

◆ _doOptATLAS()

def python.TileConfigFlags._doOptATLAS (   prevFlags)
private

Definition at line 131 of file TileConfigFlags.py.

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

◆ _getRawChannelContainer()

def python.TileConfigFlags._getRawChannelContainer (   prevFlags)
private

Definition at line 187 of file TileConfigFlags.py.

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

◆ _getRunType()

def python.TileConfigFlags._getRunType (   prevFlags)
private

Definition at line 169 of file TileConfigFlags.py.

169 def _getRunType(prevFlags):
170  # Tile run types: UNDEFINED, PHY, PED, LAS, BILAS, CIS, MONOCIS
171  from AthenaConfiguration.AutoConfigFlags import GetFileMD
172  if not prevFlags.Input.isMC and 'calibration_Tile' in GetFileMD(prevFlags.Input.Files).get('triggerStreamOfFile', ''):
173  return TileRunType.UNDEFINED
174  else:
175  return TileRunType.PHY
176 
177 

◆ _useDCS()

def python.TileConfigFlags._useDCS (   prevFlags)
private

Definition at line 178 of file TileConfigFlags.py.

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

◆ _zeroAmplitudeWithoutDigits()

def python.TileConfigFlags._zeroAmplitudeWithoutDigits (   prevFlags)
private

Definition at line 146 of file TileConfigFlags.py.

146 def _zeroAmplitudeWithoutDigits(prevFlags):
147  if not prevFlags.Input.isMC:
148  runNumber = prevFlags.Input.RunNumbers[0]
149  # Use OF1 corrections only for years 2015 - 2016
150  return runNumber > 269101 and runNumber < 324320
151  else:
152  return False
153 
154 

◆ createTileConfigFlags()

def python.TileConfigFlags.createTileConfigFlags ( )

Definition at line 47 of file TileConfigFlags.py.

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 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 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  return tcf
83 
84 
85 

Variable Documentation

◆ Files

python.TileConfigFlags.Files

Definition at line 223 of file TileConfigFlags.py.

◆ flags

python.TileConfigFlags.flags

Definition at line 222 of file TileConfigFlags.py.

python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True, maxLevel='peeker')
Definition: AutoConfigFlags.py:65
python.TileConfigFlags._doExtraMethods
def _doExtraMethods(prevFlags)
Definition: TileConfigFlags.py:107
python.TileConfigFlags._getRawChannelContainer
def _getRawChannelContainer(prevFlags)
Definition: TileConfigFlags.py:187
python.TileConfigFlags._correctTimeJumps
def _correctTimeJumps(prevFlags)
Definition: TileConfigFlags.py:162
python.TileConfigFlags._useDCS
def _useDCS(prevFlags)
Definition: TileConfigFlags.py:178
python.TileConfigFlags.createTileConfigFlags
def createTileConfigFlags()
Definition: TileConfigFlags.py:47
python.TileConfigFlags._zeroAmplitudeWithoutDigits
def _zeroAmplitudeWithoutDigits(prevFlags)
Definition: TileConfigFlags.py:146
python.TileConfigFlags._correctPedestalDifference
def _correctPedestalDifference(prevFlags)
Definition: TileConfigFlags.py:155
python.TileConfigFlags._doOpt2
def _doOpt2(prevFlags)
Definition: TileConfigFlags.py:116
python.TileConfigFlags._getRunType
def _getRunType(prevFlags)
Definition: TileConfigFlags.py:169
python.TileConfigFlags._doOpt2ByDefault
def _doOpt2ByDefault(prevFlags)
Definition: TileConfigFlags.py:86
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:131