From 83cec662a343e5bd8abf7632146a5a8800594586 Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Fri, 15 Aug 2025 11:43:25 -0500 Subject: [PATCH 1/8] Coning around particles with intermediate generator status as well, in order to get information about stau LLPs --- source/Utils/src/FilterConeHits.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 2265784..abf7f2e 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -236,7 +236,7 @@ void FilterConeHits::processEvent( LCEvent * evt ) { MCParticle* part = dynamic_cast( m_inputMCParticles->getElementAt(ipart) ); // --- Keep only the generator-level particles: - if ( part->getGeneratorStatus() != 1 ) continue; + if ( part->getGeneratorStatus() != 1 && status != 22 && status != 51 && status != 52 ) continuegit checkout -b; double part_p = sqrt( part->getMomentum()[0]*part->getMomentum()[0] + part->getMomentum()[1]*part->getMomentum()[1] + From a559fae11091de74b31f3dc1de14e2dada7be751 Mon Sep 17 00:00:00 2001 From: Mira Littmann <139819020+mlittmann@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:47:46 -0500 Subject: [PATCH 2/8] cone around intermediates for llp studies --- source/Utils/src/FilterConeHits.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index abf7f2e..5354e4a 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -236,7 +236,7 @@ void FilterConeHits::processEvent( LCEvent * evt ) { MCParticle* part = dynamic_cast( m_inputMCParticles->getElementAt(ipart) ); // --- Keep only the generator-level particles: - if ( part->getGeneratorStatus() != 1 && status != 22 && status != 51 && status != 52 ) continuegit checkout -b; + if ( part->getGeneratorStatus() != 1 && status != 22 && status != 51 && status != 52 ) continue; double part_p = sqrt( part->getMomentum()[0]*part->getMomentum()[0] + part->getMomentum()[1]*part->getMomentum()[1] + From 6d0e520da2ad1777c8125f053f6ee88cdb53cb64 Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Tue, 19 Aug 2025 11:04:09 -0500 Subject: [PATCH 3/8] Cone around certain generator statuses as a parameter 'ConeAroundStatus' in the steering file Adding an option for which particles to cone around based on their Pythia MCParticle status. --- source/Utils/include/FilterConeHits.h | 5 ++++- source/Utils/src/FilterConeHits.cc | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/source/Utils/include/FilterConeHits.h b/source/Utils/include/FilterConeHits.h index 8b6b36d..22b40e7 100644 --- a/source/Utils/include/FilterConeHits.h +++ b/source/Utils/include/FilterConeHits.h @@ -25,6 +25,7 @@ using namespace marlin ; * @parameter TrackerHitOutputRelations name of the tracker hit relation output collections * @parameter DeltaRCut maximum angular distance between the hits and the particle direction * @parameter FillHistograms flag to fill the diagnostic histograms + * @parameter ConeAroundStatus list of Pythia generator statuses that we can choose to cone around * * @author M. Casarsa, INFN Trieste * @date 22 January 2021 @@ -64,11 +65,13 @@ class FilterConeHits : public Processor { std::vector m_outputTrackerSimHitsCollNames{} ; std::vector m_outputTrackerHitRelNames{} ; - // --- Processor parameters: bool m_fillHistos{} ; double m_deltaRCut{} ; + // Coning around MCParticles whose generator status is in this list, given in steering file + std::vector m_coneAroundStatus{}; + // --- Diagnostic histograms: TH1F* m_distXY = nullptr ; TH1F* m_distZ = nullptr ; diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 5354e4a..45a88ad 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -16,6 +16,8 @@ #include "HelixClass_double.h" +#include + using namespace lcio ; using namespace marlin ; @@ -71,12 +73,16 @@ FilterConeHits::FilterConeHits() : Processor("FilterConeHits") { "Maximum angular distance between the hits and the particle direction" , m_deltaRCut, double(1.) ); - + registerProcessorParameter( "FillHistograms", "Flag to fill the diagnostic histograms", m_fillHistos, false ); + registerProcessorParameter( "ConeAroundStatus", + "List of MCP statuses from Pythia to cone around. Default is 1", + m_coneAroundStatus, + std::vector{1} ); } @@ -235,9 +241,11 @@ void FilterConeHits::processEvent( LCEvent * evt ) { MCParticle* part = dynamic_cast( m_inputMCParticles->getElementAt(ipart) ); - // --- Keep only the generator-level particles: - if ( part->getGeneratorStatus() != 1 && status != 22 && status != 51 && status != 52 ) continue; - + const int genStat = part->getGeneratorStatus(); + if ( std::find(m_coneAroundStatus.begin(), m_coneAroundStatus.end(), genStat) == m_coneAroundStatus.end() ) { + continue; + } + double part_p = sqrt( part->getMomentum()[0]*part->getMomentum()[0] + part->getMomentum()[1]*part->getMomentum()[1] + part->getMomentum()[2]*part->getMomentum()[2] ); From 66cf50a3e2f881e9c844fd8df39534f4ab553448 Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Fri, 5 Sep 2025 05:03:40 -0500 Subject: [PATCH 4/8] before i try to fix truth links --- source/Utils/src/FilterConeHits.cc | 82 +++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 45a88ad..788461f 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -18,12 +18,16 @@ #include +#include + using namespace lcio ; using namespace marlin ; - FilterConeHits aFilterConeHits ; +void FilterConeHits::processRunHeader( EVENT::LCRunHeader* h ) { + _nRun++ ; +} FilterConeHits::FilterConeHits() : Processor("FilterConeHits") { @@ -119,19 +123,13 @@ void FilterConeHits::init() { m_time = new TH1F("m_time","time at the point of closest approach;T [mm/GeV]", 1000, 0., 2000.); m_pathLength = new TH1F("m_pathLength","pathlength at the point of closest approach;L [mm]", 1000, 0., 12000.); -} - - -void FilterConeHits::processRunHeader( LCRunHeader* ) { - - _nRun++ ; - } - - void FilterConeHits::processEvent( LCEvent * evt ) { - + + streamlog_out(MESSAGE) << "[FilterConeHits] processEvent run=" << evt->getRunNumber() << " evt=" << evt->getEventNumber() << std::endl; + std::cout << "[FilterConeHits] processEvent reached for evt " << evt->getEventNumber() << std::endl; + // --- Check whether the number of input and output collections match if ( m_inputTrackerHitsCollNames.size() != m_inputTrackerSimHitsCollNames.size() || @@ -212,6 +210,8 @@ void FilterConeHits::processEvent( LCEvent * evt ) { continue; } + std::cout << "input hit relations collection: " << inputHitRels[icol] << std::endl; + // reco hit output collections std::string encoderString = inputHitColls[icol]->getParameters().getStringVal( "CellIDEncoding" ); outputTrackerHitColls[icol] = new LCCollectionVec( inputHitColls[icol]->getTypeName() ); @@ -249,6 +249,10 @@ void FilterConeHits::processEvent( LCEvent * evt ) { double part_p = sqrt( part->getMomentum()[0]*part->getMomentum()[0] + part->getMomentum()[1]*part->getMomentum()[1] + part->getMomentum()[2]*part->getMomentum()[2] ); + + std::cout << "[MCP LOOP]: ipart: " << ipart << std::endl; + std::cout << "[MCP LOOP]: pdg " << part->getPDG() << std::endl; + std::cout << "[MCP LOOP]: momentum: " << part->getMomentum()[0] << ", " << part->getMomentum()[1] << ", " << part->getMomentum()[2] << std::endl; HelixClass_double helix; helix.Initialize_VP( (double*) part->getVertex(), (double*) part->getMomentum(), @@ -319,6 +323,8 @@ void FilterConeHits::processEvent( LCEvent * evt ) { for (unsigned int icol=0; icol(inputHitColls[icol]->getElementAt(ihit)); @@ -337,13 +343,41 @@ void FilterConeHits::processEvent( LCEvent * evt ) { hit_new->setTime(hit->getTime()); hit_new->setQuality(hit->getQuality()); + std::cout << std::fixed << std::setprecision(3); + const double* reco_pos = hit->getPosition(); + const auto reco_time = hit->getTime(); + std::cout << "[RECO HIT]: position " << reco_pos[0] << ", " << reco_pos[1] << ", " << reco_pos[2] << std::endl; + std::cout << "[RECO HIT]: time " << reco_time << std::endl; + outputTrackerHitColls[icol]->addElement( hit_new ); + const auto& tos = nav.getRelatedToObjects( hit ); + const auto& ws = nav.getRelatedToWeights( hit ); + + int mc = 0, nullmc = 0; + for (size_t k = 0; k < tos.size(); ++k) { + auto* sim = dynamic_cast( tos[k] ); + bool hasMC = (sim && sim->getMCParticle()); + if (hasMC) ++mc; else ++nullmc; + } + + std::cout << "[per-hit] " << m_inputTrackerHitsCollNames[icol] + << "[" << ihit << "] candidates=" << tos.size() + << " withMC=" << mc << " nullMC=" << nullmc << std::endl; + LCRelation* rel = dynamic_cast(inputHitRels[icol]->getElementAt(ihit)); + auto* fromObj = rel ? rel->getFrom() : nullptr; + auto* toObj = rel ? rel->getTo() : nullptr; + + std::cout << "[align] hits[" << ihit << "]@" << (void*)hit + << " rel[" << ihit << "] from@" << (void*)fromObj + << " to@" << (void*)toObj + << " from==hit? " << (fromObj==hit) << std::endl; SimTrackerHit* simhit = dynamic_cast(rel->getTo()); + SimTrackerHitImpl* simhit_new = new SimTrackerHitImpl(); simhit_new->setCellID0(simhit->getCellID0()); @@ -367,26 +401,36 @@ void FilterConeHits::processEvent( LCEvent * evt ) { rel_new->setTo(simhit_new); rel_new->setWeight(rel->getWeight()); + auto* mcp_sim = simhit->getMCParticle(); + const float* p_sim = simhit->getMomentum(); + const double* sim_pos = simhit->getPosition(); + const auto sim_time = simhit->getTime(); + + std::cout << std::fixed << std::setprecision(3); + std::cout << "[SIM HIT]: position" << sim_pos[0] << ", " << sim_pos[1] << ", " << sim_pos[2] << std::endl; + + std::cout << "[SIM HIT]: mcparticle: " << mcp_sim + <<(mcp_sim ? ("PDG = " + std::to_string(mcp_sim->getPDG())) : "") << "\n"; + std::cout << "[SIM HIT]: momentum: [" << p_sim[0] << ", " << p_sim[1] << ", " << p_sim[2] << "]\n"; + std::cout << "[SIM HIT]: time: " << sim_time << std::endl; + outputTrackerHitRels[icol]->addElement( rel_new ); } // ihit loop - streamlog_out( MESSAGE ) << " " << hits_to_save[icol].size() << " hits added to the collections: " + std::cout << " " << hits_to_save[icol].size() << " hits added to the collections: " << m_outputTrackerHitsCollNames[icol] << ", " << m_outputTrackerSimHitsCollNames[icol] << ", " << m_outputTrackerHitRelNames[icol] << std::endl; + + streamlog_out( MESSAGE ) << " <<>> " << hits_to_save[icol].size() << " hits added to: " << std::endl; + evt->addCollection( outputTrackerHitColls[icol], m_outputTrackerHitsCollNames[icol] ) ; evt->addCollection( outputTrackerSimHitColls[icol], m_outputTrackerSimHitsCollNames[icol] ) ; evt->addCollection( outputTrackerHitRels[icol], m_outputTrackerHitRelNames[icol] ) ; - streamlog_out( DEBUG5 ) << " output collection " << m_outputTrackerHitsCollNames[icol] << " of type " - << outputTrackerHitColls[icol]->getTypeName() << " added to the event \n" - << " output collection " << m_outputTrackerSimHitsCollNames[icol] << " of type " - << outputTrackerSimHitColls[icol]->getTypeName() << " added to the event \n" - << " output collection " << m_outputTrackerHitRelNames[icol] << " of type " - << outputTrackerHitRels[icol]->getTypeName() << " added to the event " - << std::endl ; + std::cout << "output tracker hit rels collection: " << m_outputTrackerHitRelNames[icol] << " at " << outputTrackerHitRels[icol] << " now has " << (outputTrackerHitRels[icol] ? outputTrackerHitRels[icol]->getNumberOfElements() : 0) << " elements " << std::endl; } // icol loop From f5bb4f2ad1be7f4f7dd7f335b25d235d2db529bb Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Fri, 5 Sep 2025 08:25:09 -0500 Subject: [PATCH 5/8] Fixed truth relation matching?! --- source/Utils/src/FilterConeHits.cc | 56 ++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 788461f..22a5350 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -2,6 +2,7 @@ #include #include #include +#include #include @@ -366,19 +367,44 @@ void FilterConeHits::processEvent( LCEvent * evt ) { << " withMC=" << mc << " nullMC=" << nullmc << std::endl; - LCRelation* rel = dynamic_cast(inputHitRels[icol]->getElementAt(ihit)); + //LCRelation* rel = dynamic_cast(inputHitRels[icol]->getElementAt(ihit)); + //SimTrackerHit* simhit = dynamic_cast(rel->getTo()); - auto* fromObj = rel ? rel->getFrom() : nullptr; - auto* toObj = rel ? rel->getTo() : nullptr; + std::vector cands = nav.getRelatedToObjects(hit); + std::vector wts = nav.getRelatedToWeights(hit); - std::cout << "[align] hits[" << ihit << "]@" << (void*)hit - << " rel[" << ihit << "] from@" << (void*)fromObj - << " to@" << (void*)toObj - << " from==hit? " << (fromObj==hit) << std::endl; + SimTrackerHit* simhit = nullptr; + float bestW = -1.0f; + bool bestHasMC = false; - SimTrackerHit* simhit = dynamic_cast(rel->getTo()); + for (size_t k = 0; k < cands.size(); ++k) { + auto* s = dynamic_cast(cands[k]); + if (!s) continue; + const bool hasMC = (s->getMCParticle() != nullptr); + const float w = wts[k]; + + if (hasMC && (!bestHasMC || w > bestW)) { simhit = s; bestW = w; bestHasMC = true; } + else if (!bestHasMC && w > bestW) { simhit = s; bestW = w; } + } + + if (!simhit) { + std::cout << "FAILSAFE: no SimTrackerHit" << std::endl; + continue; + } + + auto* simhit_new = new SimTrackerHitImpl(); + + // auto* fromObj = rel ? rel->getFrom() : nullptr; + // auto* toObj = rel ? rel->getTo() : nullptr; + + // std::cout << "[align] hits[" << ihit << "]@" << (void*)hit + // << " rel[" << ihit << "] from@" << (void*)fromObj + // << " to@" << (void*)toObj + // << " from==hit? " << (fromObj==hit) << std::endl; + + // SimTrackerHit* simhit = dynamic_cast(rel->getTo()); - SimTrackerHitImpl* simhit_new = new SimTrackerHitImpl(); + // SimTrackerHitImpl* simhit_new = new SimTrackerHitImpl(); simhit_new->setCellID0(simhit->getCellID0()); simhit_new->setCellID1(simhit->getCellID1()); @@ -395,11 +421,13 @@ void FilterConeHits::processEvent( LCEvent * evt ) { outputTrackerSimHitColls[icol]->addElement( simhit_new ); - LCRelationImpl* rel_new = new LCRelationImpl(); + // LCRelationImpl* rel_new = new LCRelationImpl(); + auto* rel_new = new LCRelationImpl(hit_new, simhit_new, bestW); + outputTrackerHitRels[icol]->addElement(rel_new); - rel_new->setFrom(hit_new); - rel_new->setTo(simhit_new); - rel_new->setWeight(rel->getWeight()); + // rel_new->setFrom(hit_new); + // rel_new->setTo(simhit_new); + // rel_new->setWeight(rel->getWeight()); auto* mcp_sim = simhit->getMCParticle(); const float* p_sim = simhit->getMomentum(); @@ -414,7 +442,7 @@ void FilterConeHits::processEvent( LCEvent * evt ) { std::cout << "[SIM HIT]: momentum: [" << p_sim[0] << ", " << p_sim[1] << ", " << p_sim[2] << "]\n"; std::cout << "[SIM HIT]: time: " << sim_time << std::endl; - outputTrackerHitRels[icol]->addElement( rel_new ); + // outputTrackerHitRels[icol]->addElement( rel_new ); } // ihit loop From 28252b6346eb3967688e4c2ec440a60a6a22f400 Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Fri, 5 Sep 2025 08:58:32 -0500 Subject: [PATCH 6/8] Fixed reco-sim truth matching. --- source/Utils/src/FilterConeHits.cc | 51 ++---------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 22a5350..06535c6 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -211,7 +211,6 @@ void FilterConeHits::processEvent( LCEvent * evt ) { continue; } - std::cout << "input hit relations collection: " << inputHitRels[icol] << std::endl; // reco hit output collections std::string encoderString = inputHitColls[icol]->getParameters().getStringVal( "CellIDEncoding" ); @@ -251,10 +250,6 @@ void FilterConeHits::processEvent( LCEvent * evt ) { part->getMomentum()[1]*part->getMomentum()[1] + part->getMomentum()[2]*part->getMomentum()[2] ); - std::cout << "[MCP LOOP]: ipart: " << ipart << std::endl; - std::cout << "[MCP LOOP]: pdg " << part->getPDG() << std::endl; - std::cout << "[MCP LOOP]: momentum: " << part->getMomentum()[0] << ", " << part->getMomentum()[1] << ", " << part->getMomentum()[2] << std::endl; - HelixClass_double helix; helix.Initialize_VP( (double*) part->getVertex(), (double*) part->getMomentum(), (double) part->getCharge(), m_magneticField ); @@ -344,11 +339,8 @@ void FilterConeHits::processEvent( LCEvent * evt ) { hit_new->setTime(hit->getTime()); hit_new->setQuality(hit->getQuality()); - std::cout << std::fixed << std::setprecision(3); const double* reco_pos = hit->getPosition(); const auto reco_time = hit->getTime(); - std::cout << "[RECO HIT]: position " << reco_pos[0] << ", " << reco_pos[1] << ", " << reco_pos[2] << std::endl; - std::cout << "[RECO HIT]: time " << reco_time << std::endl; outputTrackerHitColls[icol]->addElement( hit_new ); @@ -362,14 +354,6 @@ void FilterConeHits::processEvent( LCEvent * evt ) { if (hasMC) ++mc; else ++nullmc; } - std::cout << "[per-hit] " << m_inputTrackerHitsCollNames[icol] - << "[" << ihit << "] candidates=" << tos.size() - << " withMC=" << mc << " nullMC=" << nullmc << std::endl; - - - //LCRelation* rel = dynamic_cast(inputHitRels[icol]->getElementAt(ihit)); - //SimTrackerHit* simhit = dynamic_cast(rel->getTo()); - std::vector cands = nav.getRelatedToObjects(hit); std::vector wts = nav.getRelatedToWeights(hit); @@ -394,18 +378,6 @@ void FilterConeHits::processEvent( LCEvent * evt ) { auto* simhit_new = new SimTrackerHitImpl(); - // auto* fromObj = rel ? rel->getFrom() : nullptr; - // auto* toObj = rel ? rel->getTo() : nullptr; - - // std::cout << "[align] hits[" << ihit << "]@" << (void*)hit - // << " rel[" << ihit << "] from@" << (void*)fromObj - // << " to@" << (void*)toObj - // << " from==hit? " << (fromObj==hit) << std::endl; - - // SimTrackerHit* simhit = dynamic_cast(rel->getTo()); - - // SimTrackerHitImpl* simhit_new = new SimTrackerHitImpl(); - simhit_new->setCellID0(simhit->getCellID0()); simhit_new->setCellID1(simhit->getCellID1()); simhit_new->setPosition(simhit->getPosition()); @@ -419,31 +391,14 @@ void FilterConeHits::processEvent( LCEvent * evt ) { simhit_new->setProducedBySecondary(simhit->isProducedBySecondary()); outputTrackerSimHitColls[icol]->addElement( simhit_new ); - - // LCRelationImpl* rel_new = new LCRelationImpl(); auto* rel_new = new LCRelationImpl(hit_new, simhit_new, bestW); outputTrackerHitRels[icol]->addElement(rel_new); - // rel_new->setFrom(hit_new); - // rel_new->setTo(simhit_new); - // rel_new->setWeight(rel->getWeight()); - auto* mcp_sim = simhit->getMCParticle(); const float* p_sim = simhit->getMomentum(); const double* sim_pos = simhit->getPosition(); - const auto sim_time = simhit->getTime(); - - std::cout << std::fixed << std::setprecision(3); - std::cout << "[SIM HIT]: position" << sim_pos[0] << ", " << sim_pos[1] << ", " << sim_pos[2] << std::endl; - - std::cout << "[SIM HIT]: mcparticle: " << mcp_sim - <<(mcp_sim ? ("PDG = " + std::to_string(mcp_sim->getPDG())) : "") << "\n"; - std::cout << "[SIM HIT]: momentum: [" << p_sim[0] << ", " << p_sim[1] << ", " << p_sim[2] << "]\n"; - std::cout << "[SIM HIT]: time: " << sim_time << std::endl; - - // outputTrackerHitRels[icol]->addElement( rel_new ); - + const auto sim_time = simhit->getTime(); } // ihit loop std::cout << " " << hits_to_save[icol].size() << " hits added to the collections: " @@ -457,9 +412,7 @@ void FilterConeHits::processEvent( LCEvent * evt ) { evt->addCollection( outputTrackerHitColls[icol], m_outputTrackerHitsCollNames[icol] ) ; evt->addCollection( outputTrackerSimHitColls[icol], m_outputTrackerSimHitsCollNames[icol] ) ; evt->addCollection( outputTrackerHitRels[icol], m_outputTrackerHitRelNames[icol] ) ; - - std::cout << "output tracker hit rels collection: " << m_outputTrackerHitRelNames[icol] << " at " << outputTrackerHitRels[icol] << " now has " << (outputTrackerHitRels[icol] ? outputTrackerHitRels[icol]->getNumberOfElements() : 0) << " elements " << std::endl; - + } // icol loop streamlog_out(DEBUG) << " processing event: " << evt->getEventNumber() From 950dc6038dfa37277d27b897f3fef3110fbdc989 Mon Sep 17 00:00:00 2001 From: Mira Littmann Date: Fri, 5 Sep 2025 09:15:25 -0500 Subject: [PATCH 7/8] Fixed sim-reco truth matching issues, also warnings. --- source/Utils/src/FilterConeHits.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/Utils/src/FilterConeHits.cc b/source/Utils/src/FilterConeHits.cc index 06535c6..68cd739 100644 --- a/source/Utils/src/FilterConeHits.cc +++ b/source/Utils/src/FilterConeHits.cc @@ -27,6 +27,7 @@ using namespace marlin ; FilterConeHits aFilterConeHits ; void FilterConeHits::processRunHeader( EVENT::LCRunHeader* h ) { + (void)h; _nRun++ ; } @@ -344,8 +345,8 @@ void FilterConeHits::processEvent( LCEvent * evt ) { outputTrackerHitColls[icol]->addElement( hit_new ); - const auto& tos = nav.getRelatedToObjects( hit ); - const auto& ws = nav.getRelatedToWeights( hit ); + std::vector cands = nav.getRelatedToObjects(hit); + std::vector wts = nav.getRelatedToWeights(hit); int mc = 0, nullmc = 0; for (size_t k = 0; k < tos.size(); ++k) { @@ -354,9 +355,6 @@ void FilterConeHits::processEvent( LCEvent * evt ) { if (hasMC) ++mc; else ++nullmc; } - std::vector cands = nav.getRelatedToObjects(hit); - std::vector wts = nav.getRelatedToWeights(hit); - SimTrackerHit* simhit = nullptr; float bestW = -1.0f; bool bestHasMC = false; From a9f77f65e024fce12948eb65c8718eaa2c7d7286 Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Sat, 6 Sep 2025 00:26:00 +0200 Subject: [PATCH 8/8] Update documentation for ConeAroundStatus parameter --- source/Utils/include/FilterConeHits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Utils/include/FilterConeHits.h b/source/Utils/include/FilterConeHits.h index 61107b7..9c968e1 100644 --- a/source/Utils/include/FilterConeHits.h +++ b/source/Utils/include/FilterConeHits.h @@ -24,7 +24,7 @@ using namespace marlin; * @parameter TrackerHitOutputRelations name of the tracker hit relation output collections * @parameter DeltaRCut maximum angular distance between the hits and the particle direction * @parameter FillHistograms flag to fill the diagnostic histograms - * @parameter ConeAroundStatus list of Pythia generator statuses that we can choose to cone around + * @parameter ConeAroundStatus list of generator statuses that we can choose to cone around * * @author M. Casarsa, INFN Trieste * @date 22 January 2021