diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/PileUpInfoAssociatorTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/PileUpInfoAssociatorTool.h index ca336e1363e2f4b79a995c24dd30856eb070453b..1dc9672b96305a773949c7cb81d1825045f9ff9d 100644 --- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/PileUpInfoAssociatorTool.h +++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/PileUpInfoAssociatorTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -13,7 +13,6 @@ #ifndef TRUTHD3P3MAKER_PILEUPINFOASSOCIATORTOOL_H #define TRUTHD3P3MAKER_PILEUPINFOASSOCIATORTOOL_H -#include "EventInfo/EventInfo.h" #include "EventInfo/PileUpEventInfo.h" #include "D3PDMakerUtils/MultiAssociationTool.h" diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt index 18b5cc52fcafa5e4581d7dc818d76e7cf14cabd0..10c8fb0f0995290ca26665379530e1a25ed4da61 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PRIVATE Control/AthenaBaseComps Control/AthenaKernel Control/CxxUtils - Event/EventInfo Event/EventKernel Event/xAOD/xAODCaloEvent Event/xAOD/xAODEgamma @@ -36,7 +35,7 @@ atlas_depends_on_subdirs( PRIVATE atlas_add_component( egammaD3PDAnalysis src/*.cxx src/components/*.cxx - LINK_LIBRARIES CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloRecLib AthContainers AthenaBaseComps AthenaKernel CxxUtils EventInfo EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel LArCablingLib D3PDMakerUtils MCTruthClassifierLib RecoToolInterfaces egammaEvent TrkCaloExtension VxVertex ) + LINK_LIBRARIES CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloRecLib AthContainers AthenaBaseComps AthenaKernel CxxUtils EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel LArCablingLib D3PDMakerUtils MCTruthClassifierLib RecoToolInterfaces egammaEvent TrkCaloExtension VxVertex ) # Install files from the package: atlas_install_headers( egammaD3PDAnalysis ) diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTimeCorrAlg.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTimeCorrAlg.h index 811f3ff631a15c79be8b1453be5573ca89c691ba..85379ff790da972b8cfc6451d00bd1c2620c924a 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTimeCorrAlg.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTimeCorrAlg.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: egammaTimeCorrAlg.h 604352 2014-07-01 04:52:11Z ssnyder $ @@ -23,9 +23,6 @@ #include "VxVertex/VxContainer.h" #include "VxVertex/RecVertex.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" - #include "CaloInterface/ICaloClusterTimeTool.h" #include <vector> diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt index a2a5dc3a2e029f6da38c71ed312adc8c2e8a2381..58a15924e42752b3f13f184701b179cbc989d171 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt @@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces PRIVATE Control/AthenaKernel - Event/EventInfo Event/xAOD/xAODBase Event/xAOD/xAODJet Generators/GeneratorObjects @@ -34,7 +33,7 @@ atlas_add_library( DerivationFrameworkMCTruthLib INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${FASTJET_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps xAODEventInfo xAODTruth GaudiKernel SGtests ExpressionEvaluationLib MCTruthClassifierLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel EventInfo xAODBase xAODJet GeneratorObjects ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel xAODBase xAODJet GeneratorObjects ) atlas_add_component( DerivationFrameworkMCTruth src/components/*.cxx diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/DerivationFrameworkMCTruth/HardTruthThinning.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/DerivationFrameworkMCTruth/HardTruthThinning.h index 9dc3911d0929fd213aa00e1a7639d58144bf9f12..8ea9852662c34ec2885417e1a3009f0ff2769dc5 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/DerivationFrameworkMCTruth/HardTruthThinning.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/DerivationFrameworkMCTruth/HardTruthThinning.h @@ -36,7 +36,8 @@ #include "DerivationFrameworkMCTruth/DecayGraphHelper.h" #include "xAODTruth/TruthParticleContainer.h" #include "GaudiKernel/ToolHandle.h" - +#include "StoreGate/ReadHandleKey.h" +#include "xAODEventInfo/EventInfo.h" class IThinningSvc; namespace DerivationFramework { @@ -59,8 +60,8 @@ namespace DerivationFramework { // handle to the thinning service ServiceHandle<IThinningSvc> m_thinningSvc; + SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}; // TruthParticle container names - std::string m_eventInfoName; std::string m_truthParticleName; std::string m_truthVertexName; std::string m_hardParticleName; diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/HardTruthThinning.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/HardTruthThinning.cxx index 2095f7def953a1bd2572cfc91f7c1fa1b9c59c12..5bdd8400e7e8a2b527ed65dedc20d3e907012283 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/HardTruthThinning.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/HardTruthThinning.cxx @@ -21,13 +21,9 @@ #include "xAODJet/JetContainer.h" #include "xAODBase/IParticle.h" #include "xAODBase/IParticleContainer.h" -#include "xAODEventInfo/EventInfo.h" -//#include "EventKernel/PdtPdg.h" #include "AthenaKernel/errorcheck.h" #include "HepPID/ParticleIDMethods.hh" #include "GaudiKernel/SystemOfUnits.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include <vector> #include <string> @@ -60,9 +56,6 @@ DerivationFramework::HardTruthThinning::HardTruthThinning( declareInterface<DerivationFramework::IThinningTool>(this); declareProperty("ThinningService", m_thinningSvc); - declareProperty("EventInfo", m_eventInfoName, - "EventInfo name"); - declareProperty("TruthParticles", m_truthParticleName, "truth particle container name"); @@ -116,6 +109,8 @@ DerivationFramework::HardTruthThinning::~HardTruthThinning() { StatusCode DerivationFramework::HardTruthThinning::initialize() { + ATH_CHECK( m_evt.initialize() ); + m_evtCount = -1; m_errCount = 0; @@ -151,14 +146,12 @@ StatusCode DerivationFramework::HardTruthThinning::doThinning() const //bool doExtra = false; - // Retrieve Event/EventInfo -- FIXME - - const EventInfo* eventInfo = 0; - if( !evtStore()->retrieve( eventInfo, m_eventInfoName).isSuccess() ){ - ATH_MSG_ERROR("No EventInfo found with name " <<m_eventInfoName ); + SG::ReadHandle<xAOD::EventInfo> evt(m_evt); + if(!evt.isValid()) { + ATH_MSG_ERROR("Failed to retrieve EventInfo"); return StatusCode::FAILURE; } - long long int evtNum = eventInfo->event_ID()->event_number(); + long long int evtNum = evt->eventNumber(); // Retrieve truth particles and vertices diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h index bb34fa968b583f34c4465560fff1f35d6cae151f..4e1fe2d63839b2a826b3d987a9b6c85809c60e7c 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef EGAMMATAGTOOL_H @@ -14,17 +14,13 @@ Purpose : build the Egamma Tag objects - AnalysisTag.h. The Egamma Analysis Tag fragment is built here *****************************************************************************/ #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandleKey.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventType.h" -#include "EventInfo/EventID.h" -//#include "egammaEvent/ElectronContainer.h" +#include "xAODEventInfo/EventInfo.h" #include "xAODEgamma/EgammaContainer.h" #include "xAODEgamma/PhotonContainer.h" #include "xAODEgamma/ElectronContainer.h" #include "xAODMissingET/MissingETContainer.h" -//#include "egammaEvent/PhotonContainer.h" -//#include "MissingETEvent/MissingET.h" #include "TagEvent/TagFragmentCollection.h" #include "AthenaPoolUtilities/AthenaAttributeSpecification.h" #include <vector> @@ -51,12 +47,12 @@ public: private: bool ZeeSelection (const xAOD::ElectronContainer* eleColl, - const DataHandle<EventInfo>& eventInfo); + SG::ReadHandle<xAOD::EventInfo> eventInfo); bool WenuSelection (const xAOD::ElectronContainer* eleColl, const xAOD::MissingETContainer* metTopo, - const DataHandle<EventInfo>& eventInfo); + SG::ReadHandle<xAOD::EventInfo> eventInfo); void dumpEventDetails(const xAOD::Electron*, - const DataHandle<EventInfo>& eventInfo); + SG::ReadHandle<xAOD::EventInfo> eventInfo); private: @@ -78,6 +74,8 @@ private: double m_welectronPtCut; double m_invMass; + + SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}; }; #endif // ELECTRONTAGTOOL_H diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx index a7a6021694672f01e02894b7c7aeaed6b42d94d1..fec9448da3817f4ed77e097ee4af1c1963fc358d 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /***************************************************************************** @@ -52,6 +52,7 @@ EgammaTagTool::EgammaTagTool (const std::string& type, const std::string& name, StatusCode EgammaTagTool::initialize() { ATH_MSG_DEBUG("in initialize()"); + ATH_CHECK( m_evt.initialize() ); return StatusCode::SUCCESS; } @@ -81,8 +82,11 @@ StatusCode EgammaTagTool::execute(TagFragmentCollection& egammaTagCol, const int const xAOD::MissingETContainer* metTopo = nullptr; ATH_CHECK( evtStore()->retrieve(metTopo, m_missingEtObject) ); - const DataHandle<EventInfo> eventInfo; - ATH_CHECK( evtStore()->retrieve(eventInfo) ); + SG::ReadHandle<xAOD::EventInfo> evt(m_evt); + if(!evt.isValid()) { + ATH_MSG_ERROR("Failed to retrieve EventInfo"); + return StatusCode::FAILURE; + } /** Flags for Z and W events */ m_flagZeeEvent = false; @@ -91,12 +95,12 @@ StatusCode EgammaTagTool::execute(TagFragmentCollection& egammaTagCol, const int //=================================================== // Zee event reconstruction //=================================================== - m_flagZeeEvent = ZeeSelection (eleColl, eventInfo); + m_flagZeeEvent = ZeeSelection (eleColl, evt); //=================================================== // Wenu event reconstruction //=================================================== - m_flagWenuEvent = WenuSelection (eleColl, metTopo, eventInfo); + m_flagWenuEvent = WenuSelection (eleColl, metTopo, evt); //=================================================== @@ -121,7 +125,7 @@ StatusCode EgammaTagTool::finalize() { bool EgammaTagTool::ZeeSelection (const xAOD::ElectronContainer* eleColl, - const DataHandle<EventInfo>& eventInfo) + SG::ReadHandle<xAOD::EventInfo> eventInfo) { ATH_MSG_DEBUG("in ZeeSelection()"); @@ -173,7 +177,7 @@ bool EgammaTagTool::ZeeSelection (const xAOD::ElectronContainer* eleColl, if ( (m_massZLow < invMass) && (invMass < m_massZHigh) ) m_flagZeeEvent = true; /** Print the details of Zee Candidate if outputLevel=DEBUG */ - if (m_flagZeeEvent) { + if (m_flagZeeEvent && msgLvl(MSG::DEBUG)) { ATH_MSG_DEBUG("***** First electron candidate of Zee *****" ); dumpEventDetails(electrons_positive[i], eventInfo); ATH_MSG_DEBUG("***** Second electron candidate of Zee *****" ); @@ -190,7 +194,7 @@ bool EgammaTagTool::ZeeSelection (const xAOD::ElectronContainer* eleColl, bool EgammaTagTool::WenuSelection (const xAOD::ElectronContainer* eleColl, const xAOD::MissingETContainer* metTopo, - const DataHandle<EventInfo>& eventInfo) + SG::ReadHandle<xAOD::EventInfo> eventInfo) { ATH_MSG_DEBUG("in WenuSelection()"); @@ -212,7 +216,7 @@ bool EgammaTagTool::WenuSelection (const xAOD::ElectronContainer* eleColl, if (select) m_flagWenuEvent = true; - if (m_flagWenuEvent) { + if (m_flagWenuEvent && msgLvl(MSG::DEBUG)) { ATH_MSG_DEBUG("***** Electron Candidate in Wenu *****" ); dumpEventDetails(*eleItr, eventInfo); } @@ -223,30 +227,20 @@ bool EgammaTagTool::WenuSelection (const xAOD::ElectronContainer* eleColl, } void EgammaTagTool::dumpEventDetails(const xAOD::Electron* eleItr, - const DataHandle<EventInfo>& eventInfo) + SG::ReadHandle<xAOD::EventInfo> eventInfo) { - ATH_MSG_DEBUG("Event info : " - << " runNumber = " << eventInfo->event_ID()->run_number() - << " lumiBlock = " << eventInfo->event_ID()->lumi_block() - << " eventNumber = " << eventInfo->event_ID()->event_number() - ); + << " runNumber = " << eventInfo->runNumber() + << " lumiBlock = " << eventInfo->lumiBlock() + << " eventNumber = " << eventInfo->eventNumber() + ); ATH_MSG_DEBUG("Electrons : " - <<" pt = " << eleItr->pt() - <<" eta = " << eleItr->eta() - <<" phi = " << eleItr->phi() - <<" charge = " << eleItr->charge() - // <<" loosePP = " << eleItr->passID(egammaPID::ElectronIDLoosePP) - // <<" mediumPP = " << eleItr->passID(egammaPID::ElectronIDMediumPP) - // <<" tightPP = " << eleItr->passID(egammaPID::ElectronIDTightPP) - ); - - ATH_MSG_DEBUG("Event MET_topo : " - // <<" pt = " << metTopo->et() - // <<" phi = " << metTopo->phi() - ); + <<" pt = " << eleItr->pt() + <<" eta = " << eleItr->eta() + <<" phi = " << eleItr->phi() + <<" charge = " << eleItr->charge() + ); ATH_MSG_DEBUG("Invariant mass = " << m_invMass ); - } diff --git a/PhysicsAnalysis/EventTag/TagEvent/TagEvent/GlobalEventAttributeNames.h b/PhysicsAnalysis/EventTag/TagEvent/TagEvent/GlobalEventAttributeNames.h index 4e30cccaf2c11ad8c757545730777419537ebd13..4fdb5f9a9fc43332ca02a73956e9b4ea21379f27 100755 --- a/PhysicsAnalysis/EventTag/TagEvent/TagEvent/GlobalEventAttributeNames.h +++ b/PhysicsAnalysis/EventTag/TagEvent/TagEvent/GlobalEventAttributeNames.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef EVENTTAGALGS_GLOBALEVENTATTRIBUTENAMES_H @@ -9,7 +9,7 @@ Author - Ketevi A. Assamagan Feb 2006 ****************************************/ -//#include "EventInfo/EventInfo.h" + #include "AthenaPoolUtilities/AthenaAttributeSpecification.h" #include "GlobalGroupAndUnitNames.h" #include <string> diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/CMakeLists.txt b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/CMakeLists.txt index d4f0ba0143d71125cbf6b36608c024343febe77a..3eefb5f3d620a36e2f03e156b4bc86d70e2d91db 100644 --- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/CMakeLists.txt +++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/CMakeLists.txt @@ -20,7 +20,6 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Control/AthenaKernel Event/EventBookkeeperMetaData - Event/EventInfo Event/FourMomUtils Event/xAOD/xAODEventInfo Event/xAOD/xAODJet @@ -35,7 +34,7 @@ atlas_add_component( LongLivedParticleDPDMaker src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps xAODCaloEvent xAODEgamma xAODMuon xAODTracking GaudiKernel MuonSelectorToolsLib TrigDecisionToolLib TrigObjectMatchingLib AthenaKernel EventBookkeeperMetaData EventInfo FourMomUtils xAODEventInfo xAODJet xAODMissingET ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps xAODCaloEvent xAODEgamma xAODMuon xAODTracking GaudiKernel MuonSelectorToolsLib TrigDecisionToolLib TrigObjectMatchingLib AthenaKernel EventBookkeeperMetaData FourMomUtils xAODEventInfo xAODJet xAODMissingET ) # Install files from the package: atlas_install_headers( LongLivedParticleDPDMaker ) diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/RPVLLTestRates.h b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/RPVLLTestRates.h index 69a9a8025a46dac448544cc04cd25a75ca4be404..0c6afed0b3a6714986fe9577792a9ddb2faa86fb 100755 --- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/RPVLLTestRates.h +++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/RPVLLTestRates.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef RPVLL_TESTRATES_H @@ -15,6 +15,8 @@ #include "GaudiKernel/IIncidentListener.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ITHistSvc.h" +#include "StoreGate/ReadHandleKey.h" +#include "xAODEventInfo/EventInfo.h" #include "TH1.h" #include "TH2.h" @@ -51,6 +53,8 @@ class RPVLLTestRates : public AthAlgorithm { int m_lumiBlock; int m_evtNum; std::vector<int> m_filterPassed; + + SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}; }; #endif diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/RPVLLTestRates.cxx b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/RPVLLTestRates.cxx index e47f2a85be882a668dd322453c3cd2db08d72a51..b60a32be409713883b918342d66f59d6428e2c0b 100755 --- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/RPVLLTestRates.cxx +++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/RPVLLTestRates.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LongLivedParticleDPDMaker/RPVLLTestRates.h" #include "EventBookkeeperMetaData/EventBookkeeperCollection.h" #include "EventBookkeeperMetaData/SkimDecisionCollection.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include <iostream> @@ -23,7 +21,6 @@ RPVLLTestRates::RPVLLTestRates(const std::string& name, ISvcLocator* pSvcLocator m_runNum(0), m_lumiBlock(0), m_evtNum(0) - // m_filterPassed(0) { } @@ -43,6 +40,8 @@ StatusCode RPVLLTestRates::initialize() { StatusCode sc = m_tHistSvc.retrieve(); if (sc.isFailure()) return StatusCode::FAILURE; + ATH_CHECK( m_evt.initialize() ); + m_myTree= new TTree("myTree","myTree"); sc = m_tHistSvc->regTree("/AANT/myTree",m_myTree); if (sc.isFailure()) msg(MSG::ERROR)<<"Failed to book TTree"<<endmsg; @@ -94,19 +93,19 @@ StatusCode RPVLLTestRates::execute() { m_EventCounter++; - const EventInfo* eventInfo = nullptr; - StatusCode sc = evtStore()->retrieve(eventInfo); - if (sc.isFailure()) { + SG::ReadHandle<xAOD::EventInfo> evt(m_evt); + if (!evt.isValid()) { ATH_MSG_ERROR( "Could not retrieve event info" ); + return StatusCode::FAILURE; } - m_runNum = eventInfo->event_ID()->run_number(); - m_evtNum = eventInfo->event_ID()->event_number(); - m_lumiBlock = eventInfo->event_ID()->lumi_block(); + m_runNum = evt->runNumber(); + m_evtNum = evt->eventNumber(); + m_lumiBlock = evt->lumiBlock(); //// these are the ones that are useful for RPVLL filters const SkimDecisionCollection *SDcoll = 0; - sc = evtStore()->retrieve(SDcoll, "StreamDESDM_RPVLL_SkimDecisionsContainer"); + StatusCode sc = evtStore()->retrieve(SDcoll, "StreamDESDM_RPVLL_SkimDecisionsContainer"); int isAc=0; if (sc.isSuccess()){