ATLAS Offline Software
FullScanInDetConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
5 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
6 
7 from TrigInDetConfig.utils import getFlagsForActiveConfig
8 from TrigInDetConfig.TrigInDetConfig import trigInDetFastTrackingCfg, trigInDetLRTCfg
9 from InDetConfig.InDetPriVxFinderConfig import InDetTrigPriVxFinderCfg
10 
11 from AthenaCommon.Logging import logging
12 from AthenaCommon.CFElements import parOR
13 
14 logging.getLogger().info("Importing %s",__name__)
15 log = logging.getLogger(__name__)
16 
17 from .FullScanDefs import trkFSRoI
18 
19 @AccumulatorCache
20 def commonInDetFullScanCfg(flags: AthConfigFlags) -> ComponentAccumulator:
21  acc = ComponentAccumulator()
22  seqname='TrigInDetFullScan'
23  acc.addSequence(parOR(seqname),primary=True)
24 
25  flagsWithTrk = getFlagsForActiveConfig(flags, 'fullScan', log)
26  acc.merge(
28  flagsWithTrk,
29  trkFSRoI,
30  signatureName='fullScan',
31  in_view=False
32  ),
33  seqname
34  )
35 
36  vxkwargs = {
37  "inputTracks": flagsWithTrk.Tracking.ActiveConfig.tracks_FTF,
38  "outputVtx": flagsWithTrk.Tracking.ActiveConfig.vertex_jet,
39  }
40  if flags.Trigger.FSTrk.doJetRestrictedVertexSort:
41  from TrkConfig.TrkVertexToolsConfig import JetRestrictedSumPt2VertexCollectionSortingToolCfg
42  from TrkConfig.TrkVertexWeightCalculatorsConfig import JetRestrictedSumPt2VertexWeightCalculatorCfg
44  flags,
45  JetContainer='HLT_AntiKt4EMTopoJets_subjesIS',
46  TrackParticleLocation=flagsWithTrk.Tracking.ActiveConfig.tracks_FTF,
47  PlainSumPtDecor='UnrestrictedSumPt'
48  )
49  jetcalc = jetcalccfg.popPrivateTools()
50  acc.merge(jetcalccfg)
52  flags,
53  VertexWeightCalculator=jetcalc
54  )
55  vxsort = acc.popToolsAndMerge(vxsortcfg)
56  vxkwargs["VertexCollectionSortingTool"] = vxsort
57 
58  from TrkConfig.TrkVertexToolsConfig import SumPt2VertexCollectionSortingToolCfg
59  default_sumpt_vxsort = SumPt2VertexCollectionSortingToolCfg(flags)
60  from InDetPriVxFinder.ResortVerticesConfig import ResortVerticesCfg
61  acc.merge(ResortVerticesCfg(
62  flags,
63  flagsWithTrk.Tracking.ActiveConfig.vertex_jet,
64  "HLT_IDVertex_FS_origsumpt",
65  default_sumpt_vxsort,
66  ))
67 
68  acc.merge(
70  flagsWithTrk,
71  **vxkwargs,
72  ),
73  seqname
74  )
75 
76  return acc
77 
78 
79 def commonInDetLRTCfg(flags : AthConfigFlags,
80  flagsLRT : AthConfigFlags,
81  rois : str = trkFSRoI) -> ComponentAccumulator:
82 
83  acc = ComponentAccumulator()
84  seqname = 'TrigInDetLRT_'+flagsLRT.Tracking.ActiveConfig.name
85  acc.addSequence(parOR(seqname),primary=True)
86 
87  acc.merge(
89  flagsLRT,
90  flags.Tracking.ActiveConfig.trkTracks_FTF,
91  rois,
92  in_view=False
93  ),
94  seqname
95  )
96 
97  return acc
grepfile.info
info
Definition: grepfile.py:38
python.TrkVertexToolsConfig.SumPt2VertexCollectionSortingToolCfg
def SumPt2VertexCollectionSortingToolCfg(flags, name="SumPt2VertexCollectionSortingTool", **kwargs)
Definition: TrkVertexToolsConfig.py:7
python.HLT.CommonSequences.FullScanInDetConfig.commonInDetFullScanCfg
ComponentAccumulator commonInDetFullScanCfg(AthConfigFlags flags)
Definition: FullScanInDetConfig.py:20
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HLT.CommonSequences.FullScanInDetConfig.commonInDetLRTCfg
ComponentAccumulator commonInDetLRTCfg(AthConfigFlags flags, AthConfigFlags flagsLRT, str rois=trkFSRoI)
Definition: FullScanInDetConfig.py:79
python.TrigInDetConfig.trigInDetLRTCfg
def trigInDetLRTCfg(flags, LRTInputCollection, roisKey, in_view, extra_view_inputs=tuple())
Definition: TrigInDetConfig.py:80
python.InDetPriVxFinderConfig.InDetTrigPriVxFinderCfg
ComponentAccumulator InDetTrigPriVxFinderCfg(flags, str inputTracks, str outputVtx, str name="InDetTrigPriVxFinder", **kwargs)
Definition: InDetPriVxFinderConfig.py:43
python.TrigInDetConfig.trigInDetFastTrackingCfg
def trigInDetFastTrackingCfg(inflags, roisKey="EMRoIs", signatureName='', patternMode='FTF', in_view=True)
Definition: TrigInDetConfig.py:54
python.utils.getFlagsForActiveConfig
AthConfigFlags getFlagsForActiveConfig(AthConfigFlags flags, str config_name, logging.Logger log)
Definition: Trigger/TrigTools/TrigInDetConfig/python/utils.py:9
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271
python.TrkVertexToolsConfig.JetRestrictedSumPt2VertexCollectionSortingToolCfg
def JetRestrictedSumPt2VertexCollectionSortingToolCfg(flags, name="JetRestrictedSumPt2VertexCollectionSortingTool", **kwargs)
Definition: TrkVertexToolsConfig.py:38
python.TrkVertexWeightCalculatorsConfig.JetRestrictedSumPt2VertexWeightCalculatorCfg
def JetRestrictedSumPt2VertexWeightCalculatorCfg(flags, name="JetRestrictedSumPt2VertexWeightCalculator", TrackParticleLocation="InDetTrackParticles", **kwargs)
Definition: TrkConfig/python/TrkVertexWeightCalculatorsConfig.py:77
ResortVerticesConfig.ResortVerticesCfg
def ResortVerticesCfg(flags, vxin, vxout, vxsortercfg, algname="ResortVx")
Definition: ResortVerticesConfig.py:8