3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import BeamType
6 from MuonConfig.MuonCalibrationConfig
import MdtCalibrationToolCfg
12 __mdtCalibWindows = [
'User',
20 """Returns index number corresponding to the calibration window name.
21 This will throw a ValueError if name is not in the list.
23 return __mdtCalibWindows.index(name)
28 muon_cluster_creator=acc.getPrimary()
30 kwargs.setdefault(
"ClusterCreator", muon_cluster_creator)
31 result.setPrivateTools(CompFactory.Muon.TriggerChamberClusterOnTrackCreator(name, **kwargs))
35 from MuonConfig.MuonSegmentFindingConfig
import QratCscClusterFitterCfg, CscClusterUtilToolCfg, CalibCscStripFitterCfg
39 qrat = acc.popPrivateTools()
41 kwargs.setdefault(
"CscClusterFitter", qrat )
44 strip_fitter = acc.popPrivateTools()
46 kwargs.setdefault(
"CscStripFitter", strip_fitter)
49 cluster_util_tool = acc.popPrivateTools()
50 kwargs.setdefault(
"CscClusterUtilTool", cluster_util_tool )
53 if not flags.Input.isMC:
55 kwargs.setdefault(
"ErrorScalerBeta", 0.070 )
57 result.setPrivateTools(CompFactory.Muon.CscClusterOnTrackCreator(name,**kwargs))
63 kwargs.setdefault(
"DoMagneticFieldCorrection", flags.Muon.Calib.correctMdtRtForBField)
65 kwargs.setdefault(
"DoSlewingCorrection", flags.Muon.Calib.correctMdtRtForTimeSlewing)
66 if flags.Beam.Type
in [BeamType.Cosmics, BeamType.SingleBeam]:
67 kwargs.setdefault(
"DoTofCorrection",
False)
69 kwargs.setdefault(
"DoTofCorrection",
True)
75 if flags.Beam.Type
in [BeamType.Cosmics, BeamType.SingleBeam]:
76 kwargs.setdefault(
"DoFixedError",
True)
77 kwargs.setdefault(
"TimingMode", 1)
78 kwargs.setdefault(
"UseParametrisedError",
True)
79 kwargs.setdefault(
"ApplyToF",
False)
82 kwargs.setdefault(
"UseParametrisedError",
False)
83 kwargs.setdefault(
"DoFixedError",
False)
84 kwargs.setdefault(
"DoErrorScaling",
False)
86 if not flags.Input.isMC :
87 kwargs.setdefault(
"CreateTubeHit",
True)
88 kwargs.setdefault(
"UseLooseErrors", flags.Muon.useLooseErrorTuning)
91 kwargs.setdefault(
"IsMC", flags.Input.isMC)
93 result.setPrivateTools(CompFactory.Muon.MdtDriftCircleOnTrackCreator(name, WasConfigured=
True, **kwargs))
98 if not flags.Input.isMC:
100 kwargs.setdefault(
"DoFixedErrorTgcEta",
True)
101 kwargs.setdefault(
"FixedErrorTgcEta", 15.)
103 kwargs.setdefault(
"DoFixedErrorTgcEta",
False)
105 if flags.Detector.EnablesTGC
or flags.Detector.EnableMM:
106 from MuonConfig.MuonCalibrationConfig
import NSWCalibToolCfg
107 kwargs.setdefault(
"NSWCalibTool", result.popToolsAndMerge(
NSWCalibToolCfg(flags)))
109 from MuonConfig.MuonConfigFlags
import MMClusterBuilderEnum
110 if flags.Muon.MMClusterCalibRecoTool == MMClusterBuilderEnum.Centroid:
111 from MuonConfig.MuonRecToolsConfig
import SimpleMMClusterBuilderToolCfg
113 elif flags.Muon.MMClusterCalibRecoTool == MMClusterBuilderEnum.ClusterTimeProjection:
114 from MuonConfig.MuonRecToolsConfig
import ClusterTimeProjectionMMClusterBuilderToolCfg
117 muon_cluster_rot_creator = CompFactory.Muon.MuonClusterOnTrackCreator(name, **kwargs)
118 result.setPrivateTools(muon_cluster_rot_creator)