ATLAS Offline Software
Functions | Variables
python.TrackCollectionReadConfig Namespace Reference

Functions

def _guessTracksAlias (tcolls)
 
def TrackCollectionReadCfg (flags, key)
 

Variables

 flags
 
 flags1
 
 NumThreads
 
 Files
 
 acc1
 
 summariseProps
 
 flags2
 
 acc2
 
 flags3
 
 acc3
 
 flags4
 
 acc4
 
 flags5
 
 acc5
 

Function Documentation

◆ _guessTracksAlias()

def python.TrackCollectionReadConfig._guessTracksAlias (   tcolls)
private
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.

13 def _guessTracksAlias (tcolls):
14  """Given the list of TrackCollection keys from the input file, try to guess
15 which 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()

def 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.

27 def TrackCollectionReadCfg (flags, key):
28  """Configure an algorithm to read a TrackCollection.
29 KEY is the desired TrackCollection key.
30 Will do nothing in serial mode, or if the requested object is not
31 in 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 

Variable Documentation

◆ acc1

python.TrackCollectionReadConfig.acc1

Definition at line 97 of file TrackCollectionReadConfig.py.

◆ acc2

python.TrackCollectionReadConfig.acc2

Definition at line 106 of file TrackCollectionReadConfig.py.

◆ acc3

python.TrackCollectionReadConfig.acc3

Definition at line 115 of file TrackCollectionReadConfig.py.

◆ acc4

python.TrackCollectionReadConfig.acc4

Definition at line 124 of file TrackCollectionReadConfig.py.

◆ acc5

python.TrackCollectionReadConfig.acc5

Definition at line 132 of file TrackCollectionReadConfig.py.

◆ Files

python.TrackCollectionReadConfig.Files

Definition at line 95 of file TrackCollectionReadConfig.py.

◆ flags

python.TrackCollectionReadConfig.flags

Definition at line 88 of file TrackCollectionReadConfig.py.

◆ flags1

python.TrackCollectionReadConfig.flags1

Definition at line 93 of file TrackCollectionReadConfig.py.

◆ flags2

python.TrackCollectionReadConfig.flags2

Definition at line 102 of file TrackCollectionReadConfig.py.

◆ flags3

python.TrackCollectionReadConfig.flags3

Definition at line 111 of file TrackCollectionReadConfig.py.

◆ flags4

python.TrackCollectionReadConfig.flags4

Definition at line 120 of file TrackCollectionReadConfig.py.

◆ flags5

python.TrackCollectionReadConfig.flags5

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.

AddressRemappingConfig.AddressRemappingCfg
def AddressRemappingCfg(renameMaps=[], overwriteMaps=[])
Definition: AddressRemappingConfig.py:10
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrackCollectionReadConfig._guessTracksAlias
def _guessTracksAlias(tcolls)
Definition: TrackCollectionReadConfig.py:13
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
python.TrackCollectionReadConfig.TrackCollectionReadCfg
def TrackCollectionReadCfg(flags, key)
Definition: TrackCollectionReadConfig.py:27