From 8cf38c7726f59bdf9fe2989199149e83f16cf4ec Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Tue, 21 Apr 2020 22:41:42 +0200
Subject: [PATCH] Removed a lot of defunct commented code

---
 .../xAOD/xAODTruthCnv/src/xAODTruthReader.cxx | 30 -----------
 .../src/ALFA_BeamTransport.cxx                | 53 +------------------
 Generators/EvtGen_i/src/EvtDecay.cxx          |  1 -
 .../TruthUtils/TruthUtils/HepMCHelpers.h      |  6 ---
 .../src/IDStandardPerformance.cxx             |  2 -
 .../LArDigitization/src/LArHitEMap.cxx        | 10 +---
 .../ParticleJetTools/Root/JetQuarkLabel.cxx   | 28 +---------
 .../src/AfpTruthInfoFillerTool.cxx            | 12 +----
 .../src/TruthTrackGetterTool.cxx              |  1 -
 .../TruthD3PDMaker/src/TruthJetFilterTool.cxx |  2 -
 .../src/HepMcFloatWriterTool.cxx              |  4 --
 .../McParticleTools/src/PileupFilterTool.cxx  |  3 +-
 .../src/FastShowerCellBuilderTool.cxx         | 22 +-------
 .../obsolete/FastCaloSimIsGenSimulStable.cxx  |  2 -
 .../src/PRD_PlanarTruthTrajectoryBuilder.cxx  |  1 -
 .../src/McMaterialEffectsUpdator.cxx          |  2 -
 .../src/InDetPrimaryConversionSelector.cxx    |  2 -
 .../TrigTrackSelector.h                       |  8 +--
 .../TrigTrackSelector_old.h                   |  9 +---
 .../src/TrigTrackSelector.cxx                 |  5 --
 .../VP1TrackSystems/SimHitHandleBase.h        |  2 -
 .../src/TrackCollHandle_TruthTracks.cxx       |  2 -
 22 files changed, 9 insertions(+), 198 deletions(-)

diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthReader.cxx b/Event/xAOD/xAODTruthCnv/src/xAODTruthReader.cxx
index ede68cc564e..b98c1485960 100644
--- a/Event/xAOD/xAODTruthCnv/src/xAODTruthReader.cxx
+++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthReader.cxx
@@ -58,14 +58,6 @@ namespace xAODReader {
     for (const xAOD::TruthEvent* evt : *xTruthEventContainer) {
       cout << endl << endl;
 
-      // Print PDF info if found
-      /*xAOD::TruthEvent::PdfInfo pdfi = evt->pdfInfo();
-      if (pdfi.valid()) {
-        cout << "PDF info: PIDs " << pdfi.pdgId1 << ", " << pdfi.pdgId2 << " with x = "
-             << pdfi.x1 << ", " << pdfi.x2 << " & Q = " << pdfi.Q << " => xf = "
-             << pdfi.xf1 << ", " << pdfi.xf2 << " with PDFs "
-             << pdfi.pdfId1 << " and " << pdfi.pdfId2 << endl;
-      }*/
 
       // Print hard-scattering info
       const xAOD::TruthVertex* vtx = evt->signalProcessVertex();
@@ -97,22 +89,7 @@ namespace xAODReader {
   void xAODTruthReader::printEvent(const xAOD::TruthEventBase* event) {
     cout << "--------------------------------------------------------------------------------\n";
     cout << "GenEvent: #" << "NNN" << "\n";
-    /*<< " ID=" << signal_process_id() << " SignalProcessGenVertex Barcode: "
-      << ( signal_process_vertex() ? signal_process_vertex()->barcode() : 0 ) << "\n";*/
     cout << " Entries this event: " << event->nTruthVertices() << " vertices, " << event->nTruthParticles() << " particles.\n";
-    // Beam particles
-    /*pair<const xAOD::TruthParticle*,const xAOD::TruthParticle*> beamParticles = event->beamParticles();
-    if ( beamParticles.first && beamParticles.second ) {
-      cout << " Beam particle barcodes: " << beamParticles.first->barcode() << " " << beamParticles.second->barcode() << " \n";
-    } else {
-      cout << " Beam particles are not defined.\n";
-    }
-    // Weights
-    const vector<float> weights = event->weights();
-    cout << weights.size() << " weights = ";
-    for (const float& w : weights) cout << w << " ";
-    cout << "\n";*/
-    // Particles and vertices
     cout << "                                    GenParticle Legend\n";
     cout << "        Barcode   PDG ID      ( Px,       Py,       Pz,     E ) Stat  DecayVtx\n";
     cout << "--------------------------------------------------------------------------------\n";
@@ -199,13 +176,6 @@ namespace xAODReader {
         cout << endl;
       }
     }
-    // // Print the weights if there are any
-    // if (vertex->weights().size() != 0) {
-    //   cout << vertex->weights().size() << " weights =";
-    //   for (vector<float>::const_iterator wgt = vertex->weights().begin();
-    //        wgt != vertex->weights().end(); ++wgt) { cout << *wgt << " "; }
-    //   cout << endl;
-    // }
     // Print out all the incoming, then outgoing particles
     for (unsigned int iPIn = 0; iPIn<vertex->nIncomingParticles(); ++iPIn) {
       if ( iPIn == 0 ) {
diff --git a/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx b/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx
index f5ceab7c24f..d6f6ae92ed7 100644
--- a/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx
+++ b/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx
@@ -238,7 +238,6 @@ void ALFA_BeamTransport::MeVToGeV (HepMC::GenEvent* evt)
 void ALFA_BeamTransport::GeVToMeV (HepMC::GenEvent* evt)
 {
      for ( HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p ) {
-	  // std::cout << " PDG, BAR " << (*p)->pdg_id() << " " << (*p)->barcode() << std::endl;
 	  const HepMC::FourVector fv((*p)->momentum().px() * 1000.,
 				      (*p)->momentum().py() * 1000.,
 				      (*p)->momentum().pz() * 1000.,
@@ -295,57 +294,7 @@ int ALFA_BeamTransport::AddHepMCData(HepMC::GenEvent* evt)
      return true;
 }
 
-/* Removed this function since it is not used 110927
-int ALFA_BeamTransport::SelectParticles(HepMC::GenEvent* evt)
-{
-//     HepMC::GenParticle* pi1=0;
-//     HepMC::GenParticle* pi2=0;
-     HepMC::GenParticle* p1=0;
-     HepMC::GenParticle* p2=0;
-     	    
-     // loop over the final state particles 
-     // change StatusCode -> Final particle from Pythia gets Status Code 201
-     //transportet particle will get statuscode 1 (final State)
-     
-     
-     for ( HepMC::GenEvent::particle_const_iterator p =  evt->particles_begin(); p != evt->particles_end(); ++p )
-     {
-	  int pid = (*p)->pdg_id();
-	  if( ((*p)->status() == 1) && (!(*p)->end_vertex()) )  {
-	       if( pid == 2212){ 
-		    //change status code
-		    (*p)->set_status(201);
-		    
-		    m_pcount++;
-		    if(m_pcount == 1){p1=(*p);}
-		    if(m_pcount == 2){p2=(*p);}
-		    if(m_pcount > 2){msg(MSG::ERROR) << "Strange: More than two protons in this event!" << "\n";}
-	       }
-	  }
-     }
-     
-     //Positions are given in mm FPTracker needs them in meter
-     m_Particle1=FPTracker::Particle(p1->production_vertex()->position().x()/1000.,//Is this the right coordinate?
-				      p1->production_vertex()->position().y()/1000., 
-				      p1->production_vertex()->position().z()/1000., 
-				      p1->momentum().px(),
-				      p1->momentum().py(), 
-				      p1->momentum().pz());	
-				      
-	m_Particle2=FPTracker::Particle(p2->production_vertex()->position().x()/1000.,
-					p2->production_vertex()->position().y()/1000., 
-					p2->production_vertex()->position().z()/1000., 
-					p2->momentum().px(),
-					p2->momentum().py(), 
-					p2->momentum().pz());
-					
-	//Energy
-	// no Energy change between IP and RP
-	m_EnergyRP1=p1->momentum().e();
-	m_EnergyRP3=p2->momentum().e();
-
-	return true;
-}*/
+
 
 int ALFA_BeamTransport::DoBeamTracking(int evt_number)
 {
diff --git a/Generators/EvtGen_i/src/EvtDecay.cxx b/Generators/EvtGen_i/src/EvtDecay.cxx
index 325cbb97c55..73938f34402 100644
--- a/Generators/EvtGen_i/src/EvtDecay.cxx
+++ b/Generators/EvtGen_i/src/EvtDecay.cxx
@@ -430,7 +430,6 @@ void EvtDecay::MeVToGeV (HepMC::GenEvent* evt) {
 
 void EvtDecay::GeVToMeV (HepMC::GenEvent* evt) {
 	for ( HepMC::GenEvent::particle_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p ) {
-//		std::cout << " PDG, BAR " << (*p)->pdg_id() << " " << (*p)->barcode() << std::endl;
        	        HepMC::FourVector newMomentum(0.,0.,0.,0.);
 		newMomentum.setPx( (*p)->momentum().px() * 1000. );
 		newMomentum.setPy( (*p)->momentum().py() * 1000. );
diff --git a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
index 94bfb1858e6..bca1fb0c476 100644
--- a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
+++ b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h
@@ -58,12 +58,6 @@ namespace MC {
     return MC::isNonInteracting(p->pdg_id()); //< From TruthUtils/PIDHelpers.h
   }
 
-  /// @brief Identify if the particle could interact with the detector during the simulation, e.g. not a neutrino or WIMP
-  /// @todo This one can't be made to only take a PDG ID argument since it needs to check gen-stability via status & decay links
-  // inline bool isSimInteracting(int pid) {
-  //   if (! MC::isGenStable(pid)) return false; //skip particles which the simulation would not see
-  //   return !MC::isNonInteracting(pid);
-  // }
   /// @brief Identify if the particle could interact with the detector during the simulation, e.g. not a neutrino or WIMP
   inline bool isSimInteracting(const HepMC::GenParticle* p) {
     if (! MC::isGenStable(p)) return false; //skip particles which the simulation would not see
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
index b704dc72e00..a74bc02f2ad 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
@@ -2437,8 +2437,6 @@ IDStandardPerformance::MakeTrackPlots(const DataVector<Trk::Track>* trks,
 	      for(unsigned int i_hmpl=0; i_hmpl<traj.size(); i_hmpl++){
 
 		int eventIndex = (int)traj[i_hmpl].eventIndex();
-		//msg(MSG::ERROR)<<"Evt Index = " << eventIndex << endmsg;
-		//msg(MSG::ERROR)<<"barcode = " << (int)traj[i_hmpl].barcode() << endmsg;
 		// Iterate on vector on event index to check if this one already exists
 		std::vector<int>::iterator itVectorData;
 		bool alreadyExist = false;
diff --git a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
index afb74a9d4a5..89f49b3186a 100644
--- a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
@@ -101,10 +101,7 @@ bool LArHitEMap::BuildWindows(float deta,float dphi, float ptmin)
          HepMC::GenParticle *part=*itrPart;
          //works only for photons(22) and electrons(11) primary particle from Geant (status>1000)
          // with pt>5 GeV
-// GU 20-june-2006 use barcode between 10001 and 20000 to select primary particles
-//         std::cout << " pdg_id,status,barcode,pt " << part->pdg_id() << " " 
-//           <<  part->status() << " " << part->barcode() << " " <<
-//                part->momentum().perp() << std::endl;
+// GU 20-june-2006 use barcode between 10001 and 20000 to select primary particles //AV2020: not sure if it works
          if(   (part->pdg_id()==22 || abs(part->pdg_id())==11 || part->pdg_id()==111) 
             && part->barcode()>10000 && part->barcode()<20000
             && part->momentum().perp()> ptmin)
@@ -116,11 +113,6 @@ bool LArHitEMap::BuildWindows(float deta,float dphi, float ptmin)
       }
     }
 
-//    std::cout << " Number of true particles " << etaPart.size() << std::endl;
-//    for(unsigned int iPart=0;iPart<etaPart.size();++iPart)
-//    {
-//     std::cout << "eta,phi " << etaPart[iPart] << " " << phiPart[iPart] << std::endl;
-//    }
 
     if ( etaPart.size() == 0) return true;
     const float pi=2*asin(1.);
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetQuarkLabel.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetQuarkLabel.cxx
index 61c749e6e0b..ef34e98c328 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetQuarkLabel.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetQuarkLabel.cxx
@@ -17,8 +17,6 @@
 
 #include <algorithm>
 
-// new
-//#include "TruthHelper/PileUpType.h"
 
 #define GeVtoMeV 1000.0
 
@@ -86,29 +84,7 @@ bool JetQuarkLabel::matchJet(const xAOD::Jet& myJet,
   int barcc = 0;
   int barcb = 0;
   unsigned int nLab = 0;
-  /*
-  PileUpType pileupType( myMcEventCollection );
-  McEventCollection::const_iterator itEvt, itEvtE;
-  if (m_inTime == -1) {
-    // Label with signal event only
-    itEvt  = myMcEventCollection->begin();
-    itEvtE = pileupType.in_time_minimum_bias_event_begin();
-  } else if (m_inTime == 0) {
-    // Label with all in time events
-    itEvt  = myMcEventCollection->begin();
-    itEvtE = pileupType.in_time_event_end();
-  } else if (m_inTime == 1) {
-    // Label with in time pile-up : removing the signal event...
-    itEvt  = pileupType.in_time_minimum_bias_event_begin();
-    itEvtE = pileupType.in_time_event_end();
-  } else if (m_inTime == 2) {
-    //Does one really want to allow for this possibility ? Or in a given BC range ?
-    // should use PileUpEventInfo maybe for a time selection...
-    // (Cavern and halo are there, but hopefully there is no heavy quark there ;-) )
-    itEvt  = myMcEventCollection->begin();
-    itEvtE = myMcEventCollection->end(); 
-  }
-  */
+
   xAOD::TruthEventContainer::const_iterator itEvt = truthEventContainer->begin(); // see if this works for now
   xAOD::TruthEventContainer::const_iterator itEvtE = truthEventContainer->end();
   const xAOD::TruthParticle* LabellingParticle(0);
@@ -127,8 +103,6 @@ bool JetQuarkLabel::matchJet(const xAOD::Jet& myJet,
       int pdg = (*pitr)->pdgId();
       
       // We want to use some special functions from HepLorentzVector
-      // HepMC::Fourvector does not have these functions. 
-      // => transform to HepLorentzVector
       TLorentzVector part_momentum_lv = (*pitr)->p4();
       
       // label b, c and light jets
diff --git a/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/src/AfpTruthInfoFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/src/AfpTruthInfoFillerTool.cxx
index bb9edc9c12a..4b0c094371c 100644
--- a/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/src/AfpTruthInfoFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/src/AfpTruthInfoFillerTool.cxx
@@ -180,18 +180,8 @@ namespace D3PD {
 
 				for(; child != child_end; ++child){
 
-					//px =      (*child)->momentum().px();
-					//py =      (*child)->momentum().py();
 					pz =      (*child)->momentum().pz();
-					//E  =      (*child)->momentum().e();
-					//phi=      (*child)->momentum().phi();
-					//barcode = (*child)->barcode();
-
-					//LogStream << MSG::DEBUG << "particle barcode = " << (*child)->barcode() << endmsg;
-					//LogStream << MSG::DEBUG << "particle pdg = " << (*child)->pdg_id() << endmsg;
-					//LogStream << MSG::DEBUG << "particle status = " << (*child)->status() << endmsg;
-					//LogStream << MSG::DEBUG << " *  px = " << px << ", py = " << py << ", pz =" << pz << endmsg;
-					//LogStream << MSG::DEBUG << " " << endmsg;
+
 
 					// incoming protons (status code = 4) at the interaction point; 
 					if( (*child)->status() == 4){ // note, it can be any colliding particle, hopefully Pb too
diff --git a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/TruthTrackGetterTool.cxx b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/TruthTrackGetterTool.cxx
index a773a7734a3..9d270b25c12 100644
--- a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/TruthTrackGetterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/TruthTrackGetterTool.cxx
@@ -138,7 +138,6 @@ bool TruthTrackGetterTool::selectParticle(const  HepMC::GenParticle* particle)
 
   // must have a valid production vertex
   if(particle->production_vertex() == NULL){
-    //REPORT_MESSAGE (MSG::DEBUG) << "GenParticle has NULL Production Vertex";
     return false;
   }
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthJetFilterTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthJetFilterTool.cxx
index 43ecda7e372..a0fda8ba1aa 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthJetFilterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthJetFilterTool.cxx
@@ -375,13 +375,11 @@ TruthJetFilterTool::acceptParticle (const HepMC::GenParticle* p)
 		
 		if (vprod && vprod->particles_in_size() > 0) {
 			int mom_pdg_id = pdg_id;
-			//int mom_barcode = barcode;
 			// Ascend decay chain looking for when actual decay occurs (not jsut evolution of particle)
 			while (pdg_id == mom_pdg_id) {
 				const HepMC::GenParticle* mother = *(vprod->particles_in_const_begin());
 				if (mother) {
 					mom_pdg_id = abs(mother->pdg_id());
-					//mom_barcode = mother->barcode();
 				} else break;
 				if (pdg_id != mom_pdg_id) break;
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/HepMcFloatWriterTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/HepMcFloatWriterTool.cxx
index 3d73437e86b..693dfdcb11c 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/HepMcFloatWriterTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/HepMcFloatWriterTool.cxx
@@ -22,10 +22,6 @@
 #include "GeneratorObjects/McEventCollection.h"
 #include "HepPDT/ParticleDataTable.hh"
 
-// McParticleUtils
-// #include "McParticleUtils/IO_BaseClass.h"
-// #include "McParticleUtils/IO_Ascii.h"
-
 // McParticleTools includes
 #include "HepMcFloatWriterTool.h"
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
index 3a2db19ae90..0f84a9398d0 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
@@ -525,10 +525,9 @@ StatusCode PileupFilterTool::rebuildLinks( const HepMC::GenEvent * mcEvt,
 	  itrPart != endPart;
 	  ++itrPart ) {
 
-      //bcChildPart.push_back( (*itrPart)->barcode() );
+
 
       // because the vertices are traversed in POST ORDER !!
-      // (quoting GenVertex::vertex_iterator)
       bcChildPart.push_front( (*itrPart)->barcode() );
 
       if ( (*itrPart)->pdg_id() == pdgId ) {
diff --git a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
index f023ace6344..a0e89b3136b 100755
--- a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
@@ -26,13 +26,7 @@
 #include "CLHEP/Random/RandFlat.h"
 #include "HepMC/GenParticle.h"
 #include "HepMC/GenVertex.h"
-//#include "TruthHelper/IsGenStable.h"
-//#include "TruthHelper/IsGenerator.h"
-//#include "TruthHelper/IsGenInteracting.h"
-//#include "TruthHelper/IsGenNonInteracting.h"
-//#include "TruthHelper/IsGenSimulStable.h"
-//#include "FastCaloSim/FastCaloSimIsGenSimulStable.h"
-//#include "TruthHelper/IsGenNonInteracting.h"
+
 
 #include "PathResolver/PathResolver.h"
 #include "AthenaKernel/RNGWrapper.h"
@@ -41,10 +35,6 @@
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloDetDescr/ICaloCoordinateTool.h"
 
-//#include "AtlfastAlgs/GlobalEventData.h"
-//#include "AtlfastUtils/TesIO.h"
-//#include "AtlfastUtils/HepMC_helper/IMCselector.h"
-//#include "AtlfastEvent/MCparticleCollection.h"
 
 //extrapolation
 #include "CaloDetDescr/CaloDepthTool.h"
@@ -54,7 +44,6 @@
 #include "TrkSurfaces/DiscBounds.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkMaterialOnTrack/EnergyLoss.h"
-//#include "TruthHelper/PileUpType.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "TrkGeometry/TrackingGeometry.h"
 
@@ -2347,8 +2336,6 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
 
   SG::ReadHandle<McEventCollection> mcCollptr (m_mcCollectionKey, ctx);
 
-  // initialize a pileup type helper object
-  //PileUpType pileupType( mcCollptr );
 
   ATH_MSG_DEBUG("Start getting particles");
 
@@ -2358,7 +2345,6 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
       HepMC::GenEvent::particle_const_iterator iend   = mcCollptr->at(0)->particles_end();
       for ( ; istart!= iend; ++istart)
         {
-          //std::cout <<" ("<< FastCaloSimIsGenSimulStable(*istart)<<"/"<<(*istart)->barcode()<<","<<(*istart)->status()<<"/"<<ifs(*istart)<<") ";
           particles.push_back(*istart);
         }
       //std::cout <<std::endl;
@@ -2366,11 +2352,7 @@ FastShowerCellBuilderTool::process (CaloCellContainer* theCellContainer,
   particles = MC::filter_keep(particles, FastCaloSimIsGenSimulStable);
 
 
-  //sc = m_gentesIO->getMC(particles, &ifs, m_mcLocation );
-  //if ( sc.isFailure() ) {
-  //  log << MSG::ERROR << "getMC from "<<m_mcLocation<<" failed "<< endmsg;
-  //  return StatusCode::FAILURE;
-  //}
+
 
   const BarcodeEnergyDepositMap* MuonEnergyMap=0;
   if (!m_MuonEnergyInCaloContainerKey.key().empty()) {
diff --git a/Simulation/FastShower/FastCaloSim/src/obsolete/FastCaloSimIsGenSimulStable.cxx b/Simulation/FastShower/FastCaloSim/src/obsolete/FastCaloSimIsGenSimulStable.cxx
index 8a7bf13dc17..67fe500a5ad 100755
--- a/Simulation/FastShower/FastCaloSim/src/obsolete/FastCaloSimIsGenSimulStable.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/obsolete/FastCaloSimIsGenSimulStable.cxx
@@ -18,8 +18,6 @@
 
   bool FastCaloSimIsGenSimulStable::operator()( const HepMC::GenParticle* const p ) const {
     int status=p->status();
-//    int barcode=p->barcode();
-//    int pdg_id=abs(p->pdg_id());
     HepMC::GenVertex* vertex = p->end_vertex();
 // we want to keep primary particle with status==2 but without vertex in HepMC
     int vertex_barcode=-999999;
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PRD_PlanarTruthTrajectoryBuilder.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PRD_PlanarTruthTrajectoryBuilder.cxx
index 7098d7f564a..3357a158a01 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PRD_PlanarTruthTrajectoryBuilder.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PRD_PlanarTruthTrajectoryBuilder.cxx
@@ -167,7 +167,6 @@ const std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >& iFatras::
     std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >::iterator prdTruthTrajIter  = m_gpPrdTruthTrajectories.begin();
     std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >::iterator prdTruthTrajIterE = m_gpPrdTruthTrajectories.end();
     for ( ; prdTruthTrajIter != prdTruthTrajIterE; ++prdTruthTrajIter ){
-    //std::cout << "sorting, barcode: " << prdTruthTrajIter->first->barcode() << std::endl;
         if ( m_prdTruthTrajectoryManipulators.size() ){
             ToolHandleArray<Trk::IPRD_TruthTrajectoryManipulator>::const_iterator prdTTMIter  = m_prdTruthTrajectoryManipulators.begin();
             ToolHandleArray<Trk::IPRD_TruthTrajectoryManipulator>::const_iterator prdTTMIterE = m_prdTruthTrajectoryManipulators.end();
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx
index b7f1968906d..93e1f65b838 100755
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx
@@ -787,7 +787,6 @@ void iFatras::McMaterialEffectsUpdator::radiate(const ISF::ISFParticle* parent,
   double path = 0.;
   double p = 1./ fabs(parm[Trk::qOverP]);
 
-  //std::cout <<"radiating from gen,barcode" <<parent->generation()<<","<<parent->barcode()<<", p="<<p <<",at position "<< pos << std::endl;
 
   while ( path < pathLim && p>m_minimumMomentum ) {
 
@@ -1606,7 +1605,6 @@ void iFatras::McMaterialEffectsUpdator::recordBremPhotonLay(const ISF::ISFPartic
       delete nMom;
     }
 
-    //std::cout <<"brem photon created:position,mom,gen,barcode:"<< vertex<<","<<gammaE<<","<<bremPhoton->generation()<<","<<bremPhoton->barcode()<< std::endl;
 
     // layer update : don't push into particle stack untill destiny resolved
     Trk::PathLimit pLim = m_samplingTool->sampleProcess(bremPhoton->momentum().mag(),0.,Trk::photon);
diff --git a/Tracking/TrkValidation/TrkValTools/src/InDetPrimaryConversionSelector.cxx b/Tracking/TrkValidation/TrkValTools/src/InDetPrimaryConversionSelector.cxx
index 9a3748b8bb4..f9c3dbf630e 100644
--- a/Tracking/TrkValidation/TrkValTools/src/InDetPrimaryConversionSelector.cxx
+++ b/Tracking/TrkValidation/TrkValTools/src/InDetPrimaryConversionSelector.cxx
@@ -111,9 +111,7 @@ Trk::InDetPrimaryConversionSelector::selectGenSignal (const McEventCollection* S
 	  HepMC::GenVertex::particles_in_const_iterator inParticle     = prodVertex->particles_in_const_begin();
 	  HepMC::GenVertex::particles_out_const_iterator inParticleEnd = prodVertex->particles_in_const_end();
 	  for ( ; inParticle != inParticleEnd; ++inParticle) {
-	    // check if mother is a photon with barcode == 10001
 	    ATH_MSG_DEBUG(" --> checking morther: " << *(*inParticle) );
-	    //if (abs((*inParticle)->pdg_id()) == 22 && (*inParticle)->barcode() == 10001 ){
 	    if ( abs((*inParticle)->pdg_id()) == 22 || abs((*inParticle)->pdg_id()) == 11 ){
 	      if (fabs(particle->momentum().perp()) >  m_minPt  &&  fabs(particle->momentum().pseudoRapidity()) < m_maxEta ) {
 		genSignal->push_back(particle);
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector.h
index 9e8ea5cf45d..2afbd2bd1f8 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector.h
@@ -33,12 +33,7 @@
 #include "HepMC/GenVertex.h"
 #include "HepMC/GenParticle.h"
 
-///// stuff *merely* to get the particle charge!!!
-/// #include "HepPDT/ParticleData.hh"
-/// #include "HepMC/ParticleDataTable.h"
-/// #include "McParticleEvent/TruthParticle.h"
-/// #include "McParticleUtils/McUtils.h" // for chargeFromPdgId
-///
+
 ///// FrameWork includes
 /// #include "GaudiKernel/ServiceHandle.h"
 /// #include "GaudiKernel/IPartPropSvc.h"
@@ -103,7 +98,6 @@ public:
   void selectTracks( const TruthParticleContainer* truthtracks );
 
 
-  // add a TruthParticle from a GenParticle - easy, bet it doesn't work 
   bool selectTrack( const HepMC::GenParticle* track );
 
 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
index d30880c5de9..e268db093df 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
@@ -26,12 +26,7 @@
 #include "HepMC/GenVertex.h"
 #include "HepMC/GenParticle.h"
 
-///// stuff *merely* to get the particle charge!!!
-/// #include "HepPDT/ParticleData.hh"
-/// #include "HepMC/ParticleDataTable.h"
-/// #include "McParticleEvent/TruthParticle.h"
-/// #include "McParticleUtils/McUtils.h" // for chargeFromPdgId
-///
+
 ///// FrameWork includes
 /// #include "GaudiKernel/ServiceHandle.h"
 /// #include "GaudiKernel/IPartPropSvc.h"
@@ -372,7 +367,6 @@ public:
     double xp[3] = { 0, 0, 0 };
 
     if ( track->genParticle()->production_vertex() ) { 
-      // std::cout << "ptr->production_vertex() " << ptr->production_vertex() << std::endl;
       xp[0] = track->genParticle()->production_vertex()->point3d().x();
       xp[1] = track->genParticle()->production_vertex()->point3d().y();
       xp[2] = track->genParticle()->production_vertex()->point3d().z();
@@ -387,7 +381,6 @@ public:
     double xd[3] = { 0, 0, 0 };
 
     if ( track->genParticle()->end_vertex() ) { 
-      // std::cout << "ptr->production_vertex() " << ptr->production_vertex() << std::endl;
       xd[0] = track->genParticle()->end_vertex()->point3d().x();
       xd[1] = track->genParticle()->end_vertex()->point3d().y();
       xd[2] = track->genParticle()->end_vertex()->point3d().z();
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
index dd4a24050be..5bee4c365e1 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
@@ -278,9 +278,6 @@ void TrigTrackSelector::selectTracks( const TruthParticleContainer* truthtracks
     
 }
 
-
-
-// add a TruthParticle from a GenParticle - easy, bet it doesn't work 
 bool TrigTrackSelector::selectTrack( const HepMC::GenParticle* track ) {
   
     /// not a "final state" particle
@@ -340,7 +337,6 @@ TIDA::Track* TrigTrackSelector::makeTrack( const TruthParticle* track, unsigned
     double xp[3] = { 0, 0, 0 };
 
     if ( track->genParticle()->production_vertex() ) { 
-      // std::cout << "ptr->production_vertex() " << ptr->production_vertex() << std::endl;
       xp[0] = track->genParticle()->production_vertex()->point3d().x();
       xp[1] = track->genParticle()->production_vertex()->point3d().y();
       xp[2] = track->genParticle()->production_vertex()->point3d().z();
@@ -361,7 +357,6 @@ TIDA::Track* TrigTrackSelector::makeTrack( const TruthParticle* track, unsigned
     double xd[3] = { 0, 0, 0 };
 
     if ( track->genParticle()->end_vertex() ) { 
-      // std::cout << "ptr->production_vertex() " << ptr->production_vertex() << std::endl;
       xd[0] = track->genParticle()->end_vertex()->point3d().x();
       xd[1] = track->genParticle()->end_vertex()->point3d().y();
       xd[2] = track->genParticle()->end_vertex()->point3d().z();
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/SimHitHandleBase.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/SimHitHandleBase.h
index 7d3705b1db5..9d0959e19c0 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/SimHitHandleBase.h
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/SimHitHandleBase.h
@@ -50,8 +50,6 @@ public:
 
   bool hasCharge() const { return m_charge!=-99999.0; }
   double charge() const { return m_charge; }
-//   static ExtBarCode extBarCode(const HepMcParticleLink& l) { return ExtBarCode( l.barcode(),l.eventIndex()); }
-//   inline ExtBarCode extBarCode() const { return extBarCode( particleLink() ); }
 
   virtual Trk::TrackParameters * createTrackParameters() const = 0;
 
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandle_TruthTracks.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandle_TruthTracks.cxx
index d3784c4c13f..ff11b4d75c3 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandle_TruthTracks.cxx
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandle_TruthTracks.cxx
@@ -324,8 +324,6 @@ void TrackCollHandle_TruthTracks::Imp::loadGenParticles( std::map<SimBarCode,con
   HepMC::GenVertex::particles_out_const_iterator itPart(vtx->particles_out_const_begin());
   HepMC::GenVertex::particles_out_const_iterator itPartEnd(vtx->particles_out_const_end());
 
-//   HepMC::GenVertex::particle_iterator itPart = vtx->particles_begin(HepMC::children);
-//   HepMC::GenVertex::particle_iterator itPartEnd = vtx->particles_end(HepMC::children);
   for (;itPart!=itPartEnd;++itPart) {
     const HepMC::GenParticle* p = *itPart;
     if (!p)//fixme: message.
-- 
GitLab