ATLAS Offline Software
Functions | Variables
python.HIGG9D1 Namespace Reference

Functions

def HIGG9D1KernelCfg (flags, name='HIGG9D1Kernel', **kwargs)
 
def HIGG9D1Cfg (flags)
 

Variables

 log_HIGG9D1 = logging.getLogger('HIGG9D1')
 
string streamName = "StreamDAOD_HIGG9D1"
 

Function Documentation

◆ HIGG9D1Cfg()

def python.HIGG9D1.HIGG9D1Cfg (   flags)

Definition at line 403 of file HIGG9D1.py.

403 def HIGG9D1Cfg(flags):
404  log_HIGG9D1.info('****************** STARTING HIGG9D1 ******************')
405 
406  acc = ComponentAccumulator()
407 
408  # Get the lists of triggers needed for trigger matching.
409  # This is needed at this scope (for the slimming) and further down in the config chain
410  # for actually configuring the matching, so we create it here and pass it down
411  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
412  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
413  HIGG9D1TriggerListsHelper = TriggerListsHelper(flags)
414 
415  # dedicated augmentations
416  acc.merge(HIGG9D1KernelCfg(flags, name="HIGG9D1Kernel", StreamName = streamName, TriggerListsHelper = HIGG9D1TriggerListsHelper))
417 
418  # =============================
419  # Define contents of the format
420  # =============================
421  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
422  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
423  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
424 
425  HIGG9D1SlimmingHelper = SlimmingHelper("HIGG9D1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
426  HIGG9D1SlimmingHelper.SmartCollections = [
427  "EventInfo",
428  "Electrons",
429  "Photons",
430  "Muons",
431  "PrimaryVertices",
432  "InDetTrackParticles",
433  "AntiKt4EMTopoJets",
434  "AntiKt4EMPFlowJets",
435  "BTagging_AntiKt4EMPFlow",
436  "AntiKt4EMPFlowJets_FTAG",
437  "MET_Baseline_AntiKt4EMTopo",
438  "MET_Baseline_AntiKt4EMPFlow",
439  "TauJets",
440  "TauJets_MuonRM",
441  "DiTauJets",
442  "DiTauJetsLowPt",
443  "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
444  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
445  "AntiKtVR30Rmax4Rmin02PV0TrackJets"]
446 
447  if flags.Tau.TauEleRM_isAvailable:
448  HIGG9D1SlimmingHelper.SmartCollections.append("TauJets_EleRM")
449 
450  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
451  AllVariables = getDefaultAllVariables()
452  AllVariables += ["PrimaryVertices"]
453  AllVariables += ["CombinedMuonTrackParticles"]
454  AllVariables += ["ExtrapolatedMuonTrackParticles"]
455 
456  doLRT = flags.Tracking.doLargeD0
457  AllVariables += ["InDetTrackParticles", "InDetLargeD0TrackParticles"] if doLRT else ["InDetTrackParticles"]
458  AllVariables += ["Muons", "MuonsLRT"] if doLRT else ["Muons"]
459  AllVariables += ["MuonSegments"]
460 
461  # Additional content (shallow copy of PrimaryVertices)
462  HIGG9D1SlimmingHelper.AppendToDictionary.update({
463  "HIGG9D1_DiphotonPrimaryVertices" : "xAOD::VertexContainer",
464  "HIGG9D1_DiphotonPrimaryVerticesAux" : "xAOD::ShallowAuxContainer"
465  })
466  AllVariables += ["HIGG9D1_DiphotonPrimaryVertices"]
467 
468  HIGG9D1_Jpsi = acc.getPublicTool("HIGG9D1_Jpsi")
469  HIGG9D1_Upsi = acc.getPublicTool("HIGG9D1_Upsi")
470 
471  StaticContent = []
472  if HIGG9D1_Jpsi.RefitPV:
473  StaticContent += [ "xAOD::VertexContainer#%s" % HIGG9D1_Jpsi.RefPVContainerName ]
474  StaticContent += [ "xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % HIGG9D1_Jpsi.RefPVContainerName ]
475  if HIGG9D1_Upsi.RefitPV:
476  StaticContent += [ "xAOD::VertexContainer#%s" % HIGG9D1_Upsi.RefPVContainerName ]
477  StaticContent += [ "xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % HIGG9D1_Upsi.RefPVContainerName ]
478  StaticContent += [ "xAOD::VertexContainer#%s" % HIGG9D1_Jpsi.OutputVtxContainerName ]
479  StaticContent += [ "xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % HIGG9D1_Jpsi.OutputVtxContainerName ]
480  StaticContent += [ "xAOD::VertexContainer#%s" % HIGG9D1_Upsi.OutputVtxContainerName ]
481  StaticContent += [ "xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % HIGG9D1_Upsi.OutputVtxContainerName ]
482 
483  excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
484  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
485  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
486  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
487  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
488  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
489  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
490 
491  HIGG9D1SlimmingHelper.StaticContent = StaticContent
492 
493  # Extra content
494  HIGG9D1SlimmingHelper.ExtraVariables += [
495  "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",
496  "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",
497  "TruthPrimaryVertices.t.x.y.z",
498  "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
499  "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification",
500  "TauJets.dRmax.etOverPtLeadTrk",
501  "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
502  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
503  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
504  if flags.Tau.TauEleRM_isAvailable:
505  HIGG9D1SlimmingHelper.ExtraVariables += ["TauJets_EleRM.dRmax.etOverPtLeadTrk"]
506 
507  # FTAG Xbb extra content
508  extraList = []
509  for tagger in ["GN2Xv01", "GN2Xv02"]:
510  for score in ["phbb", "phcc", "ptop", "pqcd"]:
511  extraList.append(f"{tagger}_{score}")
512  HIGG9D1SlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets." + ".".join(extraList)]
513 
514  # Large-Radius jet regression extra content
515  extraListReg = []
516  modelName = "bJR10v00"
517  for score in ["mass", "pt"]:
518  extraListReg.append(f"{modelName}_{score}")
519  HIGG9D1SlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets." + ".".join(extraListReg)]
520 
521  # Truth extra content
522  if flags.Input.isMC:
523  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
524  addTruth3ContentToSlimmerTool(HIGG9D1SlimmingHelper)
525  HIGG9D1SlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
526  "Muons.TruthLink",
527  "Photons.TruthLink",
528  "AntiKt4TruthDressedWZJets.IsoFixedCone5Pt"]
529 
530  AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
531  AllVariables += ['TruthLHEParticles', 'TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets']
532 
533  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTauAndDownstreamParticlesCfg
534  acc.merge(AddTauAndDownstreamParticlesCfg(flags))
535  AllVariables += ['TruthTausWithDecayParticles','TruthTausWithDecayVertices']
536 
537  HIGG9D1SlimmingHelper.AllVariables = AllVariables
538 
539  # Trigger content
540  HIGG9D1SlimmingHelper.IncludeTriggerNavigation = False
541  HIGG9D1SlimmingHelper.IncludeJetTriggerContent = False
542  HIGG9D1SlimmingHelper.IncludeMuonTriggerContent = False
543  HIGG9D1SlimmingHelper.IncludeEGammaTriggerContent = False
544  HIGG9D1SlimmingHelper.IncludeTauTriggerContent = False
545  HIGG9D1SlimmingHelper.IncludeEtMissTriggerContent = False
546  HIGG9D1SlimmingHelper.IncludeBJetTriggerContent = False
547  HIGG9D1SlimmingHelper.IncludeBPhysTriggerContent = False
548  HIGG9D1SlimmingHelper.IncludeMinBiasTriggerContent = False
549  # Compact b-jet trigger matching info
550  HIGG9D1SlimmingHelper.IncludeBJetTriggerByYearContent = True
551 
552  # Trigger matching
553  # Run 2
554  if flags.Trigger.EDMVersion == 2:
555  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
556  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = HIGG9D1SlimmingHelper,
557  OutputContainerPrefix = "TrigMatch_",
558  TriggerList = HIGG9D1TriggerListsHelper.Run2TriggerNamesTau)
559  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = HIGG9D1SlimmingHelper,
560  OutputContainerPrefix = "TrigMatch_",
561  TriggerList = HIGG9D1TriggerListsHelper.Run2TriggerNamesNoTau)
562  # Run 3, or Run 2 with navigation conversion
563  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
564  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
566 
567  # L1 trigger objects
568  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import getDataYear
569  if getDataYear(flags) >= 2024:
570  # Run 3 with Phase I jet RoIs.
571  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddjFexRoIsToSlimmingHelper
572  AddjFexRoIsToSlimmingHelper(SlimmingHelper = HIGG9D1SlimmingHelper)
573  elif getDataYear(flags) >= 2015:
574  # Run 2 and early Run 3, legacy L1 RoIs
575  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddLegacyL1JetRoIsToSlimmingHelper
576  AddLegacyL1JetRoIsToSlimmingHelper(SlimmingHelper = HIGG9D1SlimmingHelper)
577 
578  # Output stream
579  HIGG9D1ItemList = HIGG9D1SlimmingHelper.GetItemList()
580  acc.merge(OutputStreamCfg(flags, "DAOD_HIGG9D1", ItemList=HIGG9D1ItemList, AcceptAlgs=["HIGG9D1Kernel"]))
581  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_HIGG9D1", AcceptAlgs=["HIGG9D1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
582  acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False)
583  return acc

◆ HIGG9D1KernelCfg()

def python.HIGG9D1.HIGG9D1KernelCfg (   flags,
  name = 'HIGG9D1Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for HIGG9D1

Definition at line 15 of file HIGG9D1.py.

15 def HIGG9D1KernelCfg(flags, name='HIGG9D1Kernel', **kwargs):
16  """Configure the derivation framework driving algorithm (kernel) for HIGG9D1"""
17  acc = ComponentAccumulator()
18 
19  doLRT = flags.Tracking.doLargeD0
20  if doLRT:
21  log_HIGG9D1.info("flags.Tracking.doLargeD0 is True")
22  else:
23  log_HIGG9D1.info("flags.Tracking.doLargeD0 is False")
24 
25  # Adds primary vertex counts and track counts to EventInfo before they are thinned
26  HIGG9D1_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts(
27  name = "HIGG9D1_AugOriginalCounts",
28  VertexContainer = "PrimaryVertices",
29  TrackContainer = "InDetTrackParticles",
30  TrackLRTContainer = "InDetLargeD0TrackParticles" if doLRT else "" )
31  acc.addPublicTool(HIGG9D1_AugOriginalCounts)
32 
33  mainMuonInput = "StdWithLRTMuons" if doLRT else "Muons"
34  mainIDInput = "InDetWithLRTTrackParticles" if doLRT else "InDetTrackParticles"
35  if doLRT:
36  from DerivationFrameworkLLP.LLPToolsConfig import LRTMuonMergerAlg
37  from AthenaConfiguration.Enums import LHCPeriod
38  acc.merge(LRTMuonMergerAlg( flags,
39  PromptMuonLocation = "Muons",
40  LRTMuonLocation = "MuonsLRT",
41  OutputMuonLocation = mainMuonInput,
42  CreateViewCollection = True,
43  UseRun3WP = flags.GeoModel.Run is LHCPeriod.Run3 ))
44  from DerivationFrameworkInDet.InDetToolsConfig import InDetLRTMergeCfg
45  acc.merge(InDetLRTMergeCfg( flags, OutputTrackParticleLocation = mainIDInput ))
46 
47  MuonToRelink = [ "Muons", "MuonsLRT" ] if doLRT else []
48  TrkToRelink = ["InDetTrackParticles", "InDetLargeD0TrackParticles"] if doLRT else []
49 
50  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
51  V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, "HIGG9D1"))
52  vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, "HIGG9D1"))
53  acc.addPublicTool(vkalvrt)
54  acc.addPublicTool(V0Tools)
55  TrackSelector = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, "HIGG9D1"))
56  acc.addPublicTool(TrackSelector)
57  vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, "HIGG9D1"))
58  acc.addPublicTool(vpest)
59 
60  from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
61  pvRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
62  acc.addPublicTool(pvRefitter)
63 
64  HIGG9D1JpsiFinder = CompFactory.Analysis.JpsiFinder(
65  name = "HIGG9D1JpsiFinder",
66  muAndMu = True,
67  muAndTrack = False,
68  TrackAndTrack = False,
69  assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
70  trackThresholdPt = 2400.,
71  invMassLower = 2600.0,
72  invMassUpper = 3500.0,
73  Chi2Cut = 20.,
74  oppChargesOnly = True,
75  atLeastOneComb = True,
76  useCombinedMeasurement = False, # Only takes effect if combOnly=True
77  muonCollectionKey = mainMuonInput,
78  TrackParticleCollection = mainIDInput,
79  V0VertexFitterTool = None, # V0 vertex fitter
80  useV0Fitter = False, # if False a TrkVertexFitterTool will be used
81  TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
82  TrackSelectorTool = TrackSelector,
83  VertexPointEstimator = vpest,
84  useMCPCuts = False )
85  acc.addPublicTool(HIGG9D1JpsiFinder)
86 
87  HIGG9D1UpsiFinder = CompFactory.Analysis.JpsiFinder(
88  name = "HIGG9D1UpsiFinder",
89  muAndMu = True,
90  muAndTrack = False,
91  TrackAndTrack = False,
92  assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
93  trackThresholdPt = 2400.,
94  invMassLower = 8900.0,
95  invMassUpper = 9900.0,
96  Chi2Cut = 20.,
97  oppChargesOnly = True,
98  atLeastOneComb = True,
99  useCombinedMeasurement = False, # Only takes effect if combOnly=True
100  muonCollectionKey = mainMuonInput,
101  TrackParticleCollection = mainIDInput,
102  V0VertexFitterTool = None, # V0 vertex fitter
103  useV0Fitter = False, # if False a TrkVertexFitterTool will be used
104  TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
105  TrackSelectorTool = TrackSelector,
106  VertexPointEstimator = vpest,
107  useMCPCuts = False )
108  acc.addPublicTool(HIGG9D1UpsiFinder)
109 
110  HIGG9D1_Jpsi = CompFactory.DerivationFramework.Reco_Vertex(
111  name = "HIGG9D1_Jpsi",
112  VertexSearchTool = HIGG9D1JpsiFinder,
113  OutputVtxContainerName = "HIGG9D1_JpsiCandidates",
114  PVContainerName = "PrimaryVertices",
115  RefPVContainerName = "HIGG9D1_JpsiRefittedPrimaryVertices",
116  RefitPV = True,
117  MaxPVrefit = 100,
118  V0Tools = V0Tools,
119  RelinkTracks = TrkToRelink,
120  RelinkMuons = MuonToRelink,
121  PVRefitter = pvRefitter,
122  DoVertexType = 7)
123  acc.addPublicTool(HIGG9D1_Jpsi)
124 
125  HIGG9D1_Upsi = CompFactory.DerivationFramework.Reco_Vertex(
126  name = "HIGG9D1_Upsi",
127  VertexSearchTool = HIGG9D1UpsiFinder,
128  OutputVtxContainerName = "HIGG9D1_UpsiCandidates",
129  PVContainerName = "PrimaryVertices",
130  RefPVContainerName = "HIGG9D1_UpsiRefittedPrimaryVertices",
131  RefitPV = True,
132  MaxPVrefit = 100,
133  V0Tools = V0Tools,
134  RelinkTracks = TrkToRelink,
135  RelinkMuons = MuonToRelink,
136  PVRefitter = pvRefitter,
137  DoVertexType = 7)
138  acc.addPublicTool(HIGG9D1_Upsi)
139 
140  from InDetConfig.InDetTrackSelectionToolConfig import InDetTrackSelectionTool_Loose_Cfg
141  HIGG9D1_isoTrackSelTool = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(
142  flags,
143  name = "HIGG9D1_isoTrackSelTool",
144  maxZ0SinTheta = 3.0,
145  minPt = 500.))
146 
147  from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg
148  HIGG9D1_TrackIsoTool = acc.popToolsAndMerge(TrackIsolationToolCfg(
149  flags,
150  name = "HIGG9D1_TrackIsoTool",
151  TrackSelectionTool = HIGG9D1_isoTrackSelTool))
152  acc.addPublicTool(HIGG9D1_TrackIsoTool)
153 
154  HIGG9D1_JpsiVtxTrkIsoDecor = CompFactory.DerivationFramework.VertexTrackIsolation(
155  name = "HIGG9D1_JpsiVtxTrkIsoDecor",
156  TrackIsoTool = HIGG9D1_TrackIsoTool,
157  TrackContainer = "InDetTrackParticles",
158  InputVertexContainer = "HIGG9D1_JpsiCandidates",
159  FixElecExclusion = False,
160  IncludeV0 = False)
161  acc.addPublicTool(HIGG9D1_JpsiVtxTrkIsoDecor)
162 
163  HIGG9D1_UpsiVtxTrkIsoDecor = CompFactory.DerivationFramework.VertexTrackIsolation(
164  name = "HIGG9D1_UpsiVtxTrkIsoDecor",
165  TrackIsoTool = HIGG9D1_TrackIsoTool,
166  TrackContainer = "InDetTrackParticles",
167  InputVertexContainer = "HIGG9D1_UpsiCandidates",
168  FixElecExclusion = False,
169  IncludeV0 = False)
170  acc.addPublicTool(HIGG9D1_UpsiVtxTrkIsoDecor)
171 
172  # New subsequence
173  from AthenaCommon.CFElements import seqAND
174  acc.addSequence( seqAND("HIGG9D1Sequence") )
175 
176  # Common augmentations
177  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
178  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']), sequenceName="HIGG9D1Sequence")
179 
180 
183  HIGG9D1_onia_skim = CompFactory.DerivationFramework.AnyVertexSkimmingTool(name = "HIGG9D1_onia_skim", VertexContainerNames = ["HIGG9D1_JpsiCandidates", "HIGG9D1_UpsiCandidates"])
184  acc.addPublicTool(HIGG9D1_onia_skim)
185 
186  HIGG9D1_onia_skimKernel = CompFactory.DerivationFramework.DerivationKernel(
187  "HIGG9D1_onia_skimKernel",
188  AugmentationTools = [ HIGG9D1_AugOriginalCounts, HIGG9D1_Jpsi, HIGG9D1_Upsi, HIGG9D1_JpsiVtxTrkIsoDecor, HIGG9D1_UpsiVtxTrkIsoDecor ],
189  SkimmingTools = [ HIGG9D1_onia_skim ])
190  # Add skimming tool to subsequence
191  acc.addEventAlgo(HIGG9D1_onia_skimKernel, sequenceName="HIGG9D1Sequence")
192 
193 
194  from DerivationFrameworkFlavourTag.FtagDerivationConfig import JetCollectionsBTaggingCfg
195  acc.merge(JetCollectionsBTaggingCfg(flags, ["AntiKt4EMPFlowJets"]), sequenceName="HIGG9D1Sequence")
196 
197 
200 
201 
203  HIGG9D1_smallR_EMPFlow_2j_sel = "count(AntiKt4EMPFlowJets.pt > 18*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.8) >= 2"
204  HIGG9D1_smallR_EMPFlow_1j_sel = "count(AntiKt4EMPFlowJets.pt > 33*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.8) >= 1"
205  # https://gitlab.cern.ch/atlas/athena/-/blob/main/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx
206  # fraction_c (0.2), fraction_tau (0.01) and cutvalue (0.844) from TDirectory "GN2v01/AntiKt4EMPFlowJets/FixedCutBEff_77" of
207  # /cvmfs/atlas.cern.ch/repo/sw/database/GroupData/xAODBTaggingEfficiency/13TeV/MC20_2024-10-17_GN2v01_v1.root (run-2) and
208  # /cvmfs/atlas.cern.ch/repo/sw/database/GroupData/xAODBTaggingEfficiency/13p6TeV/MC23_2024-10-17_GN2v01_v1.root (run-3)
209  HIGG9D1_smallR_EMPFlow_1b_sel = "count(AntiKt4EMPFlowJets.pt > 18*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.8 && log(BTagging_AntiKt4EMPFlow.GN2v01_pb/(0.2*BTagging_AntiKt4EMPFlow.GN2v01_pc + (1.-0.2-0.01)*BTagging_AntiKt4EMPFlow.GN2v01_pu + 0.01*BTagging_AntiKt4EMPFlow.GN2v01_ptau))>=0.844) >= 1"
210 
211  HIGG9D1_bjet_sel = "%s && %s && %s" % (HIGG9D1_smallR_EMPFlow_2j_sel, HIGG9D1_smallR_EMPFlow_1j_sel, HIGG9D1_smallR_EMPFlow_1b_sel)
212  HIGG9D1_bb_skim = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "HIGG9D1_bb_skim", expression = HIGG9D1_bjet_sel)
213  acc.addPublicTool(HIGG9D1_bb_skim)
214 
215 
216  HIGG9D1_tauTrks = '(TauJets.nTracks + TauJets.nTracksIsolation >= 1 && TauJets.nTracks + TauJets.nTracksIsolation <= 8)'
217  HIGG9D1_tauLead = '(TauJets.pt > 23.0*GeV || TauJets.ptFinalCalib > 23.0*GeV)'
218  HIGG9D1_tauSubl = '(TauJets.pt > 18.0*GeV || TauJets.ptFinalCalib > 18.0*GeV)'
219  HIGG9D1_tauId = 'TauJets.DFTauLoose'
220  HIGG9D1_tauReq0 = 'count( '+HIGG9D1_tauSubl+' && '+HIGG9D1_tauTrks+' ) >= 2'
221  HIGG9D1_tauReq1 = 'count( '+HIGG9D1_tauSubl+' && '+HIGG9D1_tauTrks+' && '+HIGG9D1_tauId+' ) >= 1'
222  HIGG9D1_tauReq2 = 'count( '+HIGG9D1_tauLead+' && '+HIGG9D1_tauTrks+' ) >= 1'
223  HIGG9D1_tau_sel = "%s && %s && %s" % (HIGG9D1_tauReq0, HIGG9D1_tauReq1, HIGG9D1_tauReq2)
224 
225  HIGG9D1_tautau_skim = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "HIGG9D1_tautau_skim", expression = HIGG9D1_tau_sel)
226  acc.addPublicTool(HIGG9D1_tautau_skim)
227 
228 
229  from DerivationFrameworkHiggs.SkimmingToolHIGG1Config import SkimmingToolHIGG1Cfg
230  HIGG9D1_yy_skim = acc.popToolsAndMerge(SkimmingToolHIGG1Cfg(
231  flags,
232  name = "HIGG9D1_yy_skim",
233  RequireGRL = False,
234  ReqireLArError = True,
235  RequireTrigger = False,
236  RequirePreselection = True,
237  RequireKinematic = False,
238  RequireQuality = False, # True: "Tight" ID; False: DFCommonPhotonsIsEMLoose
239  RequireIsolation = False, # dummy
240  RequireInvariantMass = False,
241  IncludeSingleMergedElectronPreselection = False,
242  IncludeSingleElectronPreselection = False,
243  IncludeDoubleElectronPreselection = False,
244  IncludeSingleMuonPreselection = False,
245  IncludeDoubleMuonPreselection = False,
246  IncludePhotonDoubleElectronPreselection = False,
247  IncludePhotonMergedElectronPreselection = False,
248  IncludeHighPtPhotonElectronPreselection = False,
249  IncludeDoublePhotonPreselection = True, # di-photon requirement
250  MinimumPhotonPt = 4800.0,
251  RemoveCrack = True,
252  MaxEta = 2.47))
253  acc.addPublicTool(HIGG9D1_yy_skim)
254 
255  # Combine skims with OR
256  HIGG9D1_bb_tautau_yy_skim = CompFactory.DerivationFramework.FilterCombinationOR(
257  name = "HIGG9D1_bb_tautau_yy_skim",
258  FilterList = [HIGG9D1_bb_skim, HIGG9D1_tautau_skim, HIGG9D1_yy_skim])
259  acc.addPublicTool(HIGG9D1_bb_tautau_yy_skim)
260 
261  # Common calo decoration tools
262  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (CaloDecoratorKernelCfg, ClusterEnergyPerLayerDecoratorCfg)
263  acc.merge(CaloDecoratorKernelCfg(flags), sequenceName="HIGG9D1Sequence")
264 
265  # Adding missing cluster energy decorators
266  augmentationTools = []
267  cluster_sizes = (3,5), (5,7), (7,7)
268  for neta, nphi in cluster_sizes:
269  cename = "ClusterEnergyPerLayerDecorator_%sx%s" % (neta, nphi)
270  ClusterEnergyPerLayerDecorator = acc.popToolsAndMerge( ClusterEnergyPerLayerDecoratorCfg(flags, neta = neta, nphi=nphi, name=cename ))
271  acc.addPublicTool(ClusterEnergyPerLayerDecorator)
272  augmentationTools.append(ClusterEnergyPerLayerDecorator)
273 
274  HIGG9D1_bb_tautau_yy_skimKernel = CompFactory.DerivationFramework.DerivationKernel(
275  "HIGG9D1_bb_tautau_yy_skimKernel",
276  AugmentationTools = augmentationTools,
277  SkimmingTools = [ HIGG9D1_bb_tautau_yy_skim ])
278  # Add skimming tool to subsequence
279  acc.addEventAlgo(HIGG9D1_bb_tautau_yy_skimKernel, sequenceName="HIGG9D1Sequence")
280 
281 
283  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
284  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_HIGG9D1", isPhysLite = False, stream_name = kwargs['StreamName']), sequenceName="HIGG9D1Sequence")
285 
286  # diphoton vertex augmentation
287  from DerivationFrameworkEGamma.EGammaToolsConfig import PhotonVertexSelectionWrapperKernelCfg
288  acc.merge(PhotonVertexSelectionWrapperKernelCfg(flags), sequenceName="HIGG9D1Sequence")
289  from DerivationFrameworkHiggs.HIGG1D1CustomVertexConfig import DiphotonVertexDecoratorCfg
290  DiphotonVertexDecorator = acc.popToolsAndMerge(DiphotonVertexDecoratorCfg(
291  flags,
292  DiphotonVertexName = "HIGG9D1_DiphotonPrimaryVertices"))
293  acc.addPublicTool(DiphotonVertexDecorator)
294  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(name = "DiphotonVertexAugmentation", AugmentationTools = [DiphotonVertexDecorator]), sequenceName="HIGG9D1Sequence")
295 
296  #================
297  # Thinning tools
298  #================
299  # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/DaodRecommendations
300  from DerivationFrameworkInDet.InDetToolsConfig import (TrackParticleThinningCfg, MuonTrackParticleThinningCfg)
301  HIGG9D1TPthinning_expression = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV"
302  HIGG9D1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
303  flags,
304  name = "HIGG9D1TrackParticleThinningTool",
305  StreamName = kwargs['StreamName'],
306  SelectionString = HIGG9D1TPthinning_expression,
307  InDetTrackParticlesKey = "InDetTrackParticles"))
308  acc.addPublicTool(HIGG9D1TrackParticleThinningTool)
309 
310  # Include inner detector tracks associated with muons
311  HIGG9D1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
312  flags,
313  name = "HIGG9D1MuonTPThinningTool",
314  StreamName = kwargs['StreamName'],
315  MuonKey = "Muons",
316  InDetTrackParticlesKey = "InDetTrackParticles"))
317  acc.addPublicTool(HIGG9D1MuonTPThinningTool)
318 
319  # Include inner detector tracks associated with electonrs
320  HIGG9D1ElectronTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
321  name = "HIGG9D1ElectronTPThinningTool",
322  SGKey = "Electrons",
323  StreamName = kwargs['StreamName'],
324  InDetTrackParticlesKey = "InDetTrackParticles")
325  acc.addPublicTool(HIGG9D1ElectronTPThinningTool)
326 
327  # Include inner detector tracks associated with taus
328  from DerivationFrameworkInDet.InDetToolsConfig import TauTrackParticleThinningCfg
329  HIGG9D1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
330  flags,
331  name = "HIGG9D1TauTPThinningTool",
332  StreamName = kwargs['StreamName'],
333  TauKey = "TauJets",
334  InDetTrackParticlesKey = "InDetTrackParticles",
335  DoTauTracksThinning = True,
336  TauTracksKey = "TauTracks"))
337 
338  # ID tracks associated to vertices
339  HIGG9D1_ThinVtxTracks = CompFactory.DerivationFramework.Thin_vtxTrk(
340  name = "HIGG9D1_ThinVtxTracks",
341  StreamName = kwargs['StreamName'],
342  TrackParticleContainerName = "InDetTrackParticles",
343  VertexContainerNames = [ HIGG9D1_Jpsi.OutputVtxContainerName, HIGG9D1_Upsi.OutputVtxContainerName ],
344  IgnoreFlags = True )
345  acc.addPublicTool(HIGG9D1_ThinVtxTracks)
346 
347  # Primary vertices
348  HIGG9D1_ThinPV = CompFactory.DerivationFramework.BPhysPVThinningTool(
349  name = "HIGG9D1_ThinPV",
350  CandidateCollections = [ HIGG9D1_Jpsi.OutputVtxContainerName, HIGG9D1_Upsi.OutputVtxContainerName ],
351  StreamName = kwargs['StreamName'],
352  KeepPVTracks = True)
353  acc.addPublicTool(HIGG9D1_ThinPV)
354 
355  thinningTools = [HIGG9D1TrackParticleThinningTool,
356  HIGG9D1MuonTPThinningTool,
357  HIGG9D1ElectronTPThinningTool,
358  HIGG9D1TauTPThinningTool,
359  HIGG9D1_ThinVtxTracks,
360  HIGG9D1_ThinPV]
361 
362 
363  if flags.Input.isMC:
364  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import MenuTruthThinningCfg
365  HIGG9D1TruthTool = acc.getPrimaryAndMerge(MenuTruthThinningCfg(
366  flags = flags,
367  name = "HIGG9D1TruthTool",
368  StreamName = kwargs['StreamName'],
369  ParticlesKey = "TruthParticles",
370  VerticesKey = "TruthVertices",
371  EventsKey = "TruthEvents",
372  WritePartons = False,
373  WriteHadrons = True,
374  WriteBHadrons = True,
375  WriteCHadrons = True,
376  WriteGeant = False,
377  WriteTauHad = True,
378  WriteBSM = True,
379  WriteBosons = True,
380  WriteBSMProducts = True,
381  WriteBosonProducts = False,
382  WriteTopAndDecays = True,
383  WriteEverything = False,
384  WriteAllLeptons = True,
385  WriteNotPhysical = False,
386  PreserveDescendants = False,
387  PreserveGeneratorDescendants = True,
388  PreserveAncestors = True))
389  acc.addPublicTool(HIGG9D1TruthTool)
390  thinningTools.append(HIGG9D1TruthTool)
391 
392  #===================================================
393  # HEAVY FLAVOR CLASSIFICATION FOR ttbar+jets EVENTS
394  #===================================================
395  from DerivationFrameworkMCTruth.HFClassificationCommonConfig import HFClassificationCommonCfg
396  acc.merge(HFClassificationCommonCfg(flags), sequenceName="HIGG9D1Sequence")
397 
398  # Apply thinning
399  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, ThinningTools = thinningTools), sequenceName="HIGG9D1Sequence")
400 
401  return acc
402 

Variable Documentation

◆ log_HIGG9D1

python.HIGG9D1.log_HIGG9D1 = logging.getLogger('HIGG9D1')

Definition at line 11 of file HIGG9D1.py.

◆ streamName

string python.HIGG9D1.streamName = "StreamDAOD_HIGG9D1"

Definition at line 13 of file HIGG9D1.py.

python.HIGG1D1CustomVertexConfig.PrimaryVertexRefittingToolCfg
def PrimaryVertexRefittingToolCfg(flags, **kwargs)
Definition: HIGG1D1CustomVertexConfig.py:7
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.LLPToolsConfig.LRTMuonMergerAlg
def LRTMuonMergerAlg(flags, name="LLP1_MuonLRTMergingAlg", **kwargs)
Definition: LLPToolsConfig.py:180
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.SkimmingToolHIGG1Config.SkimmingToolHIGG1Cfg
def SkimmingToolHIGG1Cfg(ConfigFlags, **kwargs)
Definition: SkimmingToolHIGG1Config.py:7
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
commonBPHYMethodsCfg.BPHY_TrkVKalVrtFitterCfg
def BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName, **kwargs)
Definition: commonBPHYMethodsCfg.py:6
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.HIGG9D1.HIGG9D1Cfg
def HIGG9D1Cfg(flags)
Definition: HIGG9D1.py:403
python.TruthDerivationToolsConfig.MenuTruthThinningCfg
def MenuTruthThinningCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:369
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:458
python.TriggerMatchingCommonConfig.getDataYear
def getDataYear(flags)
Definition: TriggerMatchingCommonConfig.py:30
python.InDetTrackSelectionToolConfig.InDetTrackSelectionTool_Loose_Cfg
def InDetTrackSelectionTool_Loose_Cfg(flags, name="InDetTrackSelectionTool_Loose", **kwargs)
Configs based on CutLevel Loose #####.
Definition: InDetTrackSelectionToolConfig.py:36
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.HIGG1D1CustomVertexConfig.DiphotonVertexDecoratorCfg
def DiphotonVertexDecoratorCfg(flags, **kwargs)
Definition: HIGG1D1CustomVertexConfig.py:56
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
DerivationFrameworkCaloConfig.ClusterEnergyPerLayerDecoratorCfg
def ClusterEnergyPerLayerDecoratorCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:43
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
python.InDetToolsConfig.TauTrackParticleThinningCfg
def TauTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:539
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
commonBPHYMethodsCfg.BPHY_V0ToolCfg
def BPHY_V0ToolCfg(flags, BPHYDerivationName)
Definition: commonBPHYMethodsCfg.py:11
python.TrackIsolationDecoratorConfig.TrackIsolationToolCfg
def TrackIsolationToolCfg(ConfigFlags, name="TrackIsolationTool", **kwargs)
Definition: TrackIsolationDecoratorConfig.py:12
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.InDetConversionFinderToolsConfig.BPHY_VertexPointEstimatorCfg
def BPHY_VertexPointEstimatorCfg(flags, name="BPHY_VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:69
commonBPHYMethodsCfg.getDefaultAllVariables
def getDefaultAllVariables()
Definition: commonBPHYMethodsCfg.py:32
DerivationFrameworkCaloConfig.CaloDecoratorKernelCfg
def CaloDecoratorKernelCfg(flags, name="CaloDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:76
python.TriggerMatchingCommonConfig.AddLegacyL1JetRoIsToSlimmingHelper
def AddLegacyL1JetRoIsToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:70
python.InDetToolsConfig.InDetLRTMergeCfg
def InDetLRTMergeCfg(flags, name="InDetLRTMerge", **kwargs)
Definition: InDetToolsConfig.py:14
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
python.InDetTrackSelectorToolConfig.BPHY_InDetDetailedTrackSelectorToolCfg
def BPHY_InDetDetailedTrackSelectorToolCfg(flags, name='BPHY_InDetDetailedTrackSelectorTool', **kwargs)
Definition: InDetTrackSelectorToolConfig.py:213
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:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HIGG9D1.HIGG9D1KernelCfg
def HIGG9D1KernelCfg(flags, name='HIGG9D1Kernel', **kwargs)
Definition: HIGG9D1.py:15
python.EGammaToolsConfig.PhotonVertexSelectionWrapperKernelCfg
def PhotonVertexSelectionWrapperKernelCfg(flags, name="PhotonVertexSelectionWrapperKernel", **kwargs)
Definition: EGammaToolsConfig.py:104