diff --git a/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx b/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx index 4782ef71ade22bac03de99d8591a96e23b2d0a08..d3274fe48e8870757c40cfaee9fe2969f8436013 100644 --- a/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx +++ b/ForwardDetectors/ALFA/ALFA_BeamTransport/src/ALFA_BeamTransport.cxx @@ -177,7 +177,7 @@ StatusCode ALFA_BeamTransport::execute() //convert unit MeV to GeV for energy and momenta MeVToGeV (evt); - evt->print(); + HepMC::Print::line(std::cout,*evt); //Select final state particle from event generator //set event status !=1 (final state) @@ -200,7 +200,7 @@ StatusCode ALFA_BeamTransport::execute() //Print new data collection on screen - evt->print(); + HepMC::Print::line(std::cout,*evt); } diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx index ae802360f502e28ce5d1c6524f80d059d6bc359a..255dd8b50915a87094d5915bc3f963c0a3b65fce 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx @@ -74,12 +74,12 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); + HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); Athena_test::Leakcheck check; const HepMC::GenParticle *pGenParticle = genPartVector.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); LUCID_SimHit trans1 (1, pGenParticle->pdg_id(), trkLink, 4, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx index 66709d3eb89385548be1a5520e1db443fe95423c..c08d89c4296ba4c66254fb6526396d35c5ab3e90 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx @@ -73,11 +73,11 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); + HepMcParticleLink dummyHMPL(HepMC::barcode(particle),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); Athena_test::Leakcheck check; - HepMcParticleLink trkLink(genPartVector.at(0)->barcode(),genPartVector.at(0)->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(genPartVector.at(0)),genPartVector.at(0)->parent_event()->event_number()); LUCID_SimHit trans1 (1, genPartVector.at(0)->pdg_id(), trkLink, 4, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, diff --git a/Generators/GenInterfaces/GenInterfaces/IHiggsTruthCategoryTool.h b/Generators/GenInterfaces/GenInterfaces/IHiggsTruthCategoryTool.h index c4ddab167f6898e691915db6018bb662ac9333a2..9220b3f0ea18829044594bcd66f664f929ac1508 100644 --- a/Generators/GenInterfaces/GenInterfaces/IHiggsTruthCategoryTool.h +++ b/Generators/GenInterfaces/GenInterfaces/IHiggsTruthCategoryTool.h @@ -12,7 +12,7 @@ #define GENINTERFACES_IHIGGSTRUTHCATEGORYTOOL_H 1 #include "AsgTools/IAsgTool.h" -#include "HepMC/GenEvent.h" +#include "AtlasHepMC/GenEvent.h" namespace HTXS { struct HiggsClassification; diff --git a/Generators/HepMCAnalysis_i/CMakeLists.txt b/Generators/HepMCAnalysis_i/CMakeLists.txt index 7ebe07cdcb886c0e61d21d232f7923a1a54c02e2..e967c57af841c589f6e8460e086ebf4dae0db42f 100644 --- a/Generators/HepMCAnalysis_i/CMakeLists.txt +++ b/Generators/HepMCAnalysis_i/CMakeLists.txt @@ -25,7 +25,7 @@ atlas_add_component( HepMCAnalysis_i ${HEPMC_INCLUDE_DIRS} ${HEPMC_HepMCAnalysis_INTERFACE_DIR} LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMCANALYSIS_LIBRARIES} - ${HEPUTILS_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib + ${HEPUTILS_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${HEPMC_LIBRARIES} ${FASTJET_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib EventInfo GeneratorObjects TruthUtils ) diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h index 2b89522aa6accee2447fd0f9962cf20913b19b8e..d98f0df7e71136ded18d3b0efb1a32858c9d367d 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/test/InDetSimDataCollectionCnv_common_test.h @@ -94,7 +94,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(), particle->parent_event()->event_number()); + HepMcParticleLink dummyHMPL(HepMC::barcode(particle), particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); Athena_test::Leakcheck check; @@ -102,11 +102,11 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) // Assumme genPartVector is filled by Athena_test::initMcEventCollection. Do not check the vector size. for (int i=0; i<3; i++) { std::vector<InDetSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0+(3*i))->barcode(), genPartVector.at(0+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0+(3*i))), genPartVector.at(0+(3*i))->parent_event()->event_number()); deps.emplace_back(trkLink1, 2.5+i); - HepMcParticleLink trkLink2(genPartVector.at(1+(3*i))->barcode(), genPartVector.at(1+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1+(3*i))), genPartVector.at(1+(3*i))->parent_event()->event_number()); deps.emplace_back(trkLink2, 13.5+i); - HepMcParticleLink trkLink3(genPartVector.at(2+(3*i))->barcode(), genPartVector.at(2+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2+(3*i))), genPartVector.at(2+(3*i))->parent_event()->event_number()); deps.emplace_back(trkLink3, 23.5+i); trans1[Identifier(1234+i)] = InDetSimData(deps, 4321+i); diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx index 5cad7acff576d4d9f14abe3b0153729da859d953..ddbd2c9bd8b364247ea0d305a4cf184892140f73 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx @@ -402,7 +402,7 @@ std::vector< std::vector< int > > PixelPrepDataToxAOD::addSDOInformation( xAOD:: std::vector< float > sdoDepEnergy; for( auto deposit : pos->second.getdeposits() ){ if(deposit.first){ - sdoDepBC.push_back( deposit.first->barcode()); + sdoDepBC.push_back( HepMC::barcode(deposit.first)); } else { sdoDepBC.push_back( -1 ); } @@ -1028,12 +1028,12 @@ void PixelPrepDataToxAOD::addNNTruthInfo( xAOD::TrackMeasurementValidation* xp //Truth Track incident angle theta - theta[hitNumber] = atan2(diffPositions.z() ,diffPositions.x()); + theta[hitNumber] = std::atan2(diffPositions.z() ,diffPositions.x()); //Truth track incident angle phi -- correct for lorentz angle float tanlorentz = m_lorentzAngleTool->getTanLorentzAngle(de->identifyHash()); int readoutside = design->readoutSide(); - phi[hitNumber] = atan(tan(bowphi)-readoutside*tanlorentz); + phi[hitNumber] = std::atan(std::tan(bowphi)-readoutside*tanlorentz); if (siHit.particleLink().isValid()){ barcode[hitNumber] = siHit.particleLink().barcode(); diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx index ba1ab55499adfb4e8e1777b9ab6f39e25b0ce3c6..a490331312c74ac8ee6295aca26e630764f1f224 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx @@ -236,7 +236,7 @@ StatusCode SCT_PrepDataToxAOD::execute(const EventContext& ctx) const std::vector<int> barcodes; auto range{prdmtColl->equal_range(clusterId)}; for (auto& i{range.first}; i!=range.second; ++i) { - barcodes.push_back(i->second.barcode()); + barcodes.push_back(HepMC::barcode(i->second)); } AUXDATA(xprd, std::vector<int>, truth_barcode) = barcodes; } @@ -280,7 +280,7 @@ void SCT_PrepDataToxAOD::addSDOInformation(xAOD::TrackMeasurementValidation* xpr std::vector<float> sdoDepEnergy(pos->second.getdeposits().size()); unsigned int nDepos{0}; for (auto& deposit: pos->second.getdeposits()) { - if (deposit.first) sdoDepBC[nDepos] = deposit.first->barcode(); + if (deposit.first) sdoDepBC[nDepos] = HepMC::barcode(deposit.first); ATH_MSG_DEBUG(" SDO Energy Deposit " << deposit.second); sdoDepEnergy[nDepos] = deposit.second; nDepos++; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx index bf338ea36aecd78caabaf63050546678de2cbcbe..92828b29600844c84df9ccd3710704ffca1c20f4 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx @@ -23,9 +23,9 @@ ATLAS_NO_CHECK_FILE_THREAD_SAFETY; #include "GaudiKernel/MsgStream.h" // HepMC includes -#include "HepMC/GenEvent.h" -#include "HepMC/GenParticle.h" -#include "HepMC/GenVertex.h" +#include "AtlasHepMC/GenEvent.h" +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" // CLHEP includes #include "CLHEP/Vector/LorentzVector.h" @@ -628,7 +628,7 @@ namespace OverlayTesting { SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); const HepMC::GenParticle* pGenParticle = genPartList.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); depositVector.push_back(deposit); @@ -714,7 +714,7 @@ namespace OverlayTesting { SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); const HepMC::GenParticle* pGenParticle = genPartList.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); depositVector.push_back(deposit); @@ -809,7 +809,7 @@ namespace OverlayTesting { SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); const HepMC::GenParticle* pGenParticle = genPartList.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); ASSERT_EQ(trkLink.cptr()->pdg_id(), -11); // Sanity check to confirm that we are linking to a positron as expected InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); @@ -901,7 +901,7 @@ namespace OverlayTesting { SG::WriteHandle<InDetSimDataCollection> inputSigSDODataHandle{"StoreGateSvc+TRT_SDO_Map_SIG"}; inputSigSDODataHandle = std::make_unique<InDetSimDataCollection>(); const HepMC::GenParticle* pGenParticle = genPartList.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); ASSERT_EQ(trkLink.cptr()->pdg_id(), -11); // Sanity check to confirm that we are linking to a positron as expected InDetSimData::Deposit deposit( trkLink, 0.0 ); std::vector<InDetSimData::Deposit> depositVector(1); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx index 2587b31385b0f8a0d4377d33a96907b2dc884696..f9cb63aead3e93fd040f31f479fdb0438c67be7e 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx @@ -90,11 +90,11 @@ namespace InDet { //Now iterate over all barcodes std::vector<int>::iterator barcodeIterator; //Look for the barcode of the specific particle depositing energy in the barcodes vector - barcodeIterator = find(barcodes.begin(), barcodes.end(), deposit.first->barcode()); + barcodeIterator = find(barcodes.begin(), barcodes.end(), HepMC::barcode(deposit.first)); //If this barcode is not found if (!(barcodeIterator != barcodes.end())){ //Add the barcode to the barcodes vector - barcodes.push_back(deposit.first->barcode()); + barcodes.push_back(HepMC::barcode(deposit.first)); } } else ATH_MSG_WARNING("No deposits found"); diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx index 154423ff0e0632a2d48a48aa76e8cb9c3e2d6115..27c72473f55b7debc84b2defc756f4ce74999a82 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx +++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx @@ -38,7 +38,7 @@ StatusCode InDet::PRD_TruthTrajectoryManipulatorID::finalize() { bool InDet::PRD_TruthTrajectoryManipulatorID::manipulateTruthTrajectory( Trk::PRD_TruthTrajectory &prdvec) const { - if( (*prdvec.genParticle).barcode() < 100000){ + if( HepMC::barcode(*prdvec.genParticle) < 100000){ srand( static_cast< unsigned int >( time( 0 ) ) ); const int pdg_id = (*prdvec.genParticle).pdg_id(); const double prob_pix = pdg_id == 2212 ? 4. : 0; diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx index b3ab20ab83ed414a798e9c53a1a7451e46491208..51a4c470bf6d210543c0ecf5b39f3e817ef6caa2 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx +++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx @@ -165,7 +165,7 @@ bool InDet::PRD_TruthTrajectorySelectorID::pass( const Trk::PRD_TruthTrajectory ThreePointCircle circle(pos); // trajectory only selected when within cuts - if( ( abs(circle.d0()) <= 15 && (*prdvec.genParticle).barcode() <= 100000 ) ) return true; + if( ( std::abs(circle.d0()) <= 15 && HepMC::barcode(*prdvec.genParticle)<= 100000 ) ) return true; return false; } diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx index 282d736b5bbd0463ec0621a4b8671f095ecfc69c..d78f1876804a8b7a322f1d09fa62fa3ab6a6279e 100755 --- a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx +++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx @@ -619,11 +619,11 @@ selectGenSignal (const McEventCollection* SimTracks, if ((particle->status()%1000) != 1 ) continue; int pdgCode = particle->pdg_id(); - const HepPDT::ParticleData* pd = m_particleDataTable->particle(abs(pdgCode)); + const HepPDT::ParticleData* pd = m_particleDataTable->particle(std::abs(pdgCode)); if (!pd) { ATH_MSG_DEBUG("Could not get particle data for particle with " <<"pdgCode="<<pdgCode<< ", status=" << particle->status() - << ", barcode=" << particle->barcode()); + << ", barcode=" << HepMC::barcode(particle)); ATH_MSG_DEBUG("GenParticle= " << particle); continue; } diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx index e8cb30b7070b6cc58949bd1239de52565d54a32d..d3d9f95d9f47c90909063b4c49f85ce30c50cee3 100755 --- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx +++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx @@ -1437,7 +1437,7 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles(const InDet::Tra bool Q = false; for(; mc!=mce; ++mc) { if((*mc).first != ID) break; - if((*mc).second.cptr()->barcode()==k) {Q=true; break;} + if(HepMC::barcode((*mc).second.cptr())==k) {Q=true; break;} } if(!Q) continue; @@ -1458,7 +1458,7 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles(const InDet::Tra out<<"| " <<std::setw(4)<<n <<std::setw(6)<<pa->pdg_id() - <<std::setw(10)<<pa->barcode() + <<std::setw(10)<<HepMC::barcode(pa) <<std::setw(4)<<event_data.m_kinecluster .count(k) <<std::setw(4)<<event_data.m_kineclusterTRT.count(k) <<std::setw(4)<<event_data.m_kinespacepoint.count(k) @@ -1521,7 +1521,7 @@ int InDet::TrackClusterAssValidation::charge(const InDet::TrackClusterAssValidat PRD_MultiTruthCollection::const_iterator mc = findTruth(event_data,d,mce); for(; mc!=mce; ++mc) { - if((*mc).second.cptr()->barcode()==k) { + if(HepMC::barcode((*mc).second.cptr())==k) { const HepMC::GenParticle* pat = (*mc).second.cptr(); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx index c999fc30af90c22ad17d56fee076dff123c9b358..6a7f266d3675b766b4b9780263084692910b2112 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx @@ -83,11 +83,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) Athena_test::Leakcheck check; std::vector<CscSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0)->barcode(),genPartVector.at(0)->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0)),genPartVector.at(0)->parent_event()->event_number()); deps.emplace_back (trkLink1, CscMcData ( 2.5, 3.5, 4.5)); - HepMcParticleLink trkLink2(genPartVector.at(1)->barcode(),genPartVector.at(1)->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1)),genPartVector.at(1)->parent_event()->event_number()); deps.emplace_back (trkLink2, CscMcData (12.5, 13.5, 14.5)); - HepMcParticleLink trkLink3(genPartVector.at(2)->barcode(),genPartVector.at(2)->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2)),genPartVector.at(2)->parent_event()->event_number()); deps.emplace_back (trkLink3, CscMcData (22.5, 23.5, 24.5)); deps[0].second.setCharge ( 5.5); deps[1].second.setCharge (15.5); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx index 16c750c3e1dc68d6db4fda3cdb705c7a32567a33..90d8398e8a85635857428b19a32a1820373860ff 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx @@ -84,11 +84,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) Athena_test::Leakcheck check; std::vector<CscSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0)->barcode(),genPartVector.at(0)->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0)),genPartVector.at(0)->parent_event()->event_number()); deps.emplace_back (trkLink1, CscMcData ( 2.5, 3.5, 4.5)); - HepMcParticleLink trkLink2(genPartVector.at(1)->barcode(),genPartVector.at(1)->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1)),genPartVector.at(1)->parent_event()->event_number()); deps.emplace_back (trkLink2, CscMcData (12.5, 13.5, 14.5)); - HepMcParticleLink trkLink3(genPartVector.at(2)->barcode(),genPartVector.at(2)->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2)),genPartVector.at(2)->parent_event()->event_number()); deps.emplace_back (trkLink3, CscMcData (22.5, 23.5, 24.5)); deps[0].second.setCharge ( 5.5); deps[1].second.setCharge (15.5); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx index fe92f5d541682cbb91acb50f8db76509b81e40ce..67e7be201a7da9904280aba7037041bc12609f4f 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx @@ -99,11 +99,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) CscSimDataCollection trans1; for (int i=0; i < 3; i++) { std::vector<CscSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0+(3*i))->barcode(),genPartVector.at(0+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0+(3*i))),genPartVector.at(0+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink1, CscMcData ( 2.5, 3.5, 4.5)); - HepMcParticleLink trkLink2(genPartVector.at(1+(3*i))->barcode(),genPartVector.at(1+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1+(3*i))),genPartVector.at(1+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink2, CscMcData (12.5, 13.5, 14.5)); - HepMcParticleLink trkLink3(genPartVector.at(2+(3*i))->barcode(),genPartVector.at(2+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2+(3*i))),genPartVector.at(2+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink3, CscMcData (22.5, 23.5, 24.5)); deps[0].second.setCharge ( 5.5+i); deps[1].second.setCharge (15.5+i); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx index 7b4a6f5ff7c5f115a76e3736d55a924732d6cf08..48775a769ce81a8997915c25c2824bc65baec998 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx @@ -99,11 +99,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) CscSimDataCollection trans1; for (int i=0; i < 3; i++) { std::vector<CscSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0+(3*i))->barcode(),genPartVector.at(0+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0+(3*i))),genPartVector.at(0+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink1, CscMcData ( 2.5, 3.5, 4.5)); - HepMcParticleLink trkLink2(genPartVector.at(1+(3*i))->barcode(),genPartVector.at(1+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1+(3*i))),genPartVector.at(1+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink2, CscMcData (12.5, 13.5, 14.5)); - HepMcParticleLink trkLink3(genPartVector.at(2+(3*i))->barcode(),genPartVector.at(2+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2+(3*i))),genPartVector.at(2+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink3, CscMcData (22.5, 23.5, 24.5)); deps[0].second.setCharge ( 5.5+i); deps[1].second.setCharge (15.5+i); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx index d187fa5584b2c17e641c2e63a23bcb969851e801..224e67d5197c4dc9e3a3a9c2c321cbd6a69390ac 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx @@ -83,11 +83,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) Athena_test::Leakcheck check; std::vector<MuonSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0)->barcode(),genPartVector.at(0)->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0)),genPartVector.at(0)->parent_event()->event_number()); deps.emplace_back (trkLink1, MuonMCData ( 2.5, 3.5)); - HepMcParticleLink trkLink2(genPartVector.at(1)->barcode(),genPartVector.at(1)->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1)),genPartVector.at(1)->parent_event()->event_number()); deps.emplace_back (trkLink2, MuonMCData (12.5, 13.5)); - HepMcParticleLink trkLink3(genPartVector.at(2)->barcode(),genPartVector.at(2)->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2)),genPartVector.at(2)->parent_event()->event_number()); deps.emplace_back (trkLink3, MuonMCData (22.5, 23.5)); MuonSimData trans1 (deps, 4321); trans1.setPosition (Amg::Vector3D ( 4.5, 5.5, 6.5)); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx index f7aecbe23ed9503009c3dced46b4b7abc72d67b5..e28b7854f41fb8784e6901644a4f12f50d77ba1e 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx @@ -83,11 +83,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) Athena_test::Leakcheck check; std::vector<MuonSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0)->barcode(),genPartVector.at(0)->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0)),genPartVector.at(0)->parent_event()->event_number()); deps.emplace_back (trkLink1, MuonMCData ( 2.5, 3.5)); - HepMcParticleLink trkLink2(genPartVector.at(1)->barcode(),genPartVector.at(1)->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1)),genPartVector.at(1)->parent_event()->event_number()); deps.emplace_back (trkLink2, MuonMCData (12.5, 13.5)); - HepMcParticleLink trkLink3(genPartVector.at(2)->barcode(),genPartVector.at(2)->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2)),genPartVector.at(2)->parent_event()->event_number()); deps.emplace_back (trkLink3, MuonMCData (22.5, 23.5)); MuonSimData trans1 (deps, 4321); trans1.setPosition (Amg::Vector3D ( 4.5, 5.5, 6.5)); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx index 934c930b845e34082d24a594449723b41d77324e..8b00961eaa1a6c94a9e01d173c49c8f9f63bc4e7 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx @@ -98,11 +98,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) MuonSimDataCollection trans1; for (int i=0; i < 3; i++) { std::vector<MuonSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0+(3*i))->barcode(),genPartVector.at(0+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0+(3*i))),genPartVector.at(0+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink1, MuonMCData ( 2.5+i, 3.5+i)); - HepMcParticleLink trkLink2(genPartVector.at(1+(3*i))->barcode(),genPartVector.at(1+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1+(3*i))),genPartVector.at(1+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink2, MuonMCData (12.5+i, 13.5+i)); - HepMcParticleLink trkLink3(genPartVector.at(2+(3*i))->barcode(),genPartVector.at(2+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2+(3*i))),genPartVector.at(2+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink3, MuonMCData (22.5+i, 23.5+i)); trans1[Identifier(1234+i)] = MuonSimData (deps, 4321+i); trans1[Identifier(1234+i)].setPosition (Amg::Vector3D(4.5+i, 5.5+i, 6.5+i)); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx index 8fe08f09c68551ff0d88e84d6a1c015c5f539dd3..c686405aa4ac7616737357c014244eafca7a52a9 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx @@ -97,11 +97,11 @@ void test1(std::vector<HepMC::GenParticlePtr>& genPartVector) MuonSimDataCollection trans1; for (int i=0; i < 3; i++) { std::vector<MuonSimData::Deposit> deps; - HepMcParticleLink trkLink1(genPartVector.at(0+(3*i))->barcode(),genPartVector.at(0+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink1(HepMC::barcode(genPartVector.at(0+(3*i))),genPartVector.at(0+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink1, MuonMCData ( 2.5+i, 3.5+i)); - HepMcParticleLink trkLink2(genPartVector.at(1+(3*i))->barcode(),genPartVector.at(1+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink2(HepMC::barcode(genPartVector.at(1+(3*i))),genPartVector.at(1+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink2, MuonMCData (12.5+i, 13.5+i)); - HepMcParticleLink trkLink3(genPartVector.at(2+(3*i))->barcode(),genPartVector.at(2+(3*i))->parent_event()->event_number()); + HepMcParticleLink trkLink3(HepMC::barcode(genPartVector.at(2+(3*i))),genPartVector.at(2+(3*i))->parent_event()->event_number()); deps.emplace_back (trkLink3, MuonMCData (22.5+i, 23.5+i)); trans1[Identifier(1234+i)] = MuonSimData (deps, 4321+i); trans1[Identifier(1234+i)].setPosition (Amg::Vector3D(4.5+i, 5.5+i, 6.5+i)); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthSummaryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthSummaryTool.cxx index fe2feb7eb852927c42d81af59a056a61b42da090..1d29e2dd21ec6285c3e14c037cc2f7f112040c4c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthSummaryTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthSummaryTool.cxx @@ -103,10 +103,10 @@ MuonTruthSummaryTool::init() const PRD_MultiTruthCollection::const_iterator it_end = col->end(); for (; it != it_end; ++it) { const HepMcParticleLink& link = it->second; - if (link.cptr() && (abs(link.cptr()->pdg_id()) == m_selectedPdgId || abs(link.cptr()->pdg_id()) == 13)) + if (link.cptr() && (abs(link.cptr()->pdg_id()) == m_selectedPdgId || std::abs(link.cptr()->pdg_id()) == 13)) { - m_truthHits[it->first] = link.cptr()->barcode(); - m_pdgIdLookupFromBarcode[link.cptr()->barcode()] = link.cptr()->pdg_id(); + m_truthHits[it->first] = HepMC::barcode(link.cptr()); + m_pdgIdLookupFromBarcode[HepMC::barcode(link.cptr())] = link.cptr()->pdg_id(); } } } diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonDecayTruthTrajectoryBuilder.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonDecayTruthTrajectoryBuilder.cxx index 23e7803fa86b155661fba73baef77ebce9b9da59..cdbc6aa847c60ddd8b5d54d884d084172d4e4994 100644 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonDecayTruthTrajectoryBuilder.cxx +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonDecayTruthTrajectoryBuilder.cxx @@ -54,7 +54,7 @@ namespace Muon { // copy the outer half to result while(!tmp.empty()) { - ATH_MSG_DEBUG( " Adding daughter: barcode " << current->barcode() << " PDG id " << current->pdg_id()); + ATH_MSG_DEBUG( " Adding daughter: barcode " << HepMC::barcode(current) << " PDG id " << current->pdg_id()); result->push_back(tmp.top()); tmp.pop(); } @@ -64,7 +64,7 @@ namespace Muon { // Now continue towards the interaction point while((next = getMother(current))) { - ATH_MSG_DEBUG( " Adding mother: barcode " << current->barcode() << " PDG id " << current->pdg_id()); + ATH_MSG_DEBUG( " Adding mother: barcode " << HepMC::barcode(current) << " PDG id " << current->pdg_id()); result->push_back(current = next); } @@ -108,7 +108,7 @@ namespace Muon { const HepMC::GenParticle& par = *candidate; if( msgLvl(MSG::DEBUG) ){ - msg(MSG::DEBUG) << " PDG ID " << par.pdg_id() << " barcode: " << par.barcode() << " pt: " << par.momentum().perp(); + msg(MSG::DEBUG) << " PDG ID " << par.pdg_id() << " barcode: " << HepMC::barcode(par) << " pt: " << par.momentum().perp(); if( par.production_vertex() ) msg(MSG::DEBUG) << " vertices prod: r " << par.production_vertex()->position().perp() << " z " << par.production_vertex()->position().z(); if( par.end_vertex() ) msg(MSG::DEBUG) << " end: r " << par.end_vertex()->position().perp() << " z " << par.end_vertex()->position().z(); diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx index 5441a5177ad5004f6dd83c4f913e240d65416b45..1199406c5469d84c760a14048be2323c8a9b8e34 100644 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx @@ -445,7 +445,7 @@ namespace Muon { for( const auto& trajectory : *col ){ // check if gen particle same as input - if( (trajectory.second->barcode())%m_barcodeOffset != barcode ) continue; + if( (HepMC::barcode(trajectory.second))%m_barcodeOffset != barcode ) continue; const Identifier& id = trajectory.first; bool measPhi = m_idHelperSvc->measuresPhi(id); diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/MDTSimHitVariables.cxx b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/MDTSimHitVariables.cxx index 39303b5ad312c38c874936d05251628131cd879f..1acb3a49f165990a2c1f131c56da32ece0346078 100644 --- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/MDTSimHitVariables.cxx +++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/MDTSimHitVariables.cxx @@ -105,7 +105,7 @@ StatusCode MDTSimHitVariables::fillVariables(const MuonGM::MuonDetectorManager* const HepMC::GenParticle* genP = pLink.cptr(); if (genP) { pdgId=genP->pdg_id(); - barcode=genP->barcode(); + barcode=HepMC::barcode(genP); } else { ATH_MSG_WARNING("GenParticle is nullptr for hit in "<<stname<<" (eta="<<steta<<", phi="<<stphi<<", ml="<< ml<<", tubelayer="<<tl<<", tube="<<tube<<")"); diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/RPCSimHitVariables.cxx b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/RPCSimHitVariables.cxx index ac5993abd27caec7e52bf0a717185f61667e5362..170c025f401a3f72589e4328cf434e1b830e45ad 100644 --- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/RPCSimHitVariables.cxx +++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/RPCSimHitVariables.cxx @@ -113,7 +113,7 @@ StatusCode RPCSimHitVariables::fillVariables(const MuonGM::MuonDetectorManager* const HepMC::GenParticle* genP = pLink.cptr(); if (genP) { pdgId=genP->pdg_id(); - barcode=genP->barcode(); + barcode=HepMC::barcode(genP); } else { ATH_MSG_WARNING("GenParticle is nullptr for hit in "<<stname<<" (eta="<<steta<<", phi="<<stphi<<", doubletR="<< dbr<<", doubletZ="<<dbz<<", doubletPhi="<<dbp<<", gasgaplayer="<<gg<<", measuresPhi="<<mfi<<")"); diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/ReadTruthParticles.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/ReadTruthParticles.cxx index ee85d0e11f04130fee18b70ef220e7694ef77147..75696dd6e152b6d90368311d95645a294da1013f 100644 --- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/ReadTruthParticles.cxx +++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/ReadTruthParticles.cxx @@ -135,7 +135,7 @@ StatusCode ReadTruthParticles::execute() << " PDG-ID: " << (*itr)->pdgId() << " nChildren: " << (*itr)->nDecay() << " status: " << (*itr)->genParticle()->status() - << " bc: " << (*itr)->genParticle()->barcode()); + << " bc: " << HepMC::barcode((*itr)->genParticle())); for ( unsigned int iChild = 0; iChild != (*itr)->nDecay(); ++iChild ){ const TruthParticle * child = (*itr)->child( iChild ); if ( 0 != child ) { @@ -144,10 +144,10 @@ StatusCode ReadTruthParticles::execute() << "\tchild: " << iChild << "\tPDGID: " << child->pdgId() << " status: " << child->genParticle()->status() - << " bc: " << child->genParticle()->barcode() + << " bc: " << HepMC::barcode(child->genParticle()) << " bc Parents: " << child->nParents() << " [ "; for ( unsigned int iMoth = 0; iMoth != child->nParents(); ++iMoth ) { - msg(MSG::INFO) << child->genMother(iMoth)->barcode() << " "; + msg(MSG::INFO) << HepMC::barcode(child->genMother(iMoth)) << " "; } msg(MSG::INFO) << "]" << endmsg; } diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysis/src/AnalysisSkeleton.cxx b/PhysicsAnalysis/AnalysisCommon/UserAnalysis/src/AnalysisSkeleton.cxx index 6351201e1a7b27daa2459a0823b22d11c63bd414..14a731e8e8cb3a83c7a78b4498b148f809580ad1 100755 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysis/src/AnalysisSkeleton.cxx +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysis/src/AnalysisSkeleton.cxx @@ -1315,7 +1315,7 @@ StatusCode AnalysisSkeleton::getTopQpT(int& numTops, double& top1, double& top2) HepMC::GenVertex* prod_vtx = part->production_vertex(); int vtx_barcode = 1; - if(prod_vtx) vtx_barcode = prod_vtx->barcode(); + if(prod_vtx) vtx_barcode = HepMC::barcode(prod_vtx); if(vtx_barcode == -1) { diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTruthHitsFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTruthHitsFillerTool.cxx index b0a2983d906015e009ac8e11723d71640bc4fefb..7b7b69abf5331a178ab4e6777d5f97a22c18e284 100644 --- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTruthHitsFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTruthHitsFillerTool.cxx @@ -130,7 +130,7 @@ StatusCode MuonTruthHitsFillerTool::fillHitCounts (int barcode) for (const PRD_MultiTruthCollection::value_type& mc : *collection) { // check if gen particle same as input - if( mc.second->barcode() != barcode ) continue; + if( HepMC::barcode(mc.second) != barcode ) continue; found = true; const Identifier& id = mc.first; ATH_MSG_VERBOSE("found matching hit " << m_idHelperSvc->toString(id) ); diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/CompactHardTruth.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/CompactHardTruth.cxx index 32d008c5c725f9c9f9d5663b86fd68886f468b74..ae78f5f88836c99220e86bfc2ca5bb1ae55f3b8b 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/CompactHardTruth.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/CompactHardTruth.cxx @@ -32,14 +32,6 @@ // Needed for FourVector #include "AtlasHepMC/SimpleVector.h" -//#include "McParticleUtils/McVtxFilter.h" - -//#include "TruthHelper/IsGenStable.h" -//#include "TruthHelper/IsGenNonInteracting.h" -//#include "TruthHelper/IsGenerator.h" - -//#include "EventKernel/PdtPdg.h" - // ROOT includes #include "TH1F.h" @@ -207,7 +199,7 @@ StatusCode CompactHardTruth::execute() { if( doPrint ){ std::cout <<"========== BEGIN EVENT BEFORE THINNING ==========" <<std::endl; - thinEvt->print(); + HepMC::Print::line(std::cout,thinEvt); std::cout <<"========== END EVENT BEFORE THINNING ==========" <<std::endl; } @@ -284,7 +276,7 @@ StatusCode CompactHardTruth::execute() { isHadVtx = isHadVtx && isHadOut; if( isHadVtx ) hadVertices.push_back(*hadv); if( doDebug && isHadVtx ) ATH_MSG_VERBOSE("Hadronization vertex " - <<(*hadv)->barcode()); + <<HepMC::barcode(*hadv)); } if( hadVertices.size() < 1 ){ @@ -303,7 +295,7 @@ StatusCode CompactHardTruth::execute() { for(unsigned int iv=0; iv<hadVertices.size(); ++iv){ HepMC::GenVertex* ivtx = hadVertices[iv]; if( doDebug ) ATH_MSG_DEBUG("Removing partons from hadVertex " - <<ivtx->barcode()); + <<HepMC::barcode(ivtx)); HepMC::GenVertex::particles_in_const_iterator pin = ivtx->particles_in_const_begin(); HepMC::GenVertex::particles_in_const_iterator pinE = @@ -346,7 +338,7 @@ StatusCode CompactHardTruth::execute() { } // Geant vertices/particles - if( (*hadv)->barcode() > -cutG4 ) continue; + if( HepMC::barcode(*hadv) > -cutG4 ) continue; HepMC::GenVertex::particles_in_const_iterator pin = (*hadv)->particles_in_const_begin(); HepMC::GenVertex::particles_in_const_iterator pinE = @@ -423,7 +415,7 @@ StatusCode CompactHardTruth::execute() { if( doDebug && doExtra ){ std::cout <<"========== BEGIN EVENT BEFORE CLUSTER ==========" <<std::endl; - thinEvt->print(); + HepMC::Print::line(std::cout,thinEvt); std::cout <<"========== END EVENT BEFORE CLUSTER ==========" <<std::endl; } @@ -670,9 +662,9 @@ StatusCode CompactHardTruth::execute() { if( doDebug ){ ATH_MSG_DEBUG("Merge 1->2: ppvtx,pp,pvtx,pout1,pout2,evtx " - <<ppvtx->barcode() <<" " <<pp->barcode() <<" " - <<pvtx->barcode() <<" " <<pout1->barcode() <<" " - <<pout2->barcode()); + <<HepMC::barcode(ppvtx) <<" " <<HepMC::barcode(pp) <<" " + <<HepMC::barcode(pvtx) <<" " <<HepMC::barcode(pout1) <<" " + <<HepMC::barcode(pout2)); ATH_MSG_DEBUG("Merge 1->2: id " <<pp->pdg_id() <<" " <<pout1->pdg_id() <<" " <<pout2->pdg_id()); } @@ -775,7 +767,7 @@ StatusCode CompactHardTruth::execute() { if( doDebug && doExtra ){ std::cout <<"========== BEGIN EVENT BEFORE SOFT ==========" <<std::endl; - thinEvt->print(); + HepMC::Print::line(std::cout,thinEvt); std::cout <<"========== END EVENT BEFORE SOFT ==========" <<std::endl; } @@ -930,7 +922,7 @@ StatusCode CompactHardTruth::execute() { if( doDebug && doExtra ){ std::cout <<"========== BEGIN EVENT BEFORE 1-BODY ==========" <<std::endl; - thinEvt->print(); + HepMC::Print::line(std::cout,thinEvt); std::cout <<"========== END EVENT BEFORE 1-BODY ==========" <<std::endl; } @@ -1019,8 +1011,8 @@ StatusCode CompactHardTruth::execute() { ++m_dangleFound; if( pt > m_danglePtCut ) continue; if( doDebug ) ATH_MSG_DEBUG("1->0: removing pp,badv,pt " - <<pp->barcode() <<" " - <<(*badv)->barcode() <<" " <<pt); + <<HepMC::barcode(pp) <<" " + <<HepMC::barcode(*badv) <<" " <<pt); removePV.push_back(vpPair(*badv,pp)); deleteP.push_back(pp); removeV.push_back(*badv); @@ -1038,7 +1030,7 @@ StatusCode CompactHardTruth::execute() { // Actually implement changes -- remove vertices for(unsigned int i=0; i<removeV.size(); ++i){ if( !thinEvt->remove_vertex(removeV[i]) ){ - ATH_MSG_WARNING("1->0: Failed to remove vertex "<<removeV[i]->barcode()); + ATH_MSG_WARNING("1->0: Failed to remove vertex "<<HepMC::barcode(removeV[i])); } } @@ -1064,7 +1056,7 @@ StatusCode CompactHardTruth::execute() { if( doPrint ){ std::cout <<"========== BEGIN EVENT AFTER THINNING ==========" <<std::endl; - thinEvt->print(); + HepMC::Print::line(std::cout,thinEvt); std::cout <<"========== END EVENT AFTER THINNING ==========" <<std::endl; } @@ -1148,21 +1140,6 @@ HepMC::FourVector CompactHardTruth::vtxOutMom(HepMC::GenVertex* v){ return HepMC::FourVector(px,py,pz,e); } -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Protected methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// } //> end namespace DerivationFramework diff --git a/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx b/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx index 5636286b7c0ab0413a37945aae03a8ffadbf05df..ffa2f639869aa8e4418f0c9990eb99e362433ba8 100755 --- a/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx +++ b/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx @@ -315,7 +315,7 @@ bool McVtxFilter::checkParentBranch( const HepMC::GenVertex * vtx ) const } if ( m_msg.level() <= MSG::VERBOSE ) { - vtx->print(); + HepMC::Print::line(std::cout,vtx); } /// Check if number of parents is OK @@ -376,7 +376,7 @@ bool McVtxFilter::checkChildBranch( const HepMC::GenVertex * vtx ) const m_msg << MSG::VERBOSE << "In checkChildBranch..." << endmsg; if ( m_msg.level() <= MSG::VERBOSE ) { - vtx->print(); + HepMC::Print::line(std::cout,vtx); } /// Check we aren't in the "any particle" case diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx index 910ed5e112962347213d32a7953f1e406850c836..9e3a2eb284234366e163fe3cb810e1e953cff35e 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx @@ -69,7 +69,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode()); + HepMcParticleLink dummyHMPL(HepMC::barcode(particle)); assert(dummyHMPL.cptr()==particle); // Get proxy created outside of leak checking. DataLink<Rec::TrackParticleContainer> dldum ("tpc"); @@ -78,7 +78,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TrackParticleTruthCollection trans1 (DataLink<Rec::TrackParticleContainer>("tpc")); for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Rec::TrackParticleTruthKey key (ElementLink<Rec::TrackParticleContainer> ("tpc", i)); TrackParticleTruth val (trkLink, (float)i/10); trans1[key] = val; diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx index d218af9130a0d24acdeae240bfdbf538859f0ad9..491b0d01d1d4888a3b5a5e412d9726c89fe168cb 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx @@ -70,7 +70,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TrackParticleTruthCollection trans1 (DataLink<Rec::TrackParticleContainer>("tpc")); for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Rec::TrackParticleTruthKey key (ElementLink<Rec::TrackParticleContainer> ("tpc", i)); TrackParticleTruth val (trkLink, (float)i/10); trans1[key] = val; diff --git a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx index fbf21e33f52bb9b2ddb22fa593415fd6a207a54f..46396ea1d7fd6442f17cb2d3c6bce2dc0824231e 100755 --- a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx +++ b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx @@ -48,7 +48,7 @@ TruthParameters::findParticle (int barCode) // retrieve McEventCollection (from truthSelector to give G3/4 simulation independence) const HepMC::GenEvent* event = *m_truthSelector->mcEventCollection()->begin(); - particle = event->barcode_to_particle(barCode); + particle = HepMC::barcode_to_particle(event,barCode); if (particle == 0) ATH_MSG_DEBUG( "particle not found: barCode " << barCode ); diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx index 8ad82cc7c8f6eeaa68e40885357d229df131ea27..473529490dbbc194f78857d1e8af9a4309ecdcfb 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx @@ -69,7 +69,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) PRD_MultiTruthCollection trans1; for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); const Identifier chanId(i+100); trans1.insert(trans1.end(), std::make_pair(chanId, trkLink) ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx index 9be3a0ce50954869b2ddcb4d79ba8a2e93c301dd..cb045cd1532017018b70c4f0743cbfeaaa22b992 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx @@ -69,7 +69,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) PRD_MultiTruthCollection trans1; for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); const Identifier chanId(i+100); trans1.insert(trans1.end(), std::make_pair(chanId, trkLink) ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx index c361e094043460569689858394220358bce72a5e..897c86486e267ea06cead8df2de2c328cf7521b9 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx @@ -70,7 +70,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TrackTruthCollection trans1 (DataLink<TrackCollection>("tpc")); for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Trk::TrackTruthKey key (ElementLink<TrackCollection> ("tpc", i)); TrackTruth val (trkLink, (float)i/10); trans1[key] = val; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx index 3693284104fcd3a4fcfff59d18ef6cbeea1020f6..2f72443016544ca5b980224130336ec5721a5f38 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx @@ -70,7 +70,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TrackTruthCollection trans1 (DataLink<TrackCollection>("tpc")); for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); Trk::TrackTruthKey key (ElementLink<TrackCollection> ("tpc", i)); TrackTruth val (trkLink, (float)i/10); trans1[key] = val; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx index 07186551b3c836527a33052756b8a3f1e09e235a..853cf92d669dac95fc7f8f540a74857e8e748c42 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx @@ -67,7 +67,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TruthTrajectory trans1; for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); trans1.push_back(trkLink); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx index cc56edca571cd96ff08c32a5302dfc1568f92cd5..48dd594c325e58b5d95245cd31f0ff8c9a84e7a4 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx @@ -67,7 +67,7 @@ void test1(std::vector<HepMC::GenParticle*> genPartVector) TruthTrajectory trans1; for (int i=0; i<10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); + HepMcParticleLink trkLink(HepMC::barcode(pGenParticle),pGenParticle->parent_event()->event_number()); trans1.push_back(trkLink); } diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx index f0a1e5098625b52a545bdde7eb058fa21cf9ba0f..1d06f4241cc951e0d09a077401eab24436a3a216 100755 --- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx +++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx @@ -448,7 +448,7 @@ void DetailedTrackTruthBuilder::makeTruthToRecMap( PRD_InverseTruth& result, con // i.second = HepMcParticleLink const HepMC::GenParticle* pa = i.second.cptr(); if( !pa ) { continue; } // skip noise - if( pa->barcode()==std::numeric_limits<int32_t>::max() && + if( HepMC::barcode(pa)==std::numeric_limits<int32_t>::max() && pa->pdg_id()==999 ) { continue; } // skip geantinos result.insert(std::make_pair(i.second, i.first)); } diff --git a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx index ab729c0ac68c449bfef1c5200503f9653b177066..c8ebc03cfda152e32b9cf9320ebdf756eb42ae9e 100755 --- a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx +++ b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx @@ -108,7 +108,7 @@ const Trk::TrackParameters* Trk::TruthTrackRecordToTrack::makeProdVertexParamete (*record).GetMomentum().z()); globalMom = hv2; - ATH_MSG_DEBUG("found barcode " << part->barcode() << " with pdg ID " << + ATH_MSG_DEBUG("found barcode " << HepMC::barcode(part) << " with pdg ID " << id << ", momentum " << hv2 << " production " << globalPos); diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx index b17fa2e045bb4a786da8a7935032b3079cd2d9db..1940d483abe38acde00dfa9fac5bbdf5ed0def2d 100644 --- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx +++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx @@ -147,7 +147,7 @@ Trk::Track* Trk::TruthTrackBuilder::createTrack(const PRD_TruthTrajectory& prdTr genPart->momentum().y(), genPart->momentum().z()); //!< get the charge via the particle table ... - int barcode = genPart->barcode(); + int barcode = HepMC::barcode(genPart); int pdgCode = genPart->pdg_id(); int absPdgCode = abs(pdgCode); // get the charge: ap->charge() is used later, DOES NOT WORK RIGHT NOW diff --git a/Tracking/TrkValidation/TrkValTools/src/TruthNtupleTool.cxx b/Tracking/TrkValidation/TrkValTools/src/TruthNtupleTool.cxx index c3aab911ed92b0298eee851947a6e1fa76738803..ad6f483baa7e142a9b75bed3a008bf68900a5ec2 100644 --- a/Tracking/TrkValidation/TrkValTools/src/TruthNtupleTool.cxx +++ b/Tracking/TrkValidation/TrkValTools/src/TruthNtupleTool.cxx @@ -294,7 +294,7 @@ StatusCode Trk::TruthNtupleTool::writeTruthData ( m_mc_prodR = 0.; m_mc_prodz = 0.; } else { - m_mc_barcode = genParticle->barcode(); + m_mc_barcode = HepMC::barcode(genParticle); m_mc_particleID = genParticle->pdg_id(); m_mc_energy = genParticle->momentum().e(); diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx index 20bff89cc4db5313c6d19df20582307f788efee9..0be4b3a4c3393721945a3307a449081d475f2cc4 100755 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx @@ -231,7 +231,7 @@ namespace Trk if( ! pass( part->parent_event(), coll ) ) return false; // Now check for stable particles - if (part->barcode() < 200000) { + if (HepMC::barcode(part) < 200000) { if( ! TruthHelper::IsGenStable()( part ) ) return false; if( ! TruthHelper::IsGenInteracting()( part ) ) return false; } @@ -240,13 +240,13 @@ namespace Trk int pdg = part->pdg_id(); /// remove gluons and quarks of status 2 that pass IsGenStable!!! - if( abs(pdg) < 7 || abs(pdg) == 21 ) return false; + if( std::abs(pdg) < 7 || std::abs(pdg) == 21 ) return false; - const HepPDT::ParticleData* pd = m_partPropSvc->PDT()->particle( abs( pdg ) ); + const HepPDT::ParticleData* pd = m_partPropSvc->PDT()->particle( std::abs( pdg ) ); if( ! pd ) { ATH_MSG_DEBUG( "Could not get particle data for pdg = " << pdg - << " status " << part->status() << " barcode " <<part->barcode() - << " process id " <<part->parent_event()->signal_process_id()); + << " status " << part->status() << " barcode " <<HepMC::barcode(part) + << " process id " <<HepMC::signal_process_id(part->parent_event())); return false; } float charge = pd->charge(); diff --git a/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1TruthVertexCollection.cxx b/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1TruthVertexCollection.cxx index 48f567607eee058a7c609f04ce3692a1bb2f5842..bb6a0e5d696038099008e110b35905928f536cf2 100644 --- a/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1TruthVertexCollection.cxx +++ b/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1TruthVertexCollection.cxx @@ -309,7 +309,7 @@ QStringList VP1TruthVertexCollection::infoOnClicked(SoPath* pickedPath) if (m_d->controller->printVerboseInfoOnClick()) { l <<"======== Dump ========"; std::ostringstream s; - vtx->print(s); + HepMC::Print::line(s,vtx); l << QString(s.str().c_str()).split('\n'); l <<"======================"; }