diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TAUPExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TAUPExtraContent.py index 0c7c279db854b491b474dc22a02f78474b6ce70c..0d3df156d66940f52a024b22d1152ed2fae777ab 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TAUPExtraContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TAUPExtraContent.py @@ -122,7 +122,7 @@ ExtraContentTruthTAUP3 = ExtraContentPhotonsTruth ExtraContainersElectrons = ["ForwardElectrons"] -ExtraContainersJets = [] +ExtraContainersJets = ["CaloCalTopoClusters"] ExtraContainersTrigger = ["LVL1EmTauRoIs", # @@ -161,7 +161,23 @@ ExtraContainersTAUP2 = ExtraContainersTrigger ExtraContainersTAUP3 = ExtraContainersElectrons \ + ExtraContainersJets \ + ExtraContainersTrigger \ - + ["HLT_xAOD__TauJetContainer_TrigTauRecMerged"] + + ["HLT_xAOD__TauJetContainer_TrigTauRecMerged", +# + "HLT_xAOD__MuonRoIContainer_L1TopoMuon", +# + "HLT_xAOD__JetRoIContainer_L1TopoJet", +# + "HLT_xAOD__TrigCompositeContainer_L1TopoMET", + "HLT_xAOD__TrigCompositeContainer_L1TopoComposite", +# + "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Tau_FTK", + "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Tau_FTK_IDTrig", + "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Tau_FTKRefit", + "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Tau_FTKRefit_IDTrig", +# + "HLT_xAOD__VertexContainer_PrimVertexFTK", + "HLT_xAOD__VertexContainer_PrimVertexFTKRaw", + "HLT_xAOD__VertexContainer_PrimVertexFTKRefit"] ExtraContainersTruthTAUP1 = ["TruthEvents", "TruthParticles", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..14290fb80ba3092af0e57f7e8b6c692561ba66ee --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauJetsCPContent.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +TauJetsCPContent = [ +"AntiKt4LCTopoJets", +"InDetTrackParticles", +"InDetTrackParticlesAux.phi.vertexLink.theta.qOverP.truthParticleLink.truthMatchProbability", +"TauJets", +"TauJetsAux.pt.eta.phi.m.trackLinks.wideTrackLinks.otherTrackLinks.jetLink.vertexLink.secondaryVertexLink.hadronicPFOLinks.shotPFOLinks.chargedPFOLinks.neutralPFOLinks.pi0PFOLinks.protoChargedPFOLinks.protoNeutralPFOLinks.protoPi0PFOLinks.charge.isTauFlags.BDTJetScore.BDTEleScore.conversionTrackLinks.charged_PFOLinks.neutral_PFOLinks.pi0_PFOLinks.cellBased_Charged_PFOLinks.cellBased_Neutral_PFOLinks.cellBased_Pi0_PFOLinks.eflowRec_Charged_PFOLinks.eflowRec_Neutral_PFOLinks.eflowRec_Pi0_PFOLinks.shot_PFOLinks" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauMVATESContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauMVATESContent.py new file mode 100644 index 0000000000000000000000000000000000000000..3c229362f7174aa5c3d6aa16363adc7e1f57a382 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/python/TauMVATESContent.py @@ -0,0 +1,17 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + + +from DerivationFrameworkTau.TauJetsCPContent import TauJetsCPContent as taucore + +TauMVATESContent=taucore +TauMVATESContent += [ + "TauJets", + "TauJetsAux.ptDetectorAxis.phiDetectorAxis.etaDetectorAxis.mDetectorAxis.ptPanTauCellBased.etaPanTauCellBased.phiPanTauCellBased.mPanTauCellBased.pantau_CellBasedInput_DecayMode.pantau_CellBasedInput_DecayModeProto", + "TauNeutralParticleFlowObjects", + "TauNeutralParticleFlowObjectsAux.pt.eta.phi.m", + "TauChargedParticleFlowObjects", + "TauChargedParticleFlowObjectsAux.pt.eta.phi.m", + "CaloCalTopoClusters", + "CaloCalTopoClustersAux.CENTER_LAMBDA.FIRST_ENG_DENS.EM_PROBABILITY.SECOND_LAMBDA.e_sampl.eta0.phi0.rawE.rawEta.rawPhi.rawM.altE.altEta.altPhi.altM.calE.calEta.calPhi.calM", + ] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py index a188d365c461a84990fb398df0a24efde8bb1bef..9792549d9e7f2ffa74f9e6d12d56d7912e17e4af 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py @@ -50,6 +50,14 @@ TAUP1JetTPThinningTool = DerivationFramework__JetTrack ApplyAnd = True) ToolSvc += TAUP1JetTPThinningTool +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning +TAUP1CaloClusterThinning = DerivationFramework__CaloClusterThinning( + name = "TAUP1ClusterThinning", + ThinningService = TAUP1ThinningHelper.ThinningSvc(), + SGKey = "TauJets", + TopoClCollectionSGKey = "CaloCalTopoClusters") +ToolSvc += TAUP1CaloClusterThinning + # Tracks associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TAUP1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( @@ -108,6 +116,7 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__D SkimmingTools = [TAUP1SkimmingTool], ThinningTools = [TAUP1MetTPThinningTool, TAUP1JetTPThinningTool, + TAUP1CaloClusterThinning, TAUP1ElectronTPThinningTool, TAUP1MuonTPThinningTool, TAUP1TauTPThinningTool], diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py index 47ffb560e663f699974d113c0bc59a7e75c62867..7541840e9c23b0e3ce4393056000d9580909e708 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py @@ -37,6 +37,14 @@ TAUP3JetTPThinningTool = DerivationFramework__JetTrack ApplyAnd = True) ToolSvc += TAUP3JetTPThinningTool +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning +TAUP3CaloClusterThinning = DerivationFramework__CaloClusterThinning( + name = "TAUP3ClusterThinning", + ThinningService = "TAUP3ThinningSvc", + SGKey = "TauJets", + TopoClCollectionSGKey = "CaloCalTopoClusters") +ToolSvc += TAUP3CaloClusterThinning + # Tracks associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TAUP3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( @@ -94,6 +102,7 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__D SkimmingTools = [TAUP3SkimmingTool], ThinningTools = [TAUP3MetTPThinningTool, TAUP3JetTPThinningTool, + TAUP3CaloClusterThinning, TAUP3ElectronTPThinningTool, TAUP3MuonTPThinningTool, TAUP3TauTPThinningTool], diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauPVTrkSelectionTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauPVTrkSelectionTool.cxx index 9df5c9fb4ca8b821a5dd8d7104b4f32868e68e97..56094f39e1cb8f835457a38653e50b50b268062c 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauPVTrkSelectionTool.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauPVTrkSelectionTool.cxx @@ -84,16 +84,22 @@ namespace DerivationFramework { bool pass_selection = false; if (tau_pt > m_minPt && (fabs(tau_eta) < 1.37 || (fabs(tau_eta) > 1.52 && fabs(tau_eta) < 2.5))) pass_selection = true; for (int i = 0; i < tauNtracks; i++) { +#ifdef XAODTAU_VERSIONS_TAUJET_V3_H + const xAOD::TauTrack* tauTrk = pTau->track(i); + const xAOD::TrackParticle* tauTrk_trk = tauTrk->track(); +#else const xAOD::TrackParticle* tauTrk = pTau->track(i); + const xAOD::TrackParticle* tauTrk_trk = tauTrk; +#endif if (m_useTruth) { // identify tracks matched to tau decay products (hadrons only) if (!m_T3MT->classifyTrack(*tauTrk)) continue; - if (tauTrk->auxdecor<char>("IsHadronicTrack")) tauPVTracks->push_back(const_cast<xAOD::TrackParticle*>(tauTrk)); + if (tauTrk->auxdecor<char>("IsHadronicTrack")) tauPVTracks->push_back(const_cast<xAOD::TrackParticle*>(tauTrk_trk)); } else { // use all tau tracks //TauTracks.push_back(const_cast<xAOD::TrackParticle*>(tauTrk)); float dR = pTau->p4().DeltaR(tauTrk->p4()); - if (good_tau && pass_selection && dR < m_maxDeltaR) tauPVTracks->push_back(const_cast<xAOD::TrackParticle*>(tauTrk)); + if (good_tau && pass_selection && dR < m_maxDeltaR) tauPVTracks->push_back(const_cast<xAOD::TrackParticle*>(tauTrk_trk)); } } } diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauSelectionWrapper.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauSelectionWrapper.cxx index f0deb5e707c8f54f8d2cb10a30cfe981d492a181..eca402789478916d03a2a64a878917f448ecbdce 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauSelectionWrapper.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauSelectionWrapper.cxx @@ -82,6 +82,7 @@ StatusCode DerivationFramework::TauSelectionWrapper::addBranches() const // Write decision to SG for access by downstream algs if (evtStore()->contains<std::vector<int> >(m_sgKey)) { ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgKey << " which already exists. Please use a different key"); + delete isTauSelectionResult; return StatusCode::FAILURE; } CHECK(evtStore()->record(isTauSelectionResult,m_sgKey));