13def AFP_VertexReco_Cfg(flags, kwargs={}):
14
15 acc = ComponentAccumulator()
16
17 if flags.Input.isMC:
18 acc.merge(addFolders(flags, "/FWD/AFP/ToFParameters/Vertex<tag>AFPMCToFVtx-ideal-01</tag>", 'FWD_OFL', className='CondAttrListCollection', db='OFLP200'))
19 tofVtxParamTool = CompFactory.getComp("AFP::ToFVtxParamDBTool")("ToFVtxParamDBTool", vtx_param_key="/FWD/AFP/ToFParameters/Vertex")
20 else:
21 acc.merge(addFolders(flags, "/FWD/Onl/AFP/ToFParameters/Vertex<tag>AFPToFVtx-01</tag>", 'FWD_ONL', className='CondAttrListCollection', db='CONDBR2'))
22 tofVtxParamTool = CompFactory.getComp("AFP::ToFVtxParamDBTool")("ToFVtxParamDBTool", vtx_param_key="/FWD/Onl/AFP/ToFParameters/Vertex")
23
24 afpVertexRecoTool = CompFactory.AFP_VertexRecoBasic("AFP_VertexRecoBasic", TrackDistance=0.5, tofVtxParamDBTool=tofVtxParamTool, **kwargs)
25
26 verticesToolsList=[afpVertexRecoTool]
27
28
29 outputVertexList=[]
30 for vertexTool in verticesToolsList:
31 contName=getattr(vertexTool, "verticesContainerName", vertexTool.getDefaultProperty("verticesContainerName"))
32 if contName not in outputVertexList:
33 outputVertexList.append(contName)
34
35
36 vertexRecoTool = CompFactory.AFP_VertexRecoTool("AFP_VertexRecoTool", RecoToolsList=verticesToolsList, AFPVertexContainerList=outputVertexList )
37
38
39 acc.addEventAlgo(CompFactory.AFP_VertexReco("AFP_VertexReco", recoTool = vertexRecoTool))
40
41 return acc
42
43