ATLAS Offline Software
Loading...
Searching...
No Matches
TRTCalibToolsConfig.py
Go to the documentation of this file.
1"""
2Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3"""
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaConfiguration.ComponentFactory import CompFactory
6
7
8# Tool to write a track-tuple with TRT hit info
9def FillAlignTrkInfoCfg(flags,name='FillAlignTrkInfo',**kwargs) :
10 acc = ComponentAccumulator()
11
12 from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
13 kwargs.setdefault("TrackSummaryTool", acc.popToolsAndMerge(InDetTrackSummaryToolCfg(flags)))
14
15 acc.setPrivateTools(CompFactory.FillAlignTrkInfo(name, **kwargs))
16 return acc
17
18
19# Tool to write a hit-tuple with R-t info
20def FillAlignTRTHitsCfg(flags,name='FillAlignTRTHits',**kwargs) :
21 acc = ComponentAccumulator()
22
23 kwargs.setdefault("minTimebinsOverThreshold", 0)
24
25 if "TRTCalDbTool" not in kwargs:
26 from TRT_ConditionsServices.TRT_ConditionsServicesConfig import (
27 TRT_CalDbToolCfg)
28 kwargs.setdefault("TRTCalDbTool", acc.popToolsAndMerge(
29 TRT_CalDbToolCfg(flags)))
30
31 if "TRTStrawSummaryTool" not in kwargs:
32 from TRT_ConditionsServices.TRT_ConditionsServicesConfig import (
33 TRT_StrawStatusSummaryToolCfg)
34 kwargs.setdefault("TRTStrawSummaryTool", acc.popToolsAndMerge(
35 TRT_StrawStatusSummaryToolCfg(flags)))
36
37 if "NeighbourSvc" not in kwargs:
38 from TRT_ConditionsServices.TRT_ConditionsServicesConfig import (
39 TRT_StrawNeighbourSvcCfg)
40 kwargs.setdefault("NeighbourSvc", acc.getPrimaryAndMerge(
41 TRT_StrawNeighbourSvcCfg(flags)))
42
43 if "TRTDriftFunctionTool" not in kwargs:
44 from InDetConfig.TRT_DriftFunctionToolConfig import (
45 TRT_DriftFunctionToolCfg)
46 kwargs.setdefault("TRTDriftFunctionTool", acc.popToolsAndMerge(
47 TRT_DriftFunctionToolCfg(flags)))
48
49 if flags.Output.HISTFileName:
50 kwargs.setdefault("NtupleName", flags.Output.HISTFileName)
51
52 acc.setPrivateTools(CompFactory.FillAlignTRTHits(name, **kwargs))
53
54 return acc
55
56
57# Tool to refit tracks
58def FitToolCfg(flags, name = "FitToolCfg" ,**kwargs):
59 acc = ComponentAccumulator()
60 acc.setPrivateTools(CompFactory.FitTool(name, **kwargs))
61 return acc
FillAlignTrkInfoCfg(flags, name='FillAlignTrkInfo', **kwargs)
FillAlignTRTHitsCfg(flags, name='FillAlignTRTHits', **kwargs)
FitToolCfg(flags, name="FitToolCfg", **kwargs)