diff --git a/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h b/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h index e65d8b8cc53cf..11ddf00f18bbd 100755 --- a/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h +++ b/GeneratorInterface/ExternalDecays/interface/TauSpinnerCMS.h @@ -33,7 +33,6 @@ #include "TauSpinner/SimpleParticle.h" using namespace edm; -using namespace std; using namespace TauSpinner; class TauSpinnerCMS : public edm::EDProducer @@ -55,7 +54,7 @@ class TauSpinnerCMS : public edm::EDProducer bool isReco_; bool isTauolaConfigured_; bool isLHPDFConfigured_; - string LHAPDFname_; + std::string LHAPDFname_; double CMSEnergy_; edm::InputTag gensrc_; int MotherPDGID_,Ipol_,nonSM2_,nonSMN_; diff --git a/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h b/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h index 2db8393a8dd21..15f81ae393ee7 100644 --- a/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h +++ b/GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h @@ -8,7 +8,6 @@ #include "TauSpinner/SimpleParticle.h" #include -using namespace std; using namespace TauSpinner; /** Read HepMC::GenEvent. @@ -29,12 +28,12 @@ using namespace TauSpinner; 0 - event processed correctly 1 - empty event or no decay found in the event */ -int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, vector &tau_daughters, vector &tau2_daughters); +int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, std::vector &tau_daughters, std::vector &tau2_daughters); /** Get daughters of HepMC::GenParticle Recursively searches for final-state daughters of 'x' */ -vector *getDaughters(HepMC::GenParticle *x); +std::vector *getDaughters(HepMC::GenParticle *x); /** Find last self diff --git a/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc b/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc index 41d8f44d544e9..3f70723f7f87b 100755 --- a/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc +++ b/GeneratorInterface/ExternalDecays/plugins/TauSpinnerCMS.cc @@ -53,7 +53,7 @@ void TauSpinnerCMS::produce( edm::Event& e, const edm::EventSetup& iSetup){ double WTFlip=1.0; double polSM=-999; //range [-1,1] SimpleParticle X, tau, tau2; - vector tau_daughters, tau_daughters2; + std::vector tau_daughters, tau_daughters2; int stat(0); if(isReco_){ stat=readParticlesfromReco(e,X,tau,tau2,tau_daughters,tau_daughters2); diff --git a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc index 5d68ec2b6724f..fc89fef23be5b 100644 --- a/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc +++ b/GeneratorInterface/ExternalDecays/src/read_particles_from_HepMC.cc @@ -1,13 +1,14 @@ #include "GeneratorInterface/ExternalDecays/interface/read_particles_from_HepMC.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" /******************************************************************************* Get daughters of HepMC::GenParticle Recursively searches for final-state daughters of 'x' *******************************************************************************/ -inline vector *getDaughters(HepMC::GenParticle *x) +inline std::vector *getDaughters(HepMC::GenParticle *x) { - vector *daughters = new vector(); + std::vector *daughters = new std::vector(); if(!x->end_vertex()) return daughters; // Check decay products of 'x' @@ -20,7 +21,7 @@ inline vector *getDaughters(HepMC::GenParticle *x) // all of its daughters. if( pp->end_vertex() && pp->pdg_id()!=111) { - vector *sub_daughters = getDaughters(pp); + std::vector *sub_daughters = getDaughters(pp); daughters->insert(daughters->end(),sub_daughters->begin(),sub_daughters->end()); delete sub_daughters; @@ -84,7 +85,7 @@ inline bool isFirst(HepMC::GenParticle *x){ Event will continue to be processed with next function call. *******************************************************************************/ -int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, vector &tau_daughters, vector &tau2_daughters) +int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, std::vector &tau_daughters, std::vector &tau2_daughters) { if(event==NULL) return 1; @@ -118,7 +119,8 @@ int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, Simp else if(!hTau2) hTau2 = *it2; else { - cout<<"TauSpiner: three taus in one decay"<pdg_id()); // Create list of tau daughters - vector *buf = getDaughters(hTau); + std::vector *buf = getDaughters(hTau); tau_daughters.clear(); tau_daughters.insert(tau_daughters.end(),buf->begin(),buf->end());