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 acc.merge(JetCommonCfg(flags))
72 #We also need to build links between the newly created jet constituents (GlobalFE)
73 #and electrons,photons,muons and taus
74 from eflowRec.PFCfg import PFGlobalFlowElementLinkingCfg
75 acc.merge(PFGlobalFlowElementLinkingCfg(flags))
76 acc.merge(AddDiTauLowPtCfg(flags))
77 acc.merge(AddMuonRemovalTauAODReRecoAlgCfg(flags))
78 # eVeto WP and DeepSet ID for taus and muon-subtracted taus
79 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets"))
80 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets_MuonRM"))
81 # add ID score for ditau
82 acc.merge(AddDiTauIDDecorationCfg(flags, DiTauContainerName="DiTauJets"))
83 # for AOD produced before 24.0.17, the electron removal tau is not available
84 if flags.Tau.TauEleRM_isAvailable:
85 acc.merge(AddTauIDDecorationCfg(flags, TauContainerName="TauJets_EleRM"))
86 # ditau Charge
87 acc.merge(AddDiTauChargeDecoratorCfg(flags, DiTauContainerName="DiTauJets"))
88 acc.merge(AddDiTauChargeDecoratorCfg(flags, DiTauContainerName="DiTauJetsLowPt"))
89 if flags.Reco.EnableBTagging:
90 from BTagging.FlavorTaggingConfig import FlavorTaggingCfg
91 acc.merge(FlavorTaggingCfg(flags, "AntiKt4EMPFlowJets"))
92 acc.merge(FlavorTaggingCfg(flags, "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"))
93 if flags.GeoModel.Run >= LHCPeriod.Run4:
94 acc.merge(FlavorTaggingCfg(flags, "AntiKt4EMTopoJets"))
95
96 acc.merge(METCommonCfg(flags))
97
98 # Trigger matching and postprocessing
99 if flags.Reco.EnableTrigger or flags.Trigger.triggerConfig == 'INFILE':
100 from JetTagDerivationUtils.TrigBTagCopierConfig import TrigBTagCopierAlgCfg
101 acc.merge(TrigBTagCopierAlgCfg(flags))
102
103 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2Cfg
104 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun2ToRun3Cfg
105 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import TriggerMatchingCommonRun3Cfg
106 # requires some wrangling due to the difference between run 2 and 3
107 triggerListsHelper = kwargs['TriggerListsHelper']
108 if flags.Trigger.EDMVersion == 2:
109 # NOTE: Once Run-2 -> Run-3 trigger navigation is validated and doEDMVersionConversion is on by default, we will only want to do ONE of
110 # TriggerMatchingCommonRun2Cfg(s) OR TriggerMatchingCommonRun2ToRun3Cfg
111 # Otherwise we are doubling up on the analysis trigger data in both the Run-2 and Run-3 formats.
112
113 # This sets up the Run-2 style matching during the derivation process
114 acc.merge(TriggerMatchingCommonRun2Cfg(
115 flags,
116 name = "PhysCommonTrigMatchNoTau",
117 OutputContainerPrefix = "TrigMatch_",
118 ChainNames = triggerListsHelper.Run2TriggerNamesNoTau))
119 acc.merge(TriggerMatchingCommonRun2Cfg(
120 flags,
121 name = "PhysCommonTrigMatchTau",
122 OutputContainerPrefix = "TrigMatch_",
123 ChainNames = triggerListsHelper.Run2TriggerNamesTau,
124 DRThreshold = 0.2))
125 # This sets up a conversion of the Run-2 trigger navigation to the Run-3 style,
126 # followed by Run-3 style navigation slimming for trigger-matching from DAOD.
127 # This function is a noop if doEDMVersionConversion=False
128 acc.merge(TriggerMatchingCommonRun2ToRun3Cfg(
129 flags,
130 TriggerList = triggerListsHelper.Run2TriggerNamesNoTau +
131 triggerListsHelper.Run2TriggerNamesTau))
132 if flags.Trigger.EDMVersion == 3:
133 # This sets up the Run-3 style navigation slimming for trigger-matching from DAOD
134 acc.merge(TriggerMatchingCommonRun3Cfg(
135 flags, TriggerList = triggerListsHelper.Run3TriggerNames))
136
137 return acc
138

Variable Documentation

◆ msg

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

Definition at line 12 of file PhysCommonConfig.py.