diff --git a/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx b/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
index 8a80e311bd3bc3c24d30b78260b4c6ac046a0f46..137ce080e370231835fa16dabf682d1ce5027021 100644
--- a/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
+++ b/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
@@ -86,7 +86,7 @@ namespace Simulation
       auto vtxItEnd = ge.vertices_end();
       for( ; vtxIt != vtxItEnd; ++vtxIt) {
         // quick access:
-        HepMC::GenVertex *curVtx = (*vtxIt);
+        auto curVtx = (*vtxIt);
         const HepMC::FourVector &curPos = curVtx->position();
 
         // get a copy of the current vertex position
diff --git a/Simulation/BeamEffects/src/ZeroLifetimePositioner.cxx b/Simulation/BeamEffects/src/ZeroLifetimePositioner.cxx
index 0b58be6c4d7ecd9fc914ee3b4a06f33d854f6ac0..227f709ddea75450334d773b5e6028bcbd8681a4 100644
--- a/Simulation/BeamEffects/src/ZeroLifetimePositioner.cxx
+++ b/Simulation/BeamEffects/src/ZeroLifetimePositioner.cxx
@@ -71,7 +71,7 @@ StatusCode Simulation::ZeroLifetimePositioner::manipulate(HepMC::GenEvent& ge, b
   const auto pdgCodesEnd = m_pdgCodesToCheck.end();
   for (; vtxIt != vtxItEnd; ++vtxIt) {
     // quick access:
-    HepMC::GenVertex *curVtx = (*vtxIt);
+    auto curVtx = (*vtxIt);
     if (curVtx->particles_in_size()!=1 || curVtx->particles_out_size()!=1) { continue; }
     const int pdgIn=(*(curVtx->particles_in_const_begin()))->pdg_id();
     const int pdgOut=(*(curVtx->particles_out_const_begin()))->pdg_id();
diff --git a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
index 724f67c3bd58bfdcbb3ecdc53d056ff7c21a6d31..15d5479fc7652597130c065b2bea3c624a9a9570 100755
--- a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
@@ -202,7 +202,6 @@ void FastShowerCellBuilderTool::LoadParametrizationsFromDir(std::string dir)
   TSystemDirectory d(dirname,dirname);
   TList* files=d.GetListOfFiles();
   for(int i=0;i<files->GetSize();++i) if(files->At(i)){
-      //    cout<<i<<" : "<<files->At(i)->GetName()<<" = "<<files->At(i)->GetTitle()<<endl;
       TString name=files->At(i)->GetName();
       if(name.Index(".root")==kNPOS) continue;
       name.ReplaceAll(".root","");
@@ -1887,19 +1886,6 @@ FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCellContainer,
           //          const CaloDetDescrElement* cell=theDDE[i][icell];
           double ecell=E_theDDE[icell]*p.E_layer[sample]/elayertot;
           if(ecell<=0) continue;
-          //          log<<MSG::DEBUG<<"layer "<<i<<" cell eta="<<cell->eta()<<" phi="<<cell->phi()<<" Eorg="<<ecell;
-
-          /*
-            if(ecell/p.E_layer[sample]>0.01) {
-            const CaloDetDescrElement* cell=theDDE[icell];
-            log << MSG::DEBUG <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<ecell;
-            if(ibestcell) {
-            const CaloDetDescrElement* bestcell=theDDE[ibestcell];
-            log <<" dhit :deta="<<cell->eta()-bestcell->eta()<<" dphi="<<TVector2::Phi_mpi_pi( cell->phi() - bestcell->phi() );
-            }
-            log <<endmsg;
-            }
-          */
 
           CLHEP::HepRandomEngine* engine = m_randomEngine->getEngine (ctx);
           double rndfactor=-1;
@@ -1922,15 +1908,12 @@ FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCellContainer,
 
           CaloCell* theCaloCell=theCellContainer->findCell(cell->calo_hash());
           if(theCaloCell) {
-            //            log << MSG::VERBOSE << "found calo cell : eta=" <<theCaloCell->caloDDE()->eta()<<" phi="<<theCaloCell->caloDDE()->phi()<<" overlap="<<iter->second<<"old e=" <<theCaloCell->energy()<< " ; new e=" <<theCaloCell->energy()+energy*iter->second<< endmsg;
             theCaloCell->setEnergy(theCaloCell->energy()+ecell);
 
             if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample, ecell );
           } else {
             ATH_MSG_WARNING("det_elm found eta=" <<cell->eta()<<" phi="<<cell->phi()<<" hash="<<cell->calo_hash()
                             << " : e=" <<ecell<< " not filled!!! doing nothing!!!");
-            //            theCaloCell=new CaloCell(cell,ecell,0,1,CaloGain::UNKNOWNGAIN);
-            //            theCellContainer->push_back(theCaloCell);
 
             if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample);
           }
@@ -2043,7 +2026,7 @@ FastShowerCellBuilderTool::flag_simul_sate FastShowerCellBuilderTool::Is_below_v
     int nother=0;
     for(HepMC::GenVertex::particles_out_const_iterator pout=ver->particles_out_const_begin();pout!=ver->particles_out_const_end();++pout) {
       const HepMC::GenParticle* par=*pout;
-      int absid=abs(par->pdg_id());
+      int absid=std::abs(par->pdg_id());
       if(absid==22) {
         ++ngamma;
       } else {
@@ -2077,8 +2060,8 @@ void MC_init_particle_simul_state(MCdo_simul_state& do_simul_state,const MCparti
     const HepMC::GenParticle* par=*ip;
     if(par) {
       do_simul_state[par->barcode()]=1;
-      HepMC::GenVertex* outver=par->end_vertex();
-      HepMC::GenVertex* inver =par->production_vertex();
+      auto outver=par->end_vertex();
+      auto inver =par->production_vertex();
       if(outver) {
         do_simul_state[outver->barcode()]=1;
       }
@@ -2127,7 +2110,7 @@ void FastShowerCellBuilderTool::MC_remove_out_of_ID(MCdo_simul_state& do_simul_s
     if(par) {
       if(do_simul_state[par->barcode()]<=0) continue;
 
-      HepMC::GenVertex* inver =par->production_vertex();
+      auto inver =par->production_vertex();
       if(inver) {
         if(!Is_ID_Vertex(inver)) {
           int nin=0;
@@ -2178,7 +2161,7 @@ void FastShowerCellBuilderTool::MC_remove_below_v14_truth_cuts(MCdo_simul_state&
     if(par) {
       if(do_simul_state[par->barcode()]<=0) continue;
 
-      HepMC::GenVertex* outver =par->end_vertex();
+      auto outver =par->end_vertex();
       if(outver) {
         if(outver->barcode()>=-200000) continue;
 
@@ -2199,7 +2182,7 @@ void MC_remove_decay_to_simul(MCdo_simul_state& do_simul_state,const MCparticleC
     if(par) {
       if(do_simul_state[par->barcode()]<=0) continue;
 
-      HepMC::GenVertex* inver =par->production_vertex();
+      auto inver =par->production_vertex();
       if(inver) {
         MC_recursive_remove_in_particles(do_simul_state,inver,FastShowerCellBuilderTool::mother_particle);
       }
@@ -2259,8 +2242,6 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
     return StatusCode::FAILURE;
   }
 
-  //FastCaloSimIsGenSimulStable ifs;
-  //TruthHelper::IsGenNonInteracting invisible;
 
   MCparticleCollection particles;
   MCparticleCollection Simulparticles;
@@ -2279,7 +2260,6 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
         {
           particles.push_back(*istart);
         }
-      //std::cout <<std::endl;
     }
   particles = MC::filter_keep(particles, FastCaloSimIsGenSimulStable);
 
@@ -2366,8 +2346,8 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
       msg(MSG::DEBUG)<<reason;
 
       msg()<<indpar<<": id="<<par->pdg_id()<<" stat="<<par->status()<<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi();
-      HepMC::GenVertex*  inver =par->production_vertex();
-      HepMC::GenVertex* outver =par->end_vertex();
+      auto  inver =par->production_vertex();
+      auto outver =par->end_vertex();
       if(inver) {
         double inr=inver->position().perp();
         double inz=inver->position().z();
@@ -2460,27 +2440,6 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
 
     ++stat_npar;
   }
-  //std::cout <<"ZH Processed: "<<stat_npar<<"(ok: "<<stat_npar_nOK<<")"<<std::endl;
-  /*
-    MCparticleCollection all_particles;
-    log <<MSG::DEBUG<<"Start getting all particles"<<endmsg;
-    sc = m_gentesIO->getMC(all_particles, m_mcLocation );
-
-    if ( sc.isFailure() ) {
-    log << MSG::ERROR << "getMC from "<<m_mcLocation<<" failed "<< endmsg;
-    return StatusCode::FAILURE;
-    }
-
-    log <<MSG::INFO<<"Got all particles n="<<all_particles.size()<<endmsg;
-    for(ip=all_particles.begin(); ip<all_particles.end(); ++ip){
-    const HepMC::GenParticle* par=*ip;
-    if(abs(par->pdg_id())!=15) continue;
-    std::vector<double> sums(3);
-    sums[0]=sums[1]=sums[2]=0;
-    sum_par(par,log,sums,0);
-    print_par(par,log,0);
-    }
-  */
 
   ATH_MSG_DEBUG("Executing finished calo size=" <<theCellContainer->size()<<"; "<<stat_npar<<" particle(s), "<<stat_npar_OK<<" with sc=SUCCESS");
 
@@ -2532,36 +2491,6 @@ StatusCode FastShowerCellBuilderTool::releaseEvent (Stats& stats) const
 }
 
 
-/*
-  void FastShowerCellBuilderTool::deflectParticles(ITransportedParticleCollection &itpc)
-  {
-  MsgStream log( msgSvc(), name() );
-  log << MSG::DEBUG << "FastShowerCellBuilderTool deflectParticles()" << endmsg;
-
-  // read MC particles from TES
-  typedef std::vector<const HepMC::GenParticle*>  MCparticleCollection ;
-  typedef std::vector<const HepMC::GenParticle*>::const_iterator  MCparticleCollectionCIter ;
-
-  MCparticleCollection p;
-  TesIoStat stat = m_tesIO->getMC( p, m_mcSelector ) ;
-  std::string mess;
-  mess = stat? "Retrieved MC from TES ":"Failed MC retrieve from TES ";
-  log << MSG::DEBUG << mess << p.size()<<endmsg;
-
-  MCparticleCollectionCIter ip= p.begin();
-  for(; ip<p.end(); ++ip){
-  deflectParticle(itpc,*ip);
-  }
-  }
-
-  void FastShowerCellBuilderTool::deflectParticle(Atlfast::ITransportedParticleCollection &itpc,const HepMC::GenParticle* par)
-  {
-  ITransportedParticle *itp = new TransportedHelixParticle(par);
-  itp->deflect();
-  itpc.push_back(itp);
-  }
-
-*/
 
 std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenParticle& part) const
 {
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/LArHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/LArHitsTestTool.cxx
index 4ae39cccf85a9a23097a0f7afed97942ba1a395d..9ef784c2451cb3b87237e1beba01baa19386cceb 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/LArHitsTestTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/LArHitsTestTool.cxx
@@ -243,7 +243,7 @@ StatusCode LArHitsTestTool::processEvent() {
       }
     }
   }
-  const HepMC::GenParticle *primary = getPrimary();
+  auto primary = getPrimary();
   if (primary) {
     m_etot_eta->Fill(primary->momentum().eta(),etot);
     m_etot_phi->Fill(primary->momentum().phi(),etot);
diff --git a/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx b/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx
index 62470bdc8b9f1b98a78a1c6d2082918eadb97b32..ca8d9694a832612e3dffe005fea441d2da70a617 100644
--- a/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx
+++ b/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx
@@ -21,7 +21,6 @@ const HepMC::GenParticle* TrackInformation::GetHepMCParticle() const
 {
   return m_theParticle;
 }
-
 const ISF::ISFParticle* TrackInformation::GetBaseISFParticle() const
 {
   return m_theBaseISFParticle;