ATLAS Offline Software
MuonTruthAlgsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def MuonDetailedTrackTruthMakerCfg(flags, name="MuonDetailedTrackTruthMaker", **kwargs):
7  result = ComponentAccumulator()
8 
9  PRD_TruthNames = ["RPC_TruthMap", "TGC_TruthMap", "MDT_TruthMap"]
10  if flags.Detector.EnableCSC:
11  PRD_TruthNames += ["CSC_TruthMap"]
12  if flags.Detector.EnableMM:
13  PRD_TruthNames += ["MM_TruthMap"]
14  if flags.Detector.EnablesTGC:
15  PRD_TruthNames += ["STGC_TruthMap"]
16 
17  kwargs.setdefault("PRD_TruthNames", PRD_TruthNames)
18  result.addEventAlgo(CompFactory.MuonDetailedTrackTruthMaker(name, **kwargs))
19  return result
20 
21 def MuonTruthDecorationAlgCfg(flags, name="MuonTruthDecorationAlg", **kwargs):
22  result = ComponentAccumulator()
23 
24  PRD_TruthMaps = ["RPC_TruthMap","TGC_TruthMap","MDT_TruthMap"]
25  SDOs = ["RPC_SDO","TGC_SDO","MDT_SDO"]
26  CSCSDOs = "CSC_SDO"
27 
28  if flags.Detector.EnablesTGC and flags.Detector.EnableMM:
29  SDOs += ["MM_SDO","sTGC_SDO"]
30  PRD_TruthMaps += ["MM_TruthMap", "STGC_TruthMap"]
31  if not flags.Detector.EnableCSC:
32  CSCSDOs = ""
33  else:
34  PRD_TruthMaps += ["CSC_TruthMap"]
35 
36  kwargs.setdefault("SDOs", SDOs)
37  kwargs.setdefault("CSCSDOs", CSCSDOs)
38  kwargs.setdefault("PRD_TruthMaps", PRD_TruthMaps)
39 
40  from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCfg
41  kwargs.setdefault("MCTruthClassifier", result.popToolsAndMerge(MCTruthClassifierCfg(flags)))
42 
43  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
44  kwargs.setdefault("Extrapolator", result.popToolsAndMerge(AtlasExtrapolatorCfg(flags)))
45 
46  trackRecords = [item for item in ["CaloEntryLayer", "MuonEntryLayer", "MuonExitLayer"] if item in flags.Input.Collections]
47  kwargs.setdefault("TrackRecordCollectionNames", trackRecords)
48  result.addEventAlgo(CompFactory.Muon.MuonTruthDecorationAlg(name, **kwargs))
49  return result
50 
51 def MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlg", **kwargs):
52  result = ComponentAccumulator()
53  result.addEventAlgo(CompFactory.MuonTruthAssociationAlg(name, **kwargs))
54  return result
55 
56 def MuonSegmentTruthAssociationAlgCfg(flags, name="MuonSegmentTruthAssociationAlg", **kwargs):
57  result = ComponentAccumulator()
58  result.addEventAlgo(CompFactory.Muon.MuonSegmentTruthAssociationAlg(name, **kwargs))
59  return result
MCTruthClassifierConfig.MCTruthClassifierCfg
def MCTruthClassifierCfg(flags, **kwargs)
Definition: MCTruthClassifier/python/MCTruthClassifierConfig.py:8
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
python.MuonTruthAlgsConfig.MuonDetailedTrackTruthMakerCfg
def MuonDetailedTrackTruthMakerCfg(flags, name="MuonDetailedTrackTruthMaker", **kwargs)
Definition: MuonTruthAlgsConfig.py:6
python.MuonTruthAlgsConfig.MuonSegmentTruthAssociationAlgCfg
def MuonSegmentTruthAssociationAlgCfg(flags, name="MuonSegmentTruthAssociationAlg", **kwargs)
Definition: MuonTruthAlgsConfig.py:56
python.MuonTruthAlgsConfig.MuonTruthDecorationAlgCfg
def MuonTruthDecorationAlgCfg(flags, name="MuonTruthDecorationAlg", **kwargs)
Definition: MuonTruthAlgsConfig.py:21
python.MuonTruthAlgsConfig.MuonTruthAssociationAlgCfg
def MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlg", **kwargs)
Definition: MuonTruthAlgsConfig.py:51