Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kazuya Mochizuki
athena
Commits
41e106a6
Commit
41e106a6
authored
Oct 21, 2021
by
Jean-Baptiste De Vivie De Regie
Committed by
Vakhtang Tsulaia
Oct 21, 2021
Browse files
Prepare egamma new reco config
parent
2dd5f689
Changes
23
Hide whitespace changes
Inline
Side-by-side
Reconstruction/RecJobTransforms/python/RecoSteering.py
View file @
41e106a6
...
...
@@ -63,22 +63,9 @@ def RecoSteering(flags):
from
eflowRec.PFRun3Config
import
PFCfg
acc
.
merge
(
PFCfg
(
flags
))
# physics objects
# egamma TODO move these fragments to proper place configuring entire egamma - so it can be unit tested
from
egammaAlgs.egammaSelectedTrackCopyConfig
import
egammaSelectedTrackCopyCfg
acc
.
merge
(
egammaSelectedTrackCopyCfg
(
flags
))
from
egammaAlgs.EMBremCollectionBuilderConfig
import
EMBremCollectionBuilderCfg
acc
.
merge
(
EMBremCollectionBuilderCfg
(
flags
))
from
egammaAlgs.EMGSFCaloExtensionBuilderConfig
import
EMGSFCaloExtensionBuilderCfg
acc
.
merge
(
EMGSFCaloExtensionBuilderCfg
(
flags
))
from
egammaAlgs.EMVertexBuilderConfig
import
EMVertexBuilderCfg
acc
.
merge
(
EMVertexBuilderCfg
(
flags
))
# TBC
# from egammaAlgs.egammaRecBuilderConfig import egammaRecBuilderCfg
# acc.merge(egammaRecBuilderCfg(flags))
from
egammaConfig.egammaBuilderConfig
import
EGammaReconstructionCfg
acc
.
merge
(
EGammaReconstructionCfg
(
flags
))
# jets
# btagging
if
tryConfiguringAll
:
...
...
Reconstruction/RecJobTransforms/share/new_jo_raw_reco_aod_digest.ref
View file @
41e106a6
run event nTopo nIdTracks nTauTracks nTaus nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot
327265 186524665 430 416 0 0 0
0 0
0
0
0
0
327265 186525031 451 430 0 0 0
0
0
0
0
0
0
327265 186542447 338 293 0 0 0
0
0
0
0
0
0
327265 186543405 425 320 0 0 0
0
0
0
0
0
0
327265 186548387 537 513 0 0 0
0
0
0
0 0
0
327265 186524665 430 416 0 0 0
1
0
1 12
0
12
327265 186525031 451 430 0 0 0
2
0
2
5
0
5
327265 186542447 338 293 0 0 0
2
0
2
8
0
8
327265 186543405 425 320 0 0 0
1
0
1
9
0
9
327265 186548387 537 513 0 0 0
4
0
4
2
0 0
2
0
Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilderConfig.py
View file @
41e106a6
...
...
@@ -11,20 +11,25 @@ def EMBremCollectionBuilderCfg(flags,
acc
=
ComponentAccumulator
()
# FIXME runtime testing required this, but since this is not a
# direct dependency it should be added elsewhere, but I do not know where yet
# direct dependency it should be added elsewhere,
# but I do not know where yet
if
not
flags
.
Input
.
isMC
:
from
LumiBlockComps.LumiBlockMuWriterConfig
import
LumiBlockMuWriterCfg
acc
.
merge
(
LumiBlockMuWriterCfg
(
flags
))
if
"TrackRefitTool"
not
in
kwargs
:
from
egammaTrackTools.egammaTrackToolsConfig
import
egammaTrkRefitterToolCfg
from
egammaTrackTools.egammaTrackToolsConfig
import
(
egammaTrkRefitterToolCfg
)
kwargs
[
"TrackRefitTool"
]
=
acc
.
popToolsAndMerge
(
egammaTrkRefitterToolCfg
(
flags
))
if
"TrackParticleCreatorTool"
not
in
kwargs
:
from
InDetConfig.TrackRecoConfig
import
TrackParticleCreatorToolCfg
kwargs
[
"TrackParticleCreatorTool"
]
=
acc
.
getPrimaryAndMerge
(
TrackParticleCreatorToolCfg
(
flags
,
name
=
"GSFBuildInDetParticleCreatorTool"
,
BadClusterID
=
3
))
kwargs
[
"TrackParticleCreatorTool"
]
=
acc
.
getPrimaryAndMerge
(
TrackParticleCreatorToolCfg
(
flags
,
name
=
"GSFBuildInDetParticleCreatorTool"
,
BadClusterID
=
3
))
if
"TrackSlimmingTool"
not
in
kwargs
:
slimmingTool
=
CompFactory
.
Trk
.
TrackSlimmingTool
(
...
...
@@ -32,11 +37,13 @@ def EMBremCollectionBuilderCfg(flags,
kwargs
[
"TrackSlimmingTool"
]
=
slimmingTool
if
"TrackSummaryTool"
not
in
kwargs
:
from
egammaTrackTools.egammaTrackToolsConfig
import
GSFTrackSummaryToolCfg
from
egammaTrackTools.egammaTrackToolsConfig
import
(
GSFTrackSummaryToolCfg
)
kwargs
[
"TrackSummaryTool"
]
=
acc
.
popToolsAndMerge
(
GSFTrackSummaryToolCfg
(
flags
))
# TODO configure according to some doPixel, presumably flags.Detector.EnablePixel, same for src
# TODO configure according to some doPixel, presumably
# flags.Detector.EnablePixel, same for src
kwargs
.
setdefault
(
"usePixel"
,
True
)
kwargs
.
setdefault
(
"useSCT"
,
True
)
alg
=
CompFactory
.
EMBremCollectionBuilder
(
name
,
**
kwargs
)
...
...
Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py
View file @
41e106a6
...
...
@@ -9,9 +9,6 @@ from AthenaConfiguration.ComponentFactory import CompFactory
from
AthenaCommon.Logging
import
logging
EMGSFCaloExtensionBuilder
=
CompFactory
.
EMGSFCaloExtensionBuilder
def
EMGSFCaloExtensionBuilderCfg
(
flags
,
name
=
'EMGSFCaloExtensionBuilder'
,
...
...
@@ -22,6 +19,7 @@ def EMGSFCaloExtensionBuilderCfg(
acc
=
ComponentAccumulator
()
# should use egammaCaloExtrapolator for the two below...
if
"PerigeeCaloExtensionTool"
not
in
kwargs
:
perigeeCaloExtrapAcc
=
ParticleCaloExtensionToolCfg
(
flags
,
...
...
@@ -42,8 +40,10 @@ def EMGSFCaloExtensionBuilderCfg(
kwargs
.
setdefault
(
"GFFTrkPartContainerName"
,
flags
.
Egamma
.
Keys
.
Output
.
GSFTrackParticles
)
kwargs
.
setdefault
(
"GSFPerigeeCache"
,
"GSFPerigeeCaloExtension"
)
kwargs
.
setdefault
(
"GSFLastCache"
,
"GSFLastCaloExtension"
)
emgscaloextfAlg
=
EMGSFCaloExtensionBuilder
(
name
,
**
kwargs
)
emgscaloextfAlg
=
CompFactory
.
EMGSFCaloExtensionBuilder
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
emgscaloextfAlg
)
return
acc
...
...
Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py
View file @
41e106a6
...
...
@@ -7,8 +7,6 @@ from AthenaCommon.Logging import logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
egammaTools.egammaOQFlagsBuilderConfig
import
egammaOQFlagsBuilderCfg
EMFourMomBuilder
=
CompFactory
.
EMFourMomBuilder
egammaForwardBuilder
=
CompFactory
.
egammaForwardBuilder
def
egammaForwardBuilderCfg
(
flags
,
name
=
'egammaForwardElectron'
,
**
kwargs
):
...
...
@@ -17,7 +15,6 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs):
mlog
.
info
(
'Starting configuration'
)
acc
=
ComponentAccumulator
()
if
"forwardelectronIsEMselectors"
not
in
kwargs
:
LooseFwdElectronSelector
=
AsgForwardElectronIsEMSelectorCfg
(
flags
,
...
...
@@ -56,9 +53,9 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs):
kwargs
.
setdefault
(
"ClusterContainerName"
,
flags
.
Egamma
.
Keys
.
Output
.
ForwardClusters
)
kwargs
.
setdefault
(
"FourMomBuilderTool"
,
EMFourMomBuilder
())
CompFactory
.
EMFourMomBuilder
())
fwdAlg
=
egammaForwardBuilder
(
name
,
**
kwargs
)
fwdAlg
=
CompFactory
.
egammaForwardBuilder
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
fwdAlg
)
return
acc
Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py
View file @
41e106a6
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
__doc__
=
"""
Configure egammaLargeClusterMaker,
Configure egammaLargeClusterMaker,
which chooses cells to store in the AOD"""
__author__
=
"Jovan Mitrevski"
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
egammaTools.egammaLargeClusterMakerConfig
import
egammaLargeClusterMakerCfg
from
egammaTools.egammaLargeClusterMakerConfig
import
(
egammaLargeClusterMakerCfg
)
from
CaloClusterCorrection.CaloSwCorrections
import
make_CaloSwCorrections
CaloClusterMaker
=
CompFactory
.
CaloClusterMaker
def
egammaLargeClusterMakerAlgCfg
(
...
...
@@ -28,11 +28,13 @@ def egammaLargeClusterMakerAlgCfg(
kwargs
[
"ClusterMakerTools"
]
=
[
toolAcc
.
popPrivateTools
()]
acc
.
merge
(
toolAcc
)
kwargs
.
setdefault
(
"ClusterCorrectionTools"
,
make_CaloSwCorrections
(
"ele7_11"
,
suffix
=
"Nocorr"
,
version
=
"none"
,
cells_name
=
flags
.
Egamma
.
Keys
.
Input
.
CaloCells
))
kwargs
.
setdefault
(
"ClusterCorrectionTools"
,
make_CaloSwCorrections
(
"ele7_11"
,
suffix
=
"Nocorr"
,
version
=
"none"
,
cells_name
=
flags
.
Egamma
.
Keys
.
Input
.
CaloCells
))
acc
.
addEventAlgo
(
CaloClusterMaker
(
name
,
**
kwargs
))
acc
.
addEventAlgo
(
CompFactory
.
CaloClusterMaker
(
name
,
**
kwargs
))
return
acc
Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
View file @
41e106a6
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
__doc__
=
"Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD"
__doc__
=
"""Configure egammaLargeFWDClusterMaker,
which chooses cells to store in the AOD"""
__author__
=
"Jovan Mitrevski"
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
egammaTools.egammaLargeFWDClusterMakerConfig
import
egammaLargeFWDClusterMakerCfg
from
egammaTools.egammaLargeFWDClusterMakerConfig
import
(
egammaLargeFWDClusterMakerCfg
)
from
CaloClusterCorrection.CaloSwCorrections
import
make_CaloSwCorrections
CaloClusterMaker
=
CompFactory
.
CaloClusterMaker
def
egammaLargeFWDClusterMakerAlgCfg
(
...
...
@@ -26,11 +27,13 @@ def egammaLargeFWDClusterMakerAlgCfg(
kwargs
[
"ClusterMakerTools"
]
=
[
toolAcc
.
popPrivateTools
()]
acc
.
merge
(
toolAcc
)
kwargs
.
setdefault
(
"ClusterCorrectionTools"
,
make_CaloSwCorrections
(
"FWDele6_6"
,
suffix
=
"Nocorr"
,
version
=
"none"
,
cells_name
=
flags
.
Egamma
.
Keys
.
Input
.
CaloCells
))
kwargs
.
setdefault
(
"ClusterCorrectionTools"
,
make_CaloSwCorrections
(
"FWDele6_6"
,
suffix
=
"Nocorr"
,
version
=
"none"
,
cells_name
=
flags
.
Egamma
.
Keys
.
Input
.
CaloCells
))
acc
.
addEventAlgo
(
CaloClusterMaker
(
name
,
**
kwargs
))
acc
.
addEventAlgo
(
CompFactory
.
CaloClusterMaker
(
name
,
**
kwargs
))
return
acc
Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py
View file @
41e106a6
...
...
@@ -9,7 +9,6 @@ from AthenaConfiguration.ComponentFactory import CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
egammaTools.EMTrackMatchBuilderConfig
import
EMTrackMatchBuilderCfg
from
egammaTools.EMConversionBuilderConfig
import
EMConversionBuilderCfg
egammaRecBuilder
=
CompFactory
.
egammaRecBuilder
def
egammaRecBuilderCfg
(
...
...
@@ -21,6 +20,7 @@ def egammaRecBuilderCfg(
mlog
.
debug
(
'Start configuration'
)
acc
=
ComponentAccumulator
()
if
"TrackMatchBuilderTool"
not
in
kwargs
:
emtrkmatch
=
EMTrackMatchBuilderCfg
(
flags
)
kwargs
[
"TrackMatchBuilderTool"
]
=
acc
.
popToolsAndMerge
(
emtrkmatch
)
...
...
@@ -36,7 +36,7 @@ def egammaRecBuilderCfg(
"InputClusterContainerName"
,
flags
.
Egamma
.
Keys
.
Internal
.
EgammaTopoClusters
)
egrecAlg
=
egammaRecBuilder
(
name
,
**
kwargs
)
egrecAlg
=
CompFactory
.
egammaRecBuilder
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
egrecAlg
)
return
acc
...
...
Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py
View file @
41e106a6
...
...
@@ -2,12 +2,11 @@
__doc__
=
"Instantiate egammaSelectedTrackCopy with default configuration"
from
egammaTrackTools.egammaTrackToolsConfig
import
EMExtrapolationToolsCfg
from
egammaTrackTools.egammaTrackToolsConfig
import
(
EMExtrapolationToolsCfg
,
EMExtrapolationToolsCommonCacheCfg
)
from
AthenaCommon.Logging
import
logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
egammaCaloClusterSelector
=
CompFactory
.
egammaCaloClusterSelector
egammaSelectedTrackCopy
=
CompFactory
.
egammaSelectedTrackCopy
def
egammaSelectedTrackCopyCfg
(
...
...
@@ -21,7 +20,7 @@ def egammaSelectedTrackCopyCfg(
acc
=
ComponentAccumulator
()
if
"egammaCaloClusterSelector"
not
in
kwargs
:
egammaCaloClusterGSFSelector
=
egammaCaloClusterSelector
(
egammaCaloClusterGSFSelector
=
CompFactory
.
egammaCaloClusterSelector
(
name
=
'caloClusterGSFSelector'
,
EMEtCut
=
2250.
,
EMEtSplittingFraction
=
0.7
,
...
...
@@ -35,10 +34,8 @@ def egammaSelectedTrackCopyCfg(
kwargs
[
"ExtrapolationTool"
]
=
acc
.
popToolsAndMerge
(
extraptool
)
if
"ExtrapolationToolCommonCache"
not
in
kwargs
:
from
egammaTrackTools.egammaTrackToolsConfig
import
(
EMExtrapolationToolsCacheCfg
)
kwargs
[
"ExtrapolationToolCommonCache"
]
=
acc
.
popToolsAndMerge
(
EMExtrapolationToolsCacheCfg
(
flags
))
EMExtrapolationToolsC
ommonC
acheCfg
(
flags
))
kwargs
.
setdefault
(
"ClusterContainerName"
,
...
...
@@ -47,7 +44,7 @@ def egammaSelectedTrackCopyCfg(
"TrackParticleContainerName"
,
flags
.
Egamma
.
Keys
.
Input
.
TrackParticles
)
egseltrkcpAlg
=
egammaSelectedTrackCopy
(
name
,
**
kwargs
)
egseltrkcpAlg
=
CompFactory
.
egammaSelectedTrackCopy
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
egseltrkcpAlg
)
return
acc
...
...
Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py
View file @
41e106a6
...
...
@@ -11,12 +11,11 @@ from egammaTools.EMTrackMatchBuilderConfig import EMTrackMatchBuilderCfg
from
egammaTools.EMConversionBuilderConfig
import
EMConversionBuilderCfg
from
egammaTools.egammaSwToolConfig
import
egammaSwToolCfg
from
egammaMVACalib.egammaMVACalibConfig
import
egammaMVASvcCfg
from
egammaCaloTools.egammaCaloToolsConf
import
egammaCheckEnergyDepositTool
def
electronSuperClusterBuilderCfg
(
flags
,
name
=
'electronSuperClusterBuilder'
,
**
kwargs
):
electronSuperClusterBuilder
=
CompFactory
.
electronSuperClusterBuilder
def
electronSuperClusterBuilderCfg
(
flags
,
name
=
'electronSuperClusterBuilder'
,
**
kwargs
):
mlog
=
logging
.
getLogger
(
name
)
mlog
.
debug
(
'Start configuration'
)
...
...
@@ -43,10 +42,10 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', **
flags
.
Egamma
.
Keys
.
Internal
.
ElectronSuperRecs
)
kwargs
.
setdefault
(
"egammaCheckEnergyDepositTool"
,
egammaCheckEnergyDepositTool
())
CompFactory
.
egammaCheckEnergyDepositTool
())
kwargs
.
setdefault
(
"EtThresholdCut"
,
1000
)
print
(
kwargs
)
elscAlg
=
electronSuperClusterBuilder
(
name
,
**
kwargs
)
elscAlg
=
CompFactory
.
electronSuperClusterBuilder
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
elscAlg
)
return
acc
...
...
@@ -57,12 +56,12 @@ def photonSuperClusterBuilderCfg(
name
=
'photonSuperClusterBuilder'
,
**
kwargs
):
photonSuperClusterBuilder
=
CompFactory
.
photonSuperClusterBuilder
mlog
=
logging
.
getLogger
(
name
)
mlog
.
debug
(
'Start configuration'
)
acc
=
ComponentAccumulator
()
photonSuperClusterBuilder
=
CompFactory
.
photonSuperClusterBuilder
egammaCheckEnergyDepositTool
=
CompFactory
.
egammaCheckEnergyDepositTool
if
"ConversionBuilderTool"
not
in
kwargs
:
emcnv
=
EMConversionBuilderCfg
(
flags
)
...
...
Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py
View file @
41e106a6
...
...
@@ -5,7 +5,6 @@ __doc__ = "Instantiate egammaTopoClusterCopier with default configuration"
from
AthenaCommon.Logging
import
logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
egammaTopoClusterCopier
=
CompFactory
.
egammaTopoClusterCopier
def
egammaTopoClusterCopierCfg
(
...
...
@@ -17,7 +16,6 @@ def egammaTopoClusterCopierCfg(
mlog
.
info
(
'Starting configuration'
)
acc
=
ComponentAccumulator
()
kwargs
.
setdefault
(
"InputTopoCollection"
,
flags
.
Egamma
.
Keys
.
Input
.
TopoClusters
)
...
...
@@ -30,7 +28,7 @@ def egammaTopoClusterCopierCfg(
"OutputTopoCollectionShallow"
,
"tmp_"
+
egtopocluster
)
egcopierAlg
=
egammaTopoClusterCopier
(
name
,
**
kwargs
)
egcopierAlg
=
CompFactory
.
egammaTopoClusterCopier
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
egcopierAlg
)
return
acc
...
...
Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py
View file @
41e106a6
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from
MCTruthClassifier.MCTruthClassifierConfig
import
MCTruthClassifierCaloTruthMatchCfg
from
MCTruthClassifier.MCTruthClassifierConfig
import
(
MCTruthClassifierCaloTruthMatchCfg
)
__doc__
=
"Configure egammaTruthAssociation"
from
AthenaCommon.Logging
import
logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
egammaTruthAssociationAlg
=
CompFactory
.
egammaTruthAssociationAlg
def
egammaTruthAssociationCfg
(
flags
,
name
=
'egammaTruthAssociation'
,
**
kwargs
):
...
...
@@ -48,7 +48,7 @@ def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs):
kwargs
.
setdefault
(
"SimBarcodeOffset"
,
flags
.
Sim
.
SimBarcodeOffset
)
egtruthAlg
=
egammaTruthAssociationAlg
(
name
,
**
kwargs
)
egtruthAlg
=
CompFactory
.
egammaTruthAssociationAlg
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
egtruthAlg
)
return
acc
Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py
View file @
41e106a6
...
...
@@ -8,8 +8,12 @@ __doc__ = """
from
AthenaCommon.Logging
import
logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
xAODEgammaBuilder
=
CompFactory
.
xAODEgammaBuilder
EGammaAmbiguityTool
=
CompFactory
.
EGammaAmbiguityTool
from
egammaTools.EMClusterToolConfig
import
EMClusterToolCfg
from
egammaTools.EMShowerBuilderConfig
import
EMShowerBuilderCfg
from
egammaTools.egammaOQFlagsBuilderConfig
import
egammaOQFlagsBuilderCfg
from
egammaTools.EMPIDBuilderConfig
import
(
EMPIDBuilderElectronCfg
,
EMPIDBuilderPhotonCfg
)
def
topoEgammaBuilderCfg
(
flags
,
name
=
'topoEgammaBuilder'
,
**
kwargs
):
...
...
@@ -18,6 +22,21 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
mlog
.
info
(
'Starting configuration'
)
acc
=
ComponentAccumulator
()
if
"EMClusterTool"
not
in
kwargs
:
emclustool
=
EMClusterToolCfg
(
flags
)
kwargs
[
"EMClusterTool"
]
=
acc
.
popToolsAndMerge
(
emclustool
)
if
"EMShowerBuilder"
not
in
kwargs
:
emshowerbuilder
=
EMShowerBuilderCfg
(
flags
)
kwargs
[
"EMShowerTool"
]
=
acc
.
popToolsAndMerge
(
emshowerbuilder
)
if
"ObjectQualityTool"
not
in
kwargs
:
oqtool
=
egammaOQFlagsBuilderCfg
(
flags
)
kwargs
[
"ObjectQualityTool"
]
=
acc
.
popToolsAndMerge
(
oqtool
)
egammaTools
=
[
CompFactory
.
EMFourMomBuilder
()]
eleTools
=
[
acc
.
popToolsAndMerge
(
EMPIDBuilderElectronCfg
(
flags
))]
phoTools
=
[
acc
.
popToolsAndMerge
(
EMPIDBuilderPhotonCfg
(
flags
))]
kwargs
.
setdefault
(
"InputElectronRecCollectionName"
,
...
...
@@ -33,13 +52,22 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
flags
.
Egamma
.
Keys
.
Output
.
Photons
)
kwargs
.
setdefault
(
"AmbiguityTool"
,
EGammaAmbiguityTool
())
CompFactory
.
EGammaAmbiguityTool
())
kwargs
.
setdefault
(
"egammaTools"
,
egammaTools
)
kwargs
.
setdefault
(
"ElectronTools"
,
eleTools
)
kwargs
.
setdefault
(
"PhotonTools"
,
phoTools
)
kwargs
.
setdefault
(
"isTruth"
,
flags
.
Input
.
isMC
)
topoegAlg
=
xAODEgammaBuilder
(
name
,
**
kwargs
)
topoegAlg
=
CompFactory
.
xAODEgammaBuilder
(
name
,
**
kwargs
)
acc
.
addEventAlgo
(
topoegAlg
)
return
acc
...
...
Reconstruction/egamma/egammaConfig/python/egammaBuilderConfig.py
0 → 100644
View file @
41e106a6
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
__doc__
=
"""
Instantiate the full EGamma reconstruction.
egammaTopoClusterCopier is scheduled in TrackRecoConfig
"""
from
AthenaCommon.Logging
import
logging
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
def
EGammaReconstructionCfg
(
flags
,
name
=
"EGammaReconstruction"
):
mlog
=
logging
.
getLogger
(
name
)
mlog
.
info
(
'Starting EGamma reconstruction configuration'
)
acc
=
ComponentAccumulator
()
from
egammaAlgs.egammaSelectedTrackCopyConfig
import
(
egammaSelectedTrackCopyCfg
)
acc
.
merge
(
egammaSelectedTrackCopyCfg
(
flags
))
from
egammaAlgs.EMBremCollectionBuilderConfig
import
(
EMBremCollectionBuilderCfg
)
acc
.
merge
(
EMBremCollectionBuilderCfg
(
flags
))
from
egammaAlgs.EMGSFCaloExtensionBuilderConfig
import
(
EMGSFCaloExtensionBuilderCfg
)
acc
.
merge
(
EMGSFCaloExtensionBuilderCfg
(
flags
))
from
egammaAlgs.EMVertexBuilderConfig
import
EMVertexBuilderCfg
acc
.
merge
(
EMVertexBuilderCfg
(
flags
))
from
egammaAlgs.egammaRecBuilderConfig
import
egammaRecBuilderCfg
acc
.
merge
(
egammaRecBuilderCfg
(
flags
))
from
egammaAlgs.egammaSuperClusterBuilderConfig
import
(
electronSuperClusterBuilderCfg
,
photonSuperClusterBuilderCfg
)
acc
.
merge
(
electronSuperClusterBuilderCfg
(
flags
))
acc
.
merge
(
photonSuperClusterBuilderCfg
(
flags
))
from
egammaAlgs.topoEgammaBuilderConfig
import
topoEgammaBuilderCfg
acc
.
merge
(
topoEgammaBuilderCfg
(
flags
))
mlog
.
info
(
"EGamma reconstruction configured"
)
return
acc
Reconstruction/egamma/egammaTools/python/EMClusterToolConfig.py
0 → 100644
View file @
41e106a6
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
__doc__
=
"Configuration for EMClusterTool"
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaCommon.Logging
import
logging
from
egammaMVACalib.egammaMVACalibConfig
import
egammaMVASvcCfg
def
EMClusterToolCfg
(
flags
,
name
=
'EMClusterTool'
,
**
kwargs
):
mlog
=
logging
.
getLogger
(
name
)
mlog
.
debug
(
'Start configuration'
)
acc
=
ComponentAccumulator
()
if
"MVACalibSvc"
not
in
kwargs
:
mvacal
=
egammaMVASvcCfg
(
flags
)
kwargs
[
"MVACalibSvc"
]
=
acc
.
getPrimaryAndMerge
(
mvacal
)
kwargs
.
setdefault
(
"OutputClusterContainerName"
,
flags
.
Egamma
.
Keys
.
Output
.
CaloClusters
)
tool
=
CompFactory
.
EMClusterTool
(
name
,
**
kwargs
)
acc
.
setPrivateTools
(
tool
)
return
acc
if
__name__
==
"__main__"
:
from
AthenaConfiguration.AllConfigFlags
import
ConfigFlags
from
AthenaConfiguration.ComponentAccumulator
import
printProperties
from
AthenaCommon.Configurable
import
Configurable
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
Configurable
.
configurableRun3Behavior
=
True
ConfigFlags
.
Input
.
Files
=
defaultTestFiles
.
RDO
ConfigFlags
.
fillFromArgs
()
ConfigFlags
.
lock
()
ConfigFlags
.
dump
()
cfg
=
ComponentAccumulator
()
mlog
=
logging
.
getLogger
(
"EMClusterToolConfigTest"
)
mlog
.
info
(
"Configuring EMClusterTool: "
)
printProperties
(
mlog
,
cfg
.
popToolsAndMerge
(
EMClusterToolCfg
(
ConfigFlags
)),
nestLevel
=
1
,
printDefaults
=
True
)
f
=
open
(
"emclustertool.pkl"
,
"wb"
)
cfg
.
store
(
f
)
f
.
close
()
Reconstruction/egamma/egammaTools/python/EMConversionBuilderConfig.py
View file @
41e106a6
...
...
@@ -18,8 +18,7 @@ def EMConversionBuilderCfg(flags, name='EMConversionBuilder', **kwargs):
if
"ExtrapolationTool"
not
in
kwargs
:
extraptool
=
EMExtrapolationToolsCfg
(
flags
)
kwargs
[
"ExtrapolationTool"
]
=
extraptool
.
popPrivateTools
()
acc
.
merge
(
extraptool
)
kwargs
[
"ExtrapolationTool"
]
=
extraptool
.
popToolsAndMerge
(
extraptool
)
kwargs
.
setdefault
(
"ConversionContainerName"
,
flags
.
Egamma
.
Keys
.
Output
.
ConversionVertices
)
...
...
Reconstruction/egamma/egammaTools/python/EMPIDBuilderConfig.py
View file @
41e106a6
...
...
@@ -6,7 +6,6 @@ from AthenaCommon.Logging import logging
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
ElectronPhotonSelectorTools.EgammaPIDdefs
import
egammaPID
EMPIDBuilder
=
CompFactory
.
EMPIDBuilder
def
EMPIDBuilderElectronCfg
(
flags
,
name
=
'EMPIDBuilderElectron'
,
**
kwargs
):
...
...
@@ -61,7 +60,7 @@ def EMPIDBuilderElectronCfg(flags, name='EMPIDBuilderElectron', **kwargs):
acc
.
merge
(
MediumLHSelectorAcc
)
acc
.
merge
(
TightLHSelectorAcc
)
tool
=
EMPIDBuilder
(
name
,
**
kwargs
)
tool
=
CompFactory
.
EMPIDBuilder
(
name
,
**
kwargs
)
acc
.
setPrivateTools
(
tool
)
return
acc
...
...
@@ -91,7 +90,7 @@ def EMPIDBuilderPhotonCfg(flags, name='EMPIDBuilderPhoton', **kwargs):
acc
.
merge
(
LoosePhotonSelectorAcc
)
acc
.
merge
(
TightPhotonSelectorAcc
)
tool
=
EMPIDBuilder
(
name
,
**
kwargs
)
tool
=
CompFactory
.
EMPIDBuilder
(
name
,
**
kwargs
)
acc
.
setPrivateTools
(
tool
)
return
acc
...
...
Reconstruction/egamma/egammaTools/python/EMShowerBuilderConfig.py
View file @
41e106a6
...
...
@@ -8,10 +8,6 @@ from AthenaConfiguration.ComponentFactory import CompFactory
from
AthenaCommon.Logging
import
logging