ATLAS Offline Software
Loading...
Searching...
No Matches
python.PhysCommonConfig Namespace Reference

Functions

 PhysCommonAugmentationsCfg (flags, **kwargs)

Variables

 msg = logging.getLogger('PHYSCommonConfig')

Function Documentation

◆ PhysCommonAugmentationsCfg()

python.PhysCommonConfig.PhysCommonAugmentationsCfg ( flags,
** kwargs )
Configure the common augmentation

Definition at line 14 of file PhysCommonConfig.py.

14def PhysCommonAugmentationsCfg(flags,**kwargs):
15 """Configure the common augmentation"""
16 acc = ComponentAccumulator()
17
18 from TrkConfig.VertexFindingFlags import VertexSortingSetup
19 if flags.Tracking.PriVertex.sortingSetup is VertexSortingSetup.GNNSorting:
20 from DerivationFrameworkPhys.GNNVertexConfig import GNNVertexCfg
21 acc.merge(GNNVertexCfg(flags))
22
23 # MC truth
24 if flags.Input.isMC:
25 from DerivationFrameworkMCTruth.MCTruthCommonConfig import (
26 AddStandardTruthContentsCfg,
27 AddHFAndDownstreamParticlesCfg,
28 AddMiniTruthCollectionLinksCfg,
29 AddPVCollectionCfg,
30 TruthClassificationAugmentationsCfg)
31 acc.merge(TruthClassificationAugmentationsCfg(flags))
32 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthCharmToolCfg
33 PhysCommonTruthCharmTool = acc.getPrimaryAndMerge(DFCommonTruthCharmToolCfg(
34 flags,
35 name = "PhysCommonTruthCharmTool"))
36 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
37 acc.addEventAlgo(CommonAugmentation("PhysCommonTruthCharmKernel",AugmentationTools=[PhysCommonTruthCharmTool]))
38 acc.merge(AddHFAndDownstreamParticlesCfg(flags))
39 acc.merge(AddStandardTruthContentsCfg
40 (flags,
41 navInputCollections = ["TruthElectrons",
42 "TruthMuons",
43 "TruthPhotons",
44 "TruthTaus",
45 "TruthNeutrinos",
46 "TruthBSM",
47 "TruthBottom",
48 "TruthTop",
49 "TruthBoson",
50 "TruthCharm",
51 "TruthHFWithDecayParticles"]))
52 # Re-point links on reco objects
53 acc.merge(AddMiniTruthCollectionLinksCfg(flags))
54 acc.merge(AddPVCollectionCfg(flags))
55
56 # InDet, Muon, Egamma common augmentations
57 from DerivationFrameworkInDet.InDetCommonConfig import InDetCommonCfg
58 from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
59 from DerivationFrameworkEGamma.EGammaCommonConfig import EGammaCommonCfg
60 # TODO: need to find the new flags equivalent for the missing settings below, then we can
61 # drop these kwargs and do everything via the flags
62 acc.merge(InDetCommonCfg(flags,
63 DoVertexFinding = flags.Tracking.doVertexFinding,
64 AddPseudoTracks = flags.Tracking.doPseudoTracking,
65 DecoLRTTTVA = False,
66 DoR3LargeD0 = flags.Tracking.doLargeD0,
67 StoreSeparateLargeD0Container = flags.Tracking.storeSeparateLargeD0Container,
68 MergeLRT = False))
69 acc.merge(MuonsCommonCfg(flags))
70 acc.merge(EGammaCommonCfg(flags))
71 # Jets, di-taus, tau decorations, flavour tagging, MET association
72 from DerivationFrameworkJetEtMiss.JetCommonConfig import JetCommonCfg
73 from DerivationFrameworkTau.TauCommonConfig import (AddMuonRemovalTauAODReRecoAlgCfg, AddTauIDDecorationCfg, AddTauTESCompatibilityDecorationCfg)
74 from DerivationFrameworkTau.DiTauCommonConfig import (AddDiTauLowPtCfg, AddDiTauChargeDecoratorCfg, AddDiTauIDDecorationCfg)
75 from DerivationFrameworkJetEtMiss.METCommonConfig import METCommonCfg
76 from DerivationFrameworkJetEtMiss.METCommonConfig import HadRecoilMETCfg
77 acc.merge(JetCommonCfg(flags))
78 #We also need to build links between the newly created jet constituents (GlobalFE)
79 #and electrons,photons,muons and taus
80 from eflowRec.PFCfg import PFGlobalFlowElementLinkingCfg
81 acc.merge(PFGlobalFlowElementLinkingCfg(flags))
82 acc.merge(AddDiTauLowPtCfg(flags))
83 acc.merge(AddMuonRemovalTauAODReRecoAlgCfg(flags))
84 # eVeto WP and DeepSet ID for taus and muon-subtracted taus
85 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets"))
86 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets_MuonRM"))
87 # add TES compatibility check for taus
88 acc.merge(AddTauTESCompatibilityDecorationCfg(flags, TauContainerName="TauJets"))
89 acc.merge(AddTauTESCompatibilityDecorationCfg(flags, TauContainerName="TauJets_MuonRM"))
90 # add ID score for ditau
91 acc.merge(AddDiTauIDDecorationCfg(flags, DiTauContainerName="DiTauJets"))
92 # for AOD produced before 24.0.17, the electron removal tau is not available
93 if flags.Tau.TauEleRM_isAvailable:
94 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets_EleRM"))
95 acc.merge(AddTauTESCompatibilityDecorationCfg(flags, TauContainerName="TauJets_EleRM"))
96 # ditau Charge
97 acc.merge(AddDiTauChargeDecoratorCfg(flags, DiTauContainerName="DiTauJets"))
98 acc.merge(AddDiTauChargeDecoratorCfg(flags, DiTauContainerName="DiTauJetsLowPt"))
99 if flags.Reco.EnableBTagging:
100 from BTagging.FlavorTaggingConfig import FlavorTaggingCfg
101 acc.merge(FlavorTaggingCfg(flags, "AntiKt4EMPFlowJets"))
102 acc.merge(FlavorTaggingCfg(flags, "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"))
103 if flags.BTagging.RunNewVrtSecInclusive:
104 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig import (
105 NewVrtSecInclusiveAlgTightCfg
106 )
107 acc.merge(NewVrtSecInclusiveAlgTightCfg(flags))
108 if flags.GeoModel.Run >= LHCPeriod.Run4:
109 acc.merge(FlavorTaggingCfg(flags, "AntiKt4EMTopoJets"))
110
111 acc.merge(METCommonCfg(flags))
112 acc.merge(HadRecoilMETCfg(flags))
113
114 from AssociationUtils.AssociationUtilsConfig import FEAssociationCfg
115 acc.merge(FEAssociationCfg(flags,
116 SmallRJetChargedFELinksDecorKey="",
117 SmallRJetNeutralFELinksDecorKey="",
118 LargeRJetChargedFELinksDecorKey="",
119 LargeRJetNeutralFELinksDecorKey=""))
120
121 # Trigger matching and postprocessing
122 if flags.Reco.EnableTrigger or flags.Trigger.triggerConfig == 'INFILE':
123 from JetTagDerivationUtils.TrigBTagCopierConfig import TrigBTagCopierAlgCfg
124 acc.merge(TrigBTagCopierAlgCfg(flags))
125
126 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
127 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2ToRun3Cfg
128 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun3Cfg
129 # requires some wrangling due to the difference between run 2 and 3
130 triggerListsHelper = kwargs['TriggerListsHelper']
131 if flags.Trigger.EDMVersion == 2:
132 # NOTE: Once Run-2 -> Run-3 trigger navigation is validated and doEDMVersionConversion is on by default, we will only want to do ONE of
133 # TriggerMatchingCommonRun2Cfg(s) OR TriggerMatchingCommonRun2ToRun3Cfg
134 # Otherwise we are doubling up on the analysis trigger data in both the Run-2 and Run-3 formats.
135
136 # This sets up the Run-2 style matching during the derivation process
137 acc.merge(TriggerMatchingCommonRun2Cfg(
138 flags,
139 name = "PhysCommonTrigMatchNoTau",
140 OutputContainerPrefix = "TrigMatch_",
141 ChainNames = triggerListsHelper.Run2TriggerNamesNoTau))
142 acc.merge(TriggerMatchingCommonRun2Cfg(
143 flags,
144 name = "PhysCommonTrigMatchTau",
145 OutputContainerPrefix = "TrigMatch_",
146 ChainNames = triggerListsHelper.Run2TriggerNamesTau,
147 DRThreshold = 0.2))
148 # This sets up a conversion of the Run-2 trigger navigation to the Run-3 style,
149 # followed by Run-3 style navigation slimming for trigger-matching from DAOD.
150 # This function is a noop if doEDMVersionConversion=False
151 acc.merge(TriggerMatchingCommonRun2ToRun3Cfg(
152 flags,
153 TriggerList = triggerListsHelper.Run2TriggerNamesNoTau +
154 triggerListsHelper.Run2TriggerNamesTau))
155 if flags.Trigger.EDMVersion == 3:
156 # This sets up the Run-3 style navigation slimming for trigger-matching from DAOD
157 acc.merge(TriggerMatchingCommonRun3Cfg(
158 flags, TriggerList = triggerListsHelper.Run3TriggerNames))
159
160 return acc
161

Variable Documentation

◆ msg

python.PhysCommonConfig.msg = logging.getLogger('PHYSCommonConfig')

Definition at line 12 of file PhysCommonConfig.py.