Skip to content
Snippets Groups Projects
Commit 33e1eaf1 authored by scott snyder's avatar scott snyder
Browse files

tauRec: Fix for q220.

Workaround for running in cosmics configuration, where PrimaryVertex
does not exist.

Do not set global scheduler flags from subsystem configuration.

Do not set SGInputLoader.
parent 54e51dfe
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
################################################################################
##
......@@ -86,7 +86,8 @@ class TauRecCoreBuilder ( TauRecConfigured ) :
tools.append(taualgs.getTauAxis())
tools.append(taualgs.getTauTrackFinder(removeDuplicateTracks=(not doMVATrackClassification) ))
if doMVATrackClassification : tools.append(taualgs.getTauTrackClassifier())
tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy'))
if jobproperties.Beam.beamType()!="cosmics":
tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy'))
tools.append(taualgs.getCellVariables())
tools.append(taualgs.getElectronVetoVars())
#
......@@ -271,7 +272,8 @@ class TauRecVariablesProcessor ( TauRecConfigured ) :
#these tools need pantau info
tools.append(taualgs.getCombinedP4FromRecoTaus())
tools.append(taualgs.getMvaTESVariableDecorator())
if jobproperties.Beam.beamType()!="cosmics":
tools.append(taualgs.getMvaTESVariableDecorator())
tools.append(taualgs.getMvaTESEvaluator())
if tauFlags.doRunTauDiscriminant():
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
################################################################################
##
......@@ -14,6 +14,7 @@
################################################################################
from RecExConfig.Configured import Configured
from AthenaCommon.BeamFlags import jobproperties
from AthenaCommon.SystemOfUnits import *
################################################################################
......@@ -58,35 +59,27 @@ class TauRecConfigured ( Configured ) :
topSequence = AlgSequence()
from AthenaCommon.AlgScheduler import AlgScheduler
AlgScheduler.ShowDataDependencies(True)
AlgScheduler.ShowControlFlow(True)
from SGComps.SGCompsConf import SGInputLoader
topSequence += SGInputLoader()
topSequence.SGInputLoader.Load = [ ('xAOD::JetContainer','AntiKt4LCTopoJets'), ('xAOD::VertexContainer', 'PrimaryVertices'),
('xAOD::TrackParticleContainer','InDetTrackParticles'), ('CaloCellContainer','AllCalo') ]
# Can I move this to different script?
from AthenaCommon.AppMgr import ToolSvc
from JetRec.JetRecConf import JetAlgorithm
jetTrackAlg = JetAlgorithm("JetTrackAlg_forTaus")
from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
TauTVATool = TrackVertexAssociationTool(TrackParticleContainer = "InDetTrackParticles",
TrackVertexAssociation="JetTrackVtxAssoc_forTaus",
VertexContainer= "PrimaryVertices",
MaxTransverseDistance = 2.5 *mm,
#MaxLongitudinalDistance = 2 *mm,
MaxZ0SinTheta = 3.0 *mm,
#OutputLevel=2
)
ToolSvc += TauTVATool
jetTrackAlg.Tools = [ TauTVATool ]
topSequence += jetTrackAlg
# import tauRec.TauAlgorithmsHolder as taualgs
# add tauJVF tool to topSequence
# taualgs.setupTauJVFTool
if jobproperties.Beam.beamType()!="cosmics":
# Can I move this to different script?
from AthenaCommon.AppMgr import ToolSvc
from JetRec.JetRecConf import JetAlgorithm
jetTrackAlg = JetAlgorithm("JetTrackAlg_forTaus")
from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
TauTVATool = TrackVertexAssociationTool(TrackParticleContainer = "InDetTrackParticles",
TrackVertexAssociation="JetTrackVtxAssoc_forTaus",
VertexContainer= "PrimaryVertices",
MaxTransverseDistance = 2.5 *mm,
#MaxLongitudinalDistance = 2 *mm,
MaxZ0SinTheta = 3.0 *mm,
#OutputLevel=2
)
ToolSvc += TauTVATool
jetTrackAlg.Tools = [ TauTVATool ]
topSequence += jetTrackAlg
# import tauRec.TauAlgorithmsHolder as taualgs
# add tauJVF tool to topSequence
# taualgs.setupTauJVFTool
topSequence += self.TauProcessorAlgHandle()
......@@ -100,12 +93,6 @@ class TauRecConfigured ( Configured ) :
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from SGComps.SGCompsConf import SGInputLoader
# not needed? There by default now?
topSequence += SGInputLoader(OutputLevel=INFO)
topSequence.SGInputLoader.Load = [ ('xAOD::JetContainer','AntiKt4LCTopoJets'), ('xAOD::VertexContainer', 'PrimaryVertices'),
('xAOD::TrackParticleContainer','InDetTrackParticles'), ('CaloCellContainer','AllCalo') ]
topSequence += self.TauProcessorAlgHandle()
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
################################################################################
##
......@@ -101,8 +101,9 @@ class TauRecRunner ( TauRecRunConfigured ) :
# these tools need pantau info
tools.append(taualgs.getCombinedP4FromRecoTaus())
tools.append(taualgs.getMvaTESVariableDecorator())
tools.append(taualgs.getMvaTESEvaluator())
if jobproperties.Beam.beamType()!="cosmics":
tools.append(taualgs.getMvaTESVariableDecorator())
tools.append(taualgs.getMvaTESEvaluator())
if tauFlags.doRunTauDiscriminant():
tools.append(taualgs.getTauIDVarCalculator())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment