diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h index c4ce9dd10eaef7488451aafa92718ebaddb4c2c2..521fbd5aa9751e951714399a29b37b456ee0177a 100644 --- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h +++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h @@ -126,7 +126,8 @@ append(const TList& inputs, PseudoJetVector& psjs, const LabelIndex* pli) const jet::IConstituentUserInfo::Index labidx = 0; if ( pli != 0 ) labidx = pli->index(m_label); else ATH_MSG_WARNING("Index-to-label map is not supplied."); - if ( m_ghostscale ) labidx = -labidx; + //if ( m_ghostscale ) labidx = -labidx; + if(!m_negEnergyAsGhosts && m_ghostscale) labidx = -labidx; ATH_MSG_DEBUG( "Ghost scale = " << m_ghostscale << "; idx = " << labidx ); /// Loop over input, buid CUI and PseudoJets diff --git a/Reconstruction/Jet/JetRec/python/JetRecFlags.py b/Reconstruction/Jet/JetRec/python/JetRecFlags.py index 316515465db0fd7a9a755eacdf7b1c8261deadc7..ec52f49c54625d6948238dd95759ecd2eb323113 100644 --- a/Reconstruction/Jet/JetRec/python/JetRecFlags.py +++ b/Reconstruction/Jet/JetRec/python/JetRecFlags.py @@ -89,7 +89,7 @@ class useTracks(JobProperty): class useVertices(JobProperty): """ If true, vertices are present and used in pflow jet reconstruction. """ - statusOn = True + statusOn = False allowedTypes = ['bool'] # type StoredValue = True # default value diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandard.py b/Reconstruction/Jet/JetRec/python/JetRecStandard.py index 0dea50cbccf5ef8c7be32b68112eea47aa338321..f399aa5703962e1b8491e0973bcd8ec97fb426bb 100644 --- a/Reconstruction/Jet/JetRec/python/JetRecStandard.py +++ b/Reconstruction/Jet/JetRec/python/JetRecStandard.py @@ -32,10 +32,7 @@ from RecExConfig.ObjKeyStore import cfgKeyStore from AthenaCommon import Logging jetlog = Logging.logging.getLogger('JetRec_jobOptions') -# Disable usage of vertices in pflow jets, if we are using cosmic data. -from AthenaCommon.BeamFlags import jobproperties -if jobproperties.Beam.beamType == 'cosmics': - jetFlags.useVertices = False + # Skip truth if rec says it is absent. # No action if someone has already set the flag. @@ -57,7 +54,7 @@ print myname + " Final use topoclusters: " + str(jetFlags.useTopo()) haveTracks = cfgKeyStore.isInTransient('xAOD::TrackParticleContainer','InDetTrackParticles') haveVertices = cfgKeyStore.isInTransient("xAOD::VertexContainer","PrimaryVertices") recTracks = rec.doInDet() -recVertices = bool(InDetFlags.doVertexFinding) +recVertices = bool(InDetFlags.doVertexFinding) and (recTracks or haveTracks) print myname + "Initial useTracks: " + sflagstat(jetFlags.useTracks) print myname + " rec doInDet: " + str(recTracks) print myname + " doVertexFinding: " + str(recVertices) @@ -67,6 +64,16 @@ if not jetFlags.useTracks.statusOn: jetFlags.useTracks = (recTracks or haveTracks) and (recVertices or haveVertices) print myname + " Final useTracks: " + sflagstat(jetFlags.useTracks) +if not jetFlags.useVertices.statusOn: + jetFlags.useVertices = (recVertices or haveVertices) +print myname + " useVertices: " + sflagstat(jetFlags.useVertices) + +# Disable usage of vertices in pflow jets, if we are using cosmic data. +from AthenaCommon.BeamFlags import jobproperties +if jobproperties.Beam.beamType == 'cosmics': + jetFlags.useVertices = False + + # Skip use of muon segments if not built. # No action if someone has already set the flag. print myname + "Initial use muon segments: " + sflagstat(jetFlags.useMuonSegments) @@ -89,6 +96,10 @@ if 0: jetFlags.skipTools = ["comshapes"] jetlog.info( "Skipped tools: %s", jetFlags.skipTools()) +from RecExConfig.RecAlgsFlags import recAlgs +if not recAlgs.doEFlow(): + jetFlags.usePFlow = False + # Set the list of rho calculations. # If caller has set jetFlags.eventShapeTools(), then we use those values. if jetFlags.eventShapeTools() == None: diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py index c8b9d9d5804eb38ae3710b1986c86dda7a18bd91..6cfb079bd3b49e2b20648b16e3a504db1c14bf0d 100644 --- a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py +++ b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py @@ -277,7 +277,7 @@ jtm += RetrievePFOTool("pflowretriever") useVertices = True if False == jetFlags.useVertices: - useVertices = False + useVertices = False if True == jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction: useChargedWeights = True