Skip to content

Commit 7c1d718

Browse files
authored
[PWGLF] Fix cast of TH2 from ccdb file (#17967)
1 parent e6d0e9e commit 7c1d718

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ struct HadronNucleiCorrelation {
171171
std::vector<std::shared_ptr<TH3>> hCorrEtaPhiMixdEv;
172172

173173
int nBinspT = 0;
174-
TH2F* hEffPtEtaProton = nullptr;
175-
TH2F* hEffPtEtaAntiProton = nullptr;
176-
TH2F* hEffPtEtaDeuteron = nullptr;
177-
TH2F* hEffPtEtaAntiDeuteron = nullptr;
174+
TH2* hEffPtEtaProton = nullptr;
175+
TH2* hEffPtEtaAntiProton = nullptr;
176+
TH2* hEffPtEtaDeuteron = nullptr;
177+
TH2* hEffPtEtaAntiDeuteron = nullptr;
178178
bool correctionsLoaded = false; // true only if all four efficiency histograms above were retrieved successfully
179179

180180
// Generated-level pairing: PDG codes of the two species selected by `mode` (set in init)
@@ -686,22 +686,22 @@ struct HadronNucleiCorrelation {
686686
LOGP(error, "Could not open corrections file {}", Form("%s", filepath.Data()));
687687
return;
688688
}
689-
hEffPtEtaProton = dynamic_cast<TH2F*>(l->FindObject(Form("%s_proton", histname.Data())));
689+
hEffPtEtaProton = dynamic_cast<TH2*>(l->FindObject(Form("%s_proton", histname.Data())));
690690
if (!hEffPtEtaProton) {
691691
LOGP(error, "Could not open histogram {}", Form("%s_proton", histname.Data()));
692692
return;
693693
}
694-
hEffPtEtaAntiProton = dynamic_cast<TH2F*>(l->FindObject(Form("%s_antiproton", histname.Data())));
694+
hEffPtEtaAntiProton = dynamic_cast<TH2*>(l->FindObject(Form("%s_antiproton", histname.Data())));
695695
if (!hEffPtEtaAntiProton) {
696696
LOGP(error, "Could not open histogram {}", Form("%s_antiproton", histname.Data()));
697697
return;
698698
}
699-
hEffPtEtaDeuteron = dynamic_cast<TH2F*>(l->FindObject(Form("%s_deuteron", histname.Data())));
699+
hEffPtEtaDeuteron = dynamic_cast<TH2*>(l->FindObject(Form("%s_deuteron", histname.Data())));
700700
if (!hEffPtEtaDeuteron) {
701701
LOGP(error, "Could not open histogram {}", Form("%s_deuteron", histname.Data()));
702702
return;
703703
}
704-
hEffPtEtaAntiDeuteron = dynamic_cast<TH2F*>(l->FindObject(Form("%s_antideuteron", histname.Data())));
704+
hEffPtEtaAntiDeuteron = dynamic_cast<TH2*>(l->FindObject(Form("%s_antideuteron", histname.Data())));
705705
if (!hEffPtEtaAntiDeuteron) {
706706
LOGP(error, "Could not open histogram {}", Form("%s_antideuteron", histname.Data()));
707707
return;

0 commit comments

Comments
 (0)