Skip to content

Commit 46daa17

Browse files
O2 linter wants UpperCamelCase for the enum type name
1 parent 3b170e6 commit 46daa17

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct HfTaskDstarToD0Pi {
8383
std::vector<TH1D*> hWeights;
8484
int const nWeights = 2; // prompt and non-prompt weights
8585
std::vector<std::string> const weightHistNames = {"promptWeightVsPt", "nonPromptWeightVsPt"};
86-
enum weightType {
86+
enum WeightType {
8787
Prompt = 0,
8888
NonPrompt = 1
8989
};
@@ -369,27 +369,27 @@ struct HfTaskDstarToD0Pi {
369369
// Ensure hWeights is properly sized
370370
hWeights.resize(nWeights); // prompt and non-prompt
371371

372-
hWeights[weightType::Prompt] = dynamic_cast<TH1D*>(weightFile->Get(weightHistNames[weightType::Prompt].c_str()));
373-
hWeights[weightType::NonPrompt] = dynamic_cast<TH1D*>(weightFile->Get(weightHistNames[weightType::NonPrompt].c_str()));
374-
if (hWeights[weightType::Prompt] == nullptr) {
375-
LOGF(fatal, "Histogram %s not found in weight file!", weightHistNames[weightType::Prompt].c_str());
372+
hWeights[WeightType::Prompt] = dynamic_cast<TH1D*>(weightFile->Get(weightHistNames[WeightType::Prompt].c_str()));
373+
hWeights[WeightType::NonPrompt] = dynamic_cast<TH1D*>(weightFile->Get(weightHistNames[WeightType::NonPrompt].c_str()));
374+
if (hWeights[WeightType::Prompt] == nullptr) {
375+
LOGF(fatal, "Histogram %s not found in weight file!", weightHistNames[WeightType::Prompt].c_str());
376376
return;
377377
}
378-
if (hWeights[weightType::NonPrompt] == nullptr) {
379-
LOGF(fatal, "Histogram %s not found in weight file!", weightHistNames[weightType::NonPrompt].c_str());
378+
if (hWeights[WeightType::NonPrompt] == nullptr) {
379+
LOGF(fatal, "Histogram %s not found in weight file!", weightHistNames[WeightType::NonPrompt].c_str());
380380
return;
381381
}
382382
// checking if bin wdith of weight histograms are not finner than pT axis of Dstar
383-
if (hWeights[weightType::Prompt]->GetXaxis()->GetBinWidth(1) >= vecPtBins[1] - vecPtBins[0]) {
383+
if (hWeights[WeightType::Prompt]->GetXaxis()->GetBinWidth(1) >= vecPtBins[1] - vecPtBins[0]) {
384384
LOGF(fatal, "Bin width of weight histogram should be finer than pT axis of Dstar!");
385385
return;
386386
}
387-
if (hWeights[weightType::NonPrompt]->GetXaxis()->GetBinWidth(1) >= vecPtBins[1] - vecPtBins[0]) {
387+
if (hWeights[WeightType::NonPrompt]->GetXaxis()->GetBinWidth(1) >= vecPtBins[1] - vecPtBins[0]) {
388388
LOGF(fatal, "Bin width of weight histogram should be finer than pT axis of Dstar!");
389389
return;
390390
}
391-
hWeights[weightType::Prompt]->SetDirectory(nullptr);
392-
hWeights[weightType::NonPrompt]->SetDirectory(nullptr);
391+
hWeights[WeightType::Prompt]->SetDirectory(nullptr);
392+
hWeights[WeightType::NonPrompt]->SetDirectory(nullptr);
393393

394394
weightFile->Close();
395395
delete weightFile;
@@ -576,8 +576,8 @@ struct HfTaskDstarToD0Pi {
576576
LOGF(fatal, "Weight histograms are not initialized or empty. Check CCDB path or weight file.");
577577
return;
578578
}
579-
ptShapeWeightValues[weightType::Prompt] = hWeights[weightType::Prompt]->GetBinContent(hWeights[weightType::Prompt]->FindBin(ptDstarRecSig));
580-
ptShapeWeightValues[weightType::NonPrompt] = hWeights[weightType::NonPrompt]->GetBinContent(hWeights[weightType::NonPrompt]->FindBin(ptMother));
579+
ptShapeWeightValues[WeightType::Prompt] = hWeights[WeightType::Prompt]->GetBinContent(hWeights[WeightType::Prompt]->FindBin(ptDstarRecSig));
580+
ptShapeWeightValues[WeightType::NonPrompt] = hWeights[WeightType::NonPrompt]->GetBinContent(hWeights[WeightType::NonPrompt]->FindBin(ptMother));
581581
}
582582

583583
if (qaEnabled) {
@@ -589,9 +589,9 @@ struct HfTaskDstarToD0Pi {
589589
auto bdtScore = candDstarMcRec.mlProbDstarToD0Pi();
590590
registry.fill(HIST("Efficiency/hPtVsCentVsBDTScoreVsPvContribRecSig"), ptDstarRecSig, centrality, bdtScore[0], bdtScore[1], bdtScore[2], nPVContributors, weightValue);
591591
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
592-
registry.fill(HIST("Efficiency/hPtPromptVsCentVsBDTScorePvContribRecSig"), ptDstarRecSig, centrality, bdtScore[0], bdtScore[1], bdtScore[2], nPVContributors, ptShapeWeightValues[weightType::Prompt]);
592+
registry.fill(HIST("Efficiency/hPtPromptVsCentVsBDTScorePvContribRecSig"), ptDstarRecSig, centrality, bdtScore[0], bdtScore[1], bdtScore[2], nPVContributors, ptShapeWeightValues[WeightType::Prompt]);
593593
} else if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::NonPrompt) {
594-
registry.fill(HIST("Efficiency/hPtNonPrompRectVsCentVsBDTScorePvContribRecSig"), ptDstarRecSig, centrality, bdtScore[0], bdtScore[1], bdtScore[2], nPVContributors, ptShapeWeightValues[weightType::NonPrompt]);
594+
registry.fill(HIST("Efficiency/hPtNonPrompRectVsCentVsBDTScorePvContribRecSig"), ptDstarRecSig, centrality, bdtScore[0], bdtScore[1], bdtScore[2], nPVContributors, ptShapeWeightValues[WeightType::NonPrompt]);
595595
}
596596
if (ptShapeStudy && !useWeightOnline) {
597597
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
@@ -604,9 +604,9 @@ struct HfTaskDstarToD0Pi {
604604
auto bdtScore = candDstarMcRec.mlProbDstarToD0Pi();
605605
registry.fill(HIST("Efficiency/hPtVsBDTScoreRecSig"), ptDstarRecSig, bdtScore[0], bdtScore[1], bdtScore[2], weightValue);
606606
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
607-
registry.fill(HIST("Efficiency/hPtPromptVsBDTScoreRecSig"), ptDstarRecSig, bdtScore[0], bdtScore[1], bdtScore[2], ptShapeWeightValues[weightType::Prompt]);
607+
registry.fill(HIST("Efficiency/hPtPromptVsBDTScoreRecSig"), ptDstarRecSig, bdtScore[0], bdtScore[1], bdtScore[2], ptShapeWeightValues[WeightType::Prompt]);
608608
} else if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::NonPrompt) {
609-
registry.fill(HIST("Efficiency/hPtNonPromptVsBDTScoreRecSig"), ptDstarRecSig, bdtScore[0], bdtScore[1], bdtScore[2], ptShapeWeightValues[weightType::NonPrompt]);
609+
registry.fill(HIST("Efficiency/hPtNonPromptVsBDTScoreRecSig"), ptDstarRecSig, bdtScore[0], bdtScore[1], bdtScore[2], ptShapeWeightValues[WeightType::NonPrompt]);
610610
}
611611
if (ptShapeStudy && !useWeightOnline) {
612612
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
@@ -620,9 +620,9 @@ struct HfTaskDstarToD0Pi {
620620
if (isCentStudy) {
621621
registry.fill(HIST("Efficiency/hPtVsCentVsPvContribRecSig"), ptDstarRecSig, centrality, nPVContributors, weightValue);
622622
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
623-
registry.fill(HIST("Efficiency/hPtPromptVsCentVsPvContribRecSig"), ptDstarRecSig, centrality, nPVContributors, ptShapeWeightValues[weightType::Prompt]);
623+
registry.fill(HIST("Efficiency/hPtPromptVsCentVsPvContribRecSig"), ptDstarRecSig, centrality, nPVContributors, ptShapeWeightValues[WeightType::Prompt]);
624624
} else if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::NonPrompt) {
625-
registry.fill(HIST("Efficiency/hPtNonPromptVsCentVsPvContribRecSig"), ptDstarRecSig, centrality, nPVContributors, ptShapeWeightValues[weightType::NonPrompt]);
625+
registry.fill(HIST("Efficiency/hPtNonPromptVsCentVsPvContribRecSig"), ptDstarRecSig, centrality, nPVContributors, ptShapeWeightValues[WeightType::NonPrompt]);
626626
}
627627
if (ptShapeStudy && !useWeightOnline) {
628628
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
@@ -634,9 +634,9 @@ struct HfTaskDstarToD0Pi {
634634
} else {
635635
registry.fill(HIST("Efficiency/hPtVsPvContribRecSig"), ptDstarRecSig, nPVContributors, weightValue);
636636
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
637-
registry.fill(HIST("Efficiency/hPtPromptVsPvContribRecSig"), ptDstarRecSig, nPVContributors, ptShapeWeightValues[weightType::Prompt]);
637+
registry.fill(HIST("Efficiency/hPtPromptVsPvContribRecSig"), ptDstarRecSig, nPVContributors, ptShapeWeightValues[WeightType::Prompt]);
638638
} else if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::NonPrompt) {
639-
registry.fill(HIST("Efficiency/hPtNonPromptVsPvContribRecSig"), ptDstarRecSig, nPVContributors, ptShapeWeightValues[weightType::NonPrompt]);
639+
registry.fill(HIST("Efficiency/hPtNonPromptVsPvContribRecSig"), ptDstarRecSig, nPVContributors, ptShapeWeightValues[WeightType::NonPrompt]);
640640
}
641641
if (ptShapeStudy && !useWeightOnline) {
642642
if (candDstarMcRec.originMcRec() == RecoDecay::OriginType::Prompt) {
@@ -790,8 +790,8 @@ struct HfTaskDstarToD0Pi {
790790
LOGF(fatal, "Weight histograms are not initialized or empty. Check CCDB path or weight file.");
791791
return;
792792
}
793-
ptShapeWeightValues[weightType::Prompt] = hWeights[weightType::Prompt]->GetBinContent(hWeights[weightType::Prompt]->FindBin(ptGen));
794-
ptShapeWeightValues[weightType::NonPrompt] = hWeights[weightType::NonPrompt]->GetBinContent(hWeights[weightType::NonPrompt]->FindBin(ptBMother));
793+
ptShapeWeightValues[WeightType::Prompt] = hWeights[WeightType::Prompt]->GetBinContent(hWeights[WeightType::Prompt]->FindBin(ptGen));
794+
ptShapeWeightValues[WeightType::NonPrompt] = hWeights[WeightType::NonPrompt]->GetBinContent(hWeights[WeightType::NonPrompt]->FindBin(ptBMother));
795795
}
796796

797797
registry.fill(HIST("Efficiency/hPtVsYDstarGen"), ptGen, yGen, weightValue);
@@ -806,20 +806,20 @@ struct HfTaskDstarToD0Pi {
806806

807807
// Prompt
808808
if (mcParticle.originMcGen() == RecoDecay::OriginType::Prompt) {
809-
registry.fill(HIST("Efficiency/hPtVsYPromptDstarGen"), ptGen, yGen, ptShapeWeightValues[weightType::Prompt]);
809+
registry.fill(HIST("Efficiency/hPtVsYPromptDstarGen"), ptGen, yGen, ptShapeWeightValues[WeightType::Prompt]);
810810
if (isCentStudy) {
811-
registry.fill(HIST("Efficiency/hPtPromptVsCentVsPvContribGen"), ptGen, centFT0MGen, pvContributors, ptShapeWeightValues[weightType::Prompt]);
811+
registry.fill(HIST("Efficiency/hPtPromptVsCentVsPvContribGen"), ptGen, centFT0MGen, pvContributors, ptShapeWeightValues[WeightType::Prompt]);
812812
} else {
813-
registry.fill(HIST("Efficiency/hPtPromptVsGen"), ptGen, ptShapeWeightValues[weightType::Prompt]);
813+
registry.fill(HIST("Efficiency/hPtPromptVsGen"), ptGen, ptShapeWeightValues[WeightType::Prompt]);
814814
}
815815
// Non-Prompt
816816
} else if (mcParticle.originMcGen() == RecoDecay::OriginType::NonPrompt) {
817-
registry.fill(HIST("Efficiency/hPtVsYNonPromptDstarGen"), ptGen, yGen, ptShapeWeightValues[weightType::NonPrompt]);
817+
registry.fill(HIST("Efficiency/hPtVsYNonPromptDstarGen"), ptGen, yGen, ptShapeWeightValues[WeightType::NonPrompt]);
818818
if (isCentStudy) {
819-
registry.fill(HIST("Efficiency/hPtNonPromptVsCentVsPvContribGen"), ptGen, centFT0MGen, pvContributors, ptShapeWeightValues[weightType::NonPrompt]);
819+
registry.fill(HIST("Efficiency/hPtNonPromptVsCentVsPvContribGen"), ptGen, centFT0MGen, pvContributors, ptShapeWeightValues[WeightType::NonPrompt]);
820820

821821
} else {
822-
registry.fill(HIST("Efficiency/hPtNonPromptVsGen"), ptGen, ptShapeWeightValues[weightType::NonPrompt]);
822+
registry.fill(HIST("Efficiency/hPtNonPromptVsGen"), ptGen, ptShapeWeightValues[WeightType::NonPrompt]);
823823
}
824824
}
825825
if (ptShapeStudy && !useWeightOnline) {

0 commit comments

Comments
 (0)