12def TLACommonAugmentationsCfg(flags,**kwargs):
13 """Configure the common augmentation"""
14 acc = ComponentAccumulator()
15
16
17 if flags.Input.isMC:
18 from DerivationFrameworkMCTruth.MCTruthCommonConfig import (
19
20 AddHFAndDownstreamParticlesCfg,
21 AddMiniTruthCollectionLinksCfg,
22 AddPVCollectionCfg,
23 AddTruthCollectionNavigationDecorationsCfg,
24 TruthClassificationAugmentationsCfg)
25 acc.merge(TruthClassificationAugmentationsCfg(flags))
26 from DerivationFrameworkTLA.TLACommonConfigFunctions import AddStandardTLATruthContentsCfg
27 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthCharmToolCfg
28 TLACommonTruthCharmTool = acc.getPrimaryAndMerge(DFCommonTruthCharmToolCfg(
29 flags,
30 name = "TLACommonTruthCharmTool"))
31 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
32 acc.addEventAlgo(CommonAugmentation("TLACommonTruthCharmKernel",AugmentationTools=[TLACommonTruthCharmTool]))
33 acc.merge(AddHFAndDownstreamParticlesCfg(flags))
34 acc.merge(AddStandardTLATruthContentsCfg(flags, useTLAPostJetAugmentations=True))
35 acc.merge(AddTruthCollectionNavigationDecorationsCfg(
36 flags,
37 TruthCollections=["TruthElectrons",
38 "TruthMuons",
39 "TruthPhotons",
40 "TruthTaus",
41 "TruthNeutrinos",
42 "TruthBSM",
43 "TruthBottom",
44 "TruthTop",
45 "TruthBoson",
46 "TruthCharm",
47 "TruthHFWithDecayParticles"],
48 prefix = 'PHYS_'))
49
50 acc.merge(AddMiniTruthCollectionLinksCfg(flags))
51 acc.merge(AddPVCollectionCfg(flags))
52
53
54 from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
55 acc.merge(MuonsCommonCfg(flags))
56
57
58 from DerivationFrameworkInDet.InDetCommonConfig import InDetCommonCfg
59
60 acc.merge(InDetCommonCfg(flags,
61 DoVertexFinding = flags.Tracking.doVertexFinding,
62 AddPseudoTracks = flags.Tracking.doPseudoTracking and flags.GeoModel.Run<=LHCPeriod.Run3,
63 DecoLRTTTVA = False,
64 DoR3LargeD0 = flags.Tracking.doLargeD0,
65 StoreSeparateLargeD0Container = flags.Tracking.storeSeparateLargeD0Container,
66 MergeLRT = False))
67
68
69 from DerivationFrameworkEGamma.EGammaCommonConfig import EGammaCommonCfg
70 acc.merge(EGammaCommonCfg(flags))
71
72
73 from DerivationFrameworkTLA.TLACommonConfigFunctions import TLAJetCommonCfg
74 from DerivationFrameworkFlavourTag.FtagDerivationConfig import FtagJetCollectionsCfg, HLTJetFTagDecorationCfg
75 acc.merge(TLAJetCommonCfg(flags))
76 if flags.Input.isMC and flags.Trigger.EDMVersion == 3:
77 acc.merge(HLTJetFTagDecorationCfg(flags))
78
79 FTagJetColl = ['AntiKt4EMPFlowJets']
80 if flags.GeoModel.Run >= LHCPeriod.Run4:
81 FTagJetColl.append('AntiKt4EMTopoJets')
82 acc.merge(FtagJetCollectionsCfg(flags,FTagJetColl))
83
84
85 if flags.Reco.EnableTrigger or flags.Trigger.triggerConfig == 'INFILE':
86 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
87 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun3Cfg
88
89 triggerListsHelper = kwargs['TriggerListsHelper']
90 if flags.Trigger.EDMVersion == 2:
91 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
92 name = "TLACommonTrigMatchNoTau",
93 OutputContainerPrefix = "TrigMatch_",
94 ChainNames = triggerListsHelper.Run2TriggerNamesNoTau))
95 acc.merge(TriggerMatchingCommonRun2Cfg(flags,
96 name = "TLACommonTrigMatchTau",
97 OutputContainerPrefix = "TrigMatch_",
98 ChainNames = triggerListsHelper.Run2TriggerNamesTau,
99 DRThreshold = 0.2))
100 if flags.Trigger.EDMVersion == 3:
101 acc.merge(TriggerMatchingCommonRun3Cfg(flags, TriggerList = triggerListsHelper.Run3TriggerNames))
102
103 return acc
104
105