ATLAS Offline Software
Loading...
Searching...
No Matches
TCAL2 Namespace Reference

Functions

 TCAL2MbtsToVectorsToolCfg (flags, **kwargs)
 TCAL2E4prToVectorsToolCfg (flags, **kwargs)
 TCAL2KernelCfg (flags, name='TCAL2Kernel', **kwargs)
 TCAL2Cfg (flags)

Function Documentation

◆ TCAL2Cfg()

TCAL2.TCAL2Cfg ( flags)
Configure the TCAL1 derivation framework

Definition at line 64 of file TCAL2.py.

64def TCAL2Cfg(flags):
65 """Configure the TCAL1 derivation framework"""
66
67 TCAL2Prefix = 'TCAL2_'
68
69 acc = ComponentAccumulator()
70 acc.merge(TCAL2KernelCfg(flags, name="TCAL2Kernel", StreamName = "StreamDAOD_TCAL2", Prefix=TCAL2Prefix))
71
72 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
73 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
74 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
75 TCAL2SlimmingHelper = SlimmingHelper("TCAL2SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
76 TCAL2SlimmingHelper.SmartCollections = ["EventInfo"]
77
78 if flags.GeoModel.Run in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3]:
79 mbtsItems = [f'std::vector<float>#TCAL2_mbts_{item}' for item in ['energy', 'time', 'eta', 'phi']]
80 mbtsItems += [f'std::vector<int>#TCAL2_mbts_{item}' for item in ['quality', 'module', 'channel', 'type']]
81 TCAL2SlimmingHelper.StaticContent = mbtsItems
82 if flags.GeoModel.Run is LHCPeriod.Run2:
83 e4prItems = [f'std::vector<float>#TCAL2_e4pr_{item}' for item in ['energy', 'time']]
84 e4prItems += ['std::vector<int>#TCAL2_e4pr_{item}' for item in ['quality', 'module', 'channel', 'type']]
85 TCAL2SlimmingHelper.StaticContent += e4prItems
86 TCAL2ItemList = TCAL2SlimmingHelper.GetItemList()
87
88 acc.merge(OutputStreamCfg(flags, "DAOD_TCAL2", ItemList=TCAL2ItemList, AcceptAlgs=["TCAL2Kernel"]))
89 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_TCAL2", AcceptAlgs=["TCAL2Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
90
91 return acc

◆ TCAL2E4prToVectorsToolCfg()

TCAL2.TCAL2E4prToVectorsToolCfg ( flags,
** kwargs )
Configure the E4prToVectorsTool augmentation tool 

Definition at line 36 of file TCAL2.py.

36def TCAL2E4prToVectorsToolCfg(flags, **kwargs):
37 """ Configure the E4prToVectorsTool augmentation tool """
38
39 kwargs.setdefault('name', 'TCAL2E4prToVectorsTool')
40 kwargs.setdefault('Prefix', 'TCAL2_e4pr')
41 kwargs.setdefault('SaveEtaPhiInfo', False)
42 kwargs.setdefault('CellContainer', 'E4prContainer')
43 return TCAL2MbtsToVectorsToolCfg(flags, **kwargs)
44
45

◆ TCAL2KernelCfg()

TCAL2.TCAL2KernelCfg ( flags,
name = 'TCAL2Kernel',
** kwargs )
Configure the TCAL2 derivation framework driving algorithm (kernel)

Definition at line 46 of file TCAL2.py.

46def TCAL2KernelCfg(flags, name='TCAL2Kernel', **kwargs):
47 """Configure the TCAL2 derivation framework driving algorithm (kernel)"""
48
49 acc = ComponentAccumulator()
50
51 prefix = kwargs.pop('Prefix', 'TCAL2_')
52
53 cellsToVectorstools = []
54 if flags.GeoModel.Run in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3]:
55 cellsToVectorstools.append( acc.addPublicTool(acc.popToolsAndMerge(TCAL2MbtsToVectorsToolCfg(flags, Prefix=f'{prefix}mbts_'))) )
56 if flags.GeoModel.Run is LHCPeriod.Run2:
57 cellsToVectorstools.append ( acc.addPublicTool(acc.popToolsAndMerge(TCAL2E4prToVectorsToolCfg(flags, Prefix=f'{prefix}e4pr_'))) )
58
59 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
60 acc.addEventAlgo(DerivationKernel(name, AugmentationTools = cellsToVectorstools))
61
62 return acc
63

◆ TCAL2MbtsToVectorsToolCfg()

TCAL2.TCAL2MbtsToVectorsToolCfg ( flags,
** kwargs )
Configure the MbtsToVectorsTool augmentation tool 

Definition at line 7 of file TCAL2.py.

7def TCAL2MbtsToVectorsToolCfg(flags, **kwargs):
8 """ Configure the MbtsToVectorsTool augmentation tool """
9
10 acc = ComponentAccumulator()
11
12 from TileGeoModel.TileGMConfig import TileGMCfg
13 acc.merge(TileGMCfg(flags))
14
15 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
16 acc.merge(LArGMCfg(flags))
17
18 kwargs.setdefault('name', 'TCAL2MbtsToVectorsTool')
19 prefix = kwargs.pop('Prefix', 'TCAL2_mbts_')
20 kwargs.setdefault("Energy", prefix + "energy")
21 kwargs.setdefault("Time", prefix + "time")
22 kwargs.setdefault("Eta", prefix + "eta")
23 kwargs.setdefault("Phi", prefix + "phi")
24 kwargs.setdefault("Quality", prefix + "quality")
25 kwargs.setdefault("Type", prefix + "type")
26 kwargs.setdefault("Module", prefix + "module")
27 kwargs.setdefault("Channel", prefix + "channel")
28 kwargs.setdefault('SaveEtaPhiInfo', True)
29 kwargs.setdefault('CellContainer', 'MBTSContainer')
30
31 acc.setPrivateTools(CompFactory.DerivationFramework.MbtsToVectorsTool(**kwargs))
32
33 return acc
34
35