ATLAS Offline Software
Functions | Variables
python.PHYS Namespace Reference

Functions

def PHYSKernelCfg (flags, name='PHYSKernel', **kwargs)
 
def PHYSCoreCfg (flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerListsHelper=None)
 
def PHYSCfg (flags)
 

Variables

 logPHYS = logging.getLogger('PHYS')
 

Function Documentation

◆ PHYSCfg()

def python.PHYS.PHYSCfg (   flags)

Definition at line 219 of file PHYS.py.

219 def PHYSCfg(flags):
220 
221  logPHYS.info('****************** STARTING PHYS *****************')
222 
223  stream_name = 'StreamDAOD_PHYS'
224  acc = ComponentAccumulator()
225 
226  # Get the lists of triggers needed for trigger matching.
227  # This is needed at this scope (for the slimming) and further down in the config chain
228  # for actually configuring the matching, so we create it here and pass it down
229  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
230  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
231  PHYSTriggerListsHelper = TriggerListsHelper(flags)
232 
233  # Common augmentations
234  acc.merge(PHYSKernelCfg(
235  flags,
236  name="PHYSKernel",
237  StreamName = stream_name,
238  TriggerListsHelper = PHYSTriggerListsHelper
239  ))
240  # PHYS content
241  acc.merge(PHYSCoreCfg(
242  flags,
243  "PHYS",
244  StreamName = stream_name,
245  TriggerListsHelper = PHYSTriggerListsHelper
246  ))
247 
248  return acc

◆ PHYSCoreCfg()

def python.PHYS.PHYSCoreCfg (   flags,
  name_tag = 'PHYS',
  StreamName = 'StreamDAOD_PHYS',
  TriggerListsHelper = None 
)

Definition at line 58 of file PHYS.py.

58 def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerListsHelper=None):
59 
60  if TriggerListsHelper is None:
61  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
62  TriggerListsHelper = TriggerListsHelper(flags)
63 
64  acc = ComponentAccumulator()
65 
66 
67  from DerivationFrameworkHiggs.HiggsPhysContent import HiggsAugmentationAlgsCfg
68  acc.merge(HiggsAugmentationAlgsCfg(flags))
69 
70 
71  from DerivationFrameworkFlavourTag.FtagDerivationConfig import JetCollectionsBTaggingCfg
72  acc.merge(JetCollectionsBTaggingCfg(flags, ["AntiKt4EMPFlowJets"]))
73 
74 
76  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
77  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_"+name_tag, isPhysLite = False, stream_name = StreamName))
78 
79  #===================================================
80  # HEAVY FLAVOR CLASSIFICATION FOR ttbar+jets EVENTS
81  #===================================================
82  from DerivationFrameworkMCTruth.HFClassificationCommonConfig import HFClassificationCommonCfg
83  acc.merge(HFClassificationCommonCfg(flags))
84 
85  # ============================
86  # Define contents of the format
87  # =============================
88  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
89  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
90  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
91 
92  PHYSSlimmingHelper = SlimmingHelper(name_tag+"SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
93  PHYSSlimmingHelper.SmartCollections = ["EventInfo",
94  "Electrons",
95  "Photons",
96  "Muons",
97  "PrimaryVertices",
98  "InDetTrackParticles",
99  "AntiKt4EMTopoJets",
100  "AntiKt4EMPFlowJets",
101  "BTagging_AntiKt4EMPFlow",
102  "AntiKt4EMPFlowJets_FTAG",
103  "MET_Baseline_AntiKt4EMTopo",
104  "MET_Baseline_AntiKt4EMPFlow",
105  "TauJets",
106  "TauJets_MuonRM",
107  "DiTauJets",
108  "DiTauJetsLowPt",
109  "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
110  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
111  "AntiKtVR30Rmax4Rmin02PV0TrackJets",
112  ]
113  if flags.Tau.TauEleRM_isAvailable:
114  PHYSSlimmingHelper.SmartCollections.append("TauJets_EleRM")
115 
116  excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
117  StaticContent = []
118  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
119  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
120  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
121  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
122  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
123  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
124 
125  PHYSSlimmingHelper.StaticContent = StaticContent
126 
127  # Extra content
128  PHYSSlimmingHelper.ExtraVariables += ["AntiKt4EMTopoJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.IsoFixedCone5PtPUsub",
129  "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostPartons.isJvtHS.isJvtPU.IsoFixedCone5PtPUsub",
130  "TruthPrimaryVertices.t.x.y.z",
131  "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
132  "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification",
133  "TauJets.dRmax.etOverPtLeadTrk",
134  "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
135  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
136  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
137  if flags.Tau.TauEleRM_isAvailable:
138  PHYSSlimmingHelper.ExtraVariables += ["TauJets_EleRM.dRmax.etOverPtLeadTrk"]
139 
140  # FTAG Xbb extra content
141  extraList = []
142  for tagger in ["GN2Xv01", "GN2Xv02"]:
143  for score in ["phbb", "phcc", "ptop", "pqcd"]:
144  extraList.append(f"{tagger}_{score}")
145  PHYSSlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets." + ".".join(extraList)]
146 
147  # Large-Radius jet regression extra content
148  extraListReg = []
149  modelName = "bJR10v00"
150  for score in ["mass", "pt"]:
151  extraListReg.append(f"{modelName}_{score}")
152  PHYSSlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets." + ".".join(extraListReg)]
153 
154  # Truth extra content
155  if flags.Input.isMC:
156 
157  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
158  addTruth3ContentToSlimmerTool(PHYSSlimmingHelper)
159  PHYSSlimmingHelper.AllVariables += ['TruthLHEParticles', 'TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets']
160  PHYSSlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
161  "Muons.TruthLink",
162  "Photons.TruthLink",
163  "AntiKt4TruthDressedWZJets.IsoFixedCone5Pt"]
164 
165  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTauAndDownstreamParticlesCfg
166  acc.merge(AddTauAndDownstreamParticlesCfg(flags))
167  PHYSSlimmingHelper.AllVariables += ['TruthTausWithDecayParticles','TruthTausWithDecayVertices']
168 
169 
170  from DerivationFrameworkHiggs.HiggsPhysContent import setupHiggsSlimmingVariables
171  setupHiggsSlimmingVariables(flags, PHYSSlimmingHelper)
172 
173  # Trigger content
174  PHYSSlimmingHelper.IncludeTriggerNavigation = False
175  PHYSSlimmingHelper.IncludeJetTriggerContent = False
176  PHYSSlimmingHelper.IncludeMuonTriggerContent = False
177  PHYSSlimmingHelper.IncludeEGammaTriggerContent = False
178  PHYSSlimmingHelper.IncludeTauTriggerContent = False
179  PHYSSlimmingHelper.IncludeEtMissTriggerContent = False
180  PHYSSlimmingHelper.IncludeBJetTriggerContent = False
181  PHYSSlimmingHelper.IncludeBPhysTriggerContent = False
182  PHYSSlimmingHelper.IncludeMinBiasTriggerContent = False
183  # Compact b-jet trigger matching info
184  PHYSSlimmingHelper.IncludeBJetTriggerByYearContent = True
185 
186  # Trigger matching
187  # Run 2
188  if flags.Trigger.EDMVersion == 2:
189  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
190  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSSlimmingHelper,
191  OutputContainerPrefix = "TrigMatch_",
192  TriggerList = TriggerListsHelper.Run2TriggerNamesTau)
193  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = PHYSSlimmingHelper,
194  OutputContainerPrefix = "TrigMatch_",
195  TriggerList = TriggerListsHelper.Run2TriggerNamesNoTau)
196  # Run 3, or Run 2 with navigation conversion
197  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
198  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
200 
201  # L1 trigger objects
202  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import getDataYear
203  if getDataYear(flags) >= 2024:
204  # Run 3 with Phase I jet RoIs.
205  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddjFexRoIsToSlimmingHelper
206  AddjFexRoIsToSlimmingHelper(SlimmingHelper = PHYSSlimmingHelper)
207  elif getDataYear(flags) >= 2015:
208  # Run 2 and early Run 3, legacy L1 RoIs
209  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddLegacyL1JetRoIsToSlimmingHelper
210  AddLegacyL1JetRoIsToSlimmingHelper(SlimmingHelper = PHYSSlimmingHelper)
211 
212  # Output stream
213  PHYSItemList = PHYSSlimmingHelper.GetItemList()
214  acc.merge(OutputStreamCfg(flags, "DAOD_"+name_tag, ItemList=PHYSItemList, AcceptAlgs=[name_tag+"Kernel"]))
215  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_"+name_tag, AcceptAlgs=[name_tag+"Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
216 
217  return acc
218 

◆ PHYSKernelCfg()

def python.PHYS.PHYSKernelCfg (   flags,
  name = 'PHYSKernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for PHYS

Definition at line 18 of file PHYS.py.

18 def PHYSKernelCfg(flags, name='PHYSKernel', **kwargs):
19  """Configure the derivation framework driving algorithm (kernel) for PHYS"""
20  acc = ComponentAccumulator()
21 
22  # Common augmentations
23  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
25  flags,
26  TriggerListsHelper = kwargs['TriggerListsHelper']
27  ))
28 
29  # Thinning tools
30  # These are set up in PhysCommonThinningConfig. Only thing needed here the list of tools to schedule
31  nametag = name.replace('Kernel', '') #get the name to label the tools below such that other formats can use this KernelCfg
32  thinningToolsArgs = {
33  'TrackParticleThinningToolName' : nametag+"TrackParticleThinningTool",
34  'MuonTPThinningToolName' : nametag+"MuonTPThinningTool",
35  'TauJetThinningToolName' : nametag+"TauJetThinningTool",
36  'TauJets_MuonRMThinningToolName' : nametag+"TauJets_MuonRMThinningTool",
37  'DiTauTPThinningToolName' : nametag+"DiTauTPThinningTool",
38  'DiTauLowPtThinningToolName' : nametag+"DiTauLowPtThinningTool",
39  'DiTauLowPtTPThinningToolName' : nametag+"DiTauLowPtTPThinningTool",
40  }
41  # for AOD produced before 24.0.17, the electron removal tau is not available
42  if flags.Tau.TauEleRM_isAvailable:
43  thinningToolsArgs['TauJets_EleRMThinningToolName'] = nametag+"TauJets_EleRMThinningTool"
44  # Configure the thinning tools
45  from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
46  acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
47  # Get them from the CA so they can be added to the kernel
48  thinningTools = []
49  for key in thinningToolsArgs:
50  thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
51 
52  # The kernel algorithm itself
53  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
54  acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
55  return acc
56 
57 

Variable Documentation

◆ logPHYS

python.PHYS.logPHYS = logging.getLogger('PHYS')

Definition at line 15 of file PHYS.py.

python.PHYS.PHYSKernelCfg
def PHYSKernelCfg(flags, name='PHYSKernel', **kwargs)
Definition: PHYS.py:18
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.PhysCommonThinningConfig.PhysCommonThinningCfg
def PhysCommonThinningCfg(flags, StreamName="StreamDAOD_PHYS", **kwargs)
Definition: PhysCommonThinningConfig.py:9
python.FtagDerivationConfig.JetCollectionsBTaggingCfg
def JetCollectionsBTaggingCfg(cfgFlags, jet_cols, pv_cols=None, trackAugmenterPrefix=None)
Definition: FtagDerivationConfig.py:18
python.TriggerMatchingCommonConfig.AddjFexRoIsToSlimmingHelper
def AddjFexRoIsToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:80
IsolationSelectionConfig.IsoCloseByAlgsCfg
def IsoCloseByAlgsCfg(flags, suff="", isPhysLite=False, containerNames=["Muons", "Electrons", "Photons"], stream_name="", ttva_wp="Nonprompt_All_MaxWeight", useSelTools=False)
Definition: IsolationSelectionConfig.py:146
python.MCTruthCommonConfig.AddTauAndDownstreamParticlesCfg
def AddTauAndDownstreamParticlesCfg(flags, generations=-1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:263
python.TriggerMatchingCommonConfig.getDataYear
def getDataYear(flags)
Definition: TriggerMatchingCommonConfig.py:30
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.HiggsPhysContent.HiggsAugmentationAlgsCfg
def HiggsAugmentationAlgsCfg(flags)
Definition: HiggsPhysContent.py:4
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.TriggerMatchingCommonConfig.AddLegacyL1JetRoIsToSlimmingHelper
def AddLegacyL1JetRoIsToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:70
python.HiggsPhysContent.setupHiggsSlimmingVariables
def setupHiggsSlimmingVariables(ConfigFlags, slimmingHelper)
Definition: HiggsPhysContent.py:13
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
python.HFClassificationCommonConfig.HFClassificationCommonCfg
def HFClassificationCommonCfg(flags)
Definition: HFClassificationCommonConfig.py:114
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:67
python.PHYS.PHYSCoreCfg
def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerListsHelper=None)
Definition: PHYS.py:58
python.PHYS.PHYSCfg
def PHYSCfg(flags)
Definition: PHYS.py:219