Skip to content
Snippets Groups Projects
Commit 1067a6aa authored by Adrian Meyer-Ahrens's avatar Adrian Meyer-Ahrens
Browse files

Change TH2D to TH2F since input histograms are TH2F

parent 8827e456
No related branches found
No related tags found
1 merge request!953TRD Likelihood Method: Fix histograms not being loaded properly
......@@ -93,7 +93,7 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
gROOT->cd();
TH2D* h[10];
TH2F* h[10];
TObjArray* inArr = nullptr;
if (fMCinput) { /// mc pid method
......@@ -102,7 +102,7 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
"MC_muon_p_eloss"};
inArr = new TObjArray(histnames.size());
for (size_t i = 0; i < histnames.size(); i++) {
h[i] = histFile->Get<TH2D>(histnames[i]);
h[i] = histFile->Get<TH2F>(histnames[i]);
if (!h[i]) {
LOG(info) << "No input histogram " << histnames[i].Data();
continue;
......@@ -128,7 +128,7 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
"MC_muon_eloss"};
inArr = new TObjArray(histnames.size());
for (size_t i = 0; i < histnames.size(); i++) {
h[i] = histFile->Get<TH2D>(histnames[i]);
h[i] = histFile->Get<TH2F>(histnames[i]);
if (!h[i]) {
LOG(info) << "No input histogram " << histnames[i].Data();
continue;
......@@ -150,7 +150,7 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
"ELE_proton_p_eloss", "ELE_muon_p_eloss"};
inArr = new TObjArray(histnames.size());
for (size_t i = 0; i < histnames.size(); i++) {
h[i] = histFile->Get<TH2D>(histnames[i]);
h[i] = histFile->Get<TH2F>(histnames[i]);
h[i]->SetNameTitle(histnames[i], histnames[i]);
if (!h[i]) {
LOG(info) << "No input histogram " << histnames[i].Data();
......@@ -177,7 +177,7 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
"ELE_muon_eloss"};
inArr = new TObjArray(histnames.size());
for (size_t i = 0; i < histnames.size(); i++) {
h[i] = histFile->Get<TH2D>(histnames[i]);
h[i] = histFile->Get<TH2F>(histnames[i]);
if (!h[i]) {
LOG(info) << "No input histogram " << histnames[i].Data();
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment