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
19 clusterNeighbour = CompFactory.AFPSiClusterAllNeighbours(
"AFPSiClusterAllNeighbours", neighbourhoodType=
"X")
21 rowColToLocal = CompFactory.AFPSiRowColToLocalCSTool(
"AFPSiRowColToLocalCSTool")
26 acc.merge(
addFolders(flags,
"/FWD/AFP/Align/Local<tag>AFPMCAlignLoc-ideal-01</tag>",
'FWD_OFL', className=
'CondAttrListCollection', db=
'OFLP200'))
27 acc.merge(
addFolders(flags,
"/FWD/AFP/Align/Global<tag>AFPMCAlignGlob-ideal-01</tag>",
'FWD_OFL', className=
'CondAttrListCollection', db=
'OFLP200'))
29 siLocAlignTool = CompFactory.getComp(
"AFP::SiLocAlignDBTool")(
"SiLocAlignDBTool", loc_align_key=
"/FWD/AFP/Align/Local")
30 siGlobAlignTool = CompFactory.getComp(
"AFP::SiGlobAlignDBTool")(
"SiGlobAlignDBTool",glob_align_key=
"/FWD/AFP/Align/Global")
32 acc.merge(
addFolders(flags,
"/FWD/Onl/AFP/Align/Local<tag>AFPAlignLoc-03</tag>",
'FWD_ONL', className=
'CondAttrListCollection', db=
'CONDBR2'))
33 acc.merge(
addFolders(flags,
"/FWD/Onl/AFP/Align/Global<tag>AFPAlignGlob-03</tag>",
'FWD_ONL', className=
'CondAttrListCollection', db=
'CONDBR2'))
35 siLocAlignTool = CompFactory.getComp(
"AFP::SiLocAlignDBTool")(
"SiLocAlignDBTool", loc_align_key=
"/FWD/Onl/AFP/Align/Local")
36 siGlobAlignTool = CompFactory.getComp(
"AFP::SiGlobAlignDBTool")(
"SiGlobAlignDBTool",glob_align_key=
"/FWD/Onl/AFP/Align/Global")
39 clusterTool = CompFactory.AFPSiClusterTool(
"AFPSiClusterTool", clusterAlgTool=clusterNeighbour, rowColToLocalCSTool = rowColToLocal, siLocAlignDBTool=siLocAlignTool, siGlobAlignDBTool=siGlobAlignTool)
41 if flags.Input.Format
is Format.POOL:
42 if "AFPSiHitContainer" not in flags.Input.Collections:
43 clusterTool.AFPSiHitsContainerName=
""
45 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
46 acc.merge(
SGInputLoaderCfg(flags,Load={(
'xAOD::AFPSiHitContainer',
'StoreGateSvc+AFPSiHitContainer')}))
48 acc.addEventAlgo(CompFactory.AFPSiCluster(
"AFPSiCluster", clusterRecoTool = clusterTool, **kwargs))
55 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
60 AFP_SiCl = acc.getEventAlgo(
"AFPSiCluster")
62 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
65 monTool_AFP_SiClusterTool.defineHistogram(
'HitsSize', path=
'EXPERT', type=
'TH1F', title=
'SID hits size',xbins=50, xmin=0, xmax=50 )
66 monTool_AFP_SiClusterTool.defineHistogram(
'ClusterSize', path=
'EXPERT', type=
'TH1F', title=
'SID cluster size',xbins=50, xmin=0, xmax=50 )
67 AFP_SiCl.clusterRecoTool.MonTool = monTool_AFP_SiClusterTool