From: hristov Date: Wed, 30 Oct 2013 17:09:30 +0000 (+0000) Subject: Changes for Root6: removing obsolete TH1 functions, corrected EINCLUDE, additional... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=b8f92f9dec22bca57816e5765e3216b63199ae46 Changes for Root6: removing obsolete TH1 functions, corrected EINCLUDE, additional std::cout, std::endl --- diff --git a/MUON/AliMUONClusterFinderMLEM.cxx b/MUON/AliMUONClusterFinderMLEM.cxx index 55b4799033a..58019ef92e8 100644 --- a/MUON/AliMUONClusterFinderMLEM.cxx +++ b/MUON/AliMUONClusterFinderMLEM.cxx @@ -675,17 +675,17 @@ void AliMUONClusterFinderMLEM::BuildPixArrayOneCathode(AliMUONCluster& cluster) for (Int_t i = 1; i <= nbins[0]; ++i) { Double_t x = xaxis->GetBinCenter(i); for (Int_t j = 1; j <= nbins[1]; ++j) { - if (hist2->GetCellContent(i,j) < 0.1) continue; - //if (hist2->GetCellContent(i,j) < 1.1 && cluster.Multiplicity(0) && + if (hist2->GetBinContent(hist2->GetBin(i,j)) < 0.1) continue; + //if (hist2->GetBinContent(hist2->GetBin(i,j)) < 1.1 && cluster.Multiplicity(0) && // cluster.Multiplicity(1)) continue; if (cath0 != cath1) { // Two-sided cluster - Double_t cont = hist2->GetCellContent(i,j); + Double_t cont = hist2->GetBinContent(hist2->GetBin(i,j)); if (cont < 999.) continue; if (cont-Int_t(cont/1000.)*1000. < 0.5) continue; } Double_t y = yaxis->GetBinCenter(j); - Double_t charge = hist1->GetCellContent(i,j); + Double_t charge = hist1->GetBinContent(hist1->GetBin(i,j)); AliMUONPad* pixPtr = new AliMUONPad(x, y, width[0], width[1], charge); fPixArray->Add(pixPtr); } @@ -726,11 +726,11 @@ void AliMUONClusterFinderMLEM::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, Ali else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.1) - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont); - hist1->SetCellContent(ix0, ixy, cont); - //hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+1); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.1) + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont); + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + //hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+1); + hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+amask); } } @@ -743,11 +743,11 @@ void AliMUONClusterFinderMLEM::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, Ali else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.1) - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont); - hist1->SetCellContent(ix0, ixy, cont); - //hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+1); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.1) + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont); + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + //hist2->SetBinContent(hist1->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+1); + hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+amask); } } } @@ -1237,7 +1237,7 @@ void AliMUONClusterFinderMLEM::FindCOG(Double_t *xyc) for (Int_t i = TMath::Max(1,iymax-1); i <= ie; ++i) { y = fHistMlem->GetYaxis()->GetBinCenter(i); for (Int_t j = TMath::Max(1,ixmax-1); j <= je; ++j) { - cont = fHistMlem->GetCellContent(j,i); + cont = fHistMlem->GetBinContent(fHistMlem->GetBin(j,i)); if (cont < thresh) continue; if (i != i1) {i1 = i; nsumy++;} if (j != j1) {j1 = j; nsumx++;} @@ -1257,7 +1257,7 @@ void AliMUONClusterFinderMLEM::FindCOG(Double_t *xyc) for (Int_t i = TMath::Max(1,iymax-1); i <= ie; ++i) { if (i == iymax) continue; for (Int_t j = TMath::Max(1,ixmax-1); j <= je; ++j) { - cont = fHistMlem->GetCellContent(j,i); + cont = fHistMlem->GetBinContent(fHistMlem->GetBin(j,i)); if (cont > cmax) { cmax = cont; x = fHistMlem->GetXaxis()->GetBinCenter(j); @@ -1281,7 +1281,7 @@ void AliMUONClusterFinderMLEM::FindCOG(Double_t *xyc) for (Int_t j = TMath::Max(1,ixmax-1); j <= je; ++j) { if (j == ixmax) continue; for (Int_t i = TMath::Max(1,iymax-1); i <= ie; ++i) { - cont = fHistMlem->GetCellContent(j,i); + cont = fHistMlem->GetBinContent(fHistMlem->GetBin(j,i)); if (cont > cmax) { cmax = cont; x = fHistMlem->GetXaxis()->GetBinCenter(j); @@ -1424,7 +1424,7 @@ Int_t AliMUONClusterFinderMLEM::FindLocalMaxima(TObjArray *pixArray, Int_t *loca for (Int_t i = 1; i <= ny; ++i) { indx = (i-1) * nx; for (Int_t j = 1; j <= nx; ++j) { - if (fHistAnode->GetCellContent(j,i) < fLowestPixelCharge) continue; + if (fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)) < fLowestPixelCharge) continue; //if (isLocalMax[indx+j-1] < 0) continue; if (isLocalMax[indx+j-1] != 0) continue; FlagLocalMax(fHistAnode, i, j, isLocalMax); @@ -1436,7 +1436,7 @@ Int_t AliMUONClusterFinderMLEM::FindLocalMaxima(TObjArray *pixArray, Int_t *loca for (Int_t j = 1; j <= nx; ++j) { if (isLocalMax[indx+j-1] > 0) { localMax[nMax] = indx + j - 1; - maxVal[nMax++] = fHistAnode->GetCellContent(j,i); + maxVal[nMax++] = fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)); ((AliMUONPad*)fSplitter->BinToPix(fHistAnode, j, i))->SetStatus(fgkMustKeep); if (nMax > 99) break; } @@ -1458,7 +1458,7 @@ void AliMUONClusterFinderMLEM::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t Int_t nx = hist->GetNbinsX(); Int_t ny = hist->GetNbinsY(); - Int_t cont = TMath::Nint (hist->GetCellContent(j,i)); + Int_t cont = TMath::Nint (hist->GetBinContent(hist->GetBin(j,i))); Int_t cont1 = 0, indx = (i-1)*nx+j-1, indx1 = 0, indx2 = 0; Int_t ie = i + 2, je = j + 2; @@ -1469,7 +1469,7 @@ void AliMUONClusterFinderMLEM::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t if (j1 < 1 || j1 > nx) continue; if (i == i1 && j == j1) continue; indx2 = indx1 + j1 - 1; - cont1 = TMath::Nint (hist->GetCellContent(j1,i1)); + cont1 = TMath::Nint (hist->GetBinContent(hist->GetBin(j1,i1))); if (cont < cont1) { isLocalMax[indx] = -1; return; } else if (cont > cont1) isLocalMax[indx2] = -1; else { // the same charge @@ -1515,7 +1515,7 @@ void AliMUONClusterFinderMLEM::FindCluster(AliMUONCluster& cluster, Double_t wy = fHistAnode->GetYaxis()->GetBinWidth(1)/2; Double_t yc = fHistAnode->GetYaxis()->GetBinCenter(ic); Double_t xc = fHistAnode->GetXaxis()->GetBinCenter(jc); - Double_t cont = fHistAnode->GetCellContent(jc,ic); + Double_t cont = fHistAnode->GetBinContent( fHistAnode->GetBin(jc,ic)); fPixArray->Add(new AliMUONPad (xc, yc, wx, wy, cont)); used[(ic-1)*nx+jc-1] = kTRUE; AddBinSimple(fHistAnode, ic, jc); @@ -1566,13 +1566,13 @@ AliMUONClusterFinderMLEM::AddBinSimple(TH2D *hist, Int_t ic, Int_t jc) Int_t nx = hist->GetNbinsX(); Int_t ny = hist->GetNbinsY(); - Double_t cont1, cont = hist->GetCellContent(jc,ic); + Double_t cont1, cont = hist->GetBinContent(hist->GetBin(jc,ic)); AliMUONPad *pixPtr = 0; Int_t ie = TMath::Min(ic+1,ny), je = TMath::Min(jc+1,nx); for (Int_t i = TMath::Max(ic-1,1); i <= ie; ++i) { for (Int_t j = TMath::Max(jc-1,1); j <= je; ++j) { - cont1 = hist->GetCellContent(j,i); + cont1 = hist->GetBinContent(hist->GetBin(j,i)); if (cont1 > cont) continue; if (cont1 < fLowestPixelCharge) continue; pixPtr = new AliMUONPad (hist->GetXaxis()->GetBinCenter(j), diff --git a/MUON/AliMUONClusterFinderPeakCOG.cxx b/MUON/AliMUONClusterFinderPeakCOG.cxx index 83cbe8fc614..c0fbb5a78e1 100644 --- a/MUON/AliMUONClusterFinderPeakCOG.cxx +++ b/MUON/AliMUONClusterFinderPeakCOG.cxx @@ -601,17 +601,17 @@ void AliMUONClusterFinderPeakCOG::BuildPixArrayOneCathode(AliMUONCluster& cluste for (Int_t i = 1; i <= nbins[0]; ++i) { Double_t x = xaxis->GetBinCenter(i); for (Int_t j = 1; j <= nbins[1]; ++j) { - if (hist2->GetCellContent(i,j) < 0.01525) continue; // JC: adc -> fc + if (hist2->GetBinContent(hist2->GetBin(i,j)) < 0.01525) continue; // JC: adc -> fc if (cath0 != cath1) { // Two-sided cluster - Double_t cont = hist2->GetCellContent(i,j); + Double_t cont = hist2->GetBinContent(hist2->GetBin(i,j)); if (cont < 999.) continue; if (cont-Int_t(cont/1000.)*1000. < 0.07625) continue; // JC: adc -> fc } - //if (hist2->GetCellContent(i,j) < 1.1 && cluster.Multiplicity(0) && + //if (hist2->GetBinContent(hist2->GetBin(i,j)) < 1.1 && cluster.Multiplicity(0) && // cluster.Multiplicity(1)) continue; Double_t y = yaxis->GetBinCenter(j); - Double_t charge = hist1->GetCellContent(i,j); + Double_t charge = hist1->GetBinContent(hist1->GetBin(i,j)); AliMUONPad* pixPtr = new AliMUONPad(x, y, width[0], width[1], charge); fPixArray->Add(pixPtr); } @@ -652,11 +652,11 @@ void AliMUONClusterFinderPeakCOG::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont) - + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1, 1.525); // JC: adc -> fc - hist1->SetCellContent(ix0, ixy, cont); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.01525) // JC: adc -> fc + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont) + + TMath::Min (TMath::Max(hist1->GetBinContent(hist1->GetBin(ix0, ixy)),cont)*0.1, 1.525); // JC: adc -> fc + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+amask); } } @@ -669,11 +669,11 @@ void AliMUONClusterFinderPeakCOG::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont) - + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1,1.525); // JC: adc -> fc - hist1->SetCellContent(ix0, ixy, cont); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.01525) // JC: adc -> fc + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont) + + TMath::Min (TMath::Max(hist1->GetBinContent(hist1->GetBin(ix0, ixy)),cont)*0.1,1.525); // JC: adc -> fc + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + hist2->SetBinContent( hist2->GetBin(ix0, ixy), hist2->GetBinContent(hist2->GetBin(ix0, ixy))+amask); } } } @@ -723,7 +723,7 @@ Int_t AliMUONClusterFinderPeakCOG::FindLocalMaxima(TObjArray *pixArray, Int_t *l for (Int_t i = 1; i <= ny; ++i) { indx = (i-1) * nx; for (Int_t j = 1; j <= nx; ++j) { - if (fHistAnode->GetCellContent(j,i) < 0.07625) continue; // JC: adc -> fc + if (fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)) < 0.07625) continue; // JC: adc -> fc //if (isLocalMax[indx+j-1] < 0) continue; if (isLocalMax[indx+j-1] != 0) continue; FlagLocalMax(fHistAnode, i, j, isLocalMax); @@ -735,7 +735,7 @@ Int_t AliMUONClusterFinderPeakCOG::FindLocalMaxima(TObjArray *pixArray, Int_t *l for (Int_t j = 1; j <= nx; ++j) { if (isLocalMax[indx+j-1] > 0) { localMax[nMax] = indx + j - 1; - maxVal[nMax++] = fHistAnode->GetCellContent(j,i); + maxVal[nMax++] = fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)); if (nMax > 99) break; } } @@ -756,7 +756,7 @@ void AliMUONClusterFinderPeakCOG::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int Int_t nx = hist->GetNbinsX(); Int_t ny = hist->GetNbinsY(); - Int_t cont = TMath::Nint (hist->GetCellContent(j,i)); + Int_t cont = TMath::Nint (hist->GetBinContent(hist->GetBin(j,i))); Int_t cont1 = 0, indx = (i-1)*nx+j-1, indx1 = 0, indx2 = 0; Int_t ie = i + 2, je = j + 2; @@ -767,7 +767,7 @@ void AliMUONClusterFinderPeakCOG::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int if (j1 < 1 || j1 > nx) continue; if (i == i1 && j == j1) continue; indx2 = indx1 + j1 - 1; - cont1 = TMath::Nint (hist->GetCellContent(j1,i1)); + cont1 = TMath::Nint (hist->GetBinContent(hist->GetBin(j1,i1))); if (cont < cont1) { isLocalMax[indx] = -1; return; } else if (cont > cont1) isLocalMax[indx2] = -1; else { // the same charge @@ -826,7 +826,7 @@ void AliMUONClusterFinderPeakCOG::FindCluster(AliMUONCluster& cluster, Double_t wy = fHistAnode->GetYaxis()->GetBinWidth(1)/2; Double_t yc = fHistAnode->GetYaxis()->GetBinCenter(ic); Double_t xc = fHistAnode->GetXaxis()->GetBinCenter(jc); - Double_t cont = fHistAnode->GetCellContent(jc,ic); + Double_t cont = fHistAnode->GetBinContent(fHistAnode->GetBin(jc,ic)); AliMUONPad pixel(xc, yc, wx, wy, cont); if (fDebug) pixel.Print("full"); diff --git a/MUON/AliMUONClusterFinderPeakFit.cxx b/MUON/AliMUONClusterFinderPeakFit.cxx index b48b84e4274..21b011dd723 100644 --- a/MUON/AliMUONClusterFinderPeakFit.cxx +++ b/MUON/AliMUONClusterFinderPeakFit.cxx @@ -717,17 +717,17 @@ void AliMUONClusterFinderPeakFit::BuildPixArrayOneCathode(AliMUONCluster& cluste for (Int_t i = 1; i <= nbins[0]; ++i) { Double_t x = xaxis->GetBinCenter(i); for (Int_t j = 1; j <= nbins[1]; ++j) { - if (hist2->GetCellContent(i,j) < 0.01525) continue; // JC: adc -> fc + if (hist2->GetBinContent(hist2->GetBin(i,j)) < 0.01525) continue; // JC: adc -> fc if (cath0 != cath1) { // Two-sided cluster - Double_t cont = hist2->GetCellContent(i,j); + Double_t cont = hist2->GetBinContent(hist2->GetBin(i,j)); if (cont < 999.) continue; if (cont-Int_t(cont/1000.)*1000. < 0.07625) continue; // JC: adc -> fc } - //if (hist2->GetCellContent(i,j) < 1.1 && cluster.Multiplicity(0) && + //if (hist2->GetBinContent(hist2->GetBin(i,j)) < 1.1 && cluster.Multiplicity(0) && // cluster.Multiplicity(1)) continue; Double_t y = yaxis->GetBinCenter(j); - Double_t charge = hist1->GetCellContent(i,j); + Double_t charge = hist1->GetBinContent(hist1->GetBin(i,j)); AliMUONPad* pixPtr = new AliMUONPad(x, y, width[0], width[1], charge); fPixArray->Add(pixPtr); } @@ -768,11 +768,11 @@ void AliMUONClusterFinderPeakFit::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont) - + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1, 1.525); // JC: adc -> fc - hist1->SetCellContent(ix0, ixy, cont); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.01525) // JC: adc -> fc + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont) + + TMath::Min (TMath::Max(hist1->GetBinContent(hist1->GetBin(ix0, ixy)),cont)*0.1, 1.525); // JC: adc -> fc + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent( hist2->GetBin(ix0, ixy))+amask); } } @@ -785,11 +785,11 @@ void AliMUONClusterFinderPeakFit::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, else { // Fill histogram Double_t cont = pad->Charge(); - if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc - cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont) - + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1,1.525); // JC: adc -> fc - hist1->SetCellContent(ix0, ixy, cont); - hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask); + if (hist2->GetBinContent(hist2->GetBin(ix0, ixy)) > 0.01525) // JC: adc -> fc + cont = TMath::Min (hist1->GetBinContent(hist1->GetBin(ix0, ixy)), cont) + + TMath::Min (TMath::Max(hist1->GetBinContent(hist1->GetBin(ix0, ixy)),cont)*0.1,1.525); // JC: adc -> fc + hist1->SetBinContent(hist1->GetBin(ix0, ixy), cont); + hist2->SetBinContent(hist2->GetBin(ix0, ixy), hist2->GetBinContent( hist2->GetBin(ix0, ixy))+amask); } } } @@ -839,7 +839,7 @@ Int_t AliMUONClusterFinderPeakFit::FindLocalMaxima(TObjArray *pixArray, Int_t *l for (Int_t i = 1; i <= ny; ++i) { indx = (i-1) * nx; for (Int_t j = 1; j <= nx; ++j) { - if (fHistAnode->GetCellContent(j,i) < 0.07625) continue; // JC: adc -> fc + if (fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)) < 0.07625) continue; // JC: adc -> fc //if (isLocalMax[indx+j-1] < 0) continue; if (isLocalMax[indx+j-1] != 0) continue; FlagLocalMax(fHistAnode, i, j, isLocalMax); @@ -851,7 +851,7 @@ Int_t AliMUONClusterFinderPeakFit::FindLocalMaxima(TObjArray *pixArray, Int_t *l for (Int_t j = 1; j <= nx; ++j) { if (isLocalMax[indx+j-1] > 0) { localMax[nMax] = indx + j - 1; - maxVal[nMax++] = fHistAnode->GetCellContent(j,i); + maxVal[nMax++] = fHistAnode->GetBinContent(fHistAnode->GetBin(j,i)); if (nMax > 99) break; } } @@ -872,7 +872,7 @@ void AliMUONClusterFinderPeakFit::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int Int_t nx = hist->GetNbinsX(); Int_t ny = hist->GetNbinsY(); - Int_t cont = TMath::Nint (hist->GetCellContent(j,i)); + Int_t cont = TMath::Nint (hist->GetBinContent(hist->GetBin(j,i))); Int_t cont1 = 0, indx = (i-1)*nx+j-1, indx1 = 0, indx2 = 0; Int_t ie = i + 2, je = j + 2; @@ -883,7 +883,7 @@ void AliMUONClusterFinderPeakFit::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int if (j1 < 1 || j1 > nx) continue; if (i == i1 && j == j1) continue; indx2 = indx1 + j1 - 1; - cont1 = TMath::Nint (hist->GetCellContent(j1,i1)); + cont1 = TMath::Nint (hist->GetBinContent(hist->GetBin(j1,i1))); if (cont < cont1) { isLocalMax[indx] = -1; return; } else if (cont > cont1) isLocalMax[indx2] = -1; else { // the same charge @@ -1034,7 +1034,7 @@ void AliMUONClusterFinderPeakFit::FindClusterCOG(AliMUONCluster& cluster, Double_t wy = fHistAnode->GetYaxis()->GetBinWidth(1)/2; Double_t yc = fHistAnode->GetYaxis()->GetBinCenter(ic); Double_t xc = fHistAnode->GetXaxis()->GetBinCenter(jc); - Double_t cont = fHistAnode->GetCellContent(jc,ic); + Double_t cont = fHistAnode->GetBinContent(fHistAnode->GetBin(jc,ic)); AliMUONPad pixel(xc, yc, wx, wy, cont); if (fDebug) pixel.Print("full"); diff --git a/MUON/AliMUONClusterSplitterMLEM.cxx b/MUON/AliMUONClusterSplitterMLEM.cxx index 7b154219dce..ee383022c16 100644 --- a/MUON/AliMUONClusterSplitterMLEM.cxx +++ b/MUON/AliMUONClusterSplitterMLEM.cxx @@ -116,7 +116,7 @@ AliMUONClusterSplitterMLEM::AddBin(TH2 *mlem, Int_t nx = mlem->GetNbinsX(); Int_t ny = mlem->GetNbinsY(); - Double_t cont1, cont = mlem->GetCellContent(jc,ic); + Double_t cont1, cont = mlem->GetBinContent(mlem->GetBin(jc,ic)); AliMUONPad *pixPtr = 0; Int_t ie = TMath::Min(ic+1,ny), je = TMath::Min(jc+1,nx); @@ -124,7 +124,7 @@ AliMUONClusterSplitterMLEM::AddBin(TH2 *mlem, for (Int_t j = TMath::Max(jc-1,1); j <= je; ++j) { if (i != ic && j != jc) continue; if (used[(i-1)*nx+j-1]) continue; - cont1 = mlem->GetCellContent(j,i); + cont1 = mlem->GetBinContent(mlem->GetBin(j,i)); if (mode && cont1 > cont) continue; used[(i-1)*nx+j-1] = kTRUE; if (cont1 < fLowestPixelCharge) continue; @@ -827,7 +827,7 @@ AliMUONClusterSplitterMLEM::Split(const AliMUONCluster& cluster, { indx = (i-1)*nx + j - 1; if (used[indx]) continue; - cont = mlem->GetCellContent(j,i); + cont = mlem->GetBinContent(mlem->GetBin(j,i)); if (cont < fLowestPixelCharge) continue; pix = new TObjArray(20); used[indx] = 1; diff --git a/PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx b/PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx index 8b52d4728e1..736d91e5f07 100644 --- a/PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx +++ b/PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx @@ -485,8 +485,8 @@ AliBasedNdetaTask::ProjectX(const TH2D* h, for (Int_t ybin = first; ybin <= last; ybin++) { - Double_t c1 = h->GetCellContent(xbin, ybin); - Double_t e1 = h->GetCellError(xbin, ybin); + Double_t c1 = h->GetBinContent(h->GetBin(xbin, ybin)); + Double_t e1 = h->GetBinError(h->GetBin(xbin, ybin)); // Ignore empty bins if (c1 < 1e-12) continue; diff --git a/PWGUD/CMakelibPWGUDupc.pkg b/PWGUD/CMakelibPWGUDupc.pkg index 99980273d1d..279f13f9ece 100644 --- a/PWGUD/CMakelibPWGUDupc.pkg +++ b/PWGUD/CMakelibPWGUDupc.pkg @@ -31,6 +31,6 @@ set ( SRCS string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" ) -set ( EINCLUDE PWGUD/UPC STEER/AOD STEER/ESD STEER/STEERBase VZERO ) +set ( EINCLUDE PWGUD/UPC STEER/AOD STEER/ESD STEER/STEERBase VZERO ANALYSIS) set ( DHDR PWGUDupcLinkDef.h ) diff --git a/PWGUD/UPC/AliAnalysisTaskUpcPsi2s.cxx b/PWGUD/UPC/AliAnalysisTaskUpcPsi2s.cxx index 5f00eae0ed6..42fea0b693a 100644 --- a/PWGUD/UPC/AliAnalysisTaskUpcPsi2s.cxx +++ b/PWGUD/UPC/AliAnalysisTaskUpcPsi2s.cxx @@ -51,6 +51,9 @@ ClassImp(AliAnalysisTaskUpcPsi2s); +using std::cout; +using std::endl; + //trees for UPC analysis, // michal.broz@cern.ch diff --git a/STEER/CreateAODfromESD.C b/STEER/CreateAODfromESD.C index a13ad2129ec..5772a1f56f0 100644 --- a/STEER/CreateAODfromESD.C +++ b/STEER/CreateAODfromESD.C @@ -1,4 +1,3 @@ -#if !defined(__CINT__) || defined(__MAKECINT__) #include #include #include "AliAnalysisManager.h" @@ -6,26 +5,25 @@ #include "AliAODHandler.h" #include "AliAnalysisTaskESDfilter.h" #include "AliAnalysisDataContainer.h" -#endif void CreateAODfromESD(const char *inFileName = "AliESDs.root", const char *outFileName = "AliAOD.root", Bool_t bKineFilter = kTRUE) { - gSystem->Load("libTree"); - gSystem->Load("libGeom"); - gSystem->Load("libPhysics"); - gSystem->Load("libVMC"); - gSystem->Load("libSTEERBase"); - gSystem->Load("libESD"); - gSystem->Load("libAOD"); + // gSystem->Load("libTree"); + // gSystem->Load("libGeom"); + // gSystem->Load("libPhysics"); + // gSystem->Load("libVMC"); + // gSystem->Load("libSTEERBase"); + // gSystem->Load("libESD"); + // gSystem->Load("libAOD"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libANALYSISalice"); - gSystem->Load("libCORRFW"); - gSystem->Load("libPWGHFbase"); - gSystem->Load("libPWGmuon"); + // gSystem->Load("libANALYSIS"); + // gSystem->Load("libANALYSISalice"); + // gSystem->Load("libCORRFW"); + // gSystem->Load("libPWGHFbase"); + // gSystem->Load("libPWGmuon"); TChain *chain = new TChain("esdTree"); // Steering input chain diff --git a/TPC/AliH2F.cxx b/TPC/AliH2F.cxx index 6a2058d83b3..ec6143ce97f 100644 --- a/TPC/AliH2F.cxx +++ b/TPC/AliH2F.cxx @@ -90,8 +90,8 @@ void AliH2F::ClearSpectrum() for (Int_t i = 0 ;iGaus(0,sn); - Float_t oldv =GetCellContent(i,j); - Float_t olds =GetCellError(i,j); + Float_t oldv =GetBinContent(GetBin(i,j)); + Float_t olds =GetBinError(GetBin(i,j)); if (noise >0) { - SetCellContent(i,j,noise+oldv); - SetCellError(i,j,TMath::Sqrt((noise*noise+olds*olds))); + SetBinContent(GetBin(i,j),noise+oldv); + SetBinError(GetBin(i,j),TMath::Sqrt((noise*noise+olds*olds))); } } } @@ -136,8 +136,8 @@ void AliH2F::AddGauss(Float_t x, Float_t y, Float_t dx2 = (x2-x)*(x2-x); Float_t dy2 = (y2-y)*(y2-y); Float_t amp =max*exp(-(dx2/(2*sx*sx)+dy2/(2*sy*sy))); - //Float_t oldv =GetCellContent(i+1,j+1); - // SetCellContent(i+1,j+1,amp+oldv); + //Float_t oldv =GetBinContent(GetBin(i+1,j+1)); + // SetBinContent(GetBin(i+1,j+1),amp+oldv); Fill(x2,y2,amp); } } @@ -150,9 +150,9 @@ void AliH2F::ClearUnderTh(Int_t threshold) for (Int_t i = 0 ;i<=dimx;i++) for (Int_t j = 0 ;j<=dimy;j++) { - Float_t oldv =GetCellContent(i,j); + Float_t oldv =GetBinContent(GetBin(i,j)); if (oldv SetBinContent(index2,val); // Float_t err = GetBinError(index1); //sub->SetBinError(index2,GetBinError(index1)); - sub->SetCellContent(i,j,val); + sub->SetBinContent(GetBin(i,j),val); } return sub; } diff --git a/TPC/Base/AliTPCPRF2D.cxx b/TPC/Base/AliTPCPRF2D.cxx index 4f8d636abdc..f762ab4da7e 100644 --- a/TPC/Base/AliTPCPRF2D.cxx +++ b/TPC/Base/AliTPCPRF2D.cxx @@ -741,7 +741,7 @@ AliH2F * AliTPCPRF2D::GenerDrawHisto(Float_t x1, Float_t x2, Float_t y1, Float_t y=y1; for (Int_t j = 0;j<=Ny;j++,y+=dy){ z = GetPRF(x,y); - hPRFc->SetCellContent(i,j,z); + hPRFc->SetBinContent(hPRFc->GetBin(i,j),z); }; }; hPRFc->SetXTitle("pad direction (cm)"); @@ -785,7 +785,7 @@ AliH2F * AliTPCPRF2D::GenerDrawDistHisto(Float_t x1, Float_t x2, Float_t y1, Flo ddx = (x-(sumx/sum)); } else ddx=-1; - if (TMath::Abs(ddx)<10) hPRFDist->SetCellContent(i,j,ddx); + if (TMath::Abs(ddx)<10) hPRFDist->SetBinContent(hPRFDist->GetBin(i,j),ddx); } } diff --git a/TPC/Monitor/AliTPCMonitor.cxx b/TPC/Monitor/AliTPCMonitor.cxx index 0fffae25517..69054ef8c0d 100644 --- a/TPC/Monitor/AliTPCMonitor.cxx +++ b/TPC/Monitor/AliTPCMonitor.cxx @@ -763,13 +763,13 @@ void AliTPCMonitor::FillHistsPadPlane() for(Int_t ch = 0; chSetCellContent(ch,0,hwadd); + fHistChannelTime->SetBinContent(fHistChannelTime->GetBin(ch,0),hwadd); for(Int_t bin = 1; bin GetCellContent(ch,bin)!=0) cout << " cellcontent already set " << endl; - if( GetPedestals()==1 ) fHistChannelTime->SetCellContent(ch,bin,(fPad[ch][bin]- fHistAddrBaseMean->GetBinContent(hwadd))); - else fHistChannelTime->SetCellContent(ch,bin,(fPad[ch][bin])); + if( fHistChannelTime->GetBinContent(fHistChannelTime->GetBin(ch,bin))!=0) cout << " cellcontent already set " << endl; + if( GetPedestals()==1 ) fHistChannelTime->SetBinContent(fHistChannelTime->GetBin(ch,bin),(fPad[ch][bin]- fHistAddrBaseMean->GetBinContent(hwadd))); + else fHistChannelTime->SetBinContent(fHistChannelTime->GetBin(ch,bin),(fPad[ch][bin])); } pad = fMapHand->GetPad( hwadd); @@ -778,19 +778,19 @@ void AliTPCMonitor::FillHistsPadPlane() if(row<63) { - fHistIROC->SetCellContent( row +1 ,pad +55 -padmax/2 +1,fHistAddrMaxAdc->GetBinContent( hwadd)); - fHistIROCIndex->SetCellContent(row +1 ,pad +55 -padmax/2 +1,ch); - fHistIROCRMS->SetCellContent( row +1 ,pad +55 -padmax/2 +1,fHistAddrBaseRms->GetBinContent( hwadd)); - fHistIROCBASE->SetCellContent( row +1 ,pad +55 -padmax/2 +1,fHistAddrBaseMean->GetBinContent(hwadd)); - fHistIROCSUM->SetCellContent( row +1 ,pad +55 -padmax/2 +1,fHistAddrAdcSum->GetBinContent( hwadd)); + fHistIROC->SetBinContent(fHistIROC->GetBin( row +1 ,pad +55 -padmax/2 +1),fHistAddrMaxAdc->GetBinContent( hwadd)); + fHistIROCIndex->SetBinContent(fHistIROCIndex->GetBin(row +1 ,pad +55 -padmax/2 +1),ch); + fHistIROCRMS->SetBinContent(fHistIROCRMS->GetBin( row +1 ,pad +55 -padmax/2 +1),fHistAddrBaseRms->GetBinContent( hwadd)); + fHistIROCBASE->SetBinContent(fHistIROCBASE->GetBin( row +1 ,pad +55 -padmax/2 +1),fHistAddrBaseMean->GetBinContent(hwadd)); + fHistIROCSUM->SetBinContent(fHistIROCSUM->GetBin( row +1 ,pad +55 -padmax/2 +1),fHistAddrAdcSum->GetBinContent( hwadd)); } else { - fHistOROC->SetCellContent( row-63 +1 ,pad +70 -padmax/2 +1,fHistAddrMaxAdc->GetBinContent( hwadd)); - fHistOROCIndex->SetCellContent(row-63 +1 ,pad +70 -padmax/2 +1,ch); - fHistOROCRMS->SetCellContent( row-63 +1 ,pad +70 -padmax/2 +1,fHistAddrBaseRms->GetBinContent( hwadd)); - fHistOROCBASE->SetCellContent( row-63 +1 ,pad +70 -padmax/2 +1,fHistAddrBaseMean->GetBinContent(hwadd)); - fHistOROCSUM->SetCellContent( row-63 +1 ,pad +70 -padmax/2 +1,fHistAddrAdcSum->GetBinContent( hwadd)); + fHistOROC->SetBinContent(fHistOROC->GetBin( row-63 +1 ,pad +70 -padmax/2 +1),fHistAddrMaxAdc->GetBinContent( hwadd)); + fHistOROCIndex->SetBinContent(fHistOROCIndex->GetBin(row-63 +1 ,pad +70 -padmax/2 +1),ch); + fHistOROCRMS->SetBinContent(fHistOROCRMS->GetBin( row-63 +1 ,pad +70 -padmax/2 +1),fHistAddrBaseRms->GetBinContent( hwadd)); + fHistOROCBASE->SetBinContent(fHistOROCBASE->GetBin( row-63 +1 ,pad +70 -padmax/2 +1),fHistAddrBaseMean->GetBinContent(hwadd)); + fHistOROCSUM->SetBinContent(fHistOROCSUM->GetBin( row-63 +1 ,pad +70 -padmax/2 +1),fHistAddrAdcSum->GetBinContent( hwadd)); } } @@ -808,14 +808,14 @@ void AliTPCMonitor::ResetArrays() { for(Int_t pad = 0 ; pad < fkNPadsIroc ; pad++) { - fHistIROCIndex->SetCellContent(row+1,pad+1,-1); + fHistIROCIndex->SetBinContent(fHistIROCIndex->GetBin(row+1,pad+1),-1); } } for(Int_t row = 0 ; row < fkNRowsOroc; row++) { for(Int_t pad = 0 ; pad < fkNPadsOroc ; pad++) { - fHistOROCIndex->SetCellContent(row+1,pad+1,-1); + fHistOROCIndex->SetBinContent(fHistOROCIndex->GetBin(row+1,pad+1),-1); } } @@ -1406,7 +1406,7 @@ void AliTPCMonitor::ExecPad() if (!fHistIndex) return; Int_t testy = fHistIndex->GetYaxis()->FindBin(y); Int_t testx = fHistIndex->GetXaxis()->FindBin(x); - Int_t binchannel = (Int_t)fHistIndex->GetCellContent(testx,testy); + Int_t binchannel = (Int_t)fHistIndex->GetBinContent(fHistIndex->GetBin(testx,testy)); if(binchannel>30000 || binchannel<0) return; TH1D *hp=(TH1D*)gROOT->Get(projhist); @@ -1425,7 +1425,7 @@ void AliTPCMonitor::ExecPad() // Make title and Pave for channel Info Int_t npadRow , npad , nhw , nmax , hwadd; - hwadd = (Int_t)fHistChannelTime->GetCellContent(binchannel,0); + hwadd = (Int_t)fHistChannelTime->GetBinContent(fHistChannelTime->GetBin(binchannel,0)); fPadUsedHwAddr = hwadd; if(rocid==0)npadRow = fMapHand->GetPadRow(hwadd); @@ -1625,13 +1625,13 @@ void AliTPCMonitor::ExecRow() // get channel for xy bin -> getRow -> getNrows -> getHw for each Pad in Row -> get channel for each hw -> make proj Int_t testy = fHistIndex->GetYaxis()->FindBin(y); Int_t testx = fHistIndex->GetXaxis()->FindBin(x); - Int_t binchannel = (Int_t)fHistIndex->GetCellContent(testx,testy); + Int_t binchannel = (Int_t)fHistIndex->GetBinContent(fHistIndex->GetBin(testx,testy)); if(binchannel>30000) return; if(binchannel<=0 ) { crowtime->Update() ; crowmax->Update() ; return ; } // get hwaddress - Int_t hwadd = (Int_t)fHistChannelTime->GetCellContent(binchannel,0); + Int_t hwadd = (Int_t)fHistChannelTime->GetBinContent(fHistChannelTime->GetBin(binchannel,0)); Int_t row = fMapHand->GetPadRow(hwadd); Int_t pad = fMapHand->GetPad(hwadd) ; Int_t numofpads = fMapHand->GetNumofPads(row); @@ -1654,7 +1654,7 @@ void AliTPCMonitor::ExecRow() for(Int_t time = 0;timeGetBinContent(time); - hrowtime->SetCellContent(padnr+1,time+1,val); + hrowtime->SetBinContent(hrowtime->GetBin(padnr+1,time+1),val); } } @@ -1934,18 +1934,18 @@ void AliTPCMonitor::ShowSel(const Int_t* compval) { for(Int_t pad = 0; padGetCellContent(row+1,pad+1); + index = (Int_t)fHistIROCIndex->GetBinContent(fHistIROCIndex->GetBin(row+1,pad+1)); if(index==-1)continue; - else fHistIROC->SetCellContent(row+1,pad+1,fHistIROCClone->GetCellContent(row+1,pad+1)); + else fHistIROC->SetBinContent(fHistIROC->GetBin(row+1,pad+1),fHistIROCClone->GetBinContent(fHistIROCClone->GetBin(row+1,pad+1))); } } for(Int_t row = 0; rowGetCellContent(row+1,pad+1); + index = (Int_t)fHistOROCIndex->GetBinContent(fHistOROCIndex->GetBin(row+1,pad+1)); if(index==-1)continue; - else fHistOROC->SetCellContent(row+1,pad+1,fHistOROCClone->GetCellContent(row+1,pad+1)); + else fHistOROC->SetBinContent(fHistOROC->GetBin(row+1,pad+1),fHistOROCClone->GetBinContent(fHistOROCClone->GetBin(row+1,pad+1))); } } @@ -1964,33 +1964,33 @@ void AliTPCMonitor::ShowSel(const Int_t* compval) for(Int_t pad = 0; padGetCellContent(row -subrows +1,pad+1); + index = (Int_t)fHistIndex->GetBinContent(fHistIndex->GetBin(row -subrows +1,pad+1)); if(index==-1) continue ; - hwadd = (Int_t)fHistChannelTime->GetCellContent(index,0); + hwadd = (Int_t)fHistChannelTime->GetBinContent(fHistChannelTime->GetBin(index,0)); // global fecnr fecnr = fMapHand->GetFECfromHw(hwadd); - if(compval[0]!=-1 && fecnr!=compval[0]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[0]!=-1 && fecnr!=compval[0]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // rcu rcuget = (hwadd & fgkHwMaskRCU)>> 12; - if(compval[1]!=-1 && rcuget!=compval[1]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[1]!=-1 && rcuget!=compval[1]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // branch branch = fMapHand->U2fGetBranch(fecnr) ; - if(compval[2]!=-1 && branch!=compval[2]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[2]!=-1 && branch!=compval[2]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // local fec feclocbran= fMapHand->U2fGetFECinBranch(fecnr) ; - if(compval[3]!=-1 && feclocbran!=compval[3]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[3]!=-1 && feclocbran!=compval[3]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // connector connector = fMapHand->GetFECconnector(hwadd); - if(compval[4]!=-1 && connector!=compval[4]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[4]!=-1 && connector!=compval[4]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // Altro chip altrochip = fMapHand->GetAltro(hwadd); - if(compval[5]!=-1 && altrochip!=compval[5]) { fHist->SetCellContent(row-subrows+1,pad+1,0); continue; } + if(compval[5]!=-1 && altrochip!=compval[5]) { fHist->SetBinContent(fHist->GetBin(row-subrows+1,pad+1),0); continue; } // emptyI =0; } } @@ -2106,7 +2106,7 @@ Int_t AliTPCMonitor::ExecProcess() Int_t testy = ((TH2*)select)->GetYaxis()->FindBin(y); Int_t testx = ((TH2*)select)->GetXaxis()->FindBin(x); - if(((TH2*)select)->GetCellContent(testx,testy)==0) return -1 ; + if(((TH2*)select)->GetBinContent(((TH2*)select)->GetBin(testx,testy))==0) return -1 ; Float_t alpha = 0.0; if(x>0.0 && y > 0.0) alpha = TMath::Abs(TMath::ATan(TMath::Abs(x/y)));