ATLAS Offline Software
Functions | Variables
TileTBAANtupleConfig Namespace Reference

Functions

def getTileTBperiod (run, useFELIX)
 
def TileTBAANtupleCfg (flags, outputFile='', useFELIX=None, **kwargs)
 

Variables

 flags
 
 parser
 
 help
 
 args
 
 _
 
 MaxEvents
 
 AtlasVersion
 
 GlobalTag
 
 doFit
 
 doOpt2
 
 RunType
 
 Files
 
 cfg
 
 readMuRcv
 
 readDigits
 
 readRawChannel
 
 readDigitsFlx
 
 readBeamElem
 
 stateless
 
 TileBeamElemContainer
 
 RODStatusProxy
 
 sc
 

Function Documentation

◆ getTileTBperiod()

def TileTBAANtupleConfig.getTileTBperiod (   run,
  useFELIX 
)
Function to get Tile TB period.

Definition at line 17 of file TileTBAANtupleConfig.py.

17 def getTileTBperiod(run, useFELIX):
18  ''' Function to get Tile TB period.'''
19 
20  TBperiod = 2015 if (run // 100000 == 5) else 2016
21 
22  if useFELIX:
23  TBperiod = 2017
24  if run > 800000:
25  TBperiod += 2
26  if run >= 2200000:
27  TBperiod = 2022
28  elif run >= 2110000:
29  TBperiod = 2021
30 
31  return TBperiod
32 
33 

◆ TileTBAANtupleCfg()

def TileTBAANtupleConfig.TileTBAANtupleCfg (   flags,
  outputFile = '',
  useFELIX = None,
**  kwargs 
)
Function to configure TileTBAANtuple algorithm.

Definition at line 34 of file TileTBAANtupleConfig.py.

34 def TileTBAANtupleCfg(flags, outputFile='', useFELIX=None, **kwargs):
35 
36  ''' Function to configure TileTBAANtuple algorithm.'''
37 
38  acc = ComponentAccumulator()
39 
40  cisRun = flags.Tile.RunType is TileRunType.CIS
41  monoRun = flags.Tile.RunType is TileRunType.MONOCIS
42  pedestalRun = flags.Tile.RunType is TileRunType.PED
43 
44  # Units: TileRawChannelUnit::ADC (0) or TileRawChannelUnit::MegaElectronVolts (3)
45  offlineUnits = 0 if cisRun or monoRun or pedestalRun else 3
46  calibrateEnergy = (offlineUnits != 0)
47 
48  run = flags.Input.RunNumbers[0]
49 
50  if useFELIX is None:
51  useFELIX = True if run > 2310438 else False
52 
53  TBperiod = getTileTBperiod(run, useFELIX)
54 
55  kwargs.setdefault('TileDigitsContainer', 'TileDigitsCnt')
56  kwargs.setdefault('TileBeamElemContainer', 'TileBeamElemCnt')
57  kwargs.setdefault('TileRawChannelContainerFlat', "")
58  kwargs.setdefault('TileRawChannelContainerFit', 'TileRawChannelFit' if flags.Tile.doFit else "")
59  kwargs.setdefault('TileRawChannelContainerOpt', "TileRawChannelOpt2" if flags.Tile.doOpt2 else "")
60  kwargs.setdefault('TileRawChannelContainerDsp', "")
61  kwargs.setdefault('TileRawChannelContainerFitCool', 'TileRawChannelFitCool' if flags.Tile.doFitCOOL else "")
62 
63  kwargs.setdefault('TileDigitsContainerFlx', 'TileDigitsFlxCnt' if useFELIX else "")
64  kwargs.setdefault('TileRawChannelContainerFitFlx', 'TileRawChannelFlxFit' if useFELIX and flags.Tile.doFit else "")
65  kwargs.setdefault('TileRawChannelContainerOptFlx', 'TileRawChannelFlxOpt2' if useFELIX and flags.Tile.doOpt2 else "")
66 
67  kwargs.setdefault('TileHitContainer', "")
68  kwargs.setdefault('TileHitVector', "")
69  kwargs.setdefault('CaloCellContainer', 'AllCalo')
70 
71  kwargs.setdefault('TileLaserObj', "")
72 
73  kwargs.setdefault('OfflineUnits', offlineUnits)
74  kwargs.setdefault('CalibrateEnergy', calibrateEnergy)
75  kwargs.setdefault('CalibMode', pedestalRun or cisRun)
76  kwargs.setdefault('PMTOrder', not (cisRun or monoRun or pedestalRun))
77 
78  kwargs.setdefault('NSamples', -1)
79  kwargs.setdefault('NSamplesFelix', 16 if useFELIX else 0)
80 
81  kwargs.setdefault('TBperiod', TBperiod)
82 
83  acc = ComponentAccumulator()
84 
85  from TileGeoModel.TileGMConfig import TileGMCfg
86  acc.merge(TileGMCfg(flags))
87 
88  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
89  acc.merge(LArGMCfg(flags))
90 
91  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
92  acc.merge( TileCablingSvcCfg(flags) )
93 
94  if 'TileCondToolEmscale' not in kwargs:
95  from TileConditions.TileEMScaleConfig import TileCondToolEmscaleCfg
96  emScaleTool = acc.popToolsAndMerge( TileCondToolEmscaleCfg(flags) )
97  kwargs['TileCondToolEmscale'] = emScaleTool
98 
99  from TileRecUtils.TileDQstatusConfig import TileDQstatusAlgCfg
100  acc.merge( TileDQstatusAlgCfg(flags) )
101 
102  if flags.Input.isMC:
103  from TileConditions.TileSamplingFractionConfig import TileSamplingFractionCondAlgCfg
104  acc.merge( TileSamplingFractionCondAlgCfg(flags) )
105  else:
106  kwargs['TileSamplingFraction'] = ""
107 
108  if not outputFile:
109  outputFile = f'tiletb_{run}.aan.root'
110  histsvc = CompFactory.THistSvc()
111  histsvc.Output += ["%s DATAFILE='%s' OPT='RECREATE'" % ('AANT', outputFile)]
112  acc.addService(histsvc)
113 
114  alg = CompFactory.TileTBAANtuple(**kwargs)
115  from TileMonitoring.TileTBBeamChambersCalibration import updateBeamChambersCalibrations
117  acc.addEventAlgo(alg, primary=True)
118 
119  return acc
120 
121 

Variable Documentation

◆ _

TileTBAANtupleConfig._
private

Definition at line 135 of file TileTBAANtupleConfig.py.

◆ args

TileTBAANtupleConfig.args

Definition at line 135 of file TileTBAANtupleConfig.py.

◆ AtlasVersion

TileTBAANtupleConfig.AtlasVersion

Definition at line 138 of file TileTBAANtupleConfig.py.

◆ cfg

TileTBAANtupleConfig.cfg

Definition at line 149 of file TileTBAANtupleConfig.py.

◆ doFit

TileTBAANtupleConfig.doFit

Definition at line 140 of file TileTBAANtupleConfig.py.

◆ doOpt2

TileTBAANtupleConfig.doOpt2

Definition at line 141 of file TileTBAANtupleConfig.py.

◆ Files

TileTBAANtupleConfig.Files

Definition at line 143 of file TileTBAANtupleConfig.py.

◆ flags

TileTBAANtupleConfig.flags

Definition at line 132 of file TileTBAANtupleConfig.py.

◆ GlobalTag

TileTBAANtupleConfig.GlobalTag

Definition at line 139 of file TileTBAANtupleConfig.py.

◆ help

TileTBAANtupleConfig.help

Definition at line 134 of file TileTBAANtupleConfig.py.

◆ MaxEvents

TileTBAANtupleConfig.MaxEvents

Definition at line 137 of file TileTBAANtupleConfig.py.

◆ parser

TileTBAANtupleConfig.parser

Definition at line 133 of file TileTBAANtupleConfig.py.

◆ readBeamElem

TileTBAANtupleConfig.readBeamElem

Definition at line 156 of file TileTBAANtupleConfig.py.

◆ readDigits

TileTBAANtupleConfig.readDigits

Definition at line 153 of file TileTBAANtupleConfig.py.

◆ readDigitsFlx

TileTBAANtupleConfig.readDigitsFlx

Definition at line 155 of file TileTBAANtupleConfig.py.

◆ readMuRcv

TileTBAANtupleConfig.readMuRcv

Definition at line 152 of file TileTBAANtupleConfig.py.

◆ readRawChannel

TileTBAANtupleConfig.readRawChannel

Definition at line 154 of file TileTBAANtupleConfig.py.

◆ RODStatusProxy

TileTBAANtupleConfig.RODStatusProxy

Definition at line 161 of file TileTBAANtupleConfig.py.

◆ RunType

TileTBAANtupleConfig.RunType

Definition at line 142 of file TileTBAANtupleConfig.py.

◆ sc

TileTBAANtupleConfig.sc

Definition at line 171 of file TileTBAANtupleConfig.py.

◆ stateless

TileTBAANtupleConfig.stateless

Definition at line 157 of file TileTBAANtupleConfig.py.

◆ TileBeamElemContainer

TileTBAANtupleConfig.TileBeamElemContainer

Definition at line 159 of file TileTBAANtupleConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TileSamplingFractionConfig.TileSamplingFractionCondAlgCfg
def TileSamplingFractionCondAlgCfg(flags, **kwargs)
Definition: TileSamplingFractionConfig.py:9
TileTBAANtupleConfig.TileTBAANtupleCfg
def TileTBAANtupleCfg(flags, outputFile='', useFELIX=None, **kwargs)
Definition: TileTBAANtupleConfig.py:34
TileDQstatusConfig.TileDQstatusAlgCfg
def TileDQstatusAlgCfg(flags, **kwargs)
Definition: TileDQstatusConfig.py:31
TileTBBeamChambersCalibration.updateBeamChambersCalibrations
def updateBeamChambersCalibrations(alg, run)
Definition: TileTBBeamChambersCalibration.py:92
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.TileEMScaleConfig.TileCondToolEmscaleCfg
def TileCondToolEmscaleCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:125
TileTBAANtupleConfig.getTileTBperiod
def getTileTBperiod(run, useFELIX)
Definition: TileTBAANtupleConfig.py:17
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7