Index: /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 7227)
+++ /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 7228)
@@ -112,8 +112,17 @@
     }
 
-    //spline
-//    Float_t psf = (h1->Integral(5, 14) - 0.818)/0.0276;
-    //df
-    Float_t psf = (h1->Integral(5, 14) - 0.507)/0.0159;
+    Float_t numerator = 0;
+    Float_t denominator = 0;
+    Float_t summe = 0;
+
+    for(Int_t i=5; i<15; i++)
+    {
+        numerator   += h1->GetBinContent(i)*h1->GetBinEntries(i);
+        denominator += h1->GetBinEntries(i);
+    }
+
+    summe = numerator/denominator;
+
+    Float_t psf = (summe - 0.04816)/0.001294;
     psf = TMath::Nint(psf*10)/10.;
     TString PSF = Form("%5.1f", psf);
@@ -127,10 +136,18 @@
     }
 
-    Float_t integral = h2->Integral(5, 14);
-    //spline
-//    Float_t integralmc = -36.06*psf + 11023;
-    //df
-    Float_t integralmc = -24.1*psf + 10104.2;
-    Float_t ratiodatamc = (integral/integralmc)*100;
+    numerator = 0;
+    denominator = 0;
+    summe = 0;
+
+    for(Int_t i=5; i<15; i++)
+    {
+        numerator   += h2->GetBinContent(i)*h2->GetBinEntries(i);
+        denominator += h2->GetBinEntries(i);
+    }
+
+    summe = numerator/denominator;
+
+    Float_t integralmc = -1.43*psf + 1035;
+    Float_t ratiodatamc = (summe/integralmc)*100;
     TString ratio = Form("%5.1f", ratiodatamc);
 
