3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import BeamType
9 from collections
import namedtuple
11 driftTimes = namedtuple(
12 "driftTimes", (
"LowGate",
"HighGate",
"LowGateArgon",
"HighGateArgon"))
13 if flags.Beam.Type
is BeamType.Cosmics:
14 return driftTimes(LowGate=19.0*ns,
17 HighGateArgon=44.0*ns)
18 if not flags.Input.isMC:
19 return driftTimes(LowGate=17.1875*ns,
21 LowGateArgon=18.75*ns,
22 HighGateArgon=43.75*ns)
24 return driftTimes(LowGate=14.0625*ns,
26 LowGateArgon=14.0625*ns,
27 HighGateArgon=42.1875*ns)
31 flags, name="InDetTRT_DriftCircleTool", usePhase=False, **kwargs):
32 from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig
import TRTAlignCondAlgCfg
35 if "TRTDriftFunctionTool" not in kwargs:
36 from InDetConfig.TRT_DriftFunctionToolConfig
import (
37 TRT_DriftFunctionToolCfg)
38 kwargs.setdefault(
"TRTDriftFunctionTool", acc.popToolsAndMerge(
41 if "ConditionsSummaryTool" not in kwargs:
42 from TRT_ConditionsServices.TRT_ConditionsServicesConfig
import (
43 TRT_StrawStatusSummaryToolCfg)
44 kwargs.setdefault(
"ConditionsSummaryTool", acc.popToolsAndMerge(
47 kwargs.setdefault(
"UseConditionsStatus",
True)
48 kwargs.setdefault(
"useDriftTimeHTCorrection",
True)
49 kwargs.setdefault(
"useDriftTimeToTCorrection",
True)
53 CompFactory.InDet.TRT_DriftCircleToolCosmics(name, **kwargs))
56 kwargs.setdefault(
"UseConditionsHTStatus",
True)
57 kwargs.setdefault(
"SimpleOutOfTimePileupSupression",
False)
58 kwargs.setdefault(
"SimpleOutOfTimePileupSupressionArgon",
False)
59 kwargs.setdefault(
"RejectIfFirstBit",
False)
60 kwargs.setdefault(
"RejectIfFirstBitArgon",
False)
61 kwargs.setdefault(
"ValidityGateSuppression",
62 flags.Beam.BunchSpacing<=25
and
63 flags.Beam.Type
is BeamType.Collisions)
64 kwargs.setdefault(
"ValidityGateSuppressionArgon",
65 flags.Beam.BunchSpacing<=25
and
66 flags.Beam.Type
is BeamType.Collisions)
69 kwargs.setdefault(
"LowGate", gains.LowGate)
71 kwargs.setdefault(
"LowGateArgon", gains.LowGate)
72 kwargs.setdefault(
"HighGate", gains.HighGate)
73 kwargs.setdefault(
"HighGateArgon", gains.HighGate)
76 MinTrailingEdge = 11.0*ns
77 MaxDriftTime = 60.0*ns
78 kwargs.setdefault(
"MinTrailingEdge", MinTrailingEdge)
79 kwargs.setdefault(
"MinTrailingEdgeArgon", MinTrailingEdge)
80 kwargs.setdefault(
"MaxDriftTime", MaxDriftTime)
81 kwargs.setdefault(
"MaxDriftTimeArgon", MaxDriftTime)
83 acc.setPrivateTools(CompFactory.InDet.TRT_DriftCircleTool(name, **kwargs))
88 flags, name="InDetTRT_NoTime_DriftCircleTool", **kwargs):
91 if "TRTDriftFunctionTool" not in kwargs:
92 from InDetConfig.TRT_DriftFunctionToolConfig
import (
93 TRT_NoTime_DriftFunctionToolCfg)
94 kwargs.setdefault(
"TRTDriftFunctionTool", acc.popToolsAndMerge(
97 acc.setPrivateTools(acc.popToolsAndMerge(
103 flags, name="InDetTRT_Phase_DriftCircleTool", **kwargs):
106 if "TRTDriftFunctionTool" not in kwargs:
107 from InDetConfig.TRT_DriftFunctionToolConfig
import (
108 TRT_Phase_DriftFunctionToolCfg)
109 kwargs.setdefault(
"TRTDriftFunctionTool", acc.popToolsAndMerge(
112 acc.setPrivateTools(acc.popToolsAndMerge(