{ //Double_t Q2[2] = {0.0954, 0.0906}; // old values Double_t Q2[2] = {0.098927, 0.09271}; Double_t Ar[2] = {6.332, 5.588}; Double_t eAr[2] = {1.173, 0.903}; Double_t ApQ[2]; Double_t eApQ[2]; Double_t AvQ2; Double_t Awt[i]; Double_t tmp=0.0,wt=0.; Double_t tmpA=0.0; for (Int_t i=0; i<2; i++) { ApQ[i] = Ar[i] / Q2[i]; eApQ[i] = eAr[i] / Q2[i]; Awt[i] = 1./(eApQ[i] *eApQ[i]); tmp += Q2[i]*Awt[i]; tmpA += ApQ[i]*Awt[i]; wt += Awt[i]; } AvQ2 = tmp/wt; TString Qout = Form("%7.4f",AvQ2); cout << " Average Q^2 = " << Qout << endl; Double_t MeanApQ = tmpA / wt; TString ApQout = Form("%7.4f",MeanApQ); Double_t eMeanApQ = sqrt(1./wt); TString eApQout = Form("%7.4f",eMeanApQ); cout << " Average A/Q = " << ApQout << " +/- " << eApQout << endl; Double_t MeanA = MeanApQ * AvQ2; Double_t eMeanA = eMeanApQ * AvQ2; TString Aout = Form("%7.4f",MeanA); TString eAout = Form("%7.4f",eMeanA); cout << " Average A = " << Aout << " +/- " << eAout << endl; const Int_t nbg = 2; Double_t bgfrac[nbg] = {0.023, 0.065}; Double_t bgA[nbg] = {-2.0, -2.0}; Double_t Pol = 0.852; Double_t Aphys = MeanA / Pol; Double_t eAphys = eMeanA / Pol; tmp = 0.; Double_t tmpf = 0.; for (Int_t i=0; i