From 77b65fd63c39dcdbccc81e80da48d1e6c521fc94 Mon Sep 17 00:00:00 2001 From: Lidija Zivkovic <lidija.zivkovic@cern.ch> Date: Fri, 23 Oct 2020 12:15:31 +0000 Subject: [PATCH] AFT-501 - to remove b-tagging from Jet EDM --- Event/xAOD/xAODBTagging/CMakeLists.txt | 2 +- .../xAODBTagging/Root/BTaggingUtilities.cxx | 27 +++++++++++++++ .../xAODBTagging/BTaggingUtilities.h | 17 ++++++++++ .../versions/BTaggingContainer_v1.h | 4 +-- .../xAODBTagging/versions/BTagging_v1.h | 1 + Event/xAOD/xAODJet/CMakeLists.txt | 2 +- Event/xAOD/xAODJet/Root/Jet_v1.cxx | 34 ------------------- Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h | 11 ------ .../src/InDetGlobalTrackMonTool.h | 1 + .../AssociationUtils/AltMuJetOverlapTool.h | 1 + .../AssociationUtils/CMakeLists.txt | 5 +-- .../AssociationUtils/src/ORToolBoxTestAlg.cxx | 5 ++- .../src/OverlapRemovalTestAlg.cxx | 3 +- .../util/OverlapRemovalTester.cxx | 5 ++- .../ParticleJetTools/CMakeLists.txt | 6 ++-- .../Root/JetParticleAssociation.cxx | 1 + .../xAODJiveXML/src/xAODJetRetriever.cxx | 3 +- .../CMakeLists.txt | 6 ++-- .../util/test-btagging.cxx | 4 ++- .../src/JetMSVAugmentation.cxx | 3 +- .../src/SV1TrackThinning.cxx | 5 +-- .../src/JetMissingEtTagTool.cxx | 8 +++-- .../FlavorTagDiscriminants/CMakeLists.txt | 4 ++- .../FlavorTagDiscriminants/BTagJetAugmenter.h | 1 + .../FlavorTagDiscriminants/DL2.h | 6 ++-- .../FlavorTagDiscriminants/customGetter.h | 1 + .../Root/BTagJetAugmenter.cxx | 5 +-- .../Root/BTagMuonAugmenter.cxx | 3 +- .../Root/BTagTrackIpAccessor.cxx | 3 +- .../FlavorTagDiscriminants/Root/DL2.cxx | 7 ++-- .../FlavorTagDiscriminants/Root/HbbTag.cxx | 5 +-- .../BTagging/BTagHighLevelAugmenterAlg.h | 1 + .../BTagging/BTagging/JetBTaggerTool.h | 1 + .../BTagging/BTagging/JetSecVtxFindingAlg.h | 2 ++ .../BTagging/src/BTagTrackAssociation.cxx | 7 ++-- .../BTagging/src/JetSecVtxFindingAlg.cxx | 7 ++-- .../src/JetTagMonitorAlgorithm.cxx | 3 +- .../JetTagMonitoring/src/JetTagMonitoring.cxx | 9 ++--- .../Root/BTaggingEfficiencyTool.cxx | 3 +- .../Root/BTaggingSelectionTool.cxx | 8 +++-- .../JetTagging/JetTagTools/src/ExKtbbTag.cxx | 5 +-- .../JetTagDQA/src/BTaggingValidationPlots.cxx | 5 +-- .../JetTagDQA/src/PhysValBTag.cxx | 4 +-- .../PhysValMonitoring/src/PhysValExample.cxx | 3 +- .../Root/JetTrackFilterTool.cxx | 1 + .../JetMomentTools/JetForwardJvtTool.h | 1 + .../JetMomentTools/JetForwardJvtToolBDT.h | 1 + .../JetMomentTools/JetOriginCorrectionTool.h | 1 + Reconstruction/Jet/JetReclustering/README.md | 2 +- .../Jet/JetSubStructureUtils/CMakeLists.txt | 2 +- .../Root/BoostedXbbTag.cxx | 5 ++- .../Jet/JetSubStructureUtils/Root/Charge.cxx | 1 + .../METUtilities/METSystematicsTool.h | 2 ++ .../src/CalibrationNtupleMakerTool.cxx | 2 ++ .../TrigEFMissingET/EFMissingETBaseTool.h | 1 + .../TrigBjetHypo/src/TrigBtagFex.cxx | 3 +- .../VP1Systems/VP1AODSystems/CMakeLists.txt | 4 +-- .../VP1AODSystems/src/IParticleHandle_Jet.cxx | 7 ++-- 58 files changed, 172 insertions(+), 108 deletions(-) create mode 100644 Event/xAOD/xAODBTagging/Root/BTaggingUtilities.cxx create mode 100644 Event/xAOD/xAODBTagging/xAODBTagging/BTaggingUtilities.h diff --git a/Event/xAOD/xAODBTagging/CMakeLists.txt b/Event/xAOD/xAODBTagging/CMakeLists.txt index 9cf5cafbfac..75a556824ac 100644 --- a/Event/xAOD/xAODBTagging/CMakeLists.txt +++ b/Event/xAOD/xAODBTagging/CMakeLists.txt @@ -10,7 +10,7 @@ find_package( xAODUtilities ) atlas_add_library( xAODBTagging xAODBTagging/*.h xAODBTagging/versions/*.h Root/*.cxx PUBLIC_HEADERS xAODBTagging - LINK_LIBRARIES AthContainers AthLinks xAODBase xAODCore xAODTracking + LINK_LIBRARIES AthContainers AthLinks xAODBase xAODCore xAODTracking xAODJet CxxUtils ) atlas_add_xaod_smart_pointer_dicts( diff --git a/Event/xAOD/xAODBTagging/Root/BTaggingUtilities.cxx b/Event/xAOD/xAODBTagging/Root/BTaggingUtilities.cxx new file mode 100644 index 00000000000..24fa834946b --- /dev/null +++ b/Event/xAOD/xAODBTagging/Root/BTaggingUtilities.cxx @@ -0,0 +1,27 @@ + +#include "xAODBTagging/BTaggingUtilities.h" + +using namespace xAOD; + +const xAOD::BTagging* BTaggingUtilities::getBTagging( const SG::AuxElement& auxElement, + const std::string& linkName ) { + const SG::AuxElement::Accessor< ElementLink< xAOD::BTaggingContainer > > btagAcc( linkName ); + + if ( btagAcc.isAvailable( auxElement ) && btagAcc( auxElement ).isValid() ) + return *( btagAcc( auxElement ) ); + + return nullptr; +} + +const ElementLink< xAOD::BTaggingContainer >& BTaggingUtilities::getBTaggingLink( const SG::AuxElement& auxElement, + const std::string& linkName ) { + const SG::AuxElement::Accessor< ElementLink< xAOD::BTaggingContainer > > btagAcc( linkName ); + return btagAcc( auxElement ); +} + +void BTaggingUtilities::setBTaggingLink( const SG::AuxElement& auxElement, + const ElementLink< xAOD::BTaggingContainer >& el, + const std::string& linkName ) { + const SG::AuxElement::Decorator< ElementLink< xAOD::BTaggingContainer > > btagDec( linkName ); + btagDec( auxElement ) = el; +} diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingUtilities.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingUtilities.h new file mode 100644 index 00000000000..5dbe2d0defe --- /dev/null +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingUtilities.h @@ -0,0 +1,17 @@ +#ifndef XAODBTAGGING_UTILITIES_H +#define XAODBTAGGING_UTILITIES_H + +#include "AthContainers/AuxElement.h" +#include "xAODBTagging/BTaggingContainer.h" + +namespace xAOD::BTaggingUtilities { + const xAOD::BTagging* getBTagging( const SG::AuxElement&, + const std::string& linkName="btaggingLink" ); + const ElementLink< xAOD::BTaggingContainer >& getBTaggingLink( const SG::AuxElement&, + const std::string& linkName="btaggingLink" ); + void setBTaggingLink( const SG::AuxElement&, + const ElementLink< xAOD::BTaggingContainer >&, + const std::string& linkName="btaggingLink" ); +} // namespace xAOD::BTaggingUtilities + +#endif diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTaggingContainer_v1.h b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTaggingContainer_v1.h index 9d61b40e4b3..e8c4742e7fb 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTaggingContainer_v1.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTaggingContainer_v1.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id: BTaggingContainer_v1.h 631475 2014-11-27 11:53:05Z filthaut $ @@ -15,7 +15,7 @@ #include "xAODBTagging/versions/BTagging_v1.h" namespace xAOD { - /// The container is a simple typedef for now + // The container is a simple typedef for now typedef DataVector< xAOD::BTagging_v1 > BTaggingContainer_v1; } diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h index 08d6fc25124..342ffe4c378 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h @@ -16,6 +16,7 @@ #include "xAODBTagging/BTaggingEnums.h" #include "xAODTracking/TrackParticleContainer.h" #include "xAODTracking/VertexContainer.h" +#include "xAODJet/JetContainer.h" #include "xAODBTagging/BTagVertexContainer.h" // STL include(s): diff --git a/Event/xAOD/xAODJet/CMakeLists.txt b/Event/xAOD/xAODJet/CMakeLists.txt index 1e14f3ca880..2584ca215cb 100644 --- a/Event/xAOD/xAODJet/CMakeLists.txt +++ b/Event/xAOD/xAODJet/CMakeLists.txt @@ -17,7 +17,7 @@ endif() set( extra_srcs ) if( NOT SIMULATIONBASE AND NOT GENERATIONBASE ) set( extra_srcs Root/JetTrigAuxContainer*.cxx ) - set( extra_libs xAODBTagging xAODPFlow xAODTrigger ) + set( extra_libs xAODPFlow xAODTrigger ) endif() # External dependencies: diff --git a/Event/xAOD/xAODJet/Root/Jet_v1.cxx b/Event/xAOD/xAODJet/Root/Jet_v1.cxx index a571e2bc1c5..091050fe7e3 100644 --- a/Event/xAOD/xAODJet/Root/Jet_v1.cxx +++ b/Event/xAOD/xAODJet/Root/Jet_v1.cxx @@ -259,40 +259,6 @@ namespace xAOD { void Jet_v1::setInputType(JetInput::Type t) {inputAcc(*this)=t;} -#if !defined(SIMULATIONBASE) and !defined(GENERATIONBASE) - static const SG::AuxElement::Accessor< ElementLink< BTaggingContainer > > - btagAcc1( "btagging" ); - static const SG::AuxElement::Accessor< ElementLink< BTaggingContainer > > - btagAcc2( "btaggingLink" ); - - /// Access to btagging objects - const BTagging* Jet_v1::btagging() const { - - if( btagAcc1.isAvailable( *this ) && btagAcc1( *this ).isValid() ) { - return *( btagAcc1( *this ) ); - } else if( btagAcc2.isAvailable( *this ) && btagAcc2( *this ).isValid() ) { - return *( btagAcc2( *this ) ); - } - return nullptr; - } - - const ElementLink< BTaggingContainer >& Jet_v1::btaggingLink() const { - - if( btagAcc1.isAvailable( *this ) ) { - return btagAcc1( *this ); - } - return btagAcc2( *this ); - } - - /// Access to btagging objects - void Jet_v1::setBTaggingLink( const ElementLink< BTaggingContainer >& el ) { - - // When we create a new object, we always set the link with the new name: - btagAcc2( *this ) = el; - return; - } -#endif // not SIMULATIONBASE or GENERATIONBASE - // void Jet_v1::toPersistent() { // No longer needed, as this is done by the POOL converter for the aux container diff --git a/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h b/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h index 612098c0f89..750807591fb 100644 --- a/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h +++ b/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h @@ -16,9 +16,6 @@ // xAOD include(s): #include "xAODBase/IParticle.h" #include "xAODBase/IParticleContainer.h" -#if !defined(SIMULATIONBASE) and !defined(GENERATIONBASE) -#include "xAODBTagging/BTaggingContainer.h" -#endif // not SIMULATIONBASE or GENERATIONBASE // Local include(s): //#include "xAODJet/JetConstituentIterator.h" @@ -236,14 +233,6 @@ namespace xAOD { /// Set number by enum template<class T> void setAttribute( AttributeID type, const T& value ); -#if !defined(SIMULATIONBASE) and !defined(GENERATIONBASE) - /// Access to the associated btagging object - const BTagging* btagging() const; - /// Access to the associated btagging object - const ElementLink< BTaggingContainer >& btaggingLink() const; - /// Access to btagging objects - void setBTaggingLink( const ElementLink< BTaggingContainer>& el ); -#endif // not SIMULATIONBASE or GENERATIONBASE /// @} //////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h index 998c7bdddda..e231cfff6dc 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h @@ -35,6 +35,7 @@ #include "PixelGeoModel/IBLParameterSvc.h" #include "xAODJet/JetContainer.h" #include "xAODTracking/VertexContainer.h" +#include "xAODTracking/TrackParticleContainer.h" //Detector Managers #include "AtlasDetDescr/AtlasDetectorID.h" diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h index b5e5a0e3fa0..dd675f15971 100644 --- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h +++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h @@ -8,6 +8,7 @@ // EDM includes #include "xAODMuon/MuonContainer.h" #include "xAODJet/JetContainer.h" +#include "xAODTracking/VertexContainer.h" // Local includes #include "AssociationUtils/IOverlapTool.h" diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt index dc11e1707c1..87d7ca34c8b 100644 --- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt +++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt @@ -19,6 +19,7 @@ atlas_depends_on_subdirs( Event/xAOD/xAODBase Event/xAOD/xAODEgamma Event/xAOD/xAODJet + Event/xAOD/xAODBTagging Event/xAOD/xAODMuon Event/xAOD/xAODTau Event/xAOD/xAODTracking @@ -40,7 +41,7 @@ atlas_add_library( AssociationUtilsLib AssociationUtils/*.h Root/*.cxx PUBLIC_HEADERS AssociationUtils INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODEgamma xAODJet + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODEgamma xAODJet xAODBTagging xAODMuon xAODTau xAODTracking AthContainers AthLinks AnaAlgorithmLib PRIVATE_LINK_LIBRARIES CxxUtils FourMomUtils ) @@ -61,7 +62,7 @@ if( XAOD_STANDALONE ) util/OverlapRemovalTester.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} xAODRootAccess - xAODEventInfo xAODEgamma xAODMuon xAODJet xAODTau xAODEgamma + xAODEventInfo xAODEgamma xAODMuon xAODJet xAODBTagging xAODTau xAODEgamma AssociationUtilsLib ) endif() diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx index d809185dc1c..878a8b4d050 100644 --- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx +++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx @@ -5,6 +5,8 @@ #include "ORToolBoxTestAlg.h" #include "AssociationUtils/OverlapRemovalDefs.h" #include "AssociationUtils/OverlapRemovalInit.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" namespace { @@ -105,7 +107,8 @@ bool ORToolBoxTestAlg::selectObject<xAOD::Jet>(const xAOD::Jet& jet) static ort::inputDecorator_t bJetDec(m_flags.bJetLabel); bJetDec(jet) = false; double mv2c10 = 0.; - if(jet.btagging()->MVx_discriminant("MV2c10", mv2c10)){ + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); + if(btag->MVx_discriminant("MV2c10", mv2c10)){ if(mv2c10 > -0.1416) bJetDec(jet) = true; } else ATH_MSG_WARNING("BTag info unavailable!"); diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx index 10c7203dc19..4b0a5abcdd5 100644 --- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx +++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx @@ -6,6 +6,7 @@ // Local includes #include "AssociationUtils/OverlapRemovalDefs.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "OverlapRemovalTestAlg.h" namespace @@ -112,7 +113,7 @@ bool OverlapRemovalTestAlg::selectObject<xAOD::Jet>(const xAOD::Jet& jet) static ort::inputDecorator_t bJetDec(m_bJetLabel); bJetDec(jet) = false; double mv2c10 = 0.; - auto btag = jet.btagging(); + auto btag = xAOD::BTaggingUtilities::getBTagging( jet ); if(btag && btag->MVx_discriminant("MV2c10", mv2c10)){ if(mv2c10 > -0.1416) bJetDec(jet) = true; } diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx index ee0db33e22d..6834b04e9f5 100644 --- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx +++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx @@ -37,6 +37,8 @@ #include "xAODJet/JetContainer.h" #include "xAODTau/TauJetContainer.h" #include "xAODEgamma/PhotonContainer.h" +#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" // Local includes #include "AssociationUtils/OverlapRemovalInit.h" @@ -93,7 +95,8 @@ template<> void selectObjects<xAOD::JetContainer> selectDec(*jet) = pass; // Label bjets double mv2c10 = 0.; - if(!jet->btagging()->MVx_discriminant("MV2c10", mv2c10)) + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); + if(!btag->MVx_discriminant("MV2c10", mv2c10)) throw std::runtime_error("MV2c10 unavailable"); // This is the 85% efficiency working point bJetDec(*jet) = (mv2c10 > -0.1416); diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt index 95407b2491a..c4817c3c307 100644 --- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt +++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt @@ -14,6 +14,7 @@ if( XAOD_STANDALONE ) Control/AthToolSupport/AsgTools Event/EventPrimitives Event/xAOD/xAODJet + Event/xAOD/xAODTracking Event/xAOD/xAODTruth PhysicsAnalysis/MCTruthClassifier Reconstruction/Jet/JetInterface @@ -28,6 +29,7 @@ else() Control/AthToolSupport/AsgTools Event/EventPrimitives Event/xAOD/xAODJet + Event/xAOD/xAODTracking Event/xAOD/xAODTruth GaudiKernel PhysicsAnalysis/MCTruthClassifier @@ -44,14 +46,14 @@ if( XAOD_STANDALONE ) atlas_add_library( ParticleJetToolsLib ParticleJetTools/*.h Root/*.cxx src/*.cxx PUBLIC_HEADERS ParticleJetTools - LINK_LIBRARIES AsgTools EventPrimitives xAODJet xAODTruth + LINK_LIBRARIES AsgTools EventPrimitives xAODJet xAODTracking xAODTruth JetInterface MCTruthClassifierLib JetRecLib AsgDataHandlesLib PRIVATE_LINK_LIBRARIES AthContainers TruthUtils ) else() atlas_add_library( ParticleJetToolsLib ParticleJetTools/*.h Root/*.cxx src/*.cxx PUBLIC_HEADERS ParticleJetTools - LINK_LIBRARIES AsgTools EventPrimitives xAODJet xAODTruth GaudiKernel + LINK_LIBRARIES AsgTools EventPrimitives xAODJet xAODTracking xAODTruth GaudiKernel JetInterface MCTruthClassifierLib JetRecLib AsgDataHandlesLib PRIVATE_LINK_LIBRARIES AthAnalysisBaseCompsLib AthContainers TruthUtils ) endif() diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleAssociation.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleAssociation.cxx index 6cf71c83ad9..49f28af9b1b 100644 --- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleAssociation.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetParticleAssociation.cxx @@ -5,6 +5,7 @@ // author: cpollard@cern.ch #include "ParticleJetTools/JetParticleAssociation.h" +#include "xAODTracking/TrackParticleContainer.h" using namespace std; using namespace xAOD; diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx index d01966b3f9b..956dea66425 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx @@ -8,6 +8,7 @@ #include "xAODCaloEvent/CaloCluster.h" #include "xAODTracking/TrackParticle.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "xAODJet/JetAttributes.h" #include "TrkTrack/Track.h" @@ -278,7 +279,7 @@ namespace JiveXML { pz.push_back(DataType((*jetItr)->pz()/GeV)); // bjet tagger values - const xAOD::BTagging *bTagJet = (*jetItr)->btagging(); + const xAOD::BTagging *bTagJet = xAOD::BTaggingUtilities::getBTagging( **jetItr ); bTagName.push_back( DataType( "default" )); diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt index 99162375f2b..3ce221e99d5 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt @@ -10,7 +10,7 @@ find_package( ROOT COMPONENTS Core RIO ) atlas_add_component( DerivationFrameworkFlavourTag src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps FlavorTagDiscriminants GaudiKernel xAODJet xAODTracking ) + LINK_LIBRARIES AthenaBaseComps FlavorTagDiscriminants GaudiKernel xAODJet xAODTracking xAODBTagging ) # Install files from the package: atlas_install_python_modules( python/*.py ) @@ -20,9 +20,9 @@ atlas_install_joboptions( share/*.py ) atlas_add_executable( test_btagging util/test-btagging.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODRootAccess ) + LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODTracking xAODBTagging xAODRootAccess ) atlas_add_executable( test_jet_links util/test-jet-links.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODRootAccess ) + LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODTracking xAODBTagging xAODRootAccess ) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/util/test-btagging.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/util/test-btagging.cxx index 680ce2b91ae..aeda1774b7d 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/util/test-btagging.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/util/test-btagging.cxx @@ -2,6 +2,8 @@ #include "xAODRootAccess/tools/ReturnCheck.h" #include "xAODRootAccess/TEvent.h" #include "xAODJet/JetContainer.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "TFile.h" #include "TTree.h" @@ -49,7 +51,7 @@ int main (int argc, char *argv[]) { const xAOD::JetContainer *jets = nullptr; RETURN_CHECK( APP_NAME, event.retrieve(jets, jets_name) ); for (const xAOD::Jet *const jet : *jets) { - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging *btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (!btag) { nbad++; } else { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/JetMSVAugmentation.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/JetMSVAugmentation.cxx index cdcf54bcbdc..7832270c621 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/JetMSVAugmentation.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/JetMSVAugmentation.cxx @@ -10,6 +10,7 @@ #include "xAODBTagging/SecVtxHelper.h" #include "xAODTracking/Vertex.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" namespace DerivationFramework { @@ -76,7 +77,7 @@ StatusCode JetMSVAugmentation::addBranches() const{ for(auto jet : *jets){ - const xAOD::BTagging* bjet = jet->btagging(); + const xAOD::BTagging* bjet = xAOD::BTaggingUtilities::getBTagging( *jet ); if(!bjet){ ATH_MSG_WARNING("btagging information not available" ); diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/SV1TrackThinning.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/SV1TrackThinning.cxx index 0fd97a64a60..6e7ea245b93 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/SV1TrackThinning.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/src/SV1TrackThinning.cxx @@ -14,6 +14,7 @@ #include "xAODJet/JetContainer.h" #include "xAODTracking/TrackParticleContainer.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "StoreGate/ThinningHandle.h" #include "GaudiKernel/ThreadLocalContext.h" #include <vector> @@ -113,7 +114,7 @@ StatusCode DerivationFramework::SV1TrackThinning::doThinning() const // ... jets if (m_selectionString=="") { // check all jets as user didn't provide a selection string for (xAOD::JetContainer::const_iterator jetIt=importedJets->begin(); jetIt!=importedJets->end(); ++jetIt) { - const xAOD::BTagging* btag = (*jetIt)->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( **jetIt ); const std::vector< ElementLink<xAOD::TrackParticleContainer> >& SV1_trackParticleLinks = btag->SV1_TrackParticleLinks(); @@ -125,7 +126,7 @@ StatusCode DerivationFramework::SV1TrackThinning::doThinning() const } } else { // check only jets passing user selection string for (std::vector<const xAOD::Jet*>::iterator jetIt = jetToCheck.begin(); jetIt!=jetToCheck.end(); ++jetIt) { - const xAOD::BTagging* btag = (*jetIt)->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( **jetIt ); const std::vector< ElementLink<xAOD::TrackParticleContainer> >& SV1_trackParticleLinks = btag->SV1_TrackParticleLinks(); diff --git a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtTagTool.cxx b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtTagTool.cxx index 0f5bcd812db..42b60919292 100755 --- a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtTagTool.cxx +++ b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtTagTool.cxx @@ -22,6 +22,8 @@ Purpose : create a collection of JetMissingEtJetTag #include "xAODEgamma/PhotonContainer.h" #include "xAODMuon/MuonContainer.h" #include "xAODTau/TauJetContainer.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "xAODMissingET/MissingET.h" #include "xAODMissingET/MissingETContainer.h" @@ -471,8 +473,8 @@ StatusCode JetMetTagTool::execute(TagFragmentCollection& jetMissingEtTagColl, co /** B-tagging using selection tools*/ /** B-tagging */ - const xAOD::BTagging* btag = selectedJet->btagging(); - if (bool(btag)) { + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *selectedJet ); + if ( btag ) { if ( m_FixedCutBEff_60->accept( selectedJet ) ) pid |= 1 << 12; // MV2c20 @ 60% if ( m_FixedCutBEff_70->accept( selectedJet ) ) pid |= 1 << 13; // MV2c20 @ 70% if ( m_FixedCutBEff_85->accept( selectedJet ) ) pid |= 1 << 14; // MV2c20 @ 85% @@ -507,7 +509,7 @@ StatusCode JetMetTagTool::execute(TagFragmentCollection& jetMissingEtTagColl, co if (jetP4.pt() > 100.0 * CLHEP::GeV) ij100++; - const xAOD::BTagging* btag = selectedJet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *selectedJet ); if (bool(btag)) { double mvx; btag->MVx_discriminant("MV2c20", mvx); diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt index 0cf8ec9ebb0..680b210e9d5 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/CMakeLists.txt @@ -24,7 +24,9 @@ atlas_depends_on_subdirs( Event/xAOD/xAODBase Event/xAOD/xAODMuon Event/xAOD/xAODJet + Event/xAOD/xAODBTagging Event/xAOD/xAODEventInfo + Event/xAOD/xAODTracking PRIVATE Tools/PathResolver ) @@ -51,7 +53,7 @@ atlas_add_library( FlavorTagDiscriminants Root/VRJetOverlapDecorator.cxx INCLUDE_DIRS ${LWTNN_INCLUDE_DIRS} PUBLIC_HEADERS FlavorTagDiscriminants - LINK_LIBRARIES AsgTools xAODBase xAODJet xAODMuon xAODEventInfo PathResolver + LINK_LIBRARIES AsgTools xAODBase xAODJet xAODBTagging xAODTracking xAODMuon xAODEventInfo PathResolver JetInterface ${LWTNN_LIBRARIES}) diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h index e289a503dea..f38011af602 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h @@ -9,6 +9,7 @@ #include "FlavorTagDiscriminants/ftagfloat_t.h" // ATLAS things +#include "xAODBTagging/BTagging.h" #include "xAODJet/Jet.h" #include "xAODEventInfo/EventInfo.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h index e150d0c4edd..d5c2e02e809 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h @@ -13,6 +13,8 @@ // EDM includes #include "xAODJet/Jet.h" +#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" // external libraries #include "lwtnn/lightweight_network_config.hh" @@ -121,7 +123,7 @@ namespace FlavorTagDiscriminants { { } NamedVar operator()(const xAOD::Jet& jet) const { - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); if (!btag) throw std::runtime_error("can't find btagging object"); T ret_value = m_getter(*btag); bool is_default = m_default_flag(*btag); @@ -151,7 +153,7 @@ namespace FlavorTagDiscriminants { { } NamedVar operator()(const xAOD::Jet& jet) const { - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); if (!btag) throw std::runtime_error("can't find btagging object"); T ret_value = m_getter(*btag); if constexpr (std::is_floating_point<T>::value) { diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/customGetter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/customGetter.h index 16d4d7b77f5..0dbadded291 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/customGetter.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/customGetter.h @@ -10,6 +10,7 @@ // EDM includes #include "xAODJet/Jet.h" +#include "xAODTracking/TrackParticle.h" #include <functional> #include <string> diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx index 8fc4249730f..cc9ce31eb71 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx @@ -8,6 +8,7 @@ #include <cstddef> #include "xAODJet/Jet.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "TVector3.h" @@ -206,7 +207,7 @@ void BTagJetAugmenter::augmentIpRatios(const xAOD::BTagging& btag) { void BTagJetAugmenter::augmentBtagJes(const xAOD::Jet &target, const xAOD::Jet &uncalib) { - const xAOD::BTagging* btag_ptr = target.btagging(); + const xAOD::BTagging* btag_ptr = xAOD::BTaggingUtilities::getBTagging( target ); if (!btag_ptr) throw std::runtime_error("No b-tagging object found!"); const xAOD::BTagging& btag = *btag_ptr; @@ -217,7 +218,7 @@ void BTagJetAugmenter::augmentBtagJes(const xAOD::Jet &target, } void BTagJetAugmenter::augment(const xAOD::Jet &jet) { - const xAOD::BTagging* btag_ptr = jet.btagging(); + const xAOD::BTagging *btag_ptr = xAOD::BTaggingUtilities::getBTagging( jet ); if (!btag_ptr) throw std::runtime_error("No b-tagging object found!"); const xAOD::BTagging& btag = *btag_ptr; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx index cb56e99eedf..81a2fb69963 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx @@ -6,6 +6,7 @@ #include "xAODMuon/MuonContainer.h" #include "FlavorTagDiscriminants/BTagMuonAugmenter.h" #include "FlavorTagDiscriminants/BTagTrackIpAccessor.h" +#include "xAODBTagging/BTaggingUtilities.h" namespace FlavorTagDiscriminants { @@ -67,7 +68,7 @@ namespace FlavorTagDiscriminants { ElementLink<xAOD::MuonContainer> muon_link; - const xAOD::BTagging &btag = *jet.btagging(); + const xAOD::BTagging &btag = *xAOD::BTaggingUtilities::getBTagging( jet ); // Find associated combined muon closest to jet axis (like legacy SMT) std::vector<ElementLink<xAOD::MuonContainer> > assocMuons; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackIpAccessor.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackIpAccessor.cxx index 95a76bc481c..0436c99c6ad 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackIpAccessor.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackIpAccessor.cxx @@ -3,6 +3,7 @@ */ #include "FlavorTagDiscriminants/BTagTrackIpAccessor.h" +#include "xAODBTagging/BTaggingUtilities.h" #include <cmath> #include <cstddef> @@ -101,7 +102,7 @@ void BTagTrackIpAccessor::augment_with_ip(const xAOD::TrackParticle &track, cons } void BTagTrackIpAccessor::augment_with_grades(const xAOD::TrackParticle &track, const xAOD::Jet &jet) { int ip3d_grade = -1; - const xAOD::BTagging &btagging = *jet.btagging(); + const xAOD::BTagging &btagging = *xAOD::BTaggingUtilities::getBTagging( jet ); const std::vector<ElementLink<xAOD::TrackParticleContainer> > ip3d_tracks = m_ip3d_trackParticleLinks(btagging); for (std::size_t ip3d_track_index = 0; ip3d_track_index < ip3d_tracks.size(); ++ip3d_track_index) { if (&track == *(ip3d_tracks.at(ip3d_track_index))) { diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx index c1ea9db0120..0ca1b9650a4 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx @@ -7,6 +7,8 @@ #include "lwtnn/LightweightGraph.hh" #include "lwtnn/NanReplacer.hh" +#include "xAODBTagging/BTaggingUtilities.h" + namespace { // This is a workaround because a lot of our builds still don't // support C++17. It's meant to look just as ugly as it is. @@ -162,7 +164,8 @@ namespace FlavorTagDiscriminants { // the second argument to compute(...) is for sequences auto out_vals = m_graph->compute(nodes, seqs, dec.first); for (const auto& node: dec.second) { - node.second(*jet.btagging(), out_vals.at(node.first)); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); + node.second(*btag, out_vals.at(node.first)); } } } @@ -193,7 +196,7 @@ namespace FlavorTagDiscriminants { { } Tracks TracksFromJet::operator()(const xAOD::Jet& jet) const { - const xAOD::BTagging *btagging = jet.btagging(); + const xAOD::BTagging *btagging = xAOD::BTaggingUtilities::getBTagging( jet ); if (!btagging) throw std::runtime_error("can't find btagging object"); std::vector<std::pair<double, const xAOD::TrackParticle*>> tracks; for (const auto &link : m_trackAssociator(*btagging)) { diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx index f2acff73d03..e4662caa634 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx @@ -7,7 +7,8 @@ // EDM includes #include "xAODJet/Jet.h" - +#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" // atlas utilities #include "PathResolver/PathResolver.h" @@ -142,7 +143,7 @@ namespace { template <typename T> std::pair<std::string, double> BTagPairGetter<T>::operator()(const xAOD::Jet& jet) { - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); if (!btag) throw std::runtime_error("can't find btagging object"); return {m_key, m_getter(*btag)}; } diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h index 1b1d75a873a..e8603f23f14 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h @@ -8,6 +8,7 @@ // ATLAS things #include "AthenaBaseComps/AthAlgorithm.h" #include "xAODJet/JetContainer.h" +#include "xAODBTagging/BTaggingContainer.h" #include "xAODBTagging/BTagging.h" #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadDecorHandle.h" diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h index 293b5ccd12e..022702470ba 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h @@ -13,6 +13,7 @@ #include "AsgTools/AsgTool.h" #include "JetInterface/IJetModifier.h" #include "BTagging/IJetBTaggerTool.h" +#include "xAODBTagging/BTaggingContainer.h" #include "GaudiKernel/ToolHandle.h" #include "StoreGate/ReadHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetSecVtxFindingAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetSecVtxFindingAlg.h index 4ea468b7311..3bb059ee21f 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetSecVtxFindingAlg.h +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetSecVtxFindingAlg.h @@ -16,6 +16,8 @@ #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" +#include "xAODTracking/VertexContainer.h" + namespace InDet { class ISecVertexInJetFinder; } diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTrackAssociation.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTrackAssociation.cxx index 3c3b82922f0..b6c6d8a28f3 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTrackAssociation.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTrackAssociation.cxx @@ -9,6 +9,7 @@ #include "xAODBTagging/BTagging.h" #include "xAODBTagging/BTaggingContainer.h" #include "xAODBTagging/BTaggingAuxContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "xAODJet/Jet.h" @@ -110,7 +111,7 @@ namespace Analysis { if ( m_TracksToTagList.size() ) { for (const std::string& trackColName : m_TracksToTagList) { for (const xAOD::Jet* jet : *theJets) { - xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>(jet->btagging()); + xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>(xAOD::BTaggingUtilities::getBTagging( *jet )); if (!tagInfo) { ATH_MSG_FATAL("The pointer from Jet to BTagging object is invalid"); @@ -168,7 +169,7 @@ namespace Analysis { // non-const pointer to the BTagging object like that. That would keep // const-correctness intact, as StoreGate could tell us whether it's allowed // to modify the BTagging object or not. - xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>((*jetIter)->btagging()); + xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>(xAOD::BTaggingUtilities::getBTagging( **jetIter )); if (!tagInfo) { ATH_MSG_FATAL("The pointer from Jet to BTagging object is invalid"); return StatusCode::FAILURE; @@ -213,7 +214,7 @@ namespace Analysis { // then store them in the BTagging objects. Note that for this to work, the ElementLink from Jet to BTagging object must exist unsigned int i = 0; for (jetcollection_t::iterator jetIter = theJets->begin(); jetIter != theJets->end(); ++jetIter) { - xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>((*jetIter)->btagging()); + xAOD::BTagging* tagInfo = const_cast<xAOD::BTagging*>(xAOD::BTaggingUtilities::getBTagging( **jetIter )); std::vector< ElementLink< xAOD::MuonContainer > > associationLinks; for (std::vector<const xAOD::Muon*>::const_iterator muonIter = assocs[i]->begin(); muonIter != assocs[i]->end(); ++muonIter) { ElementLink<xAOD::MuonContainer> EL; diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetSecVtxFindingAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetSecVtxFindingAlg.cxx index 7f1ac927e0e..8ed783c4947 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetSecVtxFindingAlg.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetSecVtxFindingAlg.cxx @@ -2,13 +2,14 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "BTagging/JetSecVtxFindingAlg.h" - //general interface for secondary vertex finders #include "InDetRecToolInterfaces/ISecVertexInJetFinder.h" #include "VxSecVertex/VxSecVKalVertexInfo.h" #include "VxSecVertex/VxJetFitterVertexInfo.h" - +#include "xAODTracking/TrackParticleContainer.h" + +#include "BTagging/JetSecVtxFindingAlg.h" + #include "StoreGate/ReadDecorHandle.h" #include "StoreGate/ReadHandle.h" diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx index b32bbbae40a..b37aebe0091 100755 --- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx @@ -8,6 +8,7 @@ #include "xAODJet/JetContainer.h" #include "xAODJet/JetAttributes.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "xAODEventInfo/EventInfo.h" #include "xAODEgamma/ElectronContainer.h" #include "xAODMuon/MuonContainer.h" @@ -836,7 +837,7 @@ double JetTagMonitorAlgorithm::getMVweight(const xAOD::Jet *jet) const { ATH_MSG_DEBUG("retrieving MV2c10/DL1* weight"); - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (!btag) return 0; diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx index feaef044feb..ac42a610521 100755 --- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx @@ -4,6 +4,7 @@ #include "xAODJet/JetAttributes.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "JetTagMonitoring.h" @@ -1248,7 +1249,7 @@ void JetTagMonitoring::fillTrackInJetHistograms(const xAOD::Jet *jet) { void JetTagMonitoring::fillBtagHistograms(const xAOD::Jet *jet, bool fill_top_histos) { // added by SARA (just moved already existing code into this function for better readibility) - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (!btag) return; @@ -1290,7 +1291,7 @@ void JetTagMonitoring::fillDetailedHistograms(const xAOD::Jet *jet, Jet_t taggab ATH_MSG_DEBUG("in fillDetailedHistograms()"); //* get detailed information *// - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (not btag){ ATH_MSG_WARNING("btag pointer is null in JetTagMonitoring::fillDetailedHistograms; filling these histograms will be skipped"); @@ -1435,7 +1436,7 @@ void JetTagMonitoring::fillBadTrackBits(const std::bitset<17> failedCuts, double void JetTagMonitoring::fillGoodJetHistos(const xAOD::Jet *jet) { - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (not btag){ ATH_MSG_WARNING("btag pointer is null in JetTagMonitoring::fillGoodJetHistos; filling these histograms will be skipped"); return; @@ -1552,7 +1553,7 @@ void JetTagMonitoring::fillSuspectJetHistos(const xAOD::Jet *jet) { m_track_selector_suspect->Fill(jet->eta(), jet->phi(), 1.); - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (not btag){ ATH_MSG_WARNING("btag pointer is null in JetTagMonitoring::fillSuspectJetHistos; filling these histograms will be skipped"); return; diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx index 09e35d18556..7082d2dd980 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx @@ -4,6 +4,7 @@ #include "xAODBTaggingEfficiency/BTaggingEfficiencyTool.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "CalibrationDataInterface/CalibrationDataInterfaceROOT.h" #include "CalibrationDataInterface/CalibrationDataVariables.h" #include "CalibrationDataInterface/CalibrationDataContainer.h" @@ -985,7 +986,7 @@ BTaggingEfficiencyTool::fillVariables( const xAOD::Jet & jet, CalibrationDataVar x.jetAuthor = m_jetAuthor; //bool weightOK = true; if (m_isContinuous) { - const xAOD::BTagging* tagInfo = jet.btagging(); + const xAOD::BTagging* tagInfo = xAOD::BTaggingUtilities::getBTagging( jet ); if (!tagInfo) return false; // x.jetTagWeight = (tagInfo->*m_getTagWeight)(); // For now, we defer the tag weight computation to the selection tool only in the case of DL1* (this is likely to be revisited) diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx index ef4fdd408f9..6d4310cbb62 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx @@ -4,6 +4,7 @@ #include "xAODBTaggingEfficiency/BTaggingSelectionTool.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "CalibrationDataInterface/CalibrationDataInterfaceROOT.h" #include "CalibrationDataInterface/CalibrationDataVariables.h" #include "CalibrationDataInterface/CalibrationDataContainer.h" @@ -222,7 +223,7 @@ CorrectionCode BTaggingSelectionTool::getTaggerWeight( const xAOD::Jet& jet, dou else if ( taggerName.find("MV2") != string::npos ){ - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); if ((!btag) || (!btag->MVx_discriminant(taggerName, tagweight))){ if(m_ErrorOnTagWeightFailure){ @@ -243,7 +244,7 @@ CorrectionCode BTaggingSelectionTool::getTaggerWeight( const xAOD::Jet& jet, dou double dl1_pc(-10.); double dl1_pu(-10.); - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); if ((!btag)){ ATH_MSG_ERROR("Failed to retrieve the BTagging information"); @@ -372,7 +373,8 @@ asg::AcceptData BTaggingSelectionTool::accept( const xAOD::Jet& jet ) const { double weight_mv2c100(-10.); double weight_mv2cl100(-10.); - const xAOD::BTagging* btag = jet.btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( jet ); + if ((!btag)){ ATH_MSG_ERROR("Failed to retrieve the BTagging information"); diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/ExKtbbTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/ExKtbbTag.cxx index dffd4e4b683..e6d2f803b6d 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/src/ExKtbbTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/ExKtbbTag.cxx @@ -250,8 +250,9 @@ bool ExKtbbTag::CalculateInputVariables(xAOD::Jet& jetToTag, xAOD::BTagging* BTa // validity check if(ExKtSubJets.size() == 2){ - const xAOD::BTagging* bjet_LeadExKtSubJet = ExKtSubJets[0]->btagging(); - const xAOD::BTagging* bjet_SubLeadExKtSubJet = ExKtSubJets[1]->btagging(); + const xAOD::BTagging* bjet_LeadExKtSubJet = xAOD::BTaggingUtilities::getBTagging( *ExKtSubJets[0] ); + const xAOD::BTagging* bjet_SubLeadExKtSubJet = xAOD::BTaggingUtilities::getBTagging( *ExKtSubJets[1] ); + if( (!bjet_LeadExKtSubJet) || (!bjet_SubLeadExKtSubJet) ){ ATH_MSG_ERROR("Exclusive kt subjet is not well b-tagged!"); diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx index 6aa99006aca..4c38270bde1 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx @@ -3,7 +3,8 @@ */ #include "BTaggingValidationPlots.h" -#include "ParticleJetTools/JetFlavourInfo.h" +#include "ParticleJetTools/JetFlavourInfo.h" +#include "xAODBTagging/BTaggingUtilities.h" using CLHEP::GeV; namespace JetTagDQA{ @@ -138,7 +139,7 @@ namespace JetTagDQA{ else jet->getAttribute("TruthLabelID",label); //ANDREA --- Store tracking quantities - const xAOD::BTagging* bjet = jet->btagging(); + const xAOD::BTagging* bjet = xAOD::BTaggingUtilities::getBTagging( *jet ); std::vector< ElementLink< xAOD::TrackParticleContainer > > assocTracks = bjet->auxdata<std::vector<ElementLink<xAOD::TrackParticleContainer> > >("BTagTrackToJetAssociator"); for (unsigned int iT=0; iT<assocTracks.size(); iT++) { if (!assocTracks.at(iT).isValid()) continue; diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx index a1f53d839c2..a2f7d7f3e5e 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx @@ -20,7 +20,7 @@ #include "xAODTracking/TrackParticle.h" #include "xAODTracking/Vertex.h" #include "xAODBTagging/BTagging.h" -//#include "../../Event/xAOD/xAODBTagging/xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "AthenaBaseComps/AthCheckMacros.h" #include "ParticleJetTools/JetFlavourInfo.h" @@ -166,7 +166,7 @@ namespace JetTagDQA { //std::cout << "number of processed jet: " << njets << std::endl; //btagging - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); int label(1000); //double dR(1000); diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/PhysValExample.cxx b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/PhysValExample.cxx index c19296cbcdb..0e5f79a9eca 100644 --- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/PhysValExample.cxx +++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/PhysValExample.cxx @@ -28,6 +28,7 @@ #include "xAODTracking/Vertex.h" #include "xAODEventInfo/EventInfo.h" #include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "RecEvent/RecoTimingObj.h" @@ -133,7 +134,7 @@ namespace PhysVal { ATH_CHECK(evtStore()->retrieve(jets, m_jetName)); for (auto jet : *jets) { m_jetPlots.fill(jet); - const xAOD::BTagging* btag = jet->btagging(); + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *jet ); if (btag && btag->IP3D_loglikelihoodratio() > 1.2) ++nbtag; } m_jetPlots.fill(); diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx index e4d1aaa85a8..1bb818c1cfb 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx @@ -3,6 +3,7 @@ */ #include "InDetTrackSystematicsTools/JetTrackFilterTool.h" +#include "xAODTracking/TrackParticleContainer.h" #include "FourMomUtils/xAODP4Helpers.h" diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h index 28c36046b0f..479f898a884 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h @@ -24,6 +24,7 @@ // EDM includes #include "xAODJet/JetContainer.h" +#include "xAODTracking/VertexContainer.h" #include "xAODMissingET/MissingETContainer.h" #include "xAODCaloEvent/CaloCluster.h" #include "JetInterface/IJetDecorator.h" diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtToolBDT.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtToolBDT.h index b955e7fa86b..300f7db52b4 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtToolBDT.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtToolBDT.h @@ -28,6 +28,7 @@ // EDM includes #include "xAODEventInfo/EventInfo.h" #include "xAODJet/JetContainer.h" +#include "xAODTracking/VertexContainer.h" #include "xAODMissingET/MissingETContainer.h" #include "xAODCaloEvent/CaloCluster.h" #include "xAODCaloEvent/CaloClusterContainer.h" diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h index cd288e4c6fe..b4c2149de52 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h @@ -30,6 +30,7 @@ #include "AsgDataHandles/WriteDecorHandleKey.h" #include "xAODEventInfo/EventInfo.h" #include "xAODJet/JetContainer.h" +#include "xAODTracking/VertexContainer.h" class JetOriginCorrectionTool : public asg::AsgTool, virtual public IJetDecorator { diff --git a/Reconstruction/Jet/JetReclustering/README.md b/Reconstruction/Jet/JetReclustering/README.md index eef94443ab6..e43444f948b 100644 --- a/Reconstruction/Jet/JetReclustering/README.md +++ b/Reconstruction/Jet/JetReclustering/README.md @@ -291,7 +291,7 @@ for(auto jet: *in_jets){ continue; } subjet = static_cast<const xAOD::Jet*>(constit->rawConstituent()); - btag = subjet->btagging(); + btag = xAOD::BTaggingUtilities::getBTagging( *subjet ); if(btag) Info("execute()", "btagging: %0.2f", btag->MV1_discriminant()); diff --git a/Reconstruction/Jet/JetSubStructureUtils/CMakeLists.txt b/Reconstruction/Jet/JetSubStructureUtils/CMakeLists.txt index 420a1da5a99..26a2764f95c 100644 --- a/Reconstruction/Jet/JetSubStructureUtils/CMakeLists.txt +++ b/Reconstruction/Jet/JetSubStructureUtils/CMakeLists.txt @@ -15,7 +15,7 @@ atlas_add_library( JetSubStructureUtils INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} ${FASTJETCONTRIB_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${FASTJET_LIBRARIES} ${FASTJETCONTRIB_LIBRARIES} - xAODJet xAODMuon MuonSelectorToolsLib + xAODJet xAODTracking xAODBTagging xAODMuon MuonSelectorToolsLib PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PathResolver ) # Install files from the package: diff --git a/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx b/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx index 5c9f92e4b45..b33b5e487c0 100644 --- a/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx +++ b/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx @@ -8,6 +8,8 @@ #include "PathResolver/PathResolver.h" #endif +#include "xAODBTagging/BTaggingUtilities.h" + // root includes #include <TSystem.h> #include <TFile.h> @@ -452,7 +454,8 @@ int BoostedXbbTag::result(const xAOD::Jet& jet, std::string algorithm_name, cons // MV2c10 double mv2c10(FLT_MIN); - if(!trackJet->btagging()->MVx_discriminant("MV2c10", mv2c10)){ + const xAOD::BTagging* btag = xAOD::BTaggingUtilities::getBTagging( *trackJet ); + if(!btag->MVx_discriminant("MV2c10", mv2c10)){ if(m_verbose) printf("<%s>: Could not retrieve the MV2c10 discriminant.\r\n", APP_NAME); return -9; } diff --git a/Reconstruction/Jet/JetSubStructureUtils/Root/Charge.cxx b/Reconstruction/Jet/JetSubStructureUtils/Root/Charge.cxx index 0a5fc00270d..844aacd64c2 100644 --- a/Reconstruction/Jet/JetSubStructureUtils/Root/Charge.cxx +++ b/Reconstruction/Jet/JetSubStructureUtils/Root/Charge.cxx @@ -3,6 +3,7 @@ */ #include "JetSubStructureUtils/Charge.h" +#include "xAODTracking/TrackParticle.h" using namespace std; using namespace JetSubStructureUtils; diff --git a/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h b/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h index 3cd07106f01..6f46c200b59 100644 --- a/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h +++ b/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h @@ -23,6 +23,8 @@ class TH1D; #include "TRandom3.h" +#include "xAODTracking/VertexContainer.h" + #include "xAODMissingET/MissingETContainer.h" #include "xAODMissingET/MissingETAssociationMap.h" #include "xAODMissingET/MissingETAssociationHelper.h" diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx index 970fa1863c5..2928274daae 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx @@ -15,6 +15,8 @@ #include "xAODParticleEvent/IParticleLink.h" #include "xAODParticleEvent/IParticleLinkContainer.h" +#include "xAODTracking/VertexContainer.h" + // Gaudi #include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/SystemOfUnits.h" diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETBaseTool.h b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETBaseTool.h index 86624e0ef87..ea1dcd599af 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETBaseTool.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETBaseTool.h @@ -26,6 +26,7 @@ tools must implement the execute(...) method. #include "xAODCaloEvent/CaloClusterContainer.h" #include "xAODTrigMissingET/TrigMissingET.h" #include "xAODJet/JetContainer.h" +#include "xAODTracking/VertexContainer.h" #include "xAODMuon/MuonContainer.h" #include <vector> diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx index 33df86aa1da..1ab92da1add 100755 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx @@ -30,6 +30,7 @@ #include "xAODBTagging/BTagging.h" #include "xAODBTagging/BTaggingContainer.h" #include "xAODBTagging/BTaggingAuxContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" #include "xAODBTagging/BTagVertex.h" #include "xAODBTagging/BTagVertexContainer.h" @@ -270,7 +271,7 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT:: // Link the BTagging object to the jet for track association ElementLink< xAOD::BTaggingContainer> linkBTagger; linkBTagger.toContainedElement(*trigBTaggingContainer, trigBTagging); - jet->setBTaggingLink(linkBTagger); + xAOD::BTaggingUtilities::setBTaggingLink( *jet,linkBTagger ); std::vector<xAOD::Jet*> jetsList; jetsList.push_back(jet); diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt index 2492091c766..e716a981c3b 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt @@ -20,7 +20,7 @@ if(NOT BUILDVP1LIGHT) VP1AODSystems/*.h src/*.h src/*.cxx PUBLIC_HEADERS VP1AODSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} - LINK_LIBRARIES xAODMuon xAODEgamma xAODTracking GaudiKernel VP1Base StoreGateLib + LINK_LIBRARIES xAODMuon xAODEgamma xAODTracking xAODBTagging GaudiKernel VP1Base StoreGateLib Qt5::Core Qt5::Gui PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver TrkExInterfaces @@ -31,7 +31,7 @@ else() src/*.h VP1AODSystems/*.h src/*cxx PUBLIC_HEADERS VP1AODSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} - LINK_LIBRARIES xAODMuon xAODEgamma xAODTracking VP1Base + LINK_LIBRARIES xAODMuon xAODEgamma xAODTracking xAODBTagging VP1Base Qt5::Core Qt5::Gui PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver TrkExInterfaces xAODEventInfo diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Jet.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Jet.cxx index 55fb437bea8..99576a4ef36 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Jet.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Jet.cxx @@ -43,6 +43,9 @@ #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm' #endif +#include "xAODTracking/VertexContainer.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingUtilities.h" //____________________________________________________________________ class IParticleHandle_Jet::Imp { @@ -718,8 +721,8 @@ double IParticleHandle_Jet::getBTaggingWeight(std::string tagger) { double weight = 0.0; - const xAOD::BTagging * myBTag = nullptr; - myBTag = m_d->m_jet->btagging(); + const xAOD::BTagging * myBTag = nullptr; + myBTag = xAOD::BTaggingUtilities::getBTagging( *m_d->m_jet ); if (myBTag == nullptr) { VP1Msg::messageWarningRed("It was not possible to access the pointer to b-tagging info, for the selected collection! Returning 'weight': 0.0"); //("It was not possible to access the tagger '"+ tagger +"' for the selected collection: " + m_d->m_jet->getInputType() + m_d->m_jet->getAlgorithmType() ); -- GitLab