From f72eb30580258e5e99e7965f7d5a6bf3f3815ca8 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Wed, 14 Jul 2021 18:11:06 +0200 Subject: [PATCH 1/6] Add forward declaration for jets and b-tagging --- .../xAODBTagging/BTaggingContainerFwd.h | 18 +++++++++++++++++ .../xAODBTagging/xAODBTagging/BTaggingFwd.h | 18 +++++++++++++++++ Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h | 20 +++++++++++++++++++ Event/xAOD/xAODJet/xAODJet/JetFwd.h | 18 +++++++++++++++++ Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h | 4 +++- .../FlavorTagDiscriminants/BTagDecoratorAlg.h | 3 ++- .../BTagMuonAugmenter.h | 3 ++- .../BTagToJetLinkerAlg.h | 4 ++-- .../BTagTrackIpAccessor.h | 4 ++-- .../BTagTrackLinkCopyAlg.h | 2 +- .../FlavorTagDiscriminants/IBTagDecorator.h | 2 +- .../VRJetOverlapDecoratorTool.h | 1 + .../src/BTagDecoratorAlg.cxx | 2 ++ .../src/BTagToJetLinkerAlg.cxx | 4 ++++ .../src/BTagTrackLinkCopyAlg.cxx | 5 ++++- 15 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h create mode 100644 Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h create mode 100644 Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h create mode 100644 Event/xAOD/xAODJet/xAODJet/JetFwd.h diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h new file mode 100644 index 000000000000..35203897d60f --- /dev/null +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h @@ -0,0 +1,18 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef XAODBTAGGING_BTAGGINGCONTAINERFWD_H +#define XAODBTAGGING_BTAGGINGCONTAINERFWD_H + +#include "AthContainers/DataVector.h" +#include "xAODBTagging/BTaggingFwd.h" + +namespace xAOD { + /// Definition of the current "egamma container version" + typedef DataVector<BTagging> BTaggingContainer; +} + +#endif // XAODBTAGGING_BTAGGINGCONTAINERFWD_H diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h new file mode 100644 index 000000000000..568926814161 --- /dev/null +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h @@ -0,0 +1,18 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef XAODBTAGGING_BTAGGINGFWD_H +#define XAODBTAGGING_BTAGGINGFWD_H + + +/// Namespace holding all the xAOD EDM classes +namespace xAOD { + /// Definition of the current "jet version" + class BTagging_v1; + typedef BTagging_v1 BTagging; +} + +#endif // XAODBTAGGING_BTAGGINGFWD_H diff --git a/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h b/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h new file mode 100644 index 000000000000..4c71024b558b --- /dev/null +++ b/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h @@ -0,0 +1,20 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef XAODJET_JETCONTAINERFWD_H +#define XAODJET_JETCONTAINERFWD_H + +#include "AthContainers/DataVector.h" +#include "xAODBase/IParticleContainer.h" +#include "xAODJet/JetFwd.h" + +DATAVECTOR_BASE_FWD( xAOD::Jet, xAOD::IParticle); +namespace xAOD { + /// Definition of the current "egamma container version" + typedef DataVector<Jet> JetContainer; +} + +#endif // XAODJET_JETCONTAINERFWD_H diff --git a/Event/xAOD/xAODJet/xAODJet/JetFwd.h b/Event/xAOD/xAODJet/xAODJet/JetFwd.h new file mode 100644 index 000000000000..d1becf00f7ad --- /dev/null +++ b/Event/xAOD/xAODJet/xAODJet/JetFwd.h @@ -0,0 +1,18 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef XAODJET_JETFWD_H +#define XAODJET_JETFWD_H + + +/// Namespace holding all the xAOD EDM classes +namespace xAOD { + /// Definition of the current "jet version" + class Jet_v1; + typedef Jet_v1 Jet; +} + +#endif // XAODJET_JETFWD_H diff --git a/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h b/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h index 750807591fbc..f8c041d9c31f 100644 --- a/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h +++ b/Event/xAOD/xAODJet/xAODJet/versions/Jet_v1.h @@ -24,6 +24,8 @@ #include "xAODJet/JetTypes.h" #include "xAODJet/JetContainerInfo.h" +#include "xAODJet/JetContainerFwd.h" + namespace fastjet { class PseudoJet; } @@ -350,7 +352,7 @@ namespace xAOD { } // namespace xAOD // Declare IParticle as a base class of Jet_v1: -DATAVECTOR_BASE( xAOD::Jet_v1, xAOD::IParticle ); +DATAVECTOR_BASE_FIN( xAOD::Jet_v1, xAOD::IParticle ); #include "xAODJet/versions/Jet_v1.icc" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h index 54aab2e6dcc5..fcfe83b913db 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h @@ -8,7 +8,8 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "FlavorTagDiscriminants/IBTagDecorator.h" -#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingContainerFwd.h" +#include "xAODTracking/TrackParticleContainerFwd.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h index c9443bc29e16..625b3a3b2829 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h @@ -6,7 +6,8 @@ #ifndef BTAG_MUON_AUGMENTER_H #define BTAG_MUON_AUGMENTER_H -#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingFwd.h" +#include "xAODJet/JetContainer.h" #include "xAODMuon/MuonContainer.h" #include "xAODEventInfo/EventInfo.h" #include "FlavorTagDiscriminants/FlipTagEnums.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h index a55a805906d8..546224553f71 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h @@ -7,8 +7,8 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "xAODBTagging/BTaggingContainer.h" -#include "xAODJet/JetContainer.h" +#include "xAODBTagging/BTaggingContainerFwd.h" +#include "xAODJet/JetContainerFwd.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackIpAccessor.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackIpAccessor.h index c60760faad90..d93afc1a2c6e 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackIpAccessor.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackIpAccessor.h @@ -13,8 +13,8 @@ #include "AthContainers/AuxElement.h" #include "AthLinks/ElementLink.h" -#include "xAODTracking/TrackParticleContainer.h" -#include "xAODJet/Jet.h" +#include "xAODTracking/TrackParticleContainerFwd.h" +#include "xAODJet/JetFwd.h" struct BTagSignedIP { double ip2d_signed_d0; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h index 6e7f00a1d6e0..5d3b45231b87 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h @@ -8,7 +8,7 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "xAODBTagging/BTaggingContainer.h" -#include "xAODJet/JetContainer.h" +#include "xAODJet/JetContainerFwd.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IBTagDecorator.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IBTagDecorator.h index 1669c263d6d7..7fbaee5ae5aa 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IBTagDecorator.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/IBTagDecorator.h @@ -7,7 +7,7 @@ #define I_BTAG_DECORATOR_H #include "AsgTools/IAsgTool.h" -#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingFwd.h" class IBTagDecorator : virtual public asg::IAsgTool { ASG_TOOL_INTERFACE(IBTagDecorator) diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h index 59e2f4651017..d06761794ce2 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h @@ -8,6 +8,7 @@ #include "AsgTools/AsgTool.h" #include "JetInterface/IJetDecorator.h" +#include "xAODJet/JetContainerFwd.h" class VRJetOverlapDecorator; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagDecoratorAlg.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagDecoratorAlg.cxx index 0b55751d16dc..ec14c37a9674 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagDecoratorAlg.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagDecoratorAlg.cxx @@ -3,6 +3,8 @@ */ #include "FlavorTagDiscriminants/BTagDecoratorAlg.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODTracking/TrackParticleContainer.h" #include "StoreGate/ReadDecorHandle.h" #include <exception> diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagToJetLinkerAlg.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagToJetLinkerAlg.cxx index ed109c66d0c2..72540f345209 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagToJetLinkerAlg.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagToJetLinkerAlg.cxx @@ -2,10 +2,14 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODJet/JetContainer.h" + #include "FlavorTagDiscriminants/BTagToJetLinkerAlg.h" #include "StoreGate/WriteDecorHandle.h" #include "StoreGate/ReadDecorHandle.h" + namespace FlavorTagDiscriminants { BTagToJetLinkerAlg::BTagToJetLinkerAlg( const std::string& name, ISvcLocator* svcloc): diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx index ce27a451c164..cd7dfe00b5bf 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx @@ -3,9 +3,12 @@ */ #include "FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODJet/JetContainer.h" +#include "xAODTracking/TrackParticleContainer.h" + #include "StoreGate/WriteDecorHandle.h" #include "StoreGate/ReadDecorHandle.h" -#include "xAODTracking/TrackParticleContainer.h" namespace FlavorTagDiscriminants { BTagTrackLinkCopyAlg::BTagTrackLinkCopyAlg( -- GitLab From 99c4c403c99a925cc4191d6268aeef984384d975 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Thu, 15 Jul 2021 08:20:59 +0200 Subject: [PATCH 2/6] Try to make b-tagging inherit from AuxElement --- Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h | 4 +++- Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h | 3 +-- Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h | 4 ++++ Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h | 4 ++-- Event/xAOD/xAODJet/xAODJet/JetFwd.h | 2 +- .../FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h index 35203897d60f..c5c79f80d4b6 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h @@ -8,10 +8,12 @@ #define XAODBTAGGING_BTAGGINGCONTAINERFWD_H #include "AthContainers/DataVector.h" +#include "AthContainers/AuxElement.h" #include "xAODBTagging/BTaggingFwd.h" +DATAVECTOR_BASE_FWD(xAOD::BTagging, SG::AuxElement); namespace xAOD { - /// Definition of the current "egamma container version" + /// Definition of the current container version typedef DataVector<BTagging> BTaggingContainer; } diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h index 568926814161..283955f3caa8 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingFwd.h @@ -7,10 +7,9 @@ #ifndef XAODBTAGGING_BTAGGINGFWD_H #define XAODBTAGGING_BTAGGINGFWD_H - /// Namespace holding all the xAOD EDM classes namespace xAOD { - /// Definition of the current "jet version" + /// Definition of the current version class BTagging_v1; typedef BTagging_v1 BTagging; } diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h index 13d346e217cf..f23f2f3a6fa6 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h @@ -27,6 +27,8 @@ #include <iostream> #include "CxxUtils/checker_macros.h" +#include "xAODBTagging/BTaggingContainerFwd.h" + namespace xAOD { /// @class xAOD::BTagging @@ -319,4 +321,6 @@ namespace xAOD { } // namespace xAOD +DATAVECTOR_BASE_FIN(xAOD::BTagging_v1, SG::AuxElement); + #endif // XAODBTAGGING_VERSIONS_BTAGGING_V1_H diff --git a/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h b/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h index 4c71024b558b..499ac8e6a114 100644 --- a/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h +++ b/Event/xAOD/xAODJet/xAODJet/JetContainerFwd.h @@ -11,9 +11,9 @@ #include "xAODBase/IParticleContainer.h" #include "xAODJet/JetFwd.h" -DATAVECTOR_BASE_FWD( xAOD::Jet, xAOD::IParticle); +DATAVECTOR_BASE_FWD(xAOD::Jet, xAOD::IParticle); namespace xAOD { - /// Definition of the current "egamma container version" + /// Definition of the current container version typedef DataVector<Jet> JetContainer; } diff --git a/Event/xAOD/xAODJet/xAODJet/JetFwd.h b/Event/xAOD/xAODJet/xAODJet/JetFwd.h index d1becf00f7ad..10f0e1480210 100644 --- a/Event/xAOD/xAODJet/xAODJet/JetFwd.h +++ b/Event/xAOD/xAODJet/xAODJet/JetFwd.h @@ -10,7 +10,7 @@ /// Namespace holding all the xAOD EDM classes namespace xAOD { - /// Definition of the current "jet version" + /// Definition of the current version class Jet_v1; typedef Jet_v1 Jet; } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h index 5d3b45231b87..1c7aabbbc6cd 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h @@ -7,7 +7,7 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "xAODBTagging/BTaggingContainer.h" +#include "xAODBTagging/BTaggingContainerFwd.h" #include "xAODJet/JetContainerFwd.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" -- GitLab From 5595ed20777f27eb10ff713961a0f039b5ce63e7 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Thu, 15 Jul 2021 09:31:04 +0200 Subject: [PATCH 3/6] Make AuxElementContainer header --- .../xAODBTagging/BTaggingContainerFwd.h | 3 ++- .../xAODBase/xAODBase/AuxElementContainer.h | 18 ++++++++++++++++++ .../src/BTagTrackLinkCopyAlg.cxx | 2 +- .../FlavorTagDiscriminants_entries.cxx | 3 +++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h index c5c79f80d4b6..d9f27c5beebf 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h @@ -8,7 +8,7 @@ #define XAODBTAGGING_BTAGGINGCONTAINERFWD_H #include "AthContainers/DataVector.h" -#include "AthContainers/AuxElement.h" +#include "xAODBase/AuxElementContainer.h" #include "xAODBTagging/BTaggingFwd.h" DATAVECTOR_BASE_FWD(xAOD::BTagging, SG::AuxElement); @@ -17,4 +17,5 @@ namespace xAOD { typedef DataVector<BTagging> BTaggingContainer; } + #endif // XAODBTAGGING_BTAGGINGCONTAINERFWD_H diff --git a/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h b/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h new file mode 100644 index 000000000000..300e2be181f3 --- /dev/null +++ b/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h @@ -0,0 +1,18 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef AUXELEMENTCONTAINER_H +#define AUXELEMENTCONTAINER_H + +#include "AthContainers/DataVector.h" +#include "AthContainers/AuxElement.h" + +typedef DataVector<SG::AuxElement> AuxElementContainer; +// Set up a CLID for the container: +#include "xAODCore/CLASS_DEF.h" +CLASS_DEF( AuxElementContainer, 1333541012, 1 ) + +#endif // AUXELEMENTCONTAINER diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx index cd7dfe00b5bf..1465e10f2c2c 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/BTagTrackLinkCopyAlg.cxx @@ -2,8 +2,8 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h" #include "xAODBTagging/BTaggingContainer.h" +#include "FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h" #include "xAODJet/JetContainer.h" #include "xAODTracking/TrackParticleContainer.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx index f13534d84c6d..b3ea555a0529 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx @@ -11,6 +11,9 @@ #include "FlavorTagDiscriminants/BTagToJetLinkerAlg.h" #include "FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h" +// this feels like a hack, but without it we miss CLID entries +#include "xAODBTagging/BTaggingContainer.h" + using namespace FlavorTagDiscriminants; DECLARE_COMPONENT(VRJetOverlapDecoratorTool) -- GitLab From 442d8994b04989113c88839ee02d6ee788f3f009 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Fri, 16 Jul 2021 17:49:50 +0200 Subject: [PATCH 4/6] Remove AuxElementContainer --- .../xAODBTagging/BTaggingContainerFwd.h | 2 -- .../xAODBTagging/versions/BTagging_v1.h | 4 +--- .../xAODBase/xAODBase/AuxElementContainer.h | 18 ------------------ 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h index d9f27c5beebf..77792c0dd0b9 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/BTaggingContainerFwd.h @@ -8,10 +8,8 @@ #define XAODBTAGGING_BTAGGINGCONTAINERFWD_H #include "AthContainers/DataVector.h" -#include "xAODBase/AuxElementContainer.h" #include "xAODBTagging/BTaggingFwd.h" -DATAVECTOR_BASE_FWD(xAOD::BTagging, SG::AuxElement); namespace xAOD { /// Definition of the current container version typedef DataVector<BTagging> BTaggingContainer; diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h index f23f2f3a6fa6..ef46c83de0aa 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h @@ -27,8 +27,6 @@ #include <iostream> #include "CxxUtils/checker_macros.h" -#include "xAODBTagging/BTaggingContainerFwd.h" - namespace xAOD { /// @class xAOD::BTagging @@ -321,6 +319,6 @@ namespace xAOD { } // namespace xAOD -DATAVECTOR_BASE_FIN(xAOD::BTagging_v1, SG::AuxElement); +SG_BASE(xAOD::BTagging_v1, SG::AuxElement); #endif // XAODBTAGGING_VERSIONS_BTAGGING_V1_H diff --git a/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h b/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h deleted file mode 100644 index 300e2be181f3..000000000000 --- a/Event/xAOD/xAODBase/xAODBase/AuxElementContainer.h +++ /dev/null @@ -1,18 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef AUXELEMENTCONTAINER_H -#define AUXELEMENTCONTAINER_H - -#include "AthContainers/DataVector.h" -#include "AthContainers/AuxElement.h" - -typedef DataVector<SG::AuxElement> AuxElementContainer; -// Set up a CLID for the container: -#include "xAODCore/CLASS_DEF.h" -CLASS_DEF( AuxElementContainer, 1333541012, 1 ) - -#endif // AUXELEMENTCONTAINER -- GitLab From 85acc734c66e2f040ddf373882cefe7dc8b6ed6c Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Mon, 19 Jul 2021 11:11:47 +0200 Subject: [PATCH 5/6] Stop using forward declartions in Algs --- .../FlavorTagDiscriminants/BTagDecoratorAlg.h | 4 ++-- .../FlavorTagDiscriminants/BTagToJetLinkerAlg.h | 4 ++-- .../FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h | 4 ++-- .../FlavorTagDiscriminants/DL2HighLevel.h | 2 +- .../src/components/FlavorTagDiscriminants_entries.cxx | 3 --- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h index fcfe83b913db..8d4a37b15055 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagDecoratorAlg.h @@ -8,8 +8,8 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "FlavorTagDiscriminants/IBTagDecorator.h" -#include "xAODBTagging/BTaggingContainerFwd.h" -#include "xAODTracking/TrackParticleContainerFwd.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODTracking/TrackParticleContainer.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h index 546224553f71..a55a805906d8 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagToJetLinkerAlg.h @@ -7,8 +7,8 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "xAODBTagging/BTaggingContainerFwd.h" -#include "xAODJet/JetContainerFwd.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODJet/JetContainer.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h index 1c7aabbbc6cd..6e7f00a1d6e0 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h @@ -7,8 +7,8 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "xAODBTagging/BTaggingContainerFwd.h" -#include "xAODJet/JetContainerFwd.h" +#include "xAODBTagging/BTaggingContainer.h" +#include "xAODJet/JetContainer.h" #include "StoreGate/WriteDecorHandleKey.h" #include "StoreGate/ReadDecorHandleKey.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h index 779d201b1590..7bb8fa6b2f4a 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h @@ -9,7 +9,7 @@ #include "FlavorTagDiscriminants/DL2DataDependencyNames.h" // EDM includes -#include "xAODBTagging/BTagging.h" +#include "xAODBTagging/BTaggingFwd.h" #include <memory> #include <string> diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx index b3ea555a0529..f13534d84c6d 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx @@ -11,9 +11,6 @@ #include "FlavorTagDiscriminants/BTagToJetLinkerAlg.h" #include "FlavorTagDiscriminants/BTagTrackLinkCopyAlg.h" -// this feels like a hack, but without it we miss CLID entries -#include "xAODBTagging/BTaggingContainer.h" - using namespace FlavorTagDiscriminants; DECLARE_COMPONENT(VRJetOverlapDecoratorTool) -- GitLab From ccb3ec5399bfb4cec47ccf785fb2fe0ec8d7e809 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Mon, 19 Jul 2021 17:56:35 +0200 Subject: [PATCH 6/6] Remove SG_BASE from BTagging_v1 (no base class is needed here) --- Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h index ef46c83de0aa..13d346e217cf 100644 --- a/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h +++ b/Event/xAOD/xAODBTagging/xAODBTagging/versions/BTagging_v1.h @@ -319,6 +319,4 @@ namespace xAOD { } // namespace xAOD -SG_BASE(xAOD::BTagging_v1, SG::AuxElement); - #endif // XAODBTAGGING_VERSIONS_BTAGGING_V1_H -- GitLab