diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx index b98d12d91d8b5cd2df1311c8a6856d81e8b5938a..c9b438103fb9972086375b4efda7fb8e167e1d7c 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.cxx @@ -23,27 +23,27 @@ InDetRttPlots::InDetRttPlots(InDetPlotBase* pParent, const std::string& sDir) : m_fakePlots(this, "Tracks/FakeRate"), m_missingTruthFakePlots(this, "Tracks/Unlinked/FakeRate"), m_resolutionPlotPrim(this, "Tracks/Matched/Resolutions/Primary"), - m_resolutionPlotSecd(nullptr), m_hitsRecoTracksPlots(this, "Tracks/Selected/HitsOnTracks"), m_effPlots(this, "Tracks/Efficiency"), m_verticesVsMuPlots(this, "Vertices/AllPrimaryVertices"), m_vertexPlots(this, "Vertices/AllPrimaryVertices"), m_hardScatterVertexPlots(this, "Vertices/HardScatteringVertex"), m_hardScatterVertexTruthMatchingPlots(this, "Vertices/HardScatteringVertex"), + m_resolutionPlotSecd(nullptr), m_doTrackInJetPlots(true) //FIX CONFIGURATION - { +{ m_trackParticleTruthProbKey = "truthMatchProbability"; m_truthProbLowThreshold = 0.5; if(m_iDetailLevel >= 200){ - m_resolutionPlotSecd = new InDetPerfPlot_Resolution(this, "Tracks/Matched/Resolutions/Secondary"); - m_hitsMatchedTracksPlots = new InDetPerfPlot_Hits(this, "Tracks/Matched/HitsOnTracks"); - m_vertexTruthMatchingPlots = new InDetPerfPlot_VertexTruthMatching(this, "Vertices/AllPrimaryVertices"); + m_resolutionPlotSecd = std::unique_ptr<InDetPerfPlot_Resolution>(new InDetPerfPlot_Resolution(this, "Tracks/Matched/Resolutions/Secondary")); + m_hitsMatchedTracksPlots = std::unique_ptr<InDetPerfPlot_Hits>(new InDetPerfPlot_Hits(this, "Tracks/Matched/HitsOnTracks")); + m_vertexTruthMatchingPlots = std::unique_ptr<InDetPerfPlot_VertexTruthMatching>(new InDetPerfPlot_VertexTruthMatching(this, "Vertices/AllPrimaryVertices")); } //A lot of Jets... do we need these at all??? if(m_doTrackInJetPlots){ - m_trkInJetPlots = new InDetPerfPlot_TrkInJet(this, "TracksInJets/Tracks"); + m_trkInJetPlots = std::unique_ptr<InDetPerfPlot_TrkInJet>(new InDetPerfPlot_TrkInJet(this, "TracksInJets/Tracks")); } } diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h index 0280b5ddc1c6d4acdb567aee4355fc181fe6cba2..fd1bb3e8ed3ab138cffbcf4ce55cfd21ed4bfde4 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetRttPlots.h @@ -13,6 +13,8 @@ // std includes #include <string> +#include <memory> + // local includes #include "InDetPlotBase.h" #include "InDetBasicPlot.h" @@ -82,20 +84,18 @@ private: InDetPerfPlot_FakeRate m_fakePlots; InDetPerfPlot_FakeRate m_missingTruthFakePlots; InDetPerfPlot_Resolution m_resolutionPlotPrim; - InDetPerfPlot_Resolution* m_resolutionPlotSecd; - InDetPerfPlot_Hits *m_hitsMatchedTracksPlots; InDetPerfPlot_Hits m_hitsRecoTracksPlots; InDetPerfPlot_Efficiency m_effPlots; - InDetPerfPlot_VerticesVsMu m_verticesVsMuPlots; InDetPerfPlot_Vertex m_vertexPlots; InDetPerfPlot_Vertex m_hardScatterVertexPlots; - InDetPerfPlot_VertexTruthMatching *m_vertexTruthMatchingPlots; InDetPerfPlot_VertexTruthMatching m_hardScatterVertexTruthMatchingPlots; + std::unique_ptr<InDetPerfPlot_Resolution> m_resolutionPlotSecd; + std::unique_ptr<InDetPerfPlot_Hits> m_hitsMatchedTracksPlots; + std::unique_ptr<InDetPerfPlot_VertexTruthMatching> m_vertexTruthMatchingPlots; bool m_doTrackInJetPlots; - - InDetPerfPlot_TrkInJet *m_trkInJetPlots; + std::unique_ptr<InDetPerfPlot_TrkInJet> m_trkInJetPlots; std::string m_trackParticleTruthProbKey; float m_truthProbLowThreshold;