Skip to content
Snippets Groups Projects
Commit 626d4f62 authored by Emily Anne Thompson's avatar Emily Anne Thompson
Browse files

Migrate EmergingJetsHighPtFilterTool to use DataHandles

parent 51b58fca
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!39666Migrate LongLivedParticleDPDMaker to R22
......@@ -17,6 +17,8 @@
// DerivationFramework includes
#include "DerivationFrameworkInterfaces/ISkimmingTool.h"
#include "xAODJet/JetContainer.h"
#include "StoreGate/ReadHandleKey.h"
namespace DerivationFramework {
......@@ -47,11 +49,11 @@ namespace DerivationFramework {
private:
ToolHandle< Trig::TrigDecisionTool > m_tdt;
std::vector< std::string > m_triggers;
mutable unsigned int m_ntot;
mutable unsigned int m_npass;
mutable unsigned int m_nptpass;
mutable unsigned int m_nhighptpass;
std::string m_jetSGKey;
mutable std::atomic<unsigned int> m_ntot;
mutable std::atomic<unsigned int> m_npass;
mutable std::atomic<unsigned int> m_nptpass;
mutable std::atomic<unsigned int> m_nhighptpass;
SG::ReadHandleKey<xAOD::JetContainer> m_jetSGKey { this, "JetContainerKey", "AntiKt4EMTopoJets", ""};
double m_ptCut;
double m_highPtCut;
......
......@@ -9,7 +9,6 @@
#include "LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h"
#include <vector>
#include <string>
#include "xAODJet/JetContainer.h"
#include "xAODTracking/TrackParticleContainer.h"
#include "TrigDecisionTool/ChainGroup.h"
......@@ -26,7 +25,6 @@ DerivationFramework::EmergingJetsHighPtFilterTool::EmergingJetsHighPtFilterTool(
m_npass(0),
m_nptpass(0),
m_nhighptpass(0),
m_jetSGKey("AntiKt4EMTopoJets"),
m_ptCut(100000.0),
m_highPtCut(300000.0),
m_etaCut(2.5),
......@@ -36,7 +34,6 @@ DerivationFramework::EmergingJetsHighPtFilterTool::EmergingJetsHighPtFilterTool(
declareInterface<DerivationFramework::ISkimmingTool>(this);
declareProperty("TrigDecisionTool", m_tdt, "Tool to access the trigger decision");
declareProperty("Triggers", m_triggers = std::vector< std::string >());
declareProperty("JetContainerKey", m_jetSGKey);
declareProperty("JetPtCut", m_ptCut);
declareProperty("JetHighPtCut", m_highPtCut);
declareProperty("JetEtaCut", m_etaCut);
......@@ -97,9 +94,8 @@ bool DerivationFramework::EmergingJetsHighPtFilterTool::eventPassesFilter() cons
// access jet container
const xAOD::JetContainer* jets(0);
StatusCode sc = evtStore()->retrieve(jets,m_jetSGKey);
if( sc.isFailure() || !jets ){
SG::ReadHandle<xAOD::JetContainer> jets(m_jetSGKey);
if( !jets.isValid() ) {
msg(MSG::WARNING) << "No Jet container found, will skip this event" << endmsg;
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment