From 0afc213227681765070f9f109c0ed5152d7581a4 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:01:59 +0100 Subject: [PATCH 1/9] DerivationFrameworkInDet: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../JetTrackParticleThinning.h | 34 +++++---- .../src/JetTrackParticleThinning.cxx | 76 +++++++++---------- 2 files changed, 57 insertions(+), 53 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/JetTrackParticleThinning.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/JetTrackParticleThinning.h index 0a0226a5c98..ec4b428acca 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/JetTrackParticleThinning.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/JetTrackParticleThinning.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -10,33 +10,41 @@ #define DERIVATIONFRAMEWORK_JETTRACKPARTICLETHINNING_H #include +#include #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IThinningTool.h" #include "GaudiKernel/ToolHandle.h" +#include "xAODTracking/TrackParticleContainer.h" +#include "StoreGate/ThinningHandleKey.h" namespace ExpressionParsing { class ExpressionParser; } -class IThinningSvc; - namespace DerivationFramework { - class JetTrackParticleThinning : public AthAlgTool, public IThinningTool { + class JetTrackParticleThinning : public extends { public: JetTrackParticleThinning(const std::string& t, const std::string& n, const IInterface* p); - ~JetTrackParticleThinning(); - StatusCode initialize(); - StatusCode finalize(); - virtual StatusCode doThinning() const; + virtual ~JetTrackParticleThinning(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + virtual StatusCode doThinning() const override; private: - ServiceHandle m_thinningSvc; - mutable unsigned int m_ntot, m_npass; - std::string m_jetSGKey, m_inDetSGKey, m_selectionString; - bool m_and; - ExpressionParsing::ExpressionParser *m_parser; + mutable std::atomic m_ntot, m_npass; + std::string m_jetSGKey; + StringProperty m_streamName + { this, "StreamName", "", "Name of the stream being thinned" }; + SG::ThinningHandleKey m_inDetSGKey + { this, "InDetTrackParticlesKey", "InDetTrackParticles", "" }; + StringProperty m_selectionString + { this, "SelectionString", "", "" }; + StringProperty m_trackSelectionString + { this, "TrackSelectionString", "", "" }; + std::unique_ptr m_parser; + std::unique_ptr m_trackParser; }; } diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/JetTrackParticleThinning.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/JetTrackParticleThinning.cxx index aae2743c9ea..d04b0fe7788 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/JetTrackParticleThinning.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/JetTrackParticleThinning.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////// @@ -10,13 +10,14 @@ // which removes all ID tracks which do not pass a user-defined cut #include "DerivationFrameworkInDet/JetTrackParticleThinning.h" -#include "AthenaKernel/IThinningSvc.h" #include "ExpressionEvaluation/ExpressionParser.h" #include "ExpressionEvaluation/SGxAODProxyLoader.h" #include "ExpressionEvaluation/SGNTUPProxyLoader.h" #include "ExpressionEvaluation/MultipleProxyLoader.h" #include "xAODJet/JetContainer.h" #include "xAODTracking/TrackParticleContainer.h" +#include "StoreGate/ThinningHandle.h" +#include "GaudiKernel/ThreadLocalContext.h" #include #include @@ -24,22 +25,12 @@ DerivationFramework::JetTrackParticleThinning::JetTrackParticleThinning(const std::string& t, const std::string& n, const IInterface* p ) : -AthAlgTool(t,n,p), -m_thinningSvc("ThinningSvc",n), +base_class(t,n,p), m_ntot(0), m_npass(0), -m_jetSGKey(""), -m_inDetSGKey("InDetTrackParticles"), -m_selectionString(""), -m_and(false), -m_parser(0) +m_jetSGKey("") { - declareInterface(this); - declareProperty("ThinningService", m_thinningSvc); declareProperty("JetKey", m_jetSGKey); - declareProperty("InDetTrackParticlesKey", m_inDetSGKey); - declareProperty("SelectionString", m_selectionString); - declareProperty("ApplyAnd", m_and); } // Destructor @@ -51,10 +42,8 @@ StatusCode DerivationFramework::JetTrackParticleThinning::initialize() { // Decide which collections need to be checked for ID TrackParticles ATH_MSG_VERBOSE("initialize() ..."); - if (m_inDetSGKey=="") { - ATH_MSG_FATAL("No inner detector track collection provided for thinning."); - return StatusCode::FAILURE; - } else {ATH_MSG_INFO("Using " << m_inDetSGKey << "as the source collection for inner detector track particles");} + ATH_CHECK( m_inDetSGKey.initialize (m_streamName) ); + ATH_MSG_INFO("Using " << m_inDetSGKey << "as the source collection for inner detector track particles"); if (m_jetSGKey=="") { ATH_MSG_FATAL("No jet collection provided for thinning."); return StatusCode::FAILURE; @@ -65,9 +54,17 @@ StatusCode DerivationFramework::JetTrackParticleThinning::initialize() ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader(); proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore())); proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore())); - m_parser = new ExpressionParsing::ExpressionParser(proxyLoaders); + m_parser = std::make_unique(proxyLoaders); m_parser->loadExpression(m_selectionString); } + + if (m_trackSelectionString!="") { + ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader(); + proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore())); + proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore())); + m_trackParser = std::make_unique(proxyLoaders); + m_trackParser->loadExpression(m_trackSelectionString); + } return StatusCode::SUCCESS; } @@ -75,23 +72,17 @@ StatusCode DerivationFramework::JetTrackParticleThinning::finalize() { ATH_MSG_VERBOSE("finalize() ..."); ATH_MSG_INFO("Processed "<< m_ntot <<" tracks, "<< m_npass<< " were retained "); - if (m_selectionString!="") { - delete m_parser; - m_parser = 0; - } return StatusCode::SUCCESS; } // The thinning itself StatusCode DerivationFramework::JetTrackParticleThinning::doThinning() const { + const EventContext& ctx = Gaudi::Hive::currentContext(); // Retrieve main TrackParticle collection - const xAOD::TrackParticleContainer* importedTrackParticles; - if (evtStore()->retrieve(importedTrackParticles,m_inDetSGKey).isFailure()) { - ATH_MSG_ERROR("No TrackParticle collection with name " << m_inDetSGKey << " found in StoreGate!"); - return StatusCode::FAILURE; - } + SG::ThinningHandle importedTrackParticles + (m_inDetSGKey, ctx); // Check the event contains tracks unsigned int nTracks = importedTrackParticles->size(); @@ -153,6 +144,22 @@ StatusCode DerivationFramework::JetTrackParticleThinning::doThinning() const } } } + + // Apply a track selection string. + if (m_trackParser) { + std::vector entries = m_trackParser->evaluateAsVector(); + unsigned int nEntries = entries.size(); + // check the sizes are compatible + if (nTracks != nEntries ) { + ATH_MSG_ERROR("Sizes incompatible! Are you sure your track selection string used tracks??"); + return StatusCode::FAILURE; + } else { + // identify which jets to keep for the thinning check + for (unsigned int i=0; ifilter(*importedTrackParticles, mask, IThinningSvc::Operator::And).isFailure()) { - ATH_MSG_ERROR("Application of thinning service failed! "); - return StatusCode::FAILURE; - } - } - if (!m_and) { - if (m_thinningSvc->filter(*importedTrackParticles, mask, IThinningSvc::Operator::Or).isFailure()) { - ATH_MSG_ERROR("Application of thinning service failed! "); - return StatusCode::FAILURE; - } - } + importedTrackParticles.keep (mask); return StatusCode::SUCCESS; } -- GitLab From 038dc6549a5562430007700d75023d080420b2be Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:04:22 +0100 Subject: [PATCH 2/9] DerivationFrameworkSUSY: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../DerivationFrameworkSUSY/share/SUSY5.py | 13 +++---------- .../DerivationFrameworkSUSY/share/SUSY8.py | 12 ++---------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY5.py index eedb0fe9fe2..85862f3324c 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY5.py @@ -49,25 +49,18 @@ SUSY5ThinningHelper.AppendToStream( SUSY5Stream ) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -SUSY5MetTPThinningTool = DerivationFramework__TrackParticleThinning( name = "SUSY5MetTPThinningTool", - ThinningService = SUSY5ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += SUSY5MetTPThinningTool -thinningTools.append(SUSY5MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning SUSY5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "SUSY5JetTPThinningTool", - ThinningService = SUSY5ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += SUSY5JetTPThinningTool thinningTools.append(SUSY5JetTPThinningTool) # TrackParticles directly +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning SUSY5TPThinningTool = DerivationFramework__TrackParticleThinning(name = "SUSY5TPThinningTool", ThinningService = SUSY5ThinningHelper.ThinningSvc(), SelectionString = "InDetTrackParticles.pt > 10*GeV", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY8.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY8.py index e73296e9141..e2c2a93a6a5 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY8.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY8.py @@ -62,22 +62,14 @@ ToolSvc += SUSY8SkimmingTool #====================================================================\ thinning_expression = "(InDetTrackParticles.pt > 10.0*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (abs(DFCommonInDetTrackZ0AtPV) < 10.0)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -SUSY8MetTPThinningTool = DerivationFramework__TrackParticleThinning( name = "SUSY8MetTPThinningTool", - ThinningService = SUSY8ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += SUSY8MetTPThinningTool -thinningTools.append(SUSY8MetTPThinningTool) # TrackParticles associated with jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning SUSY8JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "SUSY8JetTPThinningTool", - ThinningService = SUSY8ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += SUSY8JetTPThinningTool thinningTools.append(SUSY8JetTPThinningTool) -- GitLab From 96b6d7575e66ede534c2b597d24983ff08a598c4 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:04:33 +0100 Subject: [PATCH 3/9] DerivationFrameworkTop: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../python/TOPQCommonThinning.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py index b97dfba33bd..0fade4736df 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py @@ -72,11 +72,10 @@ def setup(TOPQname, streamName, TOPQThinningSvc, ToolSvc): from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TOPQJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = TOPQname + "JetTPThinningTool", - ThinningService = TOPQThinningSvc, + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - SelectionString = "(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)", - ApplyAnd = False) + SelectionString = "(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)") ToolSvc += TOPQJetTPThinningTool thinningTools.append(TOPQJetTPThinningTool) @@ -97,11 +96,10 @@ def setup(TOPQname, streamName, TOPQThinningSvc, ToolSvc): TOPQLargeJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = TOPQname + "LargeJetTPThinningTool", - ThinningService = TOPQThinningSvc, + StreamName = streamName, JetKey = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", InDetTrackParticlesKey = "InDetTrackParticles", - SelectionString = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt>25*GeV", - ApplyAnd = False) + SelectionString = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt>25*GeV") ToolSvc += TOPQLargeJetTPThinningTool thinningTools.append(TOPQLargeJetTPThinningTool) -- GitLab From 0ed8f824f5eaf304b8edb6a4f41727249fd829cd Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:04:45 +0100 Subject: [PATCH 4/9] DerivationFrameworkTau: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../DerivationFrameworkTau/share/TAUP1.py | 12 ++---------- .../DerivationFrameworkTau/share/TAUP2.py | 12 ++---------- .../DerivationFrameworkTau/share/TAUP3.py | 12 ++---------- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py index 3c999ca95db..ecf672d06cd 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP1.py @@ -32,22 +32,14 @@ TAUP1ThinningHelper.AppendToStream( TAUP1Stream ) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -TAUP1MetTPThinningTool = DerivationFramework__TrackParticleThinning( - name = "TAUP1MetTPThinningTool", - ThinningService = TAUP1ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += TAUP1MetTPThinningTool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TAUP1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "TAUP1JetTPThinningTool", - ThinningService = TAUP1ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += TAUP1JetTPThinningTool from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP2.py index 3987cbabf31..e6b1ae4daa7 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP2.py @@ -32,22 +32,14 @@ TAUP2Stream.AcceptAlgs(["TAUP2Kernel"]) # # # MET/Jet tracks # thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -# TAUP2MetTPThinningTool = DerivationFramework__TrackParticleThinning( -# name = "TAUP2MetTPThinningTool", -# ThinningService = TAUP2ThinningHelper.ThinningSvc(), -# SelectionString = thinning_expression, -# InDetTrackParticlesKey = "InDetTrackParticles", -# ApplyAnd = True) -# ToolSvc += TAUP2MetTPThinningTool # # from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning # TAUP2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( # name = "TAUP2JetTPThinningTool", -# ThinningService = TAUP2ThinningHelper.ThinningSvc(), +# StreamName = streamName, # JetKey = "AntiKt4LCTopoJets", # InDetTrackParticlesKey = "InDetTrackParticles", -# ApplyAnd = True) +# TrackSelectionString = thinning_expression) # ToolSvc += TAUP2JetTPThinningTool # # # Tracks associated with electrons diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py index 26f94eb119f..d91d9b93e76 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/share/TAUP3.py @@ -36,22 +36,14 @@ svcMgr += createThinningSvc( # ========================================================================================================================== # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -TAUP3MetTPThinningTool = DerivationFramework__TrackParticleThinning( - name = "TAUP3MetTPThinningTool", - ThinningService = "TAUP3ThinningSvc", - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += TAUP3MetTPThinningTool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TAUP3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "TAUP3JetTPThinningTool", - ThinningService = "TAUP3ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += TAUP3JetTPThinningTool from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning -- GitLab From d3d7972ab8d8a36ec4cd02f4004b8de34ee5c14f Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:04:00 +0100 Subject: [PATCH 5/9] DerivationFrameworkSM: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../DerivationFramework/DerivationFrameworkSM/share/STDM2.py | 5 ++--- .../DerivationFramework/DerivationFrameworkSM/share/STDM3.py | 5 ++--- .../DerivationFramework/DerivationFrameworkSM/share/STDM4.py | 5 ++--- .../DerivationFramework/DerivationFrameworkSM/share/STDM5.py | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM2.py index 989f078b64f..f75c11b3770 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM2.py @@ -73,11 +73,10 @@ ToolSvc += STDM2TPThinningTool # Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "STDM2JetTPThinningTool", - ThinningService = "STDM2ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV", - ApplyAnd = False) + SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV") ToolSvc += STDM2JetTPThinningTool # All Track within a cone DeltaR=0.6 around Electrons diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM3.py index 8a21894c8f3..e192446a4a6 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM3.py @@ -51,11 +51,10 @@ STDM3ThinningHelper.AppendToStream( STDM3Stream ) # Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "STDM3JetTPThinningTool", - ThinningService = STDM3ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", # SelectionString = "AntiKt4EMTopoJets.pt > 10*GeV", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM3JetTPThinningTool thinningTools.append(STDM3JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM4.py index 506fdf225d9..fc936d870ed 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM4.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM4.py @@ -48,11 +48,10 @@ STDM4ThinningHelper.AppendToStream( STDM4Stream ) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "STDM4JetTPThinningTool", - ThinningService = STDM4ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", SelectionString = "AntiKt4EMTopoJets.pt > 10*GeV", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM4JetTPThinningTool thinningTools.append(STDM4JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM5.py index 35248ec1b7b..7fb3a922335 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/share/STDM5.py @@ -48,11 +48,10 @@ STDM5ThinningHelper.AppendToStream( STDM5Stream ) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "STDM5JetTPThinningTool", - ThinningService = STDM5ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", SelectionString = "AntiKt4EMTopoJets.pt > 15*GeV", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM5JetTPThinningTool -- GitLab From 899aae7d76e62291041eb0d0245bd74da41e0d48 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:03:47 +0100 Subject: [PATCH 6/9] DerivationFrameworkJetEtMiss: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../share/JETM6.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py index 567e778c040..f1d39c442b8 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py @@ -78,36 +78,29 @@ ToolSvc += JETM6OfflineSkimmingTool thinningTools = [] # thinning_expression = "InDetTrackParticles.pt > 0.5*GeV" -# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -# JETM6TPThinningTool = DerivationFramework__TrackParticleThinning( name = "JETM6ThinningTool", -# ThinningService = "JETM6ThinningSvc", -# SelectionString = thinning_expression, -# InDetTrackParticlesKey = "InDetTrackParticles") # from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning # JETM6JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt4JetTPThinningTool", -# ThinningService = "JETM6ThinningSvc", +# StreamName = streamName, # JetKey = "AntiKt4EMTopoJets", # InDetTrackParticlesKey = "InDetTrackParticles", -# ApplyAnd = True) +# TrackSelectionString = thinning_expression) # ToolSvc += JETM6JetTPThinningTool # thinningTools.append(JETM6JetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning JETM6Akt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt4JetTPThinningTool", - ThinningService = "JETM6ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = False) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM6Akt4JetTPThinningTool thinningTools.append(JETM6Akt4JetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning JETM6Akt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt10JetTPThinningTool", - ThinningService = "JETM6ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = False) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM6Akt10JetTPThinningTool thinningTools.append(JETM6Akt10JetTPThinningTool) -- GitLab From 6190e6af390a4ae5d6d63faedc20a237deffe793 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:03:06 +0100 Subject: [PATCH 7/9] DerivationFrameworkHiggs: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../python/HIGG4DxThinning.py | 8 ++++---- .../DerivationFrameworkHiggs/share/HIGG1D1.py | 20 ++++++------------- .../DerivationFrameworkHiggs/share/HIGG1D2.py | 20 ++++++------------- .../DerivationFrameworkHiggs/share/HIGG2D1.py | 12 ++--------- .../DerivationFrameworkHiggs/share/HIGG2D2.py | 12 ++--------- .../DerivationFrameworkHiggs/share/HIGG2D3.py | 12 ++--------- .../DerivationFrameworkHiggs/share/HIGG2D4.py | 6 +++--- .../DerivationFrameworkHiggs/share/HIGG2D5.py | 12 ++--------- .../DerivationFrameworkHiggs/share/HIGG3D1.py | 13 +++--------- .../DerivationFrameworkHiggs/share/HIGG3D3.py | 5 ++--- .../DerivationFrameworkHiggs/share/HIGG5D1.py | 2 +- .../DerivationFrameworkHiggs/share/HIGG5D2.py | 2 +- .../DerivationFrameworkHiggs/share/HIGG5D3.py | 5 ++--- .../DerivationFrameworkHiggs/share/HIGG6D1.py | 14 +++---------- .../DerivationFrameworkHiggs/share/HIGG6D2.py | 14 ++++--------- .../DerivationFrameworkHiggs/share/HIGG8D1.py | 12 ++--------- 16 files changed, 45 insertions(+), 124 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py index 8361e0fe189..512b0924496 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py @@ -29,7 +29,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc): #jets and tracks from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = HIGG4DxName+"JetTPThinningTool", - ThinningService = HIGG4DxThinningSvc, + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", SelectionString = "AntiKt4EMTopoJets.pt > 18*GeV", InDetTrackParticlesKey = "InDetTrackParticles", @@ -38,7 +38,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc): thinningTools.append(HIGG4DxJetTPThinningTool) HIGG4DxJetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = HIGG4DxName+"JetLCTPThinningTool", - ThinningService = HIGG4DxThinningSvc, + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 18*GeV", InDetTrackParticlesKey = "InDetTrackParticles", @@ -50,7 +50,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc): if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']: from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTrackThinningTool1 = DerivationFramework__JetTrackParticleThinning( name = HIGG4DxName+"JetTrackThinningTool1", - ThinningService = HIGG4DxThinningSvc, + StreamName = streamName, JetKey = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", SelectionString = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt > 150*GeV", InDetTrackParticlesKey = "InDetTrackParticles", @@ -61,7 +61,7 @@ def setup(HIGG4DxName, streamName, HIGG4DxThinningSvc, ToolSvc): if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']: from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTrackThinningTool2 = DerivationFramework__JetTrackParticleThinning( name = HIGG4DxName+"JetTrackThinningTool2", - ThinningService = HIGG4DxThinningSvc, + StreamName = streamName, JetKey = "AntiKt2PV0TrackJets", SelectionString = "AntiKt2PV0TrackJets.pt > 6*GeV", InDetTrackParticlesKey = "InDetTrackParticles", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D1.py index cc6b0c6d8c7..e5a6f2336e9 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D1.py @@ -82,32 +82,23 @@ print SkimmingToolHIGG1D1 thinningTools=[] # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG1D1MetTPThinningTool = DerivationFramework__TrackParticleThinning( name = "HIGG1D1MetTPThinningTool", - ThinningService = "HIGG1D1ThinningSvc", - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG1D1MetTPThinningTool -print HIGG1D1MetTPThinningTool -#thinningTools.append(HIGG1D1MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG1D1JetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG1D1JetLCTPThinningTool", - ThinningService = "HIGG1D1ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG1D1JetLCTPThinningTool print HIGG1D1JetLCTPThinningTool #thinningTools.append(HIGG1D1JetLCTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG1D1JetEMTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG1D1JetEMTPThinningTool", - ThinningService = "HIGG1D1ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG1D1JetEMTPThinningTool print HIGG1D1JetEMTPThinningTool #thinningTools.append(HIGG1D1JetEMTPThinningTool) @@ -143,8 +134,9 @@ print HIGG1D1PhotonTPThinningTool #thinningTools.append(HIGG1D1PhotonTPThinningTool) # Tracks themselves +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG1D1TPThinningTool = DerivationFramework__TrackParticleThinning( name = "HIGG1D1TPThinningTool", - ThinningService = "HIGG1D1ThinningSvc", + StreamName = streamName, SelectionString = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG1D1TPThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D2.py index a6b60fea6e9..c8079eda6ee 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG1D2.py @@ -101,32 +101,23 @@ print "HIGG1D2 skimming tool:", HIGG1D2SkimmingTool thinningTools=[] # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG1D2MetTPThinningTool = DerivationFramework__TrackParticleThinning( name = "HIGG1D2MetTPThinningTool", - ThinningService = "HIGG1D2ThinningSvc", - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG1D2MetTPThinningTool -print HIGG1D2MetTPThinningTool -#thinningTools.append(HIGG1D2MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG1D2JetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG1D2JetLCTPThinningTool", - ThinningService = "HIGG1D2ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG1D2JetLCTPThinningTool print HIGG1D2JetLCTPThinningTool #thinningTools.append(HIGG1D2JetLCTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG1D2JetEMTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG1D2JetEMTPThinningTool", - ThinningService = "HIGG1D2ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG1D2JetEMTPThinningTool print HIGG1D2JetEMTPThinningTool #thinningTools.append(HIGG1D2JetEMTPThinningTool) @@ -162,8 +153,9 @@ print HIGG1D2PhotonTPThinningTool #thinningTools.append(HIGG1D2PhotonTPThinningTool) # Tracks themselves +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG1D2TPThinningTool = DerivationFramework__TrackParticleThinning( name = "HIGG1D2TPThinningTool", - ThinningService = "HIGG1D2ThinningSvc", + StreamName = streamName, SelectionString = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG1D2TPThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D1.py index 633449a78f9..791f5084f92 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D1.py @@ -36,21 +36,13 @@ HIGG2D1ThinningHelper.AppendToStream(HIGG2D1Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG2D1TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG2D1TPThinningTool", - ThinningService = HIGG2D1ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG2D1TPThinningTool -thinningTools.append(HIGG2D1TPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D1JetTPThinningTool", - ThinningService = HIGG2D1ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG2D1JetTPThinningTool thinningTools.append(HIGG2D1JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D2.py index 519bb343b05..2b758e461e3 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D2.py @@ -36,21 +36,13 @@ HIGG2D2ThinningHelper.AppendToStream(HIGG2D2Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG2D2TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG2D2TPThinningTool", - ThinningService = HIGG2D2ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG2D2TPThinningTool -thinningTools.append(HIGG2D2TPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D2JetTPThinningTool", - ThinningService = HIGG2D2ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG2D2JetTPThinningTool thinningTools.append(HIGG2D2JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D3.py index 4d01c146ee5..49860fbc2a0 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D3.py @@ -36,21 +36,13 @@ HIGG2D3ThinningHelper.AppendToStream(HIGG2D3Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG2D3TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG2D3TPThinningTool", - ThinningService = HIGG2D3ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG2D3TPThinningTool -thinningTools.append(HIGG2D3TPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D3JetTPThinningTool", - ThinningService = HIGG2D3ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG2D3JetTPThinningTool thinningTools.append(HIGG2D3JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py index b7fb060b913..6b70cd7b360 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py @@ -38,7 +38,7 @@ HIGG2D4ThinningHelper.AppendToStream(HIGG2D4Stream) # thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" # from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning # HIGG2D4TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG2D4TPThinningTool", -# ThinningService = HIGG2D4ThinningHelper.ThinningSvc(), +# StreamName = streamName, # SelectionString = thinning_expression, # InDetTrackParticlesKey = "InDetTrackParticles", # ApplyAnd = True) @@ -48,14 +48,14 @@ HIGG2D4ThinningHelper.AppendToStream(HIGG2D4Stream) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D4JetTPThinningTool", - ThinningService = HIGG2D4ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG2D4JetTPThinningTool thinningTools.append(HIGG2D4JetTPThinningTool) HIGG2D4JetTPThinningTool2 = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D4JetTPThinningTool2", - ThinningService = HIGG2D4ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG2D4JetTPThinningTool2 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D5.py index 3c475645b20..94054189ea1 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D5.py @@ -194,21 +194,13 @@ HIGG2D5ThinningHelper.AppendToStream(HIGG2D5Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG2D5TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG2D5TPThinningTool", - ThinningService = HIGG2D5ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG2D5TPThinningTool -thinningTools.append(HIGG2D5TPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG2D5JetTPThinningTool", - ThinningService = HIGG2D5ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG2D5JetTPThinningTool thinningTools.append(HIGG2D5JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D1.py index 02912bed3db..1ec0b99a029 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D1.py @@ -35,21 +35,13 @@ thinningTools=[] # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG3D1MetTPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG3D1MetTPThinningTool", - ThinningService = HIGG3D1ThinningHelper.ThinningSvc(), - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG3D1MetTPThinningTool -thinningTools.append(HIGG3D1MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG3D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG3D1JetTPThinningTool", - ThinningService = HIGG3D1ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG3D1JetTPThinningTool thinningTools.append(HIGG3D1JetTPThinningTool) @@ -73,6 +65,7 @@ ToolSvc += HIGG3D1ElectronTPThinningTool thinningTools.append(HIGG3D1ElectronTPThinningTool) # Tracks themselves +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG3D1TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG3D1TPThinningTool", ThinningService = HIGG3D1ThinningHelper.ThinningSvc(), SelectionString = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D3.py index a612b41ad97..a53a3dd2487 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG3D3.py @@ -98,10 +98,9 @@ thinningTools=[] # MET/Jet tracks from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG3D3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG3D3JetTPThinningTool", - ThinningService = HIGG3D3ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG3D3JetTPThinningTool thinningTools.append(HIGG3D3JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py index a12c6843f65..dd74212d287 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py @@ -73,7 +73,7 @@ if globalflags.DataSource()=='geant4': from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG5D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG5D1JetTPThinningTool", - ThinningService = HIGG5D1ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG5D1JetTPThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py index 458878c7477..edc8785d1c5 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py @@ -73,7 +73,7 @@ if globalflags.DataSource()=='geant4': from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG5D2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG5D2JetTPThinningTool", - ThinningService = HIGG5D2ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG5D2JetTPThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D3.py index 01627ac9cac..03d298f724d 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D3.py @@ -62,10 +62,9 @@ if (is_MC) : # MET/Jet tracks from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG5D3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG5D3JetTPThinningTool", - ThinningService = HIGG5D3ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG5D3JetTPThinningTool thinningTools.append(HIGG5D3JetTPThinningTool) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D1.py index db44f338188..9413e9f57ba 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D1.py @@ -150,25 +150,16 @@ thinningTools=[] # GenericTrackParticleThinning #==================================================================== thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG6D1GenTPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG6D1GenTPThinningTool", - ThinningService = "HIGG6D1ThinningSvc", - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -thinningTools.append(HIGG6D1GenTPThinningTool) -ToolSvc += HIGG6D1GenTPThinningTool - #==================================================================== # JetTrackParticleThinning #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG6D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG6D1JetTPThinningTool", - ThinningService = "HIGG6D1ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) thinningTools.append(HIGG6D1JetTPThinningTool) @@ -219,6 +210,7 @@ ToolSvc += HIGG6D1ElectronTPThinningTool #==================================================================== # Tracks themselves #==================================================================== +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG6D1TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG6D1TPThinningTool", ThinningService = "HIGG6D1ThinningSvc", SelectionString = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D2.py index e26532eca39..28c5cbaa561 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG6D2.py @@ -148,24 +148,17 @@ thinningTools=[] # GenericTrackParticleThinning #==================================================================== thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG6D2GenTPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG6D2GenTPThinningTool", - ThinningService = "HIGG6D2ThinningSvc", - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -thinningTools.append(HIGG6D2GenTPThinningTool) -ToolSvc += HIGG6D2GenTPThinningTool + #==================================================================== # JetTrackParticleThinning #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG6D2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "HIGG6D2JetTPThinningTool", - ThinningService = "HIGG6D2ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) thinningTools.append(HIGG6D2JetTPThinningTool) @@ -217,6 +210,7 @@ ToolSvc += HIGG6D2ElectronTPThinningTool #==================================================================== # Tracks themselves #==================================================================== +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG6D2TPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG6D2TPThinningTool", ThinningService = "HIGG6D2ThinningSvc", SelectionString = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG8D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG8D1.py index b8814f4551b..79d2d8ba590 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG8D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG8D1.py @@ -84,22 +84,14 @@ HIGG8D1ThinningHelper.AppendToStream( HIGG8D1Stream ) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -HIGG8D1MetTPThinningTool = DerivationFramework__TrackParticleThinning(name = "HIGG8D1MetTPThinningTool", - ThinningService = HIGG8D1ThinningHelper.ThinningSvc(), #"HIGG8D1ThinningSvc - SelectionString = thinning_expression, - InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) -ToolSvc += HIGG8D1MetTPThinningTool -thinningTools.append(HIGG8D1MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG8D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "HIGG8D1JetTPThinningTool", - ThinningService = HIGG8D1ThinningHelper.ThinningSvc(), + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", - ApplyAnd = True) + TrackSelectionString = thinning_expression) ToolSvc += HIGG8D1JetTPThinningTool thinningTools.append(HIGG8D1JetTPThinningTool) -- GitLab From 5cc1b19129d7b8c8feecb24741815fd2e0cf0e13 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:03:18 +0100 Subject: [PATCH 8/9] DerivationFrameworkExotics: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../DerivationFrameworkExotics/share/EXOT11.py | 4 ++-- .../DerivationFrameworkExotics/share/EXOT12.py | 4 ++-- .../DerivationFrameworkExotics/share/EXOT16.py | 4 ++-- .../DerivationFrameworkExotics/share/EXOT3.py | 8 ++++---- .../DerivationFrameworkExotics/share/EXOT4.py | 4 ++-- .../DerivationFrameworkExotics/share/EXOT5.py | 2 +- .../DerivationFrameworkExotics/share/EXOT6.py | 2 +- .../DerivationFrameworkExotics/share/EXOT7.py | 8 ++++---- .../DerivationFrameworkExotics/share/EXOT8.py | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT11.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT11.py index e49f7e13b0b..fbe64307b07 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT11.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT11.py @@ -64,7 +64,7 @@ thinningTools.append(EXOT11MuonTPThinningTool) #Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT11AKt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT11AKt4JetTPThinningTool", - ThinningService = "EXOT11ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV && abs(AntiKt4LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -72,7 +72,7 @@ ToolSvc += EXOT11AKt4JetTPThinningTool thinningTools.append(EXOT11AKt4JetTPThinningTool) EXOT11AKt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT11AKt10JetTPThinningTool", - ThinningService = "EXOT11ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoJets", SelectionString = "AntiKt10LCTopoJets.pt > 200*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT12.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT12.py index 8fd88f0eaef..db4d778d48d 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT12.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT12.py @@ -64,7 +64,7 @@ thinningTools.append(EXOT12MuonTPThinningTool) #Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT12AKt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT12AKt4JetTPThinningTool", - ThinningService = "EXOT12ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV && abs(AntiKt4LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -72,7 +72,7 @@ ToolSvc += EXOT12AKt4JetTPThinningTool thinningTools.append(EXOT12AKt4JetTPThinningTool) EXOT12AKt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT12AKt10JetTPThinningTool", - ThinningService = "EXOT12ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoJets", SelectionString = "AntiKt10LCTopoJets.pt > 200*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT16.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT16.py index c338c00a4f1..b23138fa945 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT16.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT16.py @@ -198,7 +198,7 @@ thinningTools=[] # Tracks associated with jets (for e-in-jet OR) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT16JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT16JetTPThinningTool", - ThinningService = "EXOT16ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV && AntiKt4LCTopoJets.eta > -2.8 && AntiKt4LCTopoJets.eta < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -206,7 +206,7 @@ ToolSvc += EXOT16JetTPThinningTool thinningTools.append(EXOT16JetTPThinningTool) ##EXOT16CA15JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT16CA15JetTPThinningTool", -## ThinningService = "EXOT16ThinningSvc", +## StreamName = streamName, ## JetKey = "CamKt15LCTopoJets", ## SelectionString = "CamKt15LCTopoJets.pt > 150*GeV && CamKt15LCTopoJets.eta > -2.7 && CamKt15LCTopoJets.eta < 2.7", ## InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT3.py index 1255b1a88a3..9be35ec7b4f 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT3.py @@ -51,7 +51,7 @@ from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFram #ToolSvc += EXOT3MetTPThinningTool # #EXOT3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT3JetTPThinningTool", -# ThinningService = "EXOT3ThinningSvc", +# StreamName = streamName, # JetKey = "AntiKt4LCTopoJets", # InDetTrackParticlesKey = "InDetTrackParticles") #ToolSvc += EXOT3JetTPThinningTool @@ -94,7 +94,7 @@ thinningTools.append(EXOT3PhotonTPThinningTool) #Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT3AKt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT3AKt4JetTPThinningTool", - ThinningService = "EXOT3ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV && abs(AntiKt4LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -102,7 +102,7 @@ ToolSvc += EXOT3AKt4JetTPThinningTool thinningTools.append(EXOT3AKt4JetTPThinningTool) EXOT3AKt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT3AKt10JetTPThinningTool", - ThinningService = "EXOT3ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoJets", SelectionString = "AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -110,7 +110,7 @@ ToolSvc += EXOT3AKt10JetTPThinningTool thinningTools.append(EXOT3AKt10JetTPThinningTool) EXOT3AKt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT3Cam12JetTPThinningTool", - ThinningService = "EXOT3ThinningSvc", + StreamName = streamName, JetKey = "CamKt12LCTopoJets", SelectionString = "CamKt12LCTopoJets.pt > 150*GeV && abs(CamKt12LCTopoJets.eta) < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT4.py index 9328121c7be..4f6bd57a76f 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT4.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT4.py @@ -88,7 +88,7 @@ thinningTools=[] # Tracks associated with jets (for e-in-jet OR) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT4JetTPThinningTool", - ThinningService = "EXOT4ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", SelectionString = "AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 15*GeV && AntiKt4EMTopoJets.DFCommonJets_Calib_eta > -2.8 && AntiKt4EMTopoJets.DFCommonJets_Calib_eta < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -96,7 +96,7 @@ ToolSvc += EXOT4JetTPThinningTool thinningTools.append(EXOT4JetTPThinningTool) EXOT4CA15JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT4CA15JetTPThinningTool", - ThinningService = "EXOT4ThinningSvc", + StreamName = streamName, JetKey = "CamKt15LCTopoJets", SelectionString = "CamKt15LCTopoJets.pt > 150*GeV && CamKt15LCTopoJets.eta > -2.7 && CamKt15LCTopoJets.eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT5.py index d018d308657..077cdebe745 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT5.py @@ -83,7 +83,7 @@ thinningTools.append(EXOT5TauTPThinningTool) # Keep tracks associated with jets #EXOT5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( #name = 'EXOT5JetTPThinningTool', - #ThinningService = EXOT5ThinningHelper.ThinningSvc(), + #StreamName = streamName, #JetKey = 'AntiKt4EMTopoJets', #InDetTrackParticlesKey = 'InDetTrackParticles', #SelectionString = 'AntiKt4EMTopoJets.pt > 20*GeV') diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT6.py index 8ce0a235923..9e45511dccd 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT6.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT6.py @@ -42,7 +42,7 @@ from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFram #ToolSvc += EXOT6MetTPThinningTool # #EXOT6JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EXOT6JetTPThinningTool", -# ThinningService = "EXOT6ThinningSvc", +# StreamName = streamName, # JetKey = "AntiKt4LCTopoJets", # InDetTrackParticlesKey = "InDetTrackParticles") #ToolSvc += EXOT6JetTPThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT7.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT7.py index 1dfb8aa8114..58d2f329ce0 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT7.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT7.py @@ -149,7 +149,7 @@ thinningTools=[] # Tracks associated with jets (for e-in-jet OR) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT7JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT7JetTPThinningTool", - ThinningService = "EXOT7ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 15*GeV && AntiKt4LCTopoJets.eta > -2.8 && AntiKt4LCTopoJets.eta < 2.8", InDetTrackParticlesKey = "InDetTrackParticles") @@ -158,7 +158,7 @@ thinningTools.append(EXOT7JetTPThinningTool) # for HTT EXOT7CA8JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT7CA8JetTPThinningTool", - ThinningService = "EXOT7ThinningSvc", + StreamName = streamName, JetKey = "CamKt8LCTopoJets", SelectionString = "CamKt8LCTopoJets.pt > 150*GeV && CamKt8LCTopoJets.eta > -2.7 && CamKt8LCTopoJets.eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") @@ -166,7 +166,7 @@ ToolSvc += EXOT7CA8JetTPThinningTool thinningTools.append(EXOT7CA8JetTPThinningTool) EXOT7CA15JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT7CA15JetTPThinningTool", - ThinningService = "EXOT7ThinningSvc", + StreamName = streamName, JetKey = "CamKt15LCTopoJets", SelectionString = "CamKt15LCTopoJets.pt > 150*GeV && CamKt15LCTopoJets.eta > -2.7 && CamKt15LCTopoJets.eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") @@ -174,7 +174,7 @@ ToolSvc += EXOT7CA15JetTPThinningTool thinningTools.append(EXOT7CA15JetTPThinningTool) EXOT7Ak10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT7Ak10JetTPThinningTool", - ThinningService = "EXOT7ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", SelectionString = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt > 150*GeV && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.eta > -2.7 && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT8.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT8.py index 0e99f53fcf9..6c832b95d42 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT8.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT8.py @@ -65,7 +65,7 @@ thinningTools.append(EXOT8ElectronTPThinningTool) ######################################### from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT8Ak4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT8Ak4JetTPThinningTool", - ThinningService = "EXOT8ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4LCTopoJets", SelectionString = "AntiKt4LCTopoJets.pt > 50*GeV && AntiKt4LCTopoJets.eta > -2.7 && AntiKt4LCTopoJets.eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") @@ -76,7 +76,7 @@ thinningTools.append(EXOT8Ak4JetTPThinningTool) # Tracks associated with large-R jets (0.2) ############################################ EXOT8Ak10r2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "EXOT8Ak10r2JetTPThinningTool", - ThinningService = "EXOT8ThinningSvc", + StreamName = streamName, JetKey = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", SelectionString = "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_pt > 200*GeV && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_eta > -2.7 && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_eta < 2.7", InDetTrackParticlesKey = "InDetTrackParticles") -- GitLab From 6d52412a5702acddc57286fda2a871395771598c Mon Sep 17 00:00:00 2001 From: scott snyder Date: Tue, 4 Feb 2020 16:03:32 +0100 Subject: [PATCH 9/9] DerivationFrameworkEGamma: Update more thinning tools to use MT thinning. Update JetTrackParticleThinning to use MT thinning. In some cases, JetTrackParticleThinning was used with an AND following a TrackParticleThinning. This doesn't work directly with the MT thinning scheme. Instead, extend JetTrackParticleThinning to take a selection string for the track particles as well, and move the selection there. --- .../DerivationFrameworkEGamma/share/EGAM1.py | 2 +- .../DerivationFrameworkEGamma/share/EGAM6.py | 2 +- .../DerivationFrameworkEGamma/share/EGAM8.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py index bec99c9de9f..57efe721610 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py @@ -205,7 +205,7 @@ thinningTools=[] # Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EGAM1JetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EGAM1JetLCTPThinningTool", - ThinningService = "EGAM1ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = True) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py index 74a5b2e3a7e..36d71eb37e8 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py @@ -200,7 +200,7 @@ thinningTools=[] # Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EGAM6JetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EGAM6JetLCTPThinningTool", - ThinningService = "EGAM6ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = True) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py index 3e8c4f05794..30d3187ee7c 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py @@ -134,7 +134,7 @@ thinningTools=[] # Tracks associated with Jets from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EGAM8JetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "EGAM8JetLCTPThinningTool", - ThinningService = "EGAM8ThinningSvc", + StreamName = streamName, JetKey = "AntiKt4EMTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = True) -- GitLab