// divides generated by measured to get the correction
//
- if (!fhMeas || !fhGene || !fhCorr)
+ if (!fhMeas || !fhGene || !fhCorr) {
+ AliDebug(AliLog::kError, "measured or generated histograms not available");
return;
+ }
fhCorr->Divide(fhGene, fhMeas, 1, 1, "B");
for (Int_t x=1; x<=fhCorr->GetNbinsX(); ++x)
for (Int_t y=1; y<=fhCorr->GetNbinsY(); ++y)
for (Int_t z=1; z<=fhCorr->GetNbinsZ(); ++z)
+ {
fhCorr->SetBinContent(x, y, z, 1);
+ fhCorr->SetBinError(x, y, z, 0);
+ }
+}
+
+//____________________________________________________________________
+void AliCorrectionMatrix::Scale(Double_t factor)
+{
+ // scales the generated and measured histogram with the given factor
+
+ Printf("Scaling histograms with %f", factor);
+
+ fhMeas->Scale(factor);
+ fhGene->Scale(factor);
}