diff --git a/RecoEgamma/EgammaMCTools/interface/PhotonMCTruthFinder.h b/RecoEgamma/EgammaMCTools/interface/PhotonMCTruthFinder.h index 77eb6084be164..45ae953ec7b83 100644 --- a/RecoEgamma/EgammaMCTools/interface/PhotonMCTruthFinder.h +++ b/RecoEgamma/EgammaMCTools/interface/PhotonMCTruthFinder.h @@ -28,6 +28,7 @@ class PhotonMCTruthFinder { std::vector find( const std::vector& simTracks, const std::vector& simVertices); + void clear() {geantToIndex_.clear();} private: diff --git a/Validation/EventGenerator/plugins/TTbar_Kinematics.cc b/Validation/EventGenerator/plugins/TTbar_Kinematics.cc index 05d46c484b886..212cff4a2dab9 100644 --- a/Validation/EventGenerator/plugins/TTbar_Kinematics.cc +++ b/Validation/EventGenerator/plugins/TTbar_Kinematics.cc @@ -39,7 +39,7 @@ void TTbar_Kinematics::analyze(const edm::Event& iEvent, const edm::EventSetup& iEvent.getByToken(hepmcCollectionToken_, evt); //Get EVENT - HepMC::GenEvent *myGenEvent = new HepMC::GenEvent(*(evt->GetEvent())); + const HepMC::GenEvent *myGenEvent = evt->GetEvent(); TLorentzVector tlv_Top, tlv_TopBar, tlv_Bottom, tlv_BottomBar ,tlv_Wplus ,tlv_Wmin , tlv_TTbar; bool top(false), antitop(false), antibottom(false), bottom(false), Wplus(false), Wmin(false); diff --git a/Validation/RecoEgamma/plugins/PhotonValidator.cc b/Validation/RecoEgamma/plugins/PhotonValidator.cc index 4cd8d2cb1ca41..9ad17ffe5f50e 100755 --- a/Validation/RecoEgamma/plugins/PhotonValidator.cc +++ b/Validation/RecoEgamma/plugins/PhotonValidator.cc @@ -1637,7 +1637,7 @@ void PhotonValidator::endRun (edm::Run& r, edm::EventSetup const & theEventSetu void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup ) { - + thePhotonMCTruthFinder_->clear(); using namespace edm; // const float etaPhiDistance=0.01; // Fiducial region diff --git a/Validation/RecoEgamma/plugins/TkConvValidator.cc b/Validation/RecoEgamma/plugins/TkConvValidator.cc index 6a92694de1ecb..45726d1c60edd 100644 --- a/Validation/RecoEgamma/plugins/TkConvValidator.cc +++ b/Validation/RecoEgamma/plugins/TkConvValidator.cc @@ -809,7 +809,7 @@ void TkConvValidator::endRun (edm::Run& r, edm::EventSetup const & theEventSetu void TkConvValidator::analyze( const edm::Event& e, const edm::EventSetup& esup ) { - + thePhotonMCTruthFinder_->clear(); using namespace edm; // const float etaPhiDistance=0.01; // Fiducial region