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

Variable Documentation

◆ msg

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

Definition at line 12 of file PhysCommonConfig.py.