7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import Format
10 from IOVDbSvc.IOVDbSvcConfig
import addFolders
11 from TrigEDMConfig.TriggerEDM
import recordable
16 kalmanTool0 = CompFactory.AFPSiDBasicKalmanTool(
"AFPSiDBasicKalmanTool0", stationID=0, **kwargs)
27 kalmanTool1 = CompFactory.AFPSiDBasicKalmanTool(
"AFPSiDBasicKalmanTool1", stationID=1, **kwargs)
28 kalmanTool2 = CompFactory.AFPSiDBasicKalmanTool(
"AFPSiDBasicKalmanTool2", stationID=2, **kwargs)
29 kalmanTool3 = CompFactory.AFPSiDBasicKalmanTool(
"AFPSiDBasicKalmanTool3", stationID=3, **kwargs)
37 kalmanToolsList=[kalmanTool0, kalmanTool1, kalmanTool2, kalmanTool3]
41 for kalmanTool
in kalmanToolsList:
44 contName=kalmanTool.tracksContainerName
45 except AttributeError:
47 contName=kalmanTool.getDefaultProperty(
"tracksContainerName")
48 if contName
not in outputKalmanList:
49 outputKalmanList.append(contName)
52 trackRecoTool = CompFactory.AFP_SIDLocRecoTool(
"AFP_SIDLocRecoTool", RecoToolsList=kalmanToolsList, AFPTrackContainerList=outputKalmanList )
56 acc.addEventAlgo(CompFactory.AFP_SIDLocReco(
"AFP_SIDLocReco", recoTool = trackRecoTool))
67 acc.merge(
addFolders(flags,
"/FWD/AFP/ToFParameters/Local<tag>AFPMCToFLoc-ideal-01</tag>",
'FWD_OFL', className=
'CondAttrListCollection', db=
'OFLP200'))
68 tofLocParamTool = CompFactory.getComp(
"AFP::ToFLocParamDBTool")(
"ToFLocParamDBTool", loc_param_key=
"/FWD/AFP/ToFParameters/Local")
70 acc.merge(
addFolders(flags,
"/FWD/Onl/AFP/ToFParameters/Local<tag>AFPToFLoc-01</tag>",
'FWD_ONL', className=
'CondAttrListCollection', db=
'CONDBR2'))
71 tofLocParamTool = CompFactory.getComp(
"AFP::ToFLocParamDBTool")(
"ToFLocParamDBTool", loc_param_key=
"/FWD/Onl/AFP/ToFParameters/Local")
73 basicTool0 = CompFactory.getComp(
"AFPTDBasicTool")(
"AFPTDBasicTool0", stationID=0, tofLocParamDBTool=tofLocParamTool, **kwargs)
74 basicTool3 = CompFactory.getComp(
"AFPTDBasicTool")(
"AFPTDBasicTool3", stationID=3, tofLocParamDBTool=tofLocParamTool, **kwargs)
76 if flags.Input.Format
is Format.POOL:
77 if "AFPToFHitContainer" not in flags.Input.Collections:
78 basicTool0.AFPToFHitContainerKey=
""
79 basicTool3.AFPToFHitContainerKey=
""
81 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
82 acc.merge(
SGInputLoaderCfg(flags, Load={(
'xAOD::AFPToFHitContainer' ,
'StoreGateSvc+AFPToFHitContainer')}))
84 basicToolsList=[basicTool0, basicTool3]
88 for basicTool
in basicToolsList:
89 contName=getattr(basicTool,
"tracksContainerName", basicTool.getDefaultProperty(
"tracksContainerName"))
90 if contName
not in outputBasicList:
91 outputBasicList.append(contName)
94 ToFtrackRecoTool = CompFactory.AFP_TDLocRecoTool(
"AFP_TDLocRecoTool", RecoToolsList=basicToolsList, AFPToFTrackContainerList=outputBasicList )
97 acc.addEventAlgo(CompFactory.AFP_TDLocReco(
"AFP_TDLocReco", recoTool=ToFtrackRecoTool))
103 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
105 acc.merge(
AFP_LocReco_SiD_Cfg(flags, {
"tracksContainerName":
recordable(
"HLT_AFPTrackContainer"),
"AFPSiHitsClusterContainerKey":
"HLT_AFPSiHitsClusterContainer"}))
106 AFP_SID = acc.getEventAlgo(
"AFP_SIDLocReco")
108 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
111 monTool_AFP_SIDLocRecoTool.defineHistogram(
'TrkSize', path=
'EXPERT', type=
'TH1F', title=
'AFP tracks size',xbins=50, xmin=0, xmax=50 )
112 AFP_SID.recoTool.MonTool = monTool_AFP_SIDLocRecoTool
114 for i, kalmanTool
in enumerate(AFP_SID.recoTool.RecoToolsList):
117 monTool_AFP_BasicKalman.defineHistogram(
'TrkStationID', path=
'EXPERT', type=
'TH1F', title=
'Track station ID',xbins=4, xmin=0, xmax=4, cutmask=
'TrkMask' )
118 monTool_AFP_BasicKalman.defineHistogram(
'TrkXLocal', path=
'EXPERT', type=
'TH1F', title=
'Track xLocal',xbins=100, xmin=-200, xmax=200, cutmask=
'TrkMask' )
119 monTool_AFP_BasicKalman.defineHistogram(
'TrkYLocal', path=
'EXPERT', type=
'TH1F', title=
'Track yLocal',xbins=100, xmin=-30, xmax=30, cutmask=
'TrkMask' )
120 monTool_AFP_BasicKalman.defineHistogram(
'TrkZLocal', path=
'EXPERT', type=
'TH1F', title=
'Track zLocal',xbins=100, xmin=-500000, xmax=500000, cutmask=
'TrkMask' )
121 monTool_AFP_BasicKalman.defineHistogram(
'TrkXSlope', path=
'EXPERT', type=
'TH1F', title=
'Track x slope',xbins=100, xmin=-0.5, xmax=0.5, cutmask=
'TrkMask' )
122 monTool_AFP_BasicKalman.defineHistogram(
'TrkYSlope', path=
'EXPERT', type=
'TH1F', title=
'Track y slope',xbins=100, xmin=-0.5, xmax=0.5, cutmask=
'TrkMask' )
123 monTool_AFP_BasicKalman.defineHistogram(
'TrkNClusters', path=
'EXPERT', type=
'TH1F', title=
'Track number of clusters',xbins=100, xmin=0, xmax=100, cutmask=
'TrkMask' )
124 monTool_AFP_BasicKalman.defineHistogram(
'TrkNHoles', path=
'EXPERT', type=
'TH1F', title=
'Track number of holes',xbins=100, xmin=0, xmax=100, cutmask=
'TrkMask' )
125 monTool_AFP_BasicKalman.defineHistogram(
'TrkChi2', path=
'EXPERT', type=
'TH1F', title=
'Track chi2',xbins=50, xmin=0, xmax=10, cutmask=
'TrkMask' )
127 AFP_SID.recoTool.RecoToolsList[i].MonTool = monTool_AFP_BasicKalman
132 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator