diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/cmt/requirements b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/cmt/requirements index e1b6fd09491303b5f2d87b454f7f915e364c4381..81c37e3ed53208a2d6596a79563a3619064fa954 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/cmt/requirements +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/cmt/requirements @@ -9,12 +9,14 @@ private use AthLinks AthLinks-* Control use AthenaBaseComps AthenaBaseComps-* Control use AthenaKernel AthenaKernel-* Control -use CaloEvent CaloEvent-* Calorimeter +#use CaloEvent CaloEvent-* Calorimeter +use_unless pkg=CaloEvent tag=ManaCore ver=* root=Calorimeter use DerivationFrameworkInterfaces DerivationFrameworkInterfaces-* PhysicsAnalysis/DerivationFramework use EventInfo EventInfo-* Event use ExpressionEvaluation ExpressionEvaluation-* PhysicsAnalysis/CommonTools use GaudiInterface GaudiInterface-* External -use TrigDecisionTool TrigDecisionTool-* Trigger/TrigAnalysis +#use TrigDecisionTool TrigDecisionTool-* Trigger/TrigAnalysis +use_unless pkg=TrigDecisionTool tag=ManaCore ver=* root=Trigger/TrigAnalysis use xAODBase xAODBase-* Event/xAOD use xAODCaloEvent xAODCaloEvent-* Event/xAOD use xAODEgamma xAODEgamma-* Event/xAOD diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx index 32a1f104956df61873026ad3a42e6654f7b89e5a..60ecb5fcf87034ff5de30919828ad1f260ec6079 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsAlg.cxx @@ -31,11 +31,11 @@ ThinCaloCellsAlg::ThinCaloCellsAlg( const std::string& name, ISvcLocator* pSvcLocator ) : ::AthAlgorithm( name, pSvcLocator ), m_jos("JobOptionsSvc", name), - m_thinningSvc( "ThinningSvc/ThinningSvc", name ), + m_thinningSvc( "ThinningSvc/ThinningSvc", name ), m_thinTool("ThinCaloCellsTool/ThinCaloCellsTool", this), - m_setCaloCellKey(false), - m_setInCollKey(false), - m_nEventsProcessed(0) + m_setCaloCellKey(false), + m_setInCollKey(false), + m_nEventsProcessed(0) { declareProperty("JobOptionsSvc", m_jos, "The JobOptionService instance."); @@ -93,7 +93,7 @@ StatusCode ThinCaloCellsAlg::initialize() ATH_MSG_DEBUG( "Setting property" << m_thinningSvc << " of private tool with name: '" << fullToolName << "'" ); ATH_CHECK( m_jos->addPropertyToCatalogue ( fullToolName, - StringProperty("ThinningSvc",m_thinningSvc.typeAndName()) ) ); + StringProperty("ThinningSvc",m_thinningSvc.typeAndName()) ) ); if (m_setCaloCellKey) { ATH_MSG_DEBUG( "Setting property" << m_caloCellKey diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.cxx index 3598f080ebd973b3d4ba1e0d9e570f33880094df..942a55db2dc4b88242987634660f5b6e59df9595 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.cxx @@ -9,6 +9,9 @@ Author: Karsten Koeneke Created: July 2014 ******************************************************************************/ +// AthAnalysisBase doesn't know about calo cells (geometry would be needed) +#ifndef XAOD_ANALYSIS + // This class' header #include "ThinCaloCellsTool.h" @@ -550,3 +553,7 @@ ThinCaloCellsTool::selectFromCompositeParticle( std::vector<bool>& mask, return StatusCode::SUCCESS; } + + +#endif + diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.h index e363ca0b03bf94180daca4c75ab174d7672ccef9..a8fcc5321a076024af46e3423232f847636e8c34 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.h +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloCellsTool.h @@ -5,6 +5,9 @@ */ +// AthAnalysisBase doesn't know about calo cells (geometry would be needed) +#ifndef XAOD_ANALYSIS + #ifndef THINNINGUTILS_THINCALOCELLSTOOL_H #define THINNINGUTILS_THINCALOCELLSTOOL_H @@ -149,3 +152,5 @@ private: }; #endif + +#endif diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.cxx index 63a79153729c52e2d657262f8822029786f0988c..2d8dcc3ca1123af2b207932d38c83b3208d5a17a 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.cxx @@ -18,7 +18,10 @@ Created: July 2014 // FrameWork includes #include "ExpressionEvaluation/ExpressionParser.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif #include "ExpressionEvaluation/TriggerDecisionProxyLoader.h" #include "ExpressionEvaluation/SGxAODProxyLoader.h" #include "ExpressionEvaluation/SGNTUPProxyLoader.h" @@ -26,6 +29,7 @@ Created: July 2014 #include "ExpressionEvaluation/StackElement.h" // EDM includes +#include "AthLinks/ElementLink.h" #include "xAODBase/IParticle.h" #include "xAODBase/IParticleContainer.h" #include "xAODBase/ObjectType.h" @@ -53,7 +57,10 @@ ThinCaloClustersTool::ThinCaloClustersTool( const std::string& type, const std::string& name, const IInterface* parent ) : ::AthAlgTool( type, name, parent ), +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"), +#endif m_parser(0), m_thinningSvc( "ThinningSvc/ThinningSvc", name ), m_nTotalCaloClusters(0), @@ -103,7 +110,10 @@ StatusCode ThinCaloClustersTool::initialize() // initialize proxy loaders for expression parsing ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader(); +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS proxyLoaders->push_back(new ExpressionParsing::TriggerDecisionProxyLoader(m_trigDecisionTool)); +#endif proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore())); proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore())); diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.h index 370b8d31b288a7e15aaf8b18fa9a03c3aa1d2ad6..ee4d26f153672c0186edb710d879720caf2f72d9 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.h +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinCaloClustersTool.h @@ -30,7 +30,10 @@ #include "AthenaKernel/IThinningSvc.h" #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IThinningTool.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif // EDM includes #include "xAODCaloEvent/CaloCluster.h" @@ -124,7 +127,10 @@ private: /// The trigger decision tool +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; +#endif /// The expression parser ExpressionParsing::ExpressionParser *m_parser; diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.cxx index e080ab62e2ec42536d1c10d9245268a540fa1436..ab28d99f765f20a7c0ee3352c705209aefe3398f 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.cxx @@ -18,7 +18,10 @@ Created: July 2014 // FrameWork includes #include "ExpressionEvaluation/ExpressionParser.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif #include "ExpressionEvaluation/TriggerDecisionProxyLoader.h" #include "ExpressionEvaluation/SGxAODProxyLoader.h" #include "ExpressionEvaluation/SGNTUPProxyLoader.h" @@ -40,7 +43,10 @@ ThinIParticlesTool::ThinIParticlesTool( const std::string& type, const std::string& name, const IInterface* parent ) : ::AthAlgTool( type, name, parent ), +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"), +#endif m_parser(0), m_thinningSvc( "ThinningSvc/ThinningSvc", name ), m_nTotalIParticles(0), @@ -96,7 +102,10 @@ StatusCode ThinIParticlesTool::initialize() // initialize proxy loaders for expression parsing ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader(); +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS proxyLoaders->push_back(new ExpressionParsing::TriggerDecisionProxyLoader(m_trigDecisionTool)); +#endif proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore())); proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore())); diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.h index d63c652f00170df92ab0989fd5a88a2418cd67f5..01e9456a08cfc3f85515bcf2b94a0ef038761539 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.h +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinIParticlesTool.h @@ -30,7 +30,10 @@ #include "AthenaKernel/IThinningSvc.h" #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IThinningTool.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif // EDM includes #include "xAODBase/IParticleContainer.h" @@ -80,7 +83,10 @@ private: /// The trigger decision tool +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; +#endif /// The expression parser ExpressionParsing::ExpressionParser *m_parser; diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.cxx index affc26da057585dc84ec7c504064ed7304e6f215..e3755ccde891b1ca47e716c8ebbc9a0d44121985 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.cxx @@ -18,7 +18,10 @@ Created: July 2013 // FrameWork includes #include "ExpressionEvaluation/ExpressionParser.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif #include "ExpressionEvaluation/TriggerDecisionProxyLoader.h" #include "ExpressionEvaluation/SGxAODProxyLoader.h" #include "ExpressionEvaluation/SGNTUPProxyLoader.h" @@ -56,8 +59,11 @@ ThinTrackParticlesTool::ThinTrackParticlesTool( const std::string& type, const std::string& name, const IInterface* parent ) : ::AthAlgTool( type, name, parent ), - m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"), - m_parser(0), +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS + m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"), +#endif + m_parser(0), m_thinningSvc( "ThinningSvc/ThinningSvc", name ), m_tauConversion(false), m_tauWide(false), @@ -120,7 +126,10 @@ StatusCode ThinTrackParticlesTool::initialize() // initialize proxy loaders for expression parsing ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader(); +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS proxyLoaders->push_back(new ExpressionParsing::TriggerDecisionProxyLoader(m_trigDecisionTool)); +#endif proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore())); proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore())); @@ -672,32 +681,33 @@ ThinTrackParticlesTool::selectFromTauJet( std::vector<bool>& mask, mask[index] = true; } // End: loop over all TrackParticles from this tau - // If requested, also get other types of TrackParticles from the Tau - if ( m_tauConversion ) { - const auto& tpLinks = part->conversionTrackLinks(); - for ( const auto& partLink : tpLinks ) { - if ( !(partLink.isValid()) ) { - ATH_MSG_WARNING("Got an invalid element link. Continuing..."); - continue; - } - - const xAOD::TrackParticleContainer* ptrTrkPartCont = partLink.getStorableObjectPointer(); - if ( ptrTrkPartCont != trackParticleContainer ) { - ATH_MSG_DEBUG("The current ElementLink doesn't point to the TrackParticleContainer"); - continue; - } - - // Get the index of the current element link - std::size_t index = partLink.index(); - - // Fill the thinning mask at this place and increment the counter - if ( index >= m_nTotalTrackParts ) { - ATH_MSG_WARNING("We got an index " << index << "out of container range " << m_nTotalTrackParts ); - continue; - } - mask[index] = true; - } // End: loop over all TrackParticles from this tau - } // End: if ( m_tauConversion ) + // FIXME!!! taus no longer have conversion track link vector after schema evolution to taujet_v2 + // // If requested, also get other types of TrackParticles from the Tau + // if ( m_tauConversion ) { + // const auto& tpLinks = part->conversionTrackLinks(); + // for ( const auto& partLink : tpLinks ) { + // if ( !(partLink.isValid()) ) { + // ATH_MSG_WARNING("Got an invalid element link. Continuing..."); + // continue; + // } + + // const xAOD::TrackParticleContainer* ptrTrkPartCont = partLink.getStorableObjectPointer(); + // if ( ptrTrkPartCont != trackParticleContainer ) { + // ATH_MSG_DEBUG("The current ElementLink doesn't point to the TrackParticleContainer"); + // continue; + // } + + // // Get the index of the current element link + // std::size_t index = partLink.index(); + + // // Fill the thinning mask at this place and increment the counter + // if ( index >= m_nTotalTrackParts ) { + // ATH_MSG_WARNING("We got an index " << index << "out of container range " << m_nTotalTrackParts ); + // continue; + // } + // mask[index] = true; + // } // End: loop over all TrackParticles from this tau + // } // End: if ( m_tauConversion ) // If requested, also get other types of TrackParticles from the Tau if ( m_tauWide ) { diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.h b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.h index b4bc6d5e12e15bb4aabb6bf24eba041f95279fd4..47cc8a0c7818e655c1fffeab11e1546fed719a1c 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.h +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinTrackParticlesTool.h @@ -28,7 +28,10 @@ #include "AthenaKernel/IThinningSvc.h" #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IThinningTool.h" +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS #include "TrigDecisionTool/TrigDecisionTool.h" +#endif // EDM includes #include "xAODTracking/TrackParticleContainerFwd.h" @@ -135,7 +138,10 @@ private: /// The trigger decision tool +// AthAnalysisBase doesn't currently include the Trigger Service +#ifndef XAOD_ANALYSIS ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; +#endif /// The expression parser ExpressionParsing::ExpressionParser *m_parser; diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/components/ThinningUtils_entries.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/components/ThinningUtils_entries.cxx index f045e79a00c8f66ccf519061d8ccb847c6dc1f68..5312ce5cd24cbe1d17de0f515fcf05678ac2e46f 100644 --- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/components/ThinningUtils_entries.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/components/ThinningUtils_entries.cxx @@ -4,7 +4,10 @@ #include "../ThinIParticlesAlg.h" #include "../ThinIParticlesTool.h" #include "../ThinCaloCellsAlg.h" +// AthAnalysisBase doesn't know about calo cells (geometry would be needed) +#ifndef XAOD_ANALYSIS #include "../ThinCaloCellsTool.h" +#endif #include "../ThinCaloClustersAlg.h" #include "../ThinCaloClustersTool.h" #include "../ThinTrackParticlesAlg.h" @@ -14,7 +17,10 @@ DECLARE_ALGORITHM_FACTORY( ReducePileUpEventInfoAlg ) DECLARE_ALGORITHM_FACTORY( ThinIParticlesAlg ) DECLARE_TOOL_FACTORY( ThinIParticlesTool ) DECLARE_ALGORITHM_FACTORY( ThinCaloCellsAlg ) +// AthAnalysisBase doesn't know about calo cells (geometry would be needed) +#ifndef XAOD_ANALYSIS DECLARE_TOOL_FACTORY( ThinCaloCellsTool ) +#endif DECLARE_ALGORITHM_FACTORY( ThinCaloClustersAlg ) DECLARE_TOOL_FACTORY( ThinCaloClustersTool ) DECLARE_ALGORITHM_FACTORY( ThinTrackParticlesAlg ) @@ -26,7 +32,10 @@ DECLARE_FACTORY_ENTRIES( ThinningUtils ) DECLARE_ALGORITHM( ThinIParticlesAlg ); DECLARE_TOOL( ThinIParticlesTool ); DECLARE_ALGORITHM( ThinCaloCellsAlg ); +// AthAnalysisBase doesn't know about calo cells (geometry would be needed) +#ifndef XAOD_ANALYSIS DECLARE_TOOL( ThinCaloCellsTool ); +#endif DECLARE_ALGORITHM( ThinCaloClustersAlg ); DECLARE_TOOL( ThinCaloClustersTool ); DECLARE_ALGORITHM( ThinTrackParticlesAlg );