From 08cdfb7b47a2275114e28d3f4081722dacdfd11f Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi <andrii.verbytskyi@mpp.mpg.de> Date: Fri, 17 Apr 2020 14:48:12 +0200 Subject: [PATCH] Cleanup: remove commented HepMC code to avoid confusion during the migration --- .../BarcodeEvent/BarcodeEvent/Barcode.h | 1 - .../FastCaloSim/FastShowerCellBuilderTool.h | 21 ----------- .../G4AtlasTests/src/SimTestToolBase.h | 3 -- .../G4AtlasTests/src/TileHitsTestTool.cxx | 5 --- .../G4AtlasTests/src/ZDCHitsTestTool.cxx | 7 ---- .../src/NativeFastCaloSimSvc.cxx | 36 ------------------- .../src/HadIntProcessorParametric.cxx | 14 -------- .../src/McEventCollectionTestTool.cxx | 1 - .../src/PixelRDOsTestTool.cxx | 1 - .../src/SCT_RDOsTestTool.cxx | 1 - .../src/TRT_RDOsTestTool.cxx | 1 - .../src/McEventCollectionFilter.cxx | 4 --- 12 files changed, 95 deletions(-) diff --git a/Simulation/Barcode/BarcodeEvent/BarcodeEvent/Barcode.h b/Simulation/Barcode/BarcodeEvent/BarcodeEvent/Barcode.h index 4257bda0c92..bc25a94e088 100644 --- a/Simulation/Barcode/BarcodeEvent/BarcodeEvent/Barcode.h +++ b/Simulation/Barcode/BarcodeEvent/BarcodeEvent/Barcode.h @@ -15,7 +15,6 @@ namespace Barcode { /** Identifier type for particles */ typedef int ParticleBarcode; - // until HepMC::GenParticle::suggest_barcode(...) takes 'int' as argument, // better not use fancy types like 'uint32_t' (may cause overflows in // implicit type conversions) //typedef uint32_t ParticleBarcode; diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h index e2e9c622a26..d148ee2b61f 100755 --- a/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h +++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h @@ -24,28 +24,7 @@ #include "GeneratorObjects/McEventCollection.h" #include "FastCaloSimAthenaPool/FastShowerInfoContainer.h" -/* - #if FastCaloSim_project_release_v1 == 12 - #include "CLHEP/HepPDT/ParticleDataTable.hh" - #else - #include "HepPDT/ParticleDataTable.hh" - #endif -*/ -/* - #include "AtlfastEvent/CollectionDefs.h" - namespace HepMC_helper{ - class IMCselector; - } - - namespace FastShower{ - class GridletForger; - } - - namespace Atlfast { - class TesIO; - } -*/ namespace HepMC { class GenParticle; diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SimTestToolBase.h b/Simulation/G4Atlas/G4AtlasTests/src/SimTestToolBase.h index c3190192399..b90a86e4c64 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/SimTestToolBase.h +++ b/Simulation/G4Atlas/G4AtlasTests/src/SimTestToolBase.h @@ -15,9 +15,6 @@ #include "SimTestHisto.h" #include "AthenaKernel/errorcheck.h" #include "GaudiKernel/ITHistSvc.h" -// #include "GaudiKernel/ISvcLocator.h" -// #include "GaudiKernel/Bootstrap.h" -// #include "GaudiKernel/ServiceHandle.h" namespace HepMC { class GenParticle; diff --git a/Simulation/G4Atlas/G4AtlasTests/src/TileHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/TileHitsTestTool.cxx index f8adce84714..69459bfed0b 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/TileHitsTestTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/TileHitsTestTool.cxx @@ -157,11 +157,6 @@ StatusCode TileHitsTestTool::processEvent() { m_mbts_sidetaphi->Fill((ieta+1)*side,iphi); } } - // const HepMC::GenParticle *primary = getPrimary(); - // if (primary) { - // m_etot_eta->Fill(primary->momentum().eta(),etot); - // m_etot_phi->Fill(primary->momentum().phi(),etot); - // } m_etot->Fill(etot); diff --git a/Simulation/G4Atlas/G4AtlasTests/src/ZDCHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/ZDCHitsTestTool.cxx index cce16ab9346..783f973a941 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/ZDCHitsTestTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/ZDCHitsTestTool.cxx @@ -4,13 +4,6 @@ #include "ZDCHitsTestTool.h" -/* -#include "GeoAdaptors/GeoLArHit.h" -#include "LArSimEvent/LArHit.h" -#include "LArSimEvent/LArHitContainer.h" -#include "CaloDetDescr/CaloDetDescrElement.h" -#include "HepMC/GenParticle.h" -*/ #include "ZDC_SimEvent/ZDC_SimStripHit.h" #include "ZDC_SimEvent/ZDC_SimStripHit_Collection.h" diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/NativeFastCaloSimSvc.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/NativeFastCaloSimSvc.cxx index 3772c253fdc..0b19bb1a2a8 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/NativeFastCaloSimSvc.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/NativeFastCaloSimSvc.cxx @@ -314,42 +314,6 @@ StatusCode ISF::NativeFastCaloSimSvc::processOneParticle( const ISF::ISFParticle ATH_MSG_VERBOSE ( m_screenOutputPrefix << "Simulating pdgid = "<< isfp.pdgCode()); StatusCode sc(StatusCode::SUCCESS); - //ZH commented out these to avoid warnings at the moment - //ToolHandleArray<ICaloCellMakerTool>::iterator itrTool=m_caloCellMakerTools_simulate.begin(); - //ToolHandleArray<ICaloCellMakerTool>::iterator endTool=m_caloCellMakerTools_simulate.end(); - - /* - // loop on tools - for (;itrTool!=endTool;++itrTool) { - FastShowerCellBuilderTool* fcs=dynamic_cast< FastShowerCellBuilderTool* >(&(*(*itrTool))); - if(!fcs) { - ATH_MSG_WARNING( m_screenOutputPrefix << "tool " << itrTool->name()<< "is not a FastShowerCellBuilderTool" ); - continue; - } - - ATH_MSG_VERBOSE( m_screenOutputPrefix << "Calling tool " << itrTool->name() ); - std::string chronoName=this->name()+"_"+ itrTool->name(); - - if (m_chrono) m_chrono->chronoStart( chronoName); - - HepMC::FourVector momentum(isfp.momentum().x(),isfp.momentum().y(),isfp.momentum().z(), sqrt( isfp.mass()*isfp.mass() + isfp.momentum().mag2()) ); - HepMC::GenParticle* part=new HepMC::GenParticle(momentum,isfp.pdgCode()); - HepMC::FourVector position(isfp.position().x(),isfp.position().y(),isfp.position().z(),isfp.timeStamp()); - HepMC::GenVertex vertex(position); - vertex.add_particle_out( part ); // HepMC::GenVertex destructor will delete the particle - - //sc = (*itrTool)->process(m_theContainer); - if(fcs->process_particle(m_theContainer,part,0).isFailure()) { - ATH_MSG_WARNING( m_screenOutputPrefix << "simulation of particle pdgid=" << isfp.pdgCode()<< " failed" ); - sc = StatusCode::FAILURE; - } - - if (m_chrono) m_chrono->chronoStop( chronoName ); - //ATH_MSG_DEBUG( m_screenOutputPrefix << "Chrono stop : delta " << m_chrono->chronoDelta (chronoName,IChronoStatSvc::USER ) * CLHEP::microsecond / CLHEP::second << " second " ); - } //end of for-loop - */ - - // ATH_MSG_VERBOSE ( m_screenOutputPrefix << "kill the particle in the end"); return sc; } diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx index 6e9490eff33..59fd423d462 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx @@ -321,20 +321,6 @@ ISF::ISFParticleVector iFatras::HadIntProcessorParametric::getHadState(const ISF << parent->pdgCode() << " and barcode " << parent->barcode() ); - /* TODO: update to ISF TruthService - // create GenVertex at interaction point, add the pion as incoming and add vertex to the event - HepMC::GenVertex* decayvertex = new HepMC::GenVertex(CLHEP::HepLorentzVector(vertex, 0.)); - decayvertex->add_particle_in(m_particleBroker->current()); - HepMC::GenEvent* parentEvent = s_currentGenParticle->parent_event(); - if( !parentEvent) { - ATH_MSG_WARNING( "[ had ] particle with PDG ID " - << m_particleBroker->current()->pdgCode() << " and barcode " - << m_particleBroker->current()->barcode() << " does not have a parent!" - ); - } else { - parentEvent->add_vertex(decayvertex); - } - */ // create the genParticles diff --git a/Simulation/Tests/DigitizationTests/src/McEventCollectionTestTool.cxx b/Simulation/Tests/DigitizationTests/src/McEventCollectionTestTool.cxx index 25f037b2ff1..6971c5a66a9 100644 --- a/Simulation/Tests/DigitizationTests/src/McEventCollectionTestTool.cxx +++ b/Simulation/Tests/DigitizationTests/src/McEventCollectionTestTool.cxx @@ -6,7 +6,6 @@ #include "AthenaBaseComps/AthMsgStreamMacros.h" //#include <boost/io/ios_state.hpp> #include "GeneratorObjects/McEventCollection.h" -//#include "HepMC/GenParticle.h" #include <TH2D.h> #include <TProfile.h> #include "AthenaKernel/errorcheck.h" diff --git a/Simulation/Tests/DigitizationTests/src/PixelRDOsTestTool.cxx b/Simulation/Tests/DigitizationTests/src/PixelRDOsTestTool.cxx index 1cdaf535182..09c0ad5a177 100644 --- a/Simulation/Tests/DigitizationTests/src/PixelRDOsTestTool.cxx +++ b/Simulation/Tests/DigitizationTests/src/PixelRDOsTestTool.cxx @@ -5,7 +5,6 @@ #include "PixelRDOsTestTool.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" #include <boost/io/ios_state.hpp> -//#include "HepMC/GenParticle.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" #include "InDetRawData/InDetRawDataContainer.h" #include "InDetIdentifier/PixelID.h" diff --git a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx index d231291302b..0cd4caf7535 100644 --- a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx +++ b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx @@ -5,7 +5,6 @@ #include "SCT_RDOsTestTool.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" #include <boost/io/ios_state.hpp> -//#include "HepMC/GenParticle.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" #include "InDetRawData/InDetRawDataContainer.h" #include "InDetIdentifier/SCT_ID.h" diff --git a/Simulation/Tests/DigitizationTests/src/TRT_RDOsTestTool.cxx b/Simulation/Tests/DigitizationTests/src/TRT_RDOsTestTool.cxx index 4f8efe28928..01c745c17bd 100644 --- a/Simulation/Tests/DigitizationTests/src/TRT_RDOsTestTool.cxx +++ b/Simulation/Tests/DigitizationTests/src/TRT_RDOsTestTool.cxx @@ -5,7 +5,6 @@ #include "TRT_RDOsTestTool.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" #include <boost/io/ios_state.hpp> -//#include "HepMC/GenParticle.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" #include "InDetRawData/InDetRawDataContainer.h" #include "InDetIdentifier/TRT_ID.h" diff --git a/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx b/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx index a347b359273..2e7968c4911 100644 --- a/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx +++ b/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx @@ -161,10 +161,6 @@ StatusCode McEventCollectionFilter::ReduceMCEventCollection(){ //......copy GenEvent to the new one and remove all vertex HepMC::GenEvent* evt=new HepMC::GenEvent(*genEvt); - //to set geantino vertex as a truth primary vertex - //HepMC::GenVertex* pmvx=*(evt->vertices_begin()); - //HepMC::FourVector pmvxpos=pmvx->position(); - //genVertex->set_position(pmvxpos); //to set geantino vertex as a truth primary vertex HepMC::GenVertex* hScatVx = genEvt->barcode_to_vertex(-3); -- GitLab