Skip to content

Commit 07ae072

Browse files
author
Changhwan Choi
committed
Resolved MegaLinter
1 parent 4fc0817 commit 07ae072

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

PWGJE/Tasks/bjetTaggingGnn.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Common/DataModel/EventSelection.h"
2828

2929
#include <CCDB/BasicCCDBManager.h>
30+
#include <CommonConstants/MathConstants.h>
3031
#include <Framework/ASoA.h>
3132
#include <Framework/AnalysisDataModel.h>
3233
#include <Framework/AnalysisHelpers.h>
@@ -237,7 +238,7 @@ struct BjetTaggingGnn {
237238
std::vector<int> eventSelectionBitsSel8Full;
238239
std::vector<int> eventSelectionBitsSel8FullGood;
239240

240-
int trackSelectionBits;
241+
int trackSelectionBits{};
241242

242243
std::vector<double> jetRadiiValues;
243244

@@ -393,7 +394,7 @@ struct BjetTaggingGnn {
393394
// h_jetEta/h_jetPhi/h_jetMass/h_Db/h2_nTracks_Db don't depend on jet pT - one shared copy regardless of
394395
// `withSub` (see addCoreJetHistograms()'s comment above).
395396
registry.add("h_jetEta", "", {HistType::kTH1F, {axisJetEta}}, callSumw2);
396-
registry.add("h_jetPhi", "", {HistType::kTH1F, {{200, 0., 2. * M_PI, "#it{phi}_{jet}"}}});
397+
registry.add("h_jetPhi", "", {HistType::kTH1F, {{200, 0., o2::constants::math::TwoPI, "#it{phi}_{jet}"}}});
397398
registry.add("h_jetMass", "", {HistType::kTH1F, {axisJetMass}});
398399
registry.add("h_Db", "", {HistType::kTH1F, {axisDbFine}});
399400
registry.add("h2_nTracks_Db", "", {HistType::kTH2F, {axisNTracks, axisDb}});
@@ -404,7 +405,7 @@ struct BjetTaggingGnn {
404405
}
405406

406407
registry.add("h_gnnfeat_trackpT", "", {HistType::kTH1F, {{200, 0., 100., "#it{p}_{T} (GeV/#it{c})"}}});
407-
registry.add("h_gnnfeat_trackPhi", "", {HistType::kTH1F, {{200, 0., 2. * M_PI, "#it{#phi}"}}});
408+
registry.add("h_gnnfeat_trackPhi", "", {HistType::kTH1F, {{200, 0., o2::constants::math::TwoPI, "#it{#phi}"}}});
408409
registry.add("h_gnnfeat_trackEta", "", {HistType::kTH1F, {{200, -0.9, 0.9, "#it{#eta}"}}});
409410
registry.add("h_gnnfeat_trackCharge", "", {HistType::kTH1F, {{3, -1., 2., "#it{q}"}}});
410411
registry.add("h_gnnfeat_trackDCAxy", "", {HistType::kTH1F, {{200, -5., 5., "DCA_{#it{xy}} (cm)"}}});
@@ -422,7 +423,7 @@ struct BjetTaggingGnn {
422423
if (doprocessDataTracks || doprocessMCDTracks) {
423424
registry.add("h_trackpT", "", {HistType::kTH1F, {axisTrackpT}}, callSumw2);
424425
registry.add("h_tracketa", "", {HistType::kTH1F, {{100, trackEtaMin, trackEtaMax, "#it{#eta}"}}}, callSumw2);
425-
registry.add("h_trackphi", "", {HistType::kTH1F, {{100, 0.0, 2.0 * M_PI, "#it{#phi}"}}}, callSumw2);
426+
registry.add("h_trackphi", "", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI, "#it{#phi}"}}}, callSumw2);
426427
registry.add("h_dcaXY", "", {HistType::kTH1F, {{200, 0., 4., "|DCA_{#it{xy}}| (cm)"}}}, callSumw2);
427428
registry.add("h_dcaZ", "", {HistType::kTH1F, {{200, 0., 4., "|DCA_{#it{z}}| (cm)"}}}, callSumw2);
428429
registry.add("hSparse_dca_pt", "", {HistType::kTHnSparseF, {{1000, 0., 100., "#it{p}_{T} (GeV/#it{c})"}, {200, 0., 4., "|DCA_{#it{z}}| (cm)"}, {200, 0., 4., "|DCA_{#it{xy}}| (cm)"}}}, callSumw2);
@@ -703,7 +704,7 @@ struct BjetTaggingGnn {
703704
bool isAcceptedJet(AnalysisJet const& jet)
704705
{
705706
if (jetAreaFractionMin > largeNegativeNumber) {
706-
if (jet.area() < jetAreaFractionMin * M_PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
707+
if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
707708
return false;
708709
}
709710
}
@@ -888,6 +889,7 @@ struct BjetTaggingGnn {
888889
// jetFlavor: JetTaggingSpecies of the jet; nTracks: number of GNN-input constituents (reused by fillMCDJetHistogramsSV()).
889890
struct JetHistFillResult {
890891
int8_t jetFlavor;
892+
// cppcheck-suppress unusedStructMember
891893
int nTracks;
892894
};
893895

0 commit comments

Comments
 (0)