ATLAS Offline Software
Functions
AFP_SiClusterTools Namespace Reference

Functions

def AFP_SiClusterTools_Cfg (flags, kwargs={})
 
def AFP_SiClusterTools_HLT (flags)
 

Function Documentation

◆ AFP_SiClusterTools_Cfg()

def AFP_SiClusterTools.AFP_SiClusterTools_Cfg (   flags,
  kwargs = {} 
)

Definition at line 14 of file AFP_SiClusterTools.py.

14 def AFP_SiClusterTools_Cfg(flags, kwargs={}):
15 
16  # original tool from Athena
17  # clusterNeighbour = CompFactory.AFPSiClusterBasicNearestNeighbour("AFPSiClusterBasicNearestNeighbour")
18  # it's also possible to get the same clustering tool as in AFPAnalysisToolbox
19  clusterNeighbour = CompFactory.AFPSiClusterAllNeighbours("AFPSiClusterAllNeighbours", neighbourhoodType="X")
20 
21  rowColToLocal = CompFactory.AFPSiRowColToLocalCSTool("AFPSiRowColToLocalCSTool")
22 
23  acc = ComponentAccumulator()
24  if flags.Input.isMC:
25  # if other tags are desired, they can be set also in postExec
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'))
28 
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")
31  else:
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'))
34 
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")
37 
38  # prepare Si cluster reco
39  clusterTool = CompFactory.AFPSiClusterTool("AFPSiClusterTool", clusterAlgTool=clusterNeighbour, rowColToLocalCSTool = rowColToLocal, siLocAlignDBTool=siLocAlignTool, siGlobAlignDBTool=siGlobAlignTool)
40 
41  if flags.Input.Format is Format.POOL:
42  if "AFPSiHitContainer" not in flags.Input.Collections:
43  clusterTool.AFPSiHitsContainerName=""
44  else:
45  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
46  acc.merge(SGInputLoaderCfg(flags,Load={('xAOD::AFPSiHitContainer','StoreGateSvc+AFPSiHitContainer')}))
47 
48  acc.addEventAlgo(CompFactory.AFPSiCluster("AFPSiCluster", clusterRecoTool = clusterTool, **kwargs))
49 
50  return acc
51 
52 

◆ AFP_SiClusterTools_HLT()

def AFP_SiClusterTools.AFP_SiClusterTools_HLT (   flags)

Definition at line 53 of file AFP_SiClusterTools.py.

53 def AFP_SiClusterTools_HLT(flags):
54 
55  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
56  acc = ComponentAccumulator()
57  acc.merge(AFP_SiClusterTools_Cfg(flags,{"AFPSiHitsClusterContainerKey": recordable("HLT_AFPSiHitsClusterContainer")}))
58 
59 
60  AFP_SiCl = acc.getEventAlgo("AFPSiCluster")
61 
62  from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
63 
64  monTool_AFP_SiClusterTool = GenericMonitoringTool(flags, "MonTool_AFP_SiClusterTool")
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
68 
69  return acc
70 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
AFP_SiClusterTools.AFP_SiClusterTools_HLT
def AFP_SiClusterTools_HLT(flags)
Definition: AFP_SiClusterTools.py:53
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
AFP_SiClusterTools.AFP_SiClusterTools_Cfg
def AFP_SiClusterTools_Cfg(flags, kwargs={})
Definition: AFP_SiClusterTools.py:14
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:30