fix the error calculations in generating function cumulants when weights are used
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 13:02:42 +0000 (13:02 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 13:02:42 +0000 (13:02 +0000)
PWG2/FLOW/AliFlowCommon/AliCumulantsFunctions.cxx

index cd7a826..6098730 100644 (file)
@@ -338,7 +338,7 @@ void AliCumulantsFunctions::Calculate()
  //v_2{2}
  if(nEvents>0 && dAvM>0 && dAvw2 && cumulant[0]>=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant[0],(1./2.))*(dAvM/dAvw2),2.)>0.))
  {        
-  chiQ[0]=(dAvM/dAvw2)*dV2/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM/dAvw2,2.),0.5); // to be improved,  analogously for higher orders
+  chiQ[0]=(dAvM*dV2)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.),0.5); // to be improved,  analogously for higher orders
   if(chiQ[0])
   {  
    sdQ[0]=pow(((1./(2.*dAvM*nEvents))*((1.+2.*pow(chiQ[0],2))/(2.*pow(chiQ[0],2)))),0.5);
@@ -366,7 +366,7 @@ void AliCumulantsFunctions::Calculate()
  //v_2{4}   
  if(nEvents>0 && dAvM>0 && dAvw2 && cumulant[1]<=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-cumulant[1],(1./4.))*(dAvM/dAvw2),2.)>0.))
  {
-  chiQ[1]=(dAvM/dAvw2)*dV4/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*(dAvM/dAvw2),2.),0.5);
+  chiQ[1]=(dAvM*dV4)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.),0.5);
   if(chiQ[1])
   {
    sdQ[1]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((1.+4.*pow(chiQ[1],2)+1.*pow(chiQ[1],4.)+2.*pow(chiQ[1],6.))/(2.*pow(chiQ[1],6.)),0.5);
@@ -394,7 +394,7 @@ void AliCumulantsFunctions::Calculate()
  //v_2{6}
  if(nEvents>0 && dAvM>0 && dAvw2 && cumulant[2]>=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*cumulant[2],(1./6.))*(dAvM/dAvw2),2.)>0.))
  {
-  chiQ[2]=(dAvM/dAvw2)*dV6/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6*(dAvM/dAvw2),2.),0.5);
+  chiQ[2]=(dAvM*dV6)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6*dAvM,2.),0.5);
   if(chiQ[2])
   {
    sdQ[2]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((3.+18.*pow(chiQ[2],2)+9.*pow(chiQ[2],4.)+28.*pow(chiQ[2],6.)+12.*pow(chiQ[2],8.)+24.*pow(chiQ[2],10.))/(24.*pow(chiQ[2],10.)),0.5);
@@ -423,7 +423,7 @@ void AliCumulantsFunctions::Calculate()
  //v_2{8}
  if(nEvents>0 && dAvM>0 && dAvw2 && cumulant[3]<=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-(1./33.)*cumulant[3],(1./8.))*(dAvM/dAvw2),2.)>0.))
  {  
-  chiQ[3]=(dAvM/dAvw2)*dV8/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV8*(dAvM/dAvw2),2.),0.5);
+  chiQ[3]=(dAvM*dV8)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV8*dAvM,2.),0.5);
   if(chiQ[3])
   {
    sdQ[3]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((12.+96.*pow(chiQ[3],2.)+72.*pow(chiQ[3],4.)+304.*pow(chiQ[3],6.)+257.*pow(chiQ[3],8.)+804.*pow(chiQ[3],10.)+363.*pow(chiQ[3],12.)+726.*pow(chiQ[3],14.))/(726.*pow(chiQ[3],14.)),0.5);
@@ -581,7 +581,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[0]>0)
     {
       v2ptRP[b]=ptRPDiffCumulant2[b]/pow(cumulant[0],0.5);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*(dAvM/dAvw2),2.)>0. && ptBinRPNoOfParticles[b]>0.) 
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0. && ptBinRPNoOfParticles[b]>0.) 
       {
        sdRPDiff2pt[b]=pow((1./(2.*ptBinRPNoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5); 
        //cout<<"v'_2/2{2} = "<<v2ptRP[b]<<"%, "<<" "<<"sd{2} = "<<100.*sdRPDiff2pt[b]<<"%"<<endl;
@@ -607,7 +607,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[1]<0)
     {
       v4ptRP[b]=-ptRPDiffCumulant4[b]/pow(-cumulant[1],.75);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*(dAvM/dAvw2),2.)>0.&&ptBinRPNoOfParticles[b]>0.) // to be improved
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.)>0.&&ptBinRPNoOfParticles[b]>0.) // to be improved
       if (ptBinRPNoOfParticles[b]>0.)
       {
        sdRPDiff4pt[b]=pow((1./(2.*ptBinRPNoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5);
@@ -827,7 +827,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[0]>0)
     {
       v2etaRP[b]=etaRPDiffCumulant2[b]/pow(cumulant[0],0.5);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*(dAvM/dAvw2),2.)>0. && etaBinRPNoOfParticles[b]>0.) // to be improved
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0. && etaBinRPNoOfParticles[b]>0.) // to be improved
       {
        sdRPDiff2eta[b]=pow((1./(2.*etaBinRPNoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5);
        //cout<<"v'_2/2{2} = "<<v2etaRP[b]<<"%, "<<" "<<"sd{2} = "<<100.*sdDiff2eta[b]<<"%"<<endl;
@@ -853,7 +853,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[1]<0)
     {
       v4etaRP[b]=-etaRPDiffCumulant4[b]/pow(-cumulant[1],0.75);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*(dAvM/dAvw2),2.)>0.&&etaBinRPNoOfParticles[b]>0.) // to be improved
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.)>0.&&etaBinRPNoOfParticles[b]>0.) // to be improved
       {
        sdRPDiff4eta[b]=pow((1./(2.*etaBinRPNoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5);
        //cout<<"v'_2/2{4} = "<<v4eta[b]<<"%, "<<" "<<"sd{4} = "<<100.*sdDiff4eta[b]<<"%"<<endl;
@@ -1114,7 +1114,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[0]>0)
     {
       v2pt[b]=ptDiffCumulant2[b]/pow(cumulant[0],0.5);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*(dAvM/dAvw2),2.)>0.&&ptBinPOINoOfParticles[b]>0.)
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0.&&ptBinPOINoOfParticles[b]>0.)
       {
        sdDiff2pt[b]=pow((1./(2.*ptBinPOINoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5);
        //cout<<"v'_2/2{2} = "<<v2pt[b]<<"%, "<<" "<<"sd{2} = "<<100.*sdDiff2pt[b]<<"%"<<endl;
@@ -1140,7 +1140,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[1]<0)
     {
       v4pt[b]=-ptDiffCumulant4[b]/pow(-cumulant[1],.75);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*(dAvM/dAvw2),2.)>0.&&ptBinPOINoOfParticles[b]>0.)
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.)>0.&&ptBinPOINoOfParticles[b]>0.)
       {
        sdDiff4pt[b]=pow((1./(2.*ptBinPOINoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5);
        //cout<<"v'_2/2{4} = "<<v4pt[b]<<"%, "<<" "<<"sd{4} = "<<100.*sdDiff4pt[b]<<"%"<<endl;
@@ -1333,7 +1333,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[0]>0)
     {
       v2eta[b]=etaDiffCumulant2[b]/pow(cumulant[0],0.5);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*(dAvM/dAvw2),2.)>0.&&etaBinPOINoOfParticles[b]>0.) // to be improved
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0.&&etaBinPOINoOfParticles[b]>0.) // to be improved
       {
        sdDiff2eta[b]=pow((1./(2.*etaBinPOINoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5);
        //cout<<"v'_2/2{2} = "<<v2eta[b]<<"%, "<<" "<<"sd{2} = "<<100.*sdDiff2eta[b]<<"%"<<endl;
@@ -1359,7 +1359,7 @@ void AliCumulantsFunctions::Calculate()
     if(cumulant[1]<0)
     {
       v4eta[b]=-etaDiffCumulant4[b]/pow(-cumulant[1],0.75);
-      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*(dAvM/dAvw2),2.)>0.&&etaBinPOINoOfParticles[b]>0.) // to be improved
+      if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.)>0.&&etaBinPOINoOfParticles[b]>0.) // to be improved
       {
        sdDiff4eta[b]=pow((1./(2.*etaBinPOINoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5);
        //cout<<"v'_2/2{4} = "<<v4eta[b]<<"%, "<<" "<<"sd{4} = "<<100.*sdDiff4eta[b]<<"%"<<endl;