ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
AFP
AFP_Reconstruction
AFP_SiClusterTools
python
AFP_SiClusterTools.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
#==============================================================
4
# Job options file for the AFP_SiClusterTools package
5
#==============================================================
6
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
12
13
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"
,
'FWD_ONL'
, className=
'CondAttrListCollection'
, db=
'CONDBR2'
))
33
acc.merge(addFolders(flags,
"/FWD/Onl/AFP/Align/Global"
,
'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
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
GenericMonitoringTool
Definition
GenericMonitoringTool.h:51
AFP_SiClusterTools.AFP_SiClusterTools_HLT
AFP_SiClusterTools_HLT(flags)
Definition
AFP_SiClusterTools.py:53
AFP_SiClusterTools.AFP_SiClusterTools_Cfg
AFP_SiClusterTools_Cfg(flags, kwargs={})
Definition
AFP_SiClusterTools.py:14
Generated on
for ATLAS Offline Software by
1.17.0