From d653df99dd4a0c3cab892396ae5206839fee1dfb Mon Sep 17 00:00:00 2001 From: Sebouh Paul Date: Wed, 31 Jul 2024 11:36:16 -0400 Subject: [PATCH] ImagingTopoCluster: fix Init printouts by adding missing break statements (#1533) Fixed an issue where "break" is not included in a case/break statement. ### Briefly, what does this PR introduce? When initializing the ImagingTopoCluster algorithm, there is a switch statement wherein different things are printed to inform the user what the parameters are (depending on the layer mode). This lacked breaks for the cases, causing the other print statements to be executed. This patch fixes it. ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? no. no ### Does this PR change default behavior? yes. only prints out the information about the cuts for defining neighbors that is relevent based on the layer mode. --------- Co-authored-by: Dmitry Kalinkin --- src/algorithms/calorimetry/ImagingTopoCluster.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/algorithms/calorimetry/ImagingTopoCluster.h b/src/algorithms/calorimetry/ImagingTopoCluster.h index a2ce8091fc..c68130181c 100644 --- a/src/algorithms/calorimetry/ImagingTopoCluster.h +++ b/src/algorithms/calorimetry/ImagingTopoCluster.h @@ -103,12 +103,13 @@ namespace eicrecon { "Global [eta, phi] distance between hits <= [{:.4f}, {:.4f} rad].", m_cfg.neighbourLayersRange, layerDistEtaPhi[0], layerDistEtaPhi[1] ); - + break; case ImagingTopoClusterConfig::ELayerMode::xy: info("Neighbour layers clustering (same sector and layer id within +- {:d}: " "Local [x, y] distance between hits <= [{:.4f}, {:.4f} rad].", m_cfg.neighbourLayersRange, layerDistXY[0], layerDistXY[1] ); + break; default: error("Unknown layer mode."); }