Skip to content

Commit

Permalink
Comments about particleBank loops
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregtom3 committed May 28, 2024
1 parent fb02933 commit f20edf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace iguana::clas12 {
ShowBank(particleBank, Logger::Header("INPUT PARTICLES"));

// Loop over each photon in the particleBank to classify it
// Here we loop over the particleBank RowList
// This ensures we are only concerned with filtering photons that passed upstream filters
particleBank.getMutableRowList().filter([this, &caloBank, &calo_map, runnum](auto bank, auto row) {
auto pid = bank.getInt("pid", row);
if (pid != 22) return true;
Expand Down Expand Up @@ -145,6 +147,9 @@ namespace iguana::clas12 {

// Build nearest neighbor event structure
// Loop over particles in the event
// Here we loop over particleBank.getRows(), which ignores upstream filters
// This is critical as the GBTs were trained on identifying nearest neighbors for the whole REC::Particle bank
// Only considering nearest neighbor particles that pass upstream filters would call the accuracy of the model into question
for(int inner_row = 0; inner_row < particleBank.getRows(); inner_row++) {
// Skip over the particle if it is photon we are trying to classify
if (inner_row == row) continue;
Expand Down

0 comments on commit f20edf3

Please sign in to comment.