32def NCBCommonAugmentationsCfg(flags,**kwargs):
33 """Configure the common augmentation"""
34 acc = ComponentAccumulator()
35
36
37 if flags.Input.isMC:
38 from DerivationFrameworkMCTruth.MCTruthCommonConfig import (
39 AddStandardTruthContentsCfg,
40 AddHFAndDownstreamParticlesCfg,
41 AddMiniTruthCollectionLinksCfg,
42 AddPVCollectionCfg,
43 AddTruthCollectionNavigationDecorationsCfg,
44 TruthClassificationAugmentationsCfg)
45 acc.merge(TruthClassificationAugmentationsCfg(flags))
46 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthCharmToolCfg
47 NCBCommonTruthCharmTool = acc.getPrimaryAndMerge(DFCommonTruthCharmToolCfg(
48 flags,
49 name = "NCBCommonTruthCharmTool"))
50 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
51 acc.addEventAlgo(CommonAugmentation("NCBCommonTruthCharmKernel",AugmentationTools=[NCBCommonTruthCharmTool]))
52 acc.merge(AddHFAndDownstreamParticlesCfg(flags))
53 acc.merge(AddStandardTruthContentsCfg(flags))
54 acc.merge(AddTruthCollectionNavigationDecorationsCfg(
55 flags,
56 TruthCollections=["TruthElectrons",
57 "TruthMuons",
58 "TruthPhotons",
59 "TruthTaus",
60 "TruthNeutrinos",
61 "TruthBSM",
62 "TruthBottom",
63 "TruthTop",
64 "TruthBoson",
65 "TruthCharm",
66 "TruthHFWithDecayParticles"],
67 prefix = 'NCB_'))
68
69 acc.merge(AddMiniTruthCollectionLinksCfg(flags))
70 acc.merge(AddPVCollectionCfg(flags))
71
72
73 from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
74 acc.merge(MuonsCommonCfg(flags))
75
76
77 from DerivationFrameworkInDet.InDetCommonConfig import InDetCommonCfg
78 acc.merge(InDetCommonCfg(flags,
79 DoVertexFinding = flags.Tracking.doVertexFinding,
80 AddPseudoTracks = flags.Tracking.doPseudoTracking,
81 DecoLRTTTVA = False,
82 DoR3LargeD0 = flags.Tracking.doLargeD0,
83 StoreSeparateLargeD0Container = flags.Tracking.storeSeparateLargeD0Container,
84 MergeLRT = False))
85
86 from DerivationFrameworkJetEtMiss.METCommonConfig import METCommonCfg
87 acc.merge(METCommonCfg(flags))
88 acc.merge(StandardJetsInDerivCfg(flags))
89
90
91 if flags.Reco.EnableTrigger or flags.Trigger.triggerConfig == 'INFILE':
92 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
93 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2ToRun3Cfg
94 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun3Cfg
95
96 triggerListsHelper = kwargs['TriggerListsHelper']
97 if flags.Trigger.EDMVersion == 2:
98
99
100
101
102
103 acc.merge(TriggerMatchingCommonRun2Cfg(
104 flags,
105 name = "PhysCommonTrigMatchNoTau",
106 OutputContainerPrefix = "TrigMatch_",
107 ChainNames = triggerListsHelper.Run2TriggerNamesNoTau))
108 acc.merge(TriggerMatchingCommonRun2Cfg(
109 flags,
110 name = "PhysCommonTrigMatchTau",
111 OutputContainerPrefix = "TrigMatch_",
112 ChainNames = triggerListsHelper.Run2TriggerNamesTau,
113 DRThreshold = 0.2))
114
115
116
117 acc.merge(TriggerMatchingCommonRun2ToRun3Cfg(
118 flags,
119 TriggerList = triggerListsHelper.Run2TriggerNamesNoTau +
120 triggerListsHelper.Run2TriggerNamesTau))
121 if flags.Trigger.EDMVersion == 3:
122
123 acc.merge(TriggerMatchingCommonRun3Cfg(
124 flags, TriggerList = triggerListsHelper.Run3TriggerNames))
125
126 return acc
127