4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from AthenaConfiguration.Enums
import MetadataCategory
7 from AthenaCommon.CFElements
import seqAND
11 """Configure the derivation framework driving algorithm (kernel) for SCTVALID"""
19 SCTVALIDSequenceName=
'SCTVALIDSequence'
20 acc.addSequence(
seqAND(SCTVALIDSequenceName))
25 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import PrescaleToolCfg
28 flags, name=
"SCTxAOD_PrescaleTool", Prescale=flags.InDet.SCTxAODPrescale))
30 skimmingTools += [prescaleTool]
32 SCTVALIDKernelPresel = CompFactory.DerivationFramework.DerivationKernel(
"SCTVALIDKernelPresel",
33 SkimmingTools=skimmingTools)
34 acc.addEventAlgo(SCTVALIDKernelPresel, sequenceName=
"SCTVALIDSequence")
36 from InDetConfig.InDetPrepRawDataToxAODConfig
import InDetSCT_PrepDataToxAODCfg
39 WriteRDOinformation=
True,
42 UseTruthInfo=flags.Input.isMC),
43 sequenceName=SCTVALIDSequenceName)
46 from InDetConfig.InDetPrepRawDataToxAODConfig
import InDetSCT_RawDataToxAODCfg
48 sequenceName=SCTVALIDSequenceName)
53 if flags.Reco.EnableTracking
is True:
54 from DerivationFrameworkInDet.InDetToolsConfig
import TrackStateOnSurfaceDecoratorCfg
56 DecorationPrefix =
"SCTVALID_",
62 augmentationTools.append(DFTSOS)
64 from DerivationFrameworkInDet.InDetToolsConfig
import EventInfoBSErrDecoratorCfg
66 augmentationTools.append(DFEI)
68 from DerivationFrameworkInDet.InDetToolsConfig
import UnassociatedHitsGetterToolCfg
70 TrackCollection =
"CombinedInDetTracks",
71 PixelClusters =
"PixelClusters",
72 SCTClusterContainer =
"SCT_Clusters",
73 TRTDriftCircleContainer =
"TRT_DriftCircles"))
75 from DerivationFrameworkJetEtMiss.JetToolConfig
import DistanceInTrainToolCfg
77 augmentationTools.append(distanceInTrainTool)
79 from DerivationFrameworkInDet.InDetToolsConfig
import UnassociatedHitsDecoratorCfg
81 name=
'SCTxAOD_unassociatedHitsDecorator',
82 UnassociatedHitsGetter = unassociatedHitsGetterTool))
83 augmentationTools.append(unassociatedHitsDecorator)
85 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
87 AugmentationTools=augmentationTools,
88 SkimmingTools=skimmingTools,
90 OutputLevel=INFO), sequenceName=SCTVALIDSequenceName)
95 """Main config fragment for SCTVALID"""
100 name =
"SCTVALIDKernel",
101 StreamName =
'StreamDAOD_SCTVALID') )
106 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
107 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
108 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
110 "SCTVALIDSlimmingHelper",
111 NamesAndTypes = flags.Input.TypedCollections,
117 SmartCollections = []
120 SCTVALIDSlimmingHelper.AppendToDictionary.update({
121 "EventInfo":
"xAOD::EventInfo",
"EventInfoAux":
"xAOD::EventAuxInfo",
122 "Muons":
"xAOD::MuonContainer",
"MuonsAux":
"xAOD::MuonAuxContainer",
123 "Electrons":
"xAOD::ElectronContainer",
"ElectronsAux":
"xAOD::ElectronAuxContainer",
124 "GSFTrackParticles":
"xAOD::TrackParticleContainer",
125 "GSFTrackParticlesAux":
"xAOD::TrackParticleAuxContainer",
129 AllVariables += [
"EventInfo",
"InDetTrackParticles",]
130 SmartCollections += [
"Muons",
"Electrons"]
132 excludedPrimaryVerticesAuxData =
"-VTAV"
133 excludedInDetTrackParticlesAuxData =
".-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
134 excludedGSFTrackParticlesAuxData =
".-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
137 StaticContent += [
"xAOD::VertexContainer#PrimaryVertices"]
138 StaticContent += [
"xAOD::VertexAuxContainer#PrimaryVerticesAux" + excludedPrimaryVerticesAuxData]
139 StaticContent += [
"xAOD::TrackParticleContainer#InDetTrackParticles"]
140 StaticContent += [
"xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux" + excludedInDetTrackParticlesAuxData]
141 StaticContent += [
"xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux"]
143 StaticContent += [
"xAOD::TrackParticleContainer#GSFTrackParticles"]
144 StaticContent += [
"xAOD::TrackParticleAuxContainer#GSFTrackParticlesAux" + excludedGSFTrackParticlesAuxData]
147 StaticContent += [
"TileCellContainer#MBTSContainer"]
148 StaticContent += [
"BCM_RDOs#BCM_RDO_Container"]
150 SCTVALIDSlimmingHelper.AppendToDictionary.update(
152 "SCT_MSOSs":
"xAOD::TrackStateValidationContainer",
153 "SCT_MSOSsAux":
"xAOD::TrackStateValidationAuxContainer",
154 "SCT_Clusters":
"xAOD::TrackMeasurementValidationContainer",
155 "SCT_ClustersAux":
"xAOD::TrackMeasurementValidationAuxContainer",
156 "SCT_RawHits":
"xAOD::SCTRawHitValidationContainer",
157 "SCT_RawHitsAux":
"xAOD::SCTRawHitValidationAuxContainer"})
167 SCTVALIDSlimmingHelper.AppendToDictionary.update({
168 "TruthEvents":
"xAOD::TruthEventContainer",
169 "TruthEventsAux":
"xAOD::TruthEventAuxContainer",
170 "TruthParticles":
"xAOD::TruthParticleContainer",
171 "TruthParticlesAux":
"xAOD::TruthParticleAuxContainer",
172 "TruthVertices":
"xAOD::TruthVertexContainer",
173 "TruthVerticesAux":
"xAOD::TruthVertexAuxContainer"})
175 AllVariables += [
"TruthEvents",
"TruthParticles",
"TruthVertices"]
178 SCTVALIDSlimmingHelper.IncludeTriggerNavigation =
True
179 SCTVALIDSlimmingHelper.IncludeAdditionalTriggerContent =
True
181 SCTVALIDSlimmingHelper.AllVariables = AllVariables
182 SCTVALIDSlimmingHelper.StaticContent = StaticContent
183 SCTVALIDSlimmingHelper.SmartCollections = SmartCollections
184 SCTVALIDSlimmingHelper.ExtraVariables = ExtraVariables
187 SCTVALIDItemList = SCTVALIDSlimmingHelper.GetItemList()
189 ItemList=SCTVALIDItemList, AcceptAlgs=[
"SCTVALIDKernel"]))
191 flags,
"DAOD_SCTVALID",
192 AcceptAlgs=[
"SCTVALIDKernel"],
193 createMetadata=[MetadataCategory.CutFlowMetaData,
194 MetadataCategory.TriggerMenuMetaData]))