diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt index d7fa3e120edd16686fe4ec32ac05d0e48b266e74..90ae8d369724d4714403c624d39420e28854bbd2 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( Control/AthToolSupport/AsgTools Control/AthenaBaseComps Control/SGTools + Control/StoreGate DetectorDescription/GeoPrimitives Event/xAOD/xAODBTagging Event/xAOD/xAODJet diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetProbTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetProbTag.h index 9bc3e4f96c867c5078937d5acb52d6c065e43217..177ffa3187416263b6013b42c14f27be6145e969 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetProbTag.h +++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetProbTag.h @@ -17,6 +17,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "StoreGate/ReadHandle.h" #include <vector> #include "JetTagTools/ITagTool.h" #include "xAODTracking/TrackParticle.h" @@ -78,7 +79,7 @@ namespace Analysis ToolHandle< TrackSelector > m_trackSelectorTool; std::string m_originalTPCollectionName; - const xAOD::TrackParticleContainer* m_originalTPCollection; + SG::ReadHandle<xAOD::TrackParticleContainer> m_originalTPCollection; bool m_writeInfoBase; // writes a basic info for each tagger with Pb, Pu (IPInfoBase) std::string m_infoPlusName; // key to store the IPInfoPlus diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h index 7e6c7b404efadab3fd82f6df6e9275ce5f746957..d27553b3612a96fee056dc0fbcb316735f1a88e0 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h +++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h @@ -50,6 +50,7 @@ UPDATE: 2006-02-10 AK, MW more track quality cuts added #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "StoreGate/ReadHandle.h" #include "JetTagTools/ITagTool.h" #include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticleContainer.h" @@ -229,11 +230,13 @@ namespace Analysis /** @brief Name of the original electron collection*/ std::string m_originalElCollectionName; /** @brief Original electron collection*/ - const ElectronContainer* m_originalElCollection; + //const ElectronContainer* m_originalElCollection; + SG::ReadHandle<ElectronContainer> m_originalElCollection; /** @brief Name of the original photon collection*/ std::string m_originalPhCollectionName; /** @brief Original photon collection*/ - const PhotonContainer* m_originalPhCollection; + //const PhotonContainer* m_originalPhCollection; + SG::ReadHandle<PhotonContainer> m_originalPhCollection; /** @brief for reference mode: */ std::string m_runModus; diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h index 5bf70fc196c0b9c618eac33c444e6bf005fc76ec..93a4ba890a8dd0bf3e33ffc4adeef5fd5d59396e 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h +++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h @@ -22,6 +22,7 @@ #include "xAODTracking/TrackParticle.h" #include "egammaMVACalib/egammaMVACalib.h" #include "MVAUtils/BDT.h" +#include "StoreGate/ReadHandle.h" #include "TMVA/MethodBase.h" #include "TMVA/IMethod.h" diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/TrackSelector.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/TrackSelector.h index 6df1a0940fdd02fee8f35addb7dcb475f76c9222..2c69b7471fa8d5802bfb1d4e869ffbcdc74ea777 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/TrackSelector.h +++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/TrackSelector.h @@ -48,7 +48,7 @@ public: bool selectTrack(const xAOD::TrackParticle* track, double refPt = 0); /** Processes all the tracks in input and outputs the tracks passing the selection */ - StatusCode selectAllTracks(); + //StatusCode selectAllTracks(); inline const std::bitset<17> currentTrackpassedCuts() const { return m_passedCuts; } diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetProbTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetProbTag.cxx index 10576aa273e10b3c2ae733bae1533d0dca3170ad..52c8be8751ff9445f450670ef8ecc1544da3fdb2 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetProbTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetProbTag.cxx @@ -321,14 +321,14 @@ namespace Analysis { author ) != m_jetWithInfoPlus.end()) keepInfoPlus = true; /** retrieve the original TP collection for persistence: */ - if(m_runModus == "analysis" && keepInfoPlus) { + /*if(m_runModus == "analysis" && keepInfoPlus) { if (evtStore()->retrieve(m_originalTPCollection, m_originalTPCollectionName).isFailure()) { ATH_MSG_ERROR("#BTAG# " << m_originalTPCollectionName << " not found in StoreGate."); return; } else { ATH_MSG_VERBOSE("#BTAG# TrackParticleContainer " << m_originalTPCollectionName << " found."); } - } + }*/ /** for reference mode: */ bool jetIsOkForReference = false; diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx index fd29b09f7c4f81bbd8b3cc44611c7974c6b832a3..b8307b486592798aba5b359a1a0e4e5a3ef1cde6 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx @@ -327,7 +327,7 @@ void SoftElectronTag::tagJet(xAOD::Jet& jetToTag) { // If one wants to add a pointer to the best Electron, needs the container. // Retrieved for each jet. Does another way to do this exist ? - if(m_writeInfoPlus) { + /*if(m_writeInfoPlus) { bool ppb = true; StatusCode sc = evtStore()->retrieve(m_originalElCollection, m_originalElCollectionName); @@ -361,7 +361,7 @@ void SoftElectronTag::tagJet(xAOD::Jet& jetToTag) ATH_MSG_VERBOSE("Not able to persistify photon infos ! Exiting..."); return; } - } + }*/ // author to know which jet algorithm: m_author = jetToTag.jetAuthor(); @@ -784,13 +784,14 @@ void SoftElectronTag::JetTagReferenceMode(xAOD::Jet& jetToTag) const xAOD::TrackParticleContainer * tpContainer(0); const TrackParticleTruthCollection* tpTruthColl(0); //sc = m_storeGate->retrieve(tpContainer,m_TPContainerName); - StatusCode sc = evtStore()->retrieve(tpContainer,m_TPContainerName); + //StatusCode sc = evtStore()->retrieve(tpContainer,m_TPContainerName); + StatusCode sc = false; if ( sc.isFailure() ) { ATH_MSG_DEBUG("No TrackParticleCandidate ! Cannot build calibration"); return; } //sc = m_storeGate->retrieve(tpTruthColl,m_TPTruthContainerName); - sc = evtStore()->retrieve(tpTruthColl,m_TPTruthContainerName); + //sc = evtStore()->retrieve(tpTruthColl,m_TPTruthContainerName); if (sc.isFailure() ) { ATH_MSG_DEBUG("No TrackParticleTruthCollection ! Cannot build calibration"); return; diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx index e2c6b5c582a0ceedb40c2ae0c2afe41010b6197a..b55776b7cf7f5dab0cacd47890ec49588f85481c 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx @@ -743,8 +743,9 @@ namespace Analysis //std::cout << " trk: " << tmpMuon->primaryTrackParticle()->z0() << " PVZ: " << m_priVtx->z() << " and z: " << z0 << std::endl; //Finding SV with a muon - const xAOD::TrackParticleContainer *trackParticles = 0; - CHECK( evtStore()->retrieve(trackParticles, "InDetTrackParticles") ); + //const xAOD::TrackParticleContainer *trackParticles = 0; + //evtStore()->retrieve(trackParticles, "InDetTrackParticles") ); + SG::ReadHandle<xAOD::TrackParticleContainer> trackParticles("InDetTrackParticles"); xAOD::TrackParticleContainer::const_iterator trackItr = trackParticles->begin(); xAOD::TrackParticleContainer::const_iterator trackItrE = trackParticles->end(); std::vector<const xAOD::TrackParticle*> my_trkparticles(0); diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx index ab1b0f288750998cab374e1f3781935bf5a7a67e..0a5e4da8fd8aec916d314f56c26cae7773a035e7 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx @@ -12,6 +12,7 @@ #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" #include "GeoPrimitives/GeoPrimitives.h" #include "GaudiKernel/IToolSvc.h" +//#include "StoreGate/ReadHandle.h" #include "ITrackToVertex/ITrackToVertex.h" #include <TMath.h> #include <string> @@ -364,22 +365,23 @@ namespace Analysis { } - StatusCode TrackSelector::selectAllTracks() { +// StatusCode TrackSelector::selectAllTracks() { /** retrieve input tracks: */ - const xAOD::TrackParticleContainer* inputTracks(0); - StatusCode sc = evtStore()->retrieve(inputTracks, m_inputTrackCollection); + //const xAOD::TrackParticleContainer* inputTracks(0); + //SG::ReadHandle<xAOD::TrackParticleContainer> inputTracks(m_inputTrackCollection); +/* StatusCode sc = evtStore()->retrieve(inputTracks, m_inputTrackCollection); if (sc.isFailure()) { ATH_MSG_ERROR("#BTAG# TrackParticleContainer " << m_inputTrackCollection << " not found."); return sc; } ATH_MSG_VERBOSE("#BTAG# TrackParticleContainer " << m_inputTrackCollection << " found."); - +*/ /** create output container: */ - xAOD::TrackParticleContainer* outputTracks = new xAOD::TrackParticleContainer(); +// xAOD::TrackParticleContainer* outputTracks = new xAOD::TrackParticleContainer(); /** loop on tracks, select and fill output container: */ - xAOD::TrackParticleContainer::const_iterator nextTrk(inputTracks->begin()); +/* xAOD::TrackParticleContainer::const_iterator nextTrk(inputTracks->begin()); xAOD::TrackParticleContainer::const_iterator lastTrk(inputTracks->end()); for (; nextTrk!=lastTrk; nextTrk++) { if( this->selectTrack( (*nextTrk) ) ) { @@ -387,10 +389,10 @@ namespace Analysis { outputTracks->push_back( new xAOD::TrackParticle(**nextTrk) ); } } - +*/ /** storing output collection in StoreGate: */ - ATH_MSG_VERBOSE("#BTAG# recording to StoreGate: " << m_outputTrackCollection); - sc = evtStore()->record(outputTracks, m_outputTrackCollection, false); +/* ATH_MSG_VERBOSE("#BTAG# recording to StoreGate: " << m_outputTrackCollection); + StatusCode sc = evtStore()->record(outputTracks, m_outputTrackCollection, false); if (sc.isFailure()) { ATH_MSG_ERROR("#BTAG# unable to store TrackParticleContainer " << m_outputTrackCollection); return sc; @@ -399,5 +401,5 @@ namespace Analysis { return StatusCode::SUCCESS; } - +*/ }