improve fit procedure (err estimates)
authorfnoferin <fnoferin@cern.ch>
Wed, 22 Oct 2014 12:32:09 +0000 (14:32 +0200)
committerfnoferin <fnoferin@cern.ch>
Wed, 22 Oct 2014 12:32:09 +0000 (14:32 +0200)
PWGPP/pid/doeffKa.C
PWGPP/pid/doeffPi.C
PWGPP/pid/doeffPr.C

index 8b221d9..7e2d667 100644 (file)
@@ -296,14 +296,15 @@ void doeffKa(Int_t pos,Float_t prob,Float_t etaminkp,Float_t etamaxkp){
     expt[i] = (-ptmin+ptmax)/2;
     eff[i] = b2[i][0]/(b[i][0]-b2[i][0]*weightS);
 
-    b[i][0] = b[i][0]-b2[i][0]*weightS;
+    //    b[i][0] = b[i][0]-b2[i][0]*weightS;
 
-    if(b[i][0] < 0.5) b[i][0] = 0.5;
-    if(b2[i][0] < 0.5) b2[i][0] = 0.5;
+    //    if(b[i][0] < 0.5) b[i][0] = 0.5;
+    //    if(b2[i][0] < 0.5) b2[i][0] = 0.5;
 
 
-    efferr[i] = TMath::Abs(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
-    efferr[i] = TMath::Sqrt(efferr[i]);
+    //    efferr[i] = TMath::Abs(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
+    //    efferr[i] = TMath::Sqrt(efferr[i]);
+    efferr[i] = 1./(b[i][0]-b2[i][0]*weightS)/(b[i][0]-b2[i][0]*weightS)*TMath::Sqrt(b[i][0]*b[i][0]*b2[i][1]*b2[i][1] + b2[i][0]*b2[i][0]*b[i][1]*b[i][1]);
 
     if(TMath::Abs(efferr[i]) > 1)efferr[i]=1;
   }
index f70d6ad..15ebc02 100644 (file)
@@ -284,9 +284,11 @@ void doeffPi(Int_t pos,Float_t prob,Float_t etaminkp,Float_t etamaxkp){
     expt[i] = (-ptmin+ptmax)/2;
     eff[i] = b2[i][0]/(b[i][0]-b2[i][0]*weightS);
 
-    b[i][0] = b[i][0]-b2[i][0]*weightS;
+    //    b[i][0] = b[i][0]-b2[i][0]*weightS;
 
-    efferr[i] = TMath::Sqrt(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
+    //    efferr[i] = TMath::Sqrt(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
+
+    efferr[i] = 1./(b[i][0]-b2[i][0]*weightS)/(b[i][0]-b2[i][0]*weightS)*TMath::Sqrt(b[i][0]*b[i][0]*b2[i][1]*b2[i][1] + b2[i][0]*b2[i][0]*b[i][1]*b[i][1]);
 
     if(TMath::Abs(efferr[i]) > 1)efferr[i]=1;
   }
index bbd8937..a4c61a2 100644 (file)
@@ -283,9 +283,11 @@ void doeffPr(Int_t pos,Float_t prob,Float_t etaminkp,Float_t etamaxkp){
     expt[i] = (-ptmin+ptmax)/2;
     eff[i] = b2[i][0]/(b[i][0]-b2[i][0]*weightS);
 
-    b[i][0] = b[i][0]-b2[i][0]*weightS;
+    //    b[i][0] = b[i][0]-b2[i][0]*weightS;
 
-    efferr[i] = TMath::Sqrt(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
+    //    efferr[i] = TMath::Sqrt(b[i][1]*b[i][1]/b[i][0]/b[i][0] + b2[i][1]*b2[i][1]/b2[i][0]/b2[i][0])*(b2[i][0]+b2[i][1])*(1+weightS*(b2[i][0]-b2[i][1])/b[i][0])/b[i][0];//*(1-eff[i]);//der2*der2*(b[i][1]*b[i][1] - b2[i][1]*b2[i][1]));
+
+    efferr[i] = 1./(b[i][0]-b2[i][0]*weightS)/(b[i][0]-b2[i][0]*weightS)*TMath::Sqrt(b[i][0]*b[i][0]*b2[i][1]*b2[i][1] + b2[i][0]*b2[i][0]*b[i][1]*b[i][1]);
 
     if(TMath::Abs(efferr[i]) > 1)efferr[i]=1;
   }