From ce5e4ae815f0b9da2fcf0f30a0d47d7d2f132ec0 Mon Sep 17 00:00:00 2001 From: HANSEO PARK Date: Fri, 10 Jan 2025 15:41:40 +0900 Subject: [PATCH] fix o2-linter --- .../TableProducer/heavyFlavourDefinition.cxx | 2 +- PWGJE/TableProducer/jetTaggerHF.cxx | 4 +-- .../secondaryVertexReconstruction.cxx | 30 +++++++++---------- PWGJE/Tasks/jetTaggerHFQA.cxx | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/PWGJE/TableProducer/heavyFlavourDefinition.cxx b/PWGJE/TableProducer/heavyFlavourDefinition.cxx index 94e316cc722..a0e6176335b 100644 --- a/PWGJE/TableProducer/heavyFlavourDefinition.cxx +++ b/PWGJE/TableProducer/heavyFlavourDefinition.cxx @@ -108,5 +108,5 @@ using JetHfDefinitionCharged = HeavyFlavourDefinitionTask(cfgc, TaskName{"jet-hf-definition-charged"})}; + adaptAnalysisTask(cfgc, TaskName{"jet-hf-definition-charged"})}; // o2-linter: disable=name/o2-task } diff --git a/PWGJE/TableProducer/jetTaggerHF.cxx b/PWGJE/TableProducer/jetTaggerHF.cxx index fb056b418e6..4cffaf6ccdf 100644 --- a/PWGJE/TableProducer/jetTaggerHF.cxx +++ b/PWGJE/TableProducer/jetTaggerHF.cxx @@ -368,6 +368,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-taggerhf-data-charged"}), - adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-taggerhf-mcd-charged"})}; + adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-taggerhf-data-charged"}), // o2-linter: disable=name/o2-task + adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-taggerhf-mcd-charged"})}; // o2-linter: disable=name/o2-task } diff --git a/PWGJE/TableProducer/secondaryVertexReconstruction.cxx b/PWGJE/TableProducer/secondaryVertexReconstruction.cxx index a6f7db097ec..de1b47cb830 100644 --- a/PWGJE/TableProducer/secondaryVertexReconstruction.cxx +++ b/PWGJE/TableProducer/secondaryVertexReconstruction.cxx @@ -9,8 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// Task to produce a SV indices table joinable to the jet tables and 3/2-prong SV for hf jet tagging -// +/// \file secondaryVertexReconstruction.cxx +/// \brief Task to produce a SV indices table joinable to the jet tables and 3/2-prong SV for hf jet tagging /// \author Hadi Hassan #include @@ -272,12 +272,12 @@ struct SecondaryVertexReconstruction { // fill histograms if (fillHistograms) { - double DecayLengthNormalised = RecoDecay::distance(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, std::array{secondaryVertex[0], secondaryVertex[1], secondaryVertex[2]}) / errorDecayLength; - double DecayLengthXYNormalised = RecoDecay::distanceXY(std::array{primaryVertex.getX(), primaryVertex.getY()}, std::array{secondaryVertex[0], secondaryVertex[1]}) / errorDecayLengthXY; + double decayLengthNormalised = RecoDecay::distance(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, std::array{secondaryVertex[0], secondaryVertex[1], secondaryVertex[2]}) / errorDecayLength; + double decayLengthXYNormalised = RecoDecay::distanceXY(std::array{primaryVertex.getX(), primaryVertex.getY()}, std::array{secondaryVertex[0], secondaryVertex[1]}) / errorDecayLengthXY; registry.fill(HIST("hMassNProngs"), massSV, numProngs); - registry.fill(HIST("hLxySNProngs"), DecayLengthXYNormalised, numProngs); - registry.fill(HIST("hLSNProngs"), DecayLengthNormalised, numProngs); + registry.fill(HIST("hLxySNProngs"), decayLengthXYNormalised, numProngs); + registry.fill(HIST("hLSNProngs"), decayLengthNormalised, numProngs); registry.fill(HIST("hFeNProngs"), energySV / analysisJet.energy() > 1. ? 0.99 : energySV / analysisJet.energy(), numProngs); } @@ -306,7 +306,7 @@ struct SecondaryVertexReconstruction { void processData3Prongs(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& jets, JetTracksData const& tracks, OriginalTracks const& /*tracks*/, aod::BCsWithTimestamps const& /*bcWithTimeStamps*/) { - for (auto& jet : jets) { + for (const auto& jet : jets) { std::vector svIndices; runCreatorNProng<3, false>(collision.template collision_as(), jet, tracks, svIndices, df3); sv3prongIndicesTableData(svIndices); @@ -316,7 +316,7 @@ struct SecondaryVertexReconstruction { void processData3ProngsExternalMagneticField(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& jets, JetTracksData const& tracks, OriginalTracks const& /*tracks*/) { - for (auto& jet : jets) { + for (const auto& jet : jets) { std::vector svIndices; runCreatorNProng<3, true>(collision.template collision_as(), jet, tracks, svIndices, df3); sv3prongIndicesTableData(svIndices); @@ -326,7 +326,7 @@ struct SecondaryVertexReconstruction { void processData2Prongs(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& jets, JetTracksData const& tracks, OriginalTracks const& /*tracks*/, aod::BCsWithTimestamps const& /*bcWithTimeStamps*/) { - for (auto& jet : jets) { + for (const auto& jet : jets) { std::vector svIndices; runCreatorNProng<2, false>(collision.template collision_as(), jet, tracks, svIndices, df2); sv2prongIndicesTableData(svIndices); @@ -336,7 +336,7 @@ struct SecondaryVertexReconstruction { void processData2ProngsExternalMagneticField(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& jets, JetTracksData const& tracks, OriginalTracks const& /*tracks*/) { - for (auto& jet : jets) { + for (const auto& jet : jets) { std::vector svIndices; runCreatorNProng<2, true>(collision.template collision_as(), jet, tracks, svIndices, df2); sv2prongIndicesTableData(svIndices); @@ -346,7 +346,7 @@ struct SecondaryVertexReconstruction { void processMCD3Prongs(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& mcdjets, JetTracksMCDwPIs const& tracks, OriginalTracks const& /*tracks*/, aod::BCsWithTimestamps const& /*bcWithTimeStamps*/) { - for (auto& jet : mcdjets) { + for (const auto& jet : mcdjets) { std::vector svIndices; runCreatorNProng<3, false>(collision.template collision_as(), jet, tracks, svIndices, df3); sv3prongIndicesTableMCD(svIndices); @@ -356,7 +356,7 @@ struct SecondaryVertexReconstruction { void processMCD3ProngsExternalMagneticField(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& mcdjets, JetTracksMCDwPIs const& tracks, OriginalTracks const& /*tracks*/) { - for (auto& jet : mcdjets) { + for (const auto& jet : mcdjets) { std::vector svIndices; runCreatorNProng<3, true>(collision.template collision_as(), jet, tracks, svIndices, df3); sv3prongIndicesTableMCD(svIndices); @@ -366,7 +366,7 @@ struct SecondaryVertexReconstruction { void processMCD2Prongs(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& mcdjets, JetTracksMCDwPIs const& tracks, OriginalTracks const& /*tracks*/, aod::BCsWithTimestamps const& /*bcWithTimeStamps*/) { - for (auto& jet : mcdjets) { + for (const auto& jet : mcdjets) { std::vector svIndices; runCreatorNProng<2, false>(collision.template collision_as(), jet, tracks, svIndices, df2); sv2prongIndicesTableMCD(svIndices); @@ -376,7 +376,7 @@ struct SecondaryVertexReconstruction { void processMCD2ProngsExternalMagneticField(JetCollisionwPIs::iterator const& collision, aod::Collisions const& /*realColl*/, soa::Join const& mcdjets, JetTracksMCDwPIs const& tracks, OriginalTracks const& /*tracks*/) { - for (auto& jet : mcdjets) { + for (const auto& jet : mcdjets) { std::vector svIndices; runCreatorNProng<2, true>(collision.template collision_as(), jet, tracks, svIndices, df2); sv2prongIndicesTableMCD(svIndices); @@ -387,5 +387,5 @@ struct SecondaryVertexReconstruction { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"jet-sv-reconstruction-charged"})}; + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"jet-sv-reconstruction-charged"})}; // o2-linter: disable=name/o2-task } diff --git a/PWGJE/Tasks/jetTaggerHFQA.cxx b/PWGJE/Tasks/jetTaggerHFQA.cxx index 5ee019e4ff4..9204b5778c2 100644 --- a/PWGJE/Tasks/jetTaggerHFQA.cxx +++ b/PWGJE/Tasks/jetTaggerHFQA.cxx @@ -1592,5 +1592,5 @@ using JetTaggerhfQACharged = JetTaggerHFQA(cfgc, TaskName{"jet-taggerhf-qa-charged"})}; + adaptAnalysisTask(cfgc, TaskName{"jet-taggerhf-qa-charged"})}; // o2-linter: disable=name/o2-task }