ATLAS Offline Software
Functions | Variables
python.TileSamplingFractionConfig Namespace Reference

Functions

def TileSamplingFractionCondAlgCfg (flags, **kwargs)
 

Variables

 flags
 
 Files
 
 acc
 
 withDetails
 
 True
 
 summariseProps
 

Function Documentation

◆ TileSamplingFractionCondAlgCfg()

def python.TileSamplingFractionConfig.TileSamplingFractionCondAlgCfg (   flags,
**  kwargs 
)
Return component accumulator with configured Tile sampling fraction conditions algorithm

Arguments:
    flags  -- Athena configuration flags
Keyword arguments:
    Source -- source of Tile SamplingFraction conditions (COOL, FILE). Defaults to COOL.
    TileSamplingFraction -- name of Tile sampling fraction conditions object. Defaults to TileSamplingFraction.

Definition at line 9 of file TileSamplingFractionConfig.py.

9 def TileSamplingFractionCondAlgCfg(flags, **kwargs):
10  """Return component accumulator with configured Tile sampling fraction conditions algorithm
11 
12  Arguments:
13  flags -- Athena configuration flags
14  Keyword arguments:
15  Source -- source of Tile SamplingFraction conditions (COOL, FILE). Defaults to COOL.
16  TileSamplingFraction -- name of Tile sampling fraction conditions object. Defaults to TileSamplingFraction.
17  """
18 
19  acc = ComponentAccumulator()
20 
21  source = kwargs.get('Source', 'COOL')
22  samplingFraction = kwargs.get('TileSamplingFraction', 'TileSamplingFraction')
23 
24  name = samplingFraction + 'CondAlg'
25 
26  if source == 'COOL':
27  # Connect COOL Tile conditions proxies to the algorithm (default)
28 
29  samplingFractionFolder = '/TILE/OFL02/CALIB/SFR'
30 
31  TileCondProxyCoolFlt = CompFactory.getComp("TileCondProxyCool<TileCalibDrawerFlt>")
32  samplingFractionProxy = TileCondProxyCoolFlt('TileCondProxyCool_SamplingFraction', Source = samplingFractionFolder)
33 
34  samplingFractionTag = None # Tag connected to global conditions tag is used by default
35  from SimulationConfig.SimEnums import LArParameterization
36  if flags.GeoModel.Run >= LHCPeriod.Run4 or flags.Overlay.DataOverlay or flags.Sim.ISF.Simulator.usesFastCaloSim() or flags.Sim.LArParameterization is LArParameterization.FastCaloSim:
37  samplingFractionTag = 'TileOfl02CalibSfr-SIM-07'
38 
39  from IOVDbSvc.IOVDbSvcConfig import addFolders
40  acc.merge( addFolders(flags, samplingFractionFolder + f'<key>{samplingFractionFolder}</key>',
41  detDb='TILE_OFL', className='CondAttrListCollection', tag=samplingFractionTag, db='OFLP200') )
42 
43  elif source == 'FILE':
44  # Connect FILE Tile conditions proxies to the algorithm
45  TileCondProxyFileFlt = CompFactory.getComp("TileCondProxyFile<TileCalibDrawerFlt>")
46  samplingFractionProxy = TileCondProxyFileFlt('TileCondProxyFile_SamplingFraction', Source = 'TileDefault.sfr')
47  else:
48  raise(Exception("Invalid source: %s" % source))
49 
50  G4Version = flags.Sim.G4Version
51  G4VersionMajor, G4VersionMinor = G4Version.split(".")[1:3]
52  G4V = int(G4VersionMajor) * 100 + int(G4VersionMinor)
53 
54  TileSamplingFractionCondAlg = CompFactory.getComp("TileSamplingFractionCondAlg")
55  samplingFractionCondAlg = TileSamplingFractionCondAlg( name = name, G4Version = G4V,
56  ConditionsProxy = samplingFractionProxy,
57  TileCondData = samplingFraction)
58 
59  acc.addCondAlgo(samplingFractionCondAlg)
60 
61  return acc
62 
63 
64 

Variable Documentation

◆ acc

python.TileSamplingFractionConfig.acc

Definition at line 79 of file TileSamplingFractionConfig.py.

◆ Files

python.TileSamplingFractionConfig.Files

Definition at line 76 of file TileSamplingFractionConfig.py.

◆ flags

python.TileSamplingFractionConfig.flags

Definition at line 75 of file TileSamplingFractionConfig.py.

◆ summariseProps

python.TileSamplingFractionConfig.summariseProps

Definition at line 83 of file TileSamplingFractionConfig.py.

◆ True

python.TileSamplingFractionConfig.True

Definition at line 83 of file TileSamplingFractionConfig.py.

◆ withDetails

python.TileSamplingFractionConfig.withDetails

Definition at line 83 of file TileSamplingFractionConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TileSamplingFractionCondAlg
Definition: TileSamplingFractionCondAlg.h:16
python.TileSamplingFractionConfig.TileSamplingFractionCondAlgCfg
def TileSamplingFractionCondAlgCfg(flags, **kwargs)
Definition: TileSamplingFractionConfig.py:9
TileCondProxyCool
The tool to get Tile conditions data from DB.
Definition: TileCondProxyCool.h:25
TileCondProxyFile
The tool to get Tile conditions data from file.
Definition: TileCondProxyFile.h:28
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72