ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrackCollectionReadConfig Namespace Reference

Functions

 _guessTracksAlias (tcolls)
 TrackCollectionReadCfg (flags, key)

Variables

 flags = initConfigFlags()
 flags1 = flags.clone()
 NumThreads
 Files
 acc1 = TrackCollectionReadCfg (flags1, 'CombinedInDetTracks')
 summariseProps
 flags2 = flags.clone()
 acc2 = TrackCollectionReadCfg (flags2, 'Tracks')
 flags3 = flags.clone()
 acc3 = TrackCollectionReadCfg (flags3, 'ResolvedForwardTracks')
 flags4 = flags.clone()
 acc4 = TrackCollectionReadCfg (flags4, 'FooTracks')
 flags5 = flags.clone()
 acc5 = TrackCollectionReadCfg (flags5, 'Tracks')

Function Documentation

◆ _guessTracksAlias()

python.TrackCollectionReadConfig._guessTracksAlias ( tcolls)
protected
Given the list of TrackCollection keys from the input file, try to guess
which one is aliased to Tracks.

Definition at line 13 of file TrackCollectionReadConfig.py.

13def _guessTracksAlias (tcolls):
14 """Given the list of TrackCollection keys from the input file, try to guess
15which one is aliased to Tracks."""
16
17 for a in ['CombinedInDetTracks',
18 'MergedTracks',
19 'InDetPseudoTracks',
20 'ConvertedIPatTracks',
21 'ConvertedXKalmanTracks',
22 'RefittedTracks']:
23 if a in tcolls: return a
24 return None
25
26

◆ TrackCollectionReadCfg()

python.TrackCollectionReadConfig.TrackCollectionReadCfg ( flags,
key )
Configure an algorithm to read a TrackCollection.
KEY is the desired TrackCollection key.
Will do nothing in serial mode, or if the requested object is not
in the input file.

Definition at line 27 of file TrackCollectionReadConfig.py.

27def TrackCollectionReadCfg (flags, key):
28 """Configure an algorithm to read a TrackCollection.
29KEY is the desired TrackCollection key.
30Will do nothing in serial mode, or if the requested object is not
31in the input file."""
32
33 # Don't do anything if we're in serial mode.
34 result = ComponentAccumulator()
35 if flags.Concurrency.NumThreads <= 0:
36 return result
37
38 # Get the list of TrackCollection keys from the input file,
39 # and try to guess the Tracks alias.
40 from AthenaConfiguration.AutoConfigFlags import GetFileMD
41 tcolls = set ([k for t,k in GetFileMD (flags.Input.Files).get('itemList', [])
42 if t == 'TrackCollection'])
43 tracks_alias = _guessTracksAlias (tcolls)
44
45 # If Tracks was requested, try to change to the target of the alias.
46 if key == 'Tracks' and tracks_alias is not None and key not in tcolls:
47 key = tracks_alias
48
49 # Do nothing if the object is not in the input file.
50 if key not in tcolls:
51 return result
52
53 # Mention Tracks as an alias if appropriate.
54 aliases = []
55 if key == tracks_alias and 'Tracks' not in tcolls:
56 aliases = ['Tracks']
57
58 extra_inputs = []
59 if flags.Detector.GeometryPixel:
60 extra_inputs.append(('InDetDD::SiDetectorElementCollection', 'ConditionStore+PixelDetectorElementCollection'))
61 if flags.Detector.GeometrySCT:
62 extra_inputs.append(('InDetDD::SiDetectorElementCollection', 'ConditionStore+SCT_DetectorElementCollection'))
63 if flags.Detector.GeometryTRT:
64 extra_inputs.append(( 'InDetDD::TRT_DetElementContainer' , 'ConditionStore+TRT_DetElementContainer' ))
65 if flags.Detector.GeometryITkPixel:
66 extra_inputs.append(( 'InDetDD::SiDetectorElementCollection' , 'ConditionStore+ITkPixelDetectorElementCollection' ))
67 if flags.Detector.GeometryITkStrip:
68 extra_inputs.append(( 'InDetDD::SiDetectorElementCollection' , 'ConditionStore+ITkStripDetectorElementCollection' ))
69 if flags.Detector.GeometryMuon:
70 extra_inputs.append(('MuonGM::MuonDetectorManager', 'ConditionStore+MuonDetectorManager'))
71
72 # Configure the algorithm.
73 AthReadAlg=CompFactory.AthReadAlg
74 alg = AthReadAlg ('TrackCollectionRead_' + key,
75 Key = 'TrackCollection/' + key,
76 Aliases = aliases,
77 ExtraInputs = extra_inputs)
78 result.addEventAlgo (alg)
79
80 # We also require AddressRemappingSvc.
81 from SGComps.AddressRemappingConfig import AddressRemappingCfg
82 result.merge (AddressRemappingCfg())
83 return result
84
85
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130

Variable Documentation

◆ acc1

python.TrackCollectionReadConfig.acc1 = TrackCollectionReadCfg (flags1, 'CombinedInDetTracks')

Definition at line 97 of file TrackCollectionReadConfig.py.

◆ acc2

python.TrackCollectionReadConfig.acc2 = TrackCollectionReadCfg (flags2, 'Tracks')

Definition at line 106 of file TrackCollectionReadConfig.py.

◆ acc3

python.TrackCollectionReadConfig.acc3 = TrackCollectionReadCfg (flags3, 'ResolvedForwardTracks')

Definition at line 115 of file TrackCollectionReadConfig.py.

◆ acc4

python.TrackCollectionReadConfig.acc4 = TrackCollectionReadCfg (flags4, 'FooTracks')

Definition at line 124 of file TrackCollectionReadConfig.py.

◆ acc5

python.TrackCollectionReadConfig.acc5 = TrackCollectionReadCfg (flags5, 'Tracks')

Definition at line 132 of file TrackCollectionReadConfig.py.

◆ Files

python.TrackCollectionReadConfig.Files

Definition at line 95 of file TrackCollectionReadConfig.py.

◆ flags

python.TrackCollectionReadConfig.flags = initConfigFlags()

Definition at line 88 of file TrackCollectionReadConfig.py.

◆ flags1

python.TrackCollectionReadConfig.flags1 = flags.clone()

Definition at line 93 of file TrackCollectionReadConfig.py.

◆ flags2

python.TrackCollectionReadConfig.flags2 = flags.clone()

Definition at line 102 of file TrackCollectionReadConfig.py.

◆ flags3

python.TrackCollectionReadConfig.flags3 = flags.clone()

Definition at line 111 of file TrackCollectionReadConfig.py.

◆ flags4

python.TrackCollectionReadConfig.flags4 = flags.clone()

Definition at line 120 of file TrackCollectionReadConfig.py.

◆ flags5

python.TrackCollectionReadConfig.flags5 = flags.clone()

Definition at line 129 of file TrackCollectionReadConfig.py.

◆ NumThreads

python.TrackCollectionReadConfig.NumThreads

Definition at line 94 of file TrackCollectionReadConfig.py.

◆ summariseProps

python.TrackCollectionReadConfig.summariseProps

Definition at line 98 of file TrackCollectionReadConfig.py.