ATLAS Offline Software
TrackTruthConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3 
4 # -------------------------------------------------------------------------
5 #
6 # ------- fragment to handle track truth association
7 #
8 # -------------------------------------------------------------------------
9 
10 
12  Tracks="CombinedInDetTracks",
13  DetailedTruth="CombinedInDetTracksDetailedTruth",
14  TracksTruth="CombinedInDetTracksTruthCollection"):
15  acc = ComponentAccumulator()
16  #
17  # --- Enable the detailed track truth
18  #
19  from InDetConfig.InDetTruthAlgsConfig import InDetDetailedTrackTruthMakerCfg
21  flags,
22  TrackCollectionName=Tracks,
23  DetailedTrackTruthName=DetailedTruth))
24  #
25  # --- Detailed to old TrackTruth
26  #
27  from TrkConfig.TrkTruthAlgsConfig import TrackTruthSimilaritySelectorCfg
29  flags,
30  DetailedTrackTruthName=DetailedTruth,
31  OutputName=TracksTruth))
32 
33  return acc
34 
35 
36 if __name__ == "__main__":
37  from AthenaConfiguration.AllConfigFlags import initConfigFlags
38  flags = initConfigFlags()
39 
40  numThreads = 1
41  flags.Concurrency.NumThreads = numThreads
42  # Might change this later, but good enough for the moment.
43  flags.Concurrency.NumConcurrentEvents = numThreads
44 
45  flags.Detector.GeometryPixel = True
46  flags.Detector.GeometrySCT = True
47  flags.Detector.GeometryTRT = True
48 
49  flags.Tracking.doPixelClusterSplitting = True
50 
51  from AthenaConfiguration.TestDefaults import defaultTestFiles
52  flags.Input.Files = defaultTestFiles.RDO_RUN2
53  flags.lock()
54  flags.dump()
55 
56  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
57  top_acc = MainServicesCfg(flags)
58 
59  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
60  top_acc.merge(PoolReadCfg(flags))
61 
62 
63  from InDetConfig.SiliconPreProcessing import InDetRecPreProcessingSiliconCfg
64  top_acc.merge(InDetRecPreProcessingSiliconCfg(flags))
65 
66  from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg
67  top_acc.merge(TRTPreProcessingCfg(flags))
68 
69  # //// TrackingSiPatternConfig configurations from Temporary location /////
70 
71 
72  InputCollections = []
73 
74  SiSPSeededTrackCollectionKey = 'SiSPSeededPixelTracks'
75  ResolvedTrackCollectionKey = 'ResolvedPixelTracks'
76  from InDetConfig.SiSPSeededTrackFinderConfig import SiSPSeededTrackFinderCfg
77  top_acc.merge(SiSPSeededTrackFinderCfg(
78  flags,
79  InputCollections=InputCollections,
80  SiSPSeededTrackCollectionKey=SiSPSeededTrackCollectionKey))
81 
83 
84  InputTrackCollection = 'SiSPSeededPixelTracks'
85  InputDetailedTrackTruth = 'DetailedTrackTruth'
86  InputTrackCollectionTruth = 'TrackTruthCollection'
87 
88  top_acc.merge(InDetTrackTruthCfg(
89  flags,
90  Tracks=InputTrackCollection,
91  DetailedTruth=InputDetailedTrackTruth,
92  TracksTruth=InputTrackCollectionTruth))
93 
94  top_acc.printConfig()
95  top_acc.run(25)
96  top_acc.store(open("test_TrackTruthConfig.pkl", "wb"))
python.TRTPreProcessing.TRTPreProcessingCfg
def TRTPreProcessingCfg(flags)
Definition: TRTPreProcessing.py:11
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.SiliconPreProcessing.InDetRecPreProcessingSiliconCfg
def InDetRecPreProcessingSiliconCfg(flags)
Definition: SiliconPreProcessing.py:6
python.TrackTruthConfig.InDetTrackTruthCfg
def InDetTrackTruthCfg(flags, Tracks="CombinedInDetTracks", DetailedTruth="CombinedInDetTracksDetailedTruth", TracksTruth="CombinedInDetTracksTruthCollection")
Definition: TrackTruthConfig.py:11
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.SiSPSeededTrackFinderConfig.SiSPSeededTrackFinderCfg
def SiSPSeededTrackFinderCfg(flags, name="InDetSiSpTrackFinder", **kwargs)
Definition: SiSPSeededTrackFinderConfig.py:8
python.InDetTruthAlgsConfig.InDetDetailedTrackTruthMakerCfg
def InDetDetailedTrackTruthMakerCfg(flags, name='Maker', **kwargs)
Definition: InDetTruthAlgsConfig.py:153
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.TrkTruthAlgsConfig.TrackTruthSimilaritySelectorCfg
def TrackTruthSimilaritySelectorCfg(flags, name='Selector', **kwargs)
Definition: TrkTruthAlgsConfig.py:6
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69