+ TH1* hESDLocalChi2XInCh = GetESDsData(kESDLocalChi2XInCh+iCh);
+ Double_t sigmaLocalChi2X = hESDLocalChi2XInCh->GetRMS();
+ hESDLocalChi2XPerChMean->SetBinContent(iCh+1, hESDLocalChi2XInCh->GetMean());
+ hESDLocalChi2XPerChMean->SetBinError(iCh+1, hESDLocalChi2XInCh->GetMeanError());
+
+ TH1* hESDLocalChi2YInCh = GetESDsData(kESDLocalChi2YInCh+iCh);
+ Double_t sigmaLocalChi2Y = hESDLocalChi2YInCh->GetRMS();
+ hESDLocalChi2YPerChMean->SetBinContent(iCh+1, hESDLocalChi2YInCh->GetMean());
+ hESDLocalChi2YPerChMean->SetBinError(iCh+1, hESDLocalChi2YInCh->GetMeanError());
+
+ // loop over DE into chamber iCh
+ AliMpDEIterator it;
+ it.First(iCh);
+ while ( !it.IsDone()) {
+
+ Int_t iDE = it.CurrentDEId();
+
+ Double_t nClusters = fhESDnTotClustersPerDE->GetBinContent(iDE+1);
+ if (nClusters > 1) {
+
+ hESDClusterChargePerDE->SetBinContent(iDE+1, fhESDSumClusterChargePerDE->GetBinContent(iDE+1)/nClusters);
+ hESDClusterChargePerDE->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters));
+
+ Double_t meanResX = fhESDSumResidualXPerDE->GetBinContent(iDE+1)/nClusters;
+ hESDResidualXPerDEMean->SetBinContent(iDE+1, meanResX);
+ hESDResidualXPerDEMean->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(nClusters));
+ hESDResidualXPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(fhESDSumResidualX2PerDE->GetBinContent(iDE+1)/nClusters - meanResX*meanResX));
+ hESDResidualXPerDESigma->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(2.*nClusters));
+
+ Double_t meanResY = fhESDSumResidualYPerDE->GetBinContent(iDE+1)/nClusters;
+ hESDResidualYPerDEMean->SetBinContent(iDE+1, meanResY);
+ hESDResidualYPerDEMean->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(nClusters));
+ hESDResidualYPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(fhESDSumResidualY2PerDE->GetBinContent(iDE+1)/nClusters - meanResY*meanResY));
+ hESDResidualYPerDESigma->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(2.*nClusters));
+
+ hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2XPerDE->GetBinContent(iDE+1)/nClusters);
+ hESDLocalChi2XPerDEMean->SetBinError(iDE+1, sigmaLocalChi2X/TMath::Sqrt(nClusters));
+
+ hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2YPerDE->GetBinContent(iDE+1)/nClusters);
+ hESDLocalChi2YPerDEMean->SetBinError(iDE+1, sigmaLocalChi2Y/TMath::Sqrt(nClusters));
+
+ } else {
+
+ hESDClusterChargePerDE->SetBinContent(iDE+1, fhESDSumClusterChargePerDE->GetBinContent(iDE+1));
+ hESDClusterChargePerDE->SetBinError(iDE+1, hESDClusterChargeInCh->GetXaxis()->GetXmax());
+
+ hESDResidualXPerDEMean->SetBinContent(iDE+1, fhESDSumResidualXPerDE->GetBinContent(iDE+1));
+ hESDResidualXPerDEMean->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax());
+ hESDResidualXPerDESigma->SetBinContent(iDE+1, 0.);
+ hESDResidualXPerDESigma->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax());
+
+ hESDResidualYPerDEMean->SetBinContent(iDE+1, fhESDSumResidualYPerDE->GetBinContent(iDE+1));
+ hESDResidualYPerDEMean->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax());
+ hESDResidualYPerDESigma->SetBinContent(iDE+1, 0.);
+ hESDResidualYPerDESigma->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax());
+
+ hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2XPerDE->GetBinContent(iDE+1));
+ hESDLocalChi2XPerDEMean->SetBinError(iDE+1, hESDLocalChi2XInCh->GetXaxis()->GetXmax());
+
+ hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2YPerDE->GetBinContent(iDE+1));
+ hESDLocalChi2YPerDEMean->SetBinError(iDE+1, hESDLocalChi2YInCh->GetXaxis()->GetXmax());
+
+ }
+
+ Double_t nFullClusters = fhESDnTotFullClustersPerDE->GetBinContent(iDE+1);
+ if (nFullClusters > 1) {
+
+ hESDClusterSizePerDE->SetBinContent(iDE+1, fhESDSumClusterSizePerDE->GetBinContent(iDE+1)/nFullClusters);
+ hESDClusterSizePerDE->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nFullClusters));
+
+ } else {
+
+ hESDClusterSizePerDE->SetBinContent(iDE+1, fhESDSumClusterSizePerDE->GetBinContent(iDE+1));
+ hESDClusterSizePerDE->SetBinError(iDE+1, hESDClusterSizeInCh->GetXaxis()->GetXmax());
+
+ }
+
+ it.Next();
+ }