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 14 of file TrackCollectionReadConfig.py.

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

◆ 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 28 of file TrackCollectionReadConfig.py.

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

Variable Documentation

◆ acc1

python.TrackCollectionReadConfig.acc1

Definition at line 98 of file TrackCollectionReadConfig.py.

◆ acc2

python.TrackCollectionReadConfig.acc2

Definition at line 107 of file TrackCollectionReadConfig.py.

◆ acc3

python.TrackCollectionReadConfig.acc3

Definition at line 116 of file TrackCollectionReadConfig.py.

◆ acc4

python.TrackCollectionReadConfig.acc4

Definition at line 125 of file TrackCollectionReadConfig.py.

◆ acc5

python.TrackCollectionReadConfig.acc5

Definition at line 133 of file TrackCollectionReadConfig.py.

◆ Files

python.TrackCollectionReadConfig.Files

Definition at line 96 of file TrackCollectionReadConfig.py.

◆ flags

python.TrackCollectionReadConfig.flags

Definition at line 89 of file TrackCollectionReadConfig.py.

◆ flags1

python.TrackCollectionReadConfig.flags1

Definition at line 94 of file TrackCollectionReadConfig.py.

◆ flags2

python.TrackCollectionReadConfig.flags2

Definition at line 103 of file TrackCollectionReadConfig.py.

◆ flags3

python.TrackCollectionReadConfig.flags3

Definition at line 112 of file TrackCollectionReadConfig.py.

◆ flags4

python.TrackCollectionReadConfig.flags4

Definition at line 121 of file TrackCollectionReadConfig.py.

◆ flags5

python.TrackCollectionReadConfig.flags5

Definition at line 130 of file TrackCollectionReadConfig.py.

◆ NumThreads

python.TrackCollectionReadConfig.NumThreads

Definition at line 95 of file TrackCollectionReadConfig.py.

◆ summariseProps

python.TrackCollectionReadConfig.summariseProps

Definition at line 99 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:14
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:28