3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import LHCPeriod, MetadataCategory
8 """ Configure the MbtsToVectorsTool augmentation tool """
12 from TileGeoModel.TileGMConfig
import TileGMCfg
15 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
18 kwargs.setdefault(
'name',
'TCAL2MbtsToVectorsTool')
19 kwargs.setdefault(
'Prefix',
'TCAL2_mbts_')
20 kwargs.setdefault(
'SaveEtaPhiInfo',
True)
21 kwargs.setdefault(
'CellContainer',
'MBTSContainer')
23 MbtsToVectorsTool = CompFactory.DerivationFramework.MbtsToVectorsTool
24 acc.addPublicTool(MbtsToVectorsTool(**kwargs), primary =
True)
30 """ Configure the E4prToVectorsTool augmentation tool """
34 from TileGeoModel.TileGMConfig
import TileGMCfg
37 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
40 kwargs.setdefault(
'name',
'TCAL2E4prToVectorsTool')
41 kwargs.setdefault(
'Prefix',
'TCAL2_e4pr')
42 kwargs.setdefault(
'SaveEtaPhiInfo',
False)
43 kwargs.setdefault(
'CellContainer',
'E4prContainer')
45 MbtsToVectorsTool = CompFactory.DerivationFramework.MbtsToVectorsTool
46 acc.addPublicTool(MbtsToVectorsTool(**kwargs), primary =
True)
52 """Configure the TCAL2 derivation framework driving algorithm (kernel)"""
56 prefix = kwargs.pop(
'Prefix',
'TCAL2_')
58 cellsToVectorstools = []
59 if flags.GeoModel.Run
in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3]:
61 if flags.GeoModel.Run
is LHCPeriod.Run2:
64 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
65 acc.addEventAlgo(
DerivationKernel(name, AugmentationTools = cellsToVectorstools))
70 """Configure the TCAL1 derivation framework"""
72 TCAL2Prefix =
'TCAL2_'
75 acc.merge(
TCAL2KernelCfg(flags, name=
"TCAL2Kernel", StreamName =
"StreamDAOD_TCAL2", Prefix=TCAL2Prefix))
77 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
78 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
79 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
80 TCAL2SlimmingHelper =
SlimmingHelper(
"TCAL2SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
81 TCAL2SlimmingHelper.SmartCollections = [
"EventInfo"]
83 if flags.GeoModel.Run
in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3]:
84 mbtsItems = [f
'std::vector<float>#TCAL2_mbts_{item}' for item
in [
'energy',
'time',
'eta',
'phi']]
85 mbtsItems += [f
'std::vector<int>#TCAL2_mbts_{item}' for item
in [
'quality',
'module',
'channel',
'type']]
86 TCAL2SlimmingHelper.StaticContent = mbtsItems
87 if flags.GeoModel.Run
is LHCPeriod.Run2:
88 e4prItems = [f
'std::vector<float>#TCAL2_e4pr_{item}' for item
in [
'energy',
'time']]
89 e4prItems += [
'std::vector<int>#TCAL2_e4pr_{item}' for item
in [
'quality',
'module',
'channel',
'type']]
90 TCAL2SlimmingHelper.StaticContent += e4prItems
91 TCAL2ItemList = TCAL2SlimmingHelper.GetItemList()
93 acc.merge(
OutputStreamCfg(flags,
"DAOD_TCAL2", ItemList=TCAL2ItemList, AcceptAlgs=[
"TCAL2Kernel"]))
94 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_TCAL2", AcceptAlgs=[
"TCAL2Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))