From c03034aaa14624fda80c46bd08b01d4481120d97 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi <averbyts@cern.ch> Date: Mon, 22 Mar 2021 22:30:56 +0100 Subject: [PATCH] Hot gfixes --- .../xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx | 2 +- .../xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx index ecb942ad877e..b81cfc82f368 100644 --- a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx +++ b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx @@ -54,7 +54,7 @@ StatusCode HepMCTruthReader::execute() { if (cntr>0) ATH_MSG_INFO("Printing pileup events..."); if (cntr==0) { - auto *signalProcessVtx = HepMC::signal_process_vertex((HepMC::GenEvent*)genEvt); + auto signalProcessVtx = HepMC::signal_process_vertex((HepMC::GenEvent*)genEvt); ATH_MSG_INFO("Signal process vertex position: (" << (signalProcessVtx?signalProcessVtx->position().x():0) << ", " << (signalProcessVtx?signalProcessVtx->position().y():0) << ", " << (signalProcessVtx?signalProcessVtx->position().z():0) diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx index 2f8958b44fc8..32ee1a443c57 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx @@ -193,7 +193,7 @@ namespace xAODMaker { if (isSignalProcess) { xTruthEventContainer->push_back( xTruthEvent ); // Cross-section - const auto *crossSection = genEvt->cross_section(); + auto crossSection = genEvt->cross_section(); #ifdef HEPMC3 xTruthEvent->setCrossSection(crossSection ? (float)crossSection->xsec() : -1); xTruthEvent->setCrossSectionError(crossSection ? (float)crossSection->xsec_err() : -1); @@ -223,7 +223,7 @@ namespace xAODMaker { xTruthEvent->setWeights(weights); // Heavy ion info - const auto *const hiInfo = genEvt->heavy_ion(); + auto const hiInfo = genEvt->heavy_ion(); if (hiInfo) { #ifdef HEPMC3 /* Please note HepMC3 as well as more recent HePMC2 versions have more Hi parameters */ @@ -261,7 +261,7 @@ namespace xAODMaker { // Parton density info // This will exist 99% of the time, except for e.g. cosmic or particle gun simulation - const auto *const pdfInfo = genEvt->pdf_info(); + auto const pdfInfo = genEvt->pdf_info(); if (pdfInfo) { #ifdef HEPMC3 xTruthEvent->setPdfInfoParameter(pdfInfo->parton_id[0], xAOD::TruthEvent::PDGID1); @@ -300,7 +300,7 @@ namespace xAODMaker { // Check signal process vertex // If this is a disconnected vertex, add it manually or won't be added from the loop over particles below. - auto *disconnectedSignalProcessVtx = HepMC::signal_process_vertex((HepMC::GenEvent*)genEvt); // Get the signal process vertex + auto disconnectedSignalProcessVtx = HepMC::signal_process_vertex((HepMC::GenEvent*)genEvt); // Get the signal process vertex if (disconnectedSignalProcessVtx) { #ifdef HEPMC3 if (disconnectedSignalProcessVtx->particles_in().size() == 0 && @@ -327,7 +327,7 @@ namespace xAODMaker { genEvt_valid_beam_particles=genEvt->valid_beam_particles(); if ( genEvt_valid_beam_particles ) beamParticles = genEvt->beam_particles(); #endif - for (auto * part: *((HepMC::GenEvent*)genEvt)) { + for (auto part: *((HepMC::GenEvent*)genEvt)) { // (a) create TruthParticle xAOD::TruthParticle* xTruthParticle = new xAOD::TruthParticle(); xTruthParticleContainer->push_back( xTruthParticle ); @@ -349,7 +349,7 @@ namespace xAODMaker { } } // (d) Particle's production vertex - auto *productionVertex = part->production_vertex(); + auto productionVertex = part->production_vertex(); if (productionVertex) { VertexParticles& parts = vertexMap[productionVertex]; if (parts.incoming.empty() && parts.outgoing.empty()) @@ -361,7 +361,7 @@ namespace xAODMaker { // else maybe want to keep track that this is the production vertex // // (e) Particle's decay vertex - auto *decayVertex = part->end_vertex(); + auto decayVertex = part->end_vertex(); if (decayVertex) { VertexParticles& parts = vertexMap[decayVertex]; if (parts.incoming.empty() && parts.outgoing.empty()) @@ -373,8 +373,8 @@ namespace xAODMaker { } // end of loop over particles // (3) Loop over the map - auto *signalProcessVtx = HepMC::signal_process_vertex(genEvt); // Get the signal process vertex - for (auto * vertex : vertices) { + auto signalProcessVtx = HepMC::signal_process_vertex(genEvt); // Get the signal process vertex + for (auto vertex : vertices) { const auto& parts = vertexMap[vertex]; // (a) create TruthVertex xAOD::TruthVertex* xTruthVertex = new xAOD::TruthVertex(); -- GitLab