using string for root need #include <cstring>
for c++               need #include <string>
 
I updated  elas_ratio.com to include everything`
The chisq min is with normalization = 1
For miller et al Integrating over the bin
   Q2   sig_q2_thy 
  0.025  0.216792  
  0.075  0.267093  
  0.125  0.258883  
  0.175  0.235854  
  0.225  0.209256  
  0.275  0.182814  
  0.325  0.158125  
  0.375  0.135698  
  0.425  0.115995  
  0.475  0.0986715  
  0.525  0.0837786  
  0.575  0.0709649  
  0.625  0.0600569  
  0.675  0.0508184  
  0.725  0.0429952  
  0.775  0.0363703  
  0.825  0.0308232  
  0.875  0.0261194  
  0.925  0.0222019  
  0.975  0.0188985  
  1.025  0.0161238  
  1.075  0.0137775  
  1.125  0.0118131  
  1.175  0.0101352  
  1.225  0.00871212  
  1.275  0.00749797  
  1.325  0.00645618  
  1.375  0.00556026  
  1.425  0.00478979  
  1.475  0.0041297  
  1.525  0.00356357  
  1.575  0.00307905  
  1.625  0.0026581  
  1.675  0.00230152  
  1.725  0.00199546  
  1.775  0.00173319  
  1.825  0.00151022  
  1.875  0.00131618  
  1.925  0.00114964  
  1.975  0.00100772  
  2.025  0.000884408  
  2.075  0.000778319  
  2.125  0.000686778  
  2.175  0.000607406  
  2.225  0.000537818  
  2.275  0.000477336  
  2.325  0.000424559  
  2.375  0.000378222  
  2.425  0.000337577  
  2.475  0.000301619  
Taking the values at the bin center
  0.025  0.229485  
  0.075  0.26896  
  0.125  0.259486  
  0.175  0.236009  
  0.225  0.209297  
  0.275  0.182727  
  0.325  0.157995  
  0.375  0.135523  
  0.425  0.11589  
  0.475  0.0985684  
  0.525  0.0837336  
  0.575  0.0709097  
  0.625  0.0600074  
  0.675  0.0507866  
  0.725  0.0429403  
  0.775  0.0362895  
  0.825  0.0307825  
  0.875  0.0260791  
  0.925  0.022158  
  0.975  0.0188874  
  1.025  0.0160965  
  1.075  0.0137671  
  1.125  0.011794  
  1.175  0.010117  
  1.225  0.00870258  
  1.275  0.00749076  
  1.325  0.00645012  
  1.375  0.00555511  
  1.425  0.00478487  
  1.475  0.0041223  
  1.525  0.00355988  
  1.575  0.0030762  
  1.625  0.00265536  
  1.675  0.00229916  
  1.725  0.00199343  
  1.775  0.00173106  
  1.825  0.00150873  
  1.875  0.00131491  
  1.925  0.0011483  
  1.975  0.00100679  
  2.025  0.000883052  
  2.075  0.000777641  
  2.125  0.000686322  
  2.175  0.000607022  
  2.225  0.000537081  
  2.275  0.000476886  
  2.325  0.00042417  
  2.375  0.000377886  
  2.425  0.000337156  
  2.475  0.00030125  

bsub -q long -o  q_ratio.log < qratio.com
does the ratio plots
plots the cross sections with all the data 
does the latest ones -  elas_nui.com

It appears that do calculate chi of Kit
one can sum from 2.0 to 3.0 and the 
chisquare will do it correctly
 
For Kit we have 25 events in first bin
from .1-3.0 we sum 328 events
If one does the integration past 3.0 one gets
about 11 events. Hence, total of 354 + 11 = 365

using the data bins which go from 2 -3 as one bin
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
m_A= 1.05 nor=1 max_like=16.8002

The chisq = 16.8, they claim 15, uses data as errors
for the Chi Square fit uses data as errors
M_a=1.10034 chimin=16.6027 error=0.110696

for the Chi Square  uses theory for the errors
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
Exp=Kitagaki_83 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
 M_a=1.23742 chimin=18.9156 error=0.0991434

max likely
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
Exp=Kitagaki_83 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.18935 chimin=18.0134 error=0.101533

using data errors vary the normalization 
m_A= 1.05 nor=0.94 chi=16.0291
m_A= 1.05 nor=0.95 chi=15.9847
m_A= 1.05 nor=0.96 chi=16.0095
m_A= 1.05 nor=0.97 chi=16.1034

Maximum likely hood
m_A= 1.19 nor=0.98 max_like=18.1474
m_A= 1.19 nor=0.99 max_like=18.0472
m_A= 1.19 nor=1 max_like=18.0141
m_A= 1.19 nor=1.01 max_like=18.0467
m_A= 1.19 nor=1.02 max_like=18.1439

using theory as the  errors
m_A= 1.23 nor=0.98 chi=19.053
m_A= 1.23 nor=0.99 chi=18.9543
m_A= 1.23 nor=1 chi=18.9214
m_A= 1.23 nor=1.01 chi=18.9543
m_A= 1.23 nor=1.02 chi=19.053
m_A= 1.23 nor=1.03 chi=19.2175

putting in overflow for Barish set all get 
Too many steps in xxxInt, Function = IntegFlux_dsigma_dq2_thy

using the overflow
i_data_pt=31 q2_binlo= -1.55 q2_binhi= -10.43
Starting to integrate this bin it starts with 
the point -10.43
 i=19 x_lo= 0.113208 x_hi= 6 cPara[0]= -10.43 diff= 7.7102e-12 criteria=
2.72475e-12 sum_new = 2.73246e-09
on the first point. The result is small  and it hasn't quite 
converged. However, there does not appear to be a mistake.

Looking at Kit. 
Usin data as errors and 20 bin histogram
using chi using events as errors
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
Exp=Kitagaki_83 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.10034 chimin=15.8064 error=0.116522, normal=0.95
 ( Exp=Kitagaki_83 mA=1.05 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson

m_A= 1.05 nor=0.95 chi=15.9847
 ( Exp=Kitagaki_83 mA=1.1 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
m_A= 1.1 nor=0.95 chi=15.8063
 ( Exp=Kitagaki_83 mA=1.15 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
m_A= 1.15 nor=0.95 chi=15.9961

for max likely hood and using theory as the errors
normalization = 1.0 gives the lowest chisquare

chi which uses errors and 20 bins.
 chimax=chi, errors=theory
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 ( Exp=Kitagaki_83 mA=1.23 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.23742 chimin=18.9156 error=0.0991434

max like 20 bins
 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 Exp=Kitagaki_83 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.19039 chimin=18.0147 error=0.0994373

max likely, binned as histogram 30 bins
Exp=Kitagaki_83 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.19435 chimin=38.7104 error=0.103437

error 
m_A= 1.08535 nor=1 maxl=39.7302
m_A= 1.08635 nor=1 maxl=39.7128 error= 0.108
m_A= 1.08735 nor=1 maxl=39.6956

m_A= 1.29435 nor=1 maxl=39.6968
m_A= 1.29535 nor=1 maxl=39.7171 error=0.101
m_A= 1.29635 nor=1 maxl=39.7375




 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 ( Exp=Kitagaki_83 mA=1.05 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  Looked at calculation of chisquare and it looks OK;
  errors seem correct and sum seem correct. 
   q2_low,q2, q2_high
  -0.1 -0.105 -0.11
Integrate dsigma_dq2 from -0.1 to -0.11 = 24.4603
Integrate dsigma_dq2 at -0.105 = 2446.21
The intergrations seems to be OK


with
  Elastic
elas("nu","NucCar","JRA_CS_HallA","Krutov","JRA_CS_HallA","JRA",1.00);
E=0.158
Nuke = 0.128205
sigma            = 0.0166244

The mean energy of the LSND cross section above threshold
for neutrinos on C12 is 156 MeV

   the cross section per carbon nucleus total is
   10.6 +-0.3 +-1.8 times 10**-40 cm2

one needs to devide by 6 to get it per neutron

Comparing polarization to non polarization

 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.045 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA

  M_a=1.05462 chimin=66.4185 error=0.0553715
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.045 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS GEn=Krutov GMp=JRA_CS GMn=JRA
  M_a=1.05642 chimin=66.5637 error=0.0551329

On July 30 2003, I reran the the program to find MA
comparing old with new

Miller M_a=1.11681 paper=1.118 - from Ma_min.txt
Barish M_a=1.0753 paper=1.075
Baker M_a=M_a=1.07885 paper=1.075 - from Ma_min.txt
Kit - 1.19436, paper = 1.189

 chimax=maxl, errors=theory
 ( Exp=Miller_82 mA=1.11 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.11681 chimin=53.8045 error=0.0552737
  
 ( Exp=Miller_82 mA=1.13 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=dipole GEn=zero GMp=dipole GMn=dipole
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.13618 chimin=53.1579 error=0.0552146
  
 ( Exp=Miller_82 mA=1.09 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.08983 chimin=54.6605 error=0.0545342
  
on fcdfsgi2  using code from May 30 14:40 Ma_min.C
get the same answer.

Exp=Miller_82 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.11681 chimin=53.8045 error=0.0552737

Exp=Miller_82 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 GEp=dipole GEn=zero GMp=dipole GMn=dipole
  M_a=1.13618 chimin=53.1579 error=0.0552147

Exp=Miller_82 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
  M_a=1.08983 chimin=54.6606 error=0.0545342

On b0urpc15 again

(rish_77 mA=1.08 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.0753 chimin=39.4258 error=0.095284

 ( Exp=Barish_77 mA=1.1 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=dipole GEn=zero GMp=dipole GMn=dipole
  M_a=1.0953 chimin=39.314 error=0.0964026

 ( Exp=Barish_77 mA=1.05 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
  M_a=1.04907 chimin=39.8453 error=0.0940946

 flu xfile =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.07 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.07885 chimin=65.95 error=0.0553564

using different start values -doesn't matter
 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.08 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07887 chimin=65.9504 error=0.0554467
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.075 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07887 chimin=65.9502 error=0.055401
 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.02 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07874 chimin=65.9532 error=0.0554563
For this nelas=5 instead of 9 but doesn't seem to matter.
 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.08 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( nelas=5
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07882 chimin=65.9501 error=0.0553528
For nelas=12 and MA=1.02
 chimax=maxl, errors=theory
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.02 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07889 chimin=65.9504 error=0.0555255
Not much difference. vx
with q2_nu_Baker_81_jun15_03.dat
( flux file =q2data/flux_spline_area_Baker_81.dat
Exp=Baker_81 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
  M_a=1.07885 chimin=65.95 error=0.0553564



  
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.09 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=dipole GEn=zero GMp=dipole GMn=dipole
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.1039 chimin=64.7333 error=0.0546695
  
 ( flux file =q2data/flux_spline_area_Baker_81.dat
 ( Exp=Baker_81 mA=1.04 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.0546 chimin=66.4182 error=0.055336
  
Below is the 30 bin fit
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 ( Exp=Kitagaki_83 mA=1.195 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.19436 chimin=38.7101 error=0.103044 30 bin fit
 M_a=1.18927 chimin=18.0137 error=0.102016 - 20 bin fit
  
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 ( Exp=Kitagaki_83 mA=1.225 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=dipole GEn=zero GMp=dipole GMn=dipole
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.2253 chimin=38.8065 error=0.0965723 - 30 bin fit
 M_a=1.22385 chimin=18.159 error=0.0978957 - 20 bin fit
  
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat
 ( Exp=Kitagaki_83 mA=1.175 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.17512 chimin=38.3812 error=0.102832 -30 bin fit
 M_a=1.16963 chimin=17.6223 error=0.102528 - 20 bin fit

m_A= 1.0651 nor=1 maxl=39.4035
m_A= 1.0661 nor=1 maxl=39.3866 - .109
m_A= 1.0671 nor=1 maxl=39.3698


m_A  = 1.275 nor=1 maxl=39.3718 -0.100 error
m_A= 1.276 nor=1 maxl=39.3927


 ( Exp=Barish_77 mA=1.08 gA=-1.23 mV=0.84 nucCorrecton=SinghD
 ( GEp=Olsson GEn=zero GMp=Olsson GMn=Olsson
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.0753 chimin=39.4258 error=0.095284

 ( Exp=Barish_77 mA=1.1 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=dipole GEn=zero GMp=dipole GMn=dipole
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.0953 chimin=39.314 error=0.0964026

 ( Exp=Barish_77 mA=1.05 gA=-1.267 mV=0.842615 nucCorrecton=SinghD
 ( GEp=JRA_CS_HallA GEn=Krutov GMp=JRA_CS_HallA GMn=JRA
 nelas = 9 step_ma = 0.01 normalization = 1
  M_a=1.04907 chimin=39.8453 error=0.0940946


-rw-r--r--    1 hbudd    cdf         3348 Apr 20 15:44 Ma_min_apr20_03.C
-rw-r--r--    1 hbudd    cdf         3377 May 11 15:46 Ma_min_may11_03.C
-rw-r--r--    1 hbudd    cdf         3873 May 12 17:50 Ma_min_may12_03.C
-rw-r--r--    1 hbudd    cdf         5257 May 19 15:13 Ma_min_may19_03.C
-rw-r--r--    1 hbudd    cdf         5270 May 27 17:01 Ma_min_may27_03.C
-rw-r--r--    1 hbudd    cdf         5082 May 27 18:16 Ma_min_may27_03_2.C
-rw-r--r--    1 hbudd    cdf         5889 May 30 14:40 Ma_min.C
-rw-r--r--    1 hbudd    cdf         2780 Jul  1 10:44 Ma_min_bar_kit.C

 THe run  Ma_min_bar_kit.C and Ma_min_may11_03.C have no difference in the
code which finds MA

check of FA2*FA**2+FA1*FA+FA0-dsig_dq2 =
I changed the error on the integration from
0.001 to 0.0005 and the value went down by 
a factor of 2
for error of 0.0005 
FA2*FA**2+FA1*FA+FA0-dsig_dq2 =0.000401846
for error of 0.00025 
FA2*FA**2+FA1*FA+FA0-dsig_dq2 =9.83032e-05

for these files
f_a_dipole.top
f_a_log.top
f_a_log_mod.top
f_a_dipole_mod.top
f_a_polar.top
f_a_cross_sect.top
f_a_polar_mod.top
f_a_cross_sect_mod.top
the differences for f_a_dipole.top
are 
45c45 from Minerva
< 1.58867 1.00266  0.0111419
---
> 1.60867 1.00266  0.0111419
71,74c71,74 from Kit
< 0.149609 0.946985  0.117453
< 0.295313 0.96878  0.108549
< 0.495703 0.968036  0.150199
< 0.696094 0.661637  0.198512
---
> 0.164609 0.946985  0.117453
> 0.310313 0.96878  0.108549
> 0.515703 0.968036  0.150199
> 0.716094 0.661637  0.198512
76,77c76,77
< 1.18711 1.38925  0.242379
< 1.58867 1.21154  0.344122
---
> 1.20211 1.38925  0.242379
> 1.60867 1.21154  0.344122
~
As far as I can tell the non mod are
the correct ones, note they all have to be 
changed to do the correct bin centering



I sent the f_a_polar.top and f_a_cross_sect.top
to jorge. So although I'm not sure what 
the mod is, the one without looks to be the 
correct one. We will modify the files for 
the errors to that f_a_polar.top will
correspond to f_a_vra_polar.top

I have redone the nub and the old dipole is
f_a_dipole_nub_mod.top, the mod comes from 
something I'm not sure
while the new dipole is 
f_a_dipole_nub.top
THe difference between these may be the flux


July 16 04.
  
   I have changed the way the flux is done 
so that it is the flux, not the expoential 
of a flux. I addition I removed the 
old files of Kit and Baker so that
only the area spline flux is there.
To put the other files back one should 
change them so they are just number
and one does not have to go through
a exp of the numbers.

checked 
Minerva_nu
Minerva_nub
Barish  checked full file
Miller checked full file

Reran Baker for the mistake in 
q2_nu_Baker_81_mva_bin.dat
The last bin was wrong. 
created new 
f_a_dipole_mva.eps  f_a_lin_mva.eps  f_a_log_mva.eps
f_a_mva.eps
in minerva/mc/ana/mod_plots
but did not modify plots in elas/tree


we have 
q2= -40.8243 gmp=-4.0452 for gmp=JRA_CS_HallA
"JRA_CS_HallA","Krutov","JRA_CS_HallA","JRA"
//

emu_vs_theta.com - plots the muon energy 
and theta given q^2 and plots over the flux.

On laptop
Modified plot_q2.com
Modified plot_fa.com
modified Experiment.h


Apr 18 2005

Put in NucCorr.C in elas_3fun_log_50GeV.com
In CS_3fun_log.C put "data/"  data/Allasia_nu.dat

Dec 30 05 
_AB is Bodek and Bradfords form factors, they have been checked

Jan 2 05
For determining MA
-  Be sure to use the correct datafile
     q2_nu_Miller_82_orig_bin.dat
     q2_nu_Baker_81_events.dat

     q2_nu_Kitagaki_83_nominal.dat
- Be sure that 
     const int IBIN_CHI_START=1;
     const int IBIN_CHI_END=0;
     char* chimax="maxl"; // "chi";
     char* data_thy="theory";
For Nuint02 it appears the 
Integration accuracy is 0.001

THe files that appeared to be used were
q2_nu_Barish_77_with_overflow.dat
q2_nu_Miller_82_orig_bin.dat
q2_nu_Baker_81_events.dat (I think)

Not clear about Kitagaki
may have used:
q2_nu_Kitagaki_83_nominal.dat

However, the file
q2_nu_Kitagaki_83.dat
has q2_nu_Kitagaki_83_q2_2_3.dat
without the last line
The file has a last line of
q2_nu_Kitagaki_83_q2_2_3.dat
has 
3.45 3.0 6.0 0.85
Which is probably from theory

Jan 17 06
Looks like the old code was supposed
to have MA=0.84 and ga=-1.23
Test rerunning the code, old is
from the nuint02 paper

m_V=0.84 and ga=-1.23
                 new        old    new_fine 
Olsson, Miller  1.11682     1.117   1.11648 
Olsson Barish   1.0753      1.075   1.07493
Olsson Baker    1.07885     1.079   1.07888
Olsson Kit      1.19436     1.194 - 1.19465 publication bins 
Olsson Kit_90                       1.09613
(note for Kit_90 g_A=-1.254 as what was in their paper)

m_V=0.842615, g_A=-1.267            new_FINE
dipole Miller   1.13618      1.136  1.13594
dipole Barish   1.0953       1.095  1.09491 
dipole Baker    1.1039       1.104  1.10496
dipole Kit_83   1.2253       1.225  1.22537   - publication bins 
dipole Kit_90                       1.12254

m_V=0.842615, g_A=-1.267 
dip-Ols Miller  0.01935   
dip-Ols Barish  0.0200
dip-Ols Baker   0.0250
dip-Ols Kit_83  0.0309
dip-Ols Kit_90  0.0264

m_V=0.842615, g_A=-1.267           new_fine
JRA   Miller    1.08984      1.090 1.08941
JRA   Barish    1.04906      1.049 1.04897 
JRA   Baker     1.0546       1.055 1.05475
JRA   Kit       1.17512      1.175 1.17556     publication bins 

m_V=0.842615, g_A=-1.267  new_fine, not difference
AB BB   Miller  1.08666  1.08622
M_a=1.13757 chimin=53.1054 error=0.056119 M_a - input = 0.00163186
AB BB   Barish  1.04626  1.04602
AB BB   Baker   1.05027  1.05045 
AB BB   Kit     1.17207  1.17247      - publication bins 

m_V=0.842615, g_A=-1.267 AB B - JRA
AB-JRA  Miller  -0.0032
AB-JRA  Barish  -0.0028
AB-JRA  Baker   -0.0043
AB-JRA  Kit     -0.0031

m_V=0.842615, g_A=-1.267 AB B - Olsson
AB-Ols  Miller  -0.0302
AB-Ols  Barish  -0.0290
AB-Ols  Baker   -0.0286
AB-Ols  Kit     -0.0223
ave             -0.0275

m_V=0.842615, g_A=-1.267 AB B - dip
AB-dip  Miller -0.04972 
AB-dip  Barish -0.04594
AB-dip  Baker  -0.05469 
AB-dip  Kit    -0.05290
ave            

THe set of runs are run with this conditions
and using the file Ma_min_nuint02.C
 chimax=maxl, errors=theory
 ( Intergration Accuracy =0.001
 ( max_integ_times_q2_flux=20
 ( nucCorrType=SinghD
 ( fun_times_G_E_p = const, fact_G_E_p = 1
 ( fun_times_G_E_n = const, fact_G_E_n = 1
 ( fun_times_G_M_p = const, fact_G_M_p = 1
 ( fun_times_G_M_n = const, fact_G_M_n = 1
 ( fun_times_F_A = const, fact_F_A = 1
 ( fun_times_F_1_V = const, fact_F_1_V = 1
 ( fun_times_cF_2_V = const, fact_F_1_V = 1
 ( fun_times_F_A = const, fact_F_1_V = 1
****Mistake dipole run with 1.23 need to rerun with 1.267
The runs
Miller`
 ( flux file =q2data/flux_Miller_82.spl in ReadSplineFile 
 ( Exp=Miller_82 sigma_thy =2.19131
 ( nu_nub=nu, m_A=1.11, g_A=-1.23, m_V=0.842615
 ( GEp=Olsson, GEn=zero, GMp=Olsson, GMn=Olsson,  F_A = dipole
  M_a=1.11214 chimin=53.8069 error=0.0555808
 ( flux file =q2data/flux_Miller_82.spl in ReadSplineFile 
 ( Exp=Miller_82 sigma_thy =2.27227
 ( nu_nub=nu, m_A=1.13, g_A=-1.23, m_V=0.842615
 ( GEp=dipole, GEn=zero, GMp=dipole, GMn=dipole,  F_A = dipole
  M_a=1.13345 chimin=53.1033 error=0.0565097
 ( flux file =q2data/flux_Miller_82.spl in ReadSplineFile 
 ( Exp=Miller_82 sigma_thy =2.23563
 ( nu_nub=nu, m_A=1.09, g_A=-1.267, m_V=0.842615
 ( GEp=JRA_CS_HallA, GEn=Krutov, GMp=JRA_CS_HallA, GMn=JRA,  F_A = dipole
  M_a=1.08984 chimin=54.6605 error=0.0545342
 ( flux file =q2data/flux_Miller_82.spl in ReadSplineFile 
 ( Exp=Miller_82 sigma_thy =2.22422
 ( nu_nub=nu, m_A=1.09, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=Krutov, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.08763 chimin=55.0763 error=0.0540917
 ( flux file =q2data/flux_Miller_82.spl in ReadSplineFile 
 ( Exp=Miller_82 sigma_thy =2.2217
 ( nu_nub=nu, m_A=1.09, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=AB, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.08666 chimin=55.2924 error=0.054102
Barish_77
 ( flux file =q2data/flux_Barish_77.spl in ReadSplineFile 
 ( Exp=Barish_77 sigma_thy =1.6571
 ( nu_nub=nu, m_A=1.08, g_A=-1.23, m_V=0.842615
 ( GEp=Olsson, GEn=zero, GMp=Olsson, GMn=Olsson,  F_A = dipole
  M_a=1.07041 chimin=39.428 error=0.0958571
 ( flux file =q2data/flux_Barish_77.spl in ReadSplineFile 
 ( Exp=Barish_77 sigma_thy =1.71995
 ( nu_nub=nu, m_A=1.1, g_A=-1.23, m_V=0.842615
 ( GEp=dipole, GEn=zero, GMp=dipole, GMn=dipole,  F_A = dipole
  M_a=1.09161 chimin=39.299 error=0.0980874
 ( flux file =q2data/flux_Barish_77.spl in ReadSplineFile 
 ( Exp=Barish_77 sigma_thy =1.67375
 ( nu_nub=nu, m_A=1.05, g_A=-1.267, m_V=0.842615
 ( GEp=JRA_CS_HallA, GEn=Krutov, GMp=JRA_CS_HallA, GMn=JRA,  F_A = dipole
  M_a=1.04907 chimin=39.8452 error=0.0940946
 ( flux file =q2data/flux_Barish_77.spl in ReadSplineFile 
 ( Exp=Barish_77 sigma_thy =1.67972
 ( nu_nub=nu, m_A=1.06, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=Krutov, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.04716 chimin=39.9566 error=0.0953279
 ( flux file =q2data/flux_Barish_77.spl in ReadSplineFile 
 ( Exp=Barish_77 sigma_thy =1.67777
 ( nu_nub=nu, m_A=1.06, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=AB, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.04626 chimin=40.0526 error=0.0953965
Baker
 ( flux file =q2data/flux_spline_area_Baker_81.dat in CreateFluxSplineArea
 ( Exp=Baker_81 sigma_thy =226.897
 ( nu_nub=nu, m_A=1.07, g_A=-1.23, m_V=0.842615
 ( GEp=Olsson, GEn=zero, GMp=Olsson, GMn=Olsson,  F_A = dipole
  M_a=1.07429 chimin=65.9516 error=0.0557129
 ( flux file =q2data/flux_spline_area_Baker_81.dat in CreateFluxSplineArea
 ( Exp=Baker_81 sigma_thy =235.28
 ( nu_nub=nu, m_A=1.09, g_A=-1.23, m_V=0.842615
 ( GEp=dipole, GEn=zero, GMp=dipole, GMn=dipole,  F_A = dipole
  M_a=1.10134 chimin=64.6603 error=0.0556215
 ( flux file =q2data/flux_spline_area_Baker_81.dat in CreateFluxSplineArea
 ( Exp=Baker_81 sigma_thy =227.01
 ( nu_nub=nu, m_A=1.04, g_A=-1.267, m_V=0.842615
 ( GEp=JRA_CS_HallA, GEn=Krutov, GMp=JRA_CS_HallA, GMn=JRA,  F_A = dipole
  M_a=1.0546 chimin=66.4182 error=0.055336
 ( flux file =q2data/flux_spline_area_Baker_81.dat in CreateFluxSplineArea
 ( Exp=Baker_81 sigma_thy =228.567
 ( nu_nub=nu, m_A=1.05, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=Krutov, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.05176 chimin=67.0284 error=0.0552752
 ( flux file =q2data/flux_spline_area_Baker_81.dat in CreateFluxSplineArea
 ( Exp=Baker_81 sigma_thy =228.225
 ( nu_nub=nu, m_A=1.05, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=AB, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.05027 chimin=66.9292 error=0.0552877
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat in CreateFluxSplineArea
 ( Exp=Kitagaki_83 sigma_thy =1330.12
 ( nu_nub=nu, m_A=1.14, g_A=-1.23, m_V=0.842615
 ( GEp=Olsson, GEn=zero, GMp=Olsson, GMn=Olsson,  F_A = dipole
  M_a=1.18852 chimin=18.0047 error=0.111502
Kitagaki
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat in CreateFluxSplineArea
 ( Exp=Kitagaki_83 sigma_thy =1387.07
 ( nu_nub=nu, m_A=1.17, g_A=-1.23, m_V=0.842615
 ( GEp=dipole, GEn=zero, GMp=dipole, GMn=dipole,  F_A = dipole
  M_a=1.22324 chimin=18.1482 error=0.104194
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat in CreateFluxSplineArea
 ( Exp=Kitagaki_83 sigma_thy =1325.05
 ( nu_nub=nu, m_A=1.12, g_A=-1.267, m_V=0.842615
 ( GEp=JRA_CS_HallA, GEn=Krutov, GMp=JRA_CS_HallA, GMn=JRA,  F_A = dipole
  M_a=1.17444 chimin=17.6138 error=0.112422
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat in CreateFluxSplineArea
 ( Exp=Kitagaki_83 sigma_thy =1322.35
 ( nu_nub=nu, m_A=1.12, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=Krutov, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.17042 chimin=17.5402 error=0.112336
 ( flux file =q2data/flux_spline_area_Kitagaki_83.dat in CreateFluxSplineArea
 ( Exp=Kitagaki_83 sigma_thy =1319.01
 ( nu_nub=nu, m_A=1.12, g_A=-1.267, m_V=0.842615
 ( GEp=AB, GEn=AB, GMp=AB, GMn=AB,  F_A = dipole
  M_a=1.17052 chimin=17.6346 error=0.11208

THis is the end of the file which reproduces the nuint02 result

********************
Getting new q2 plots
change number of splines from 200 to 450 in Spline.h
and SplineArea.h and SplineFile.h
# fval=       114.4037        41.4074        72.9964 0.000000001000
# fval=        39.7826         1.6780        38.1046 0.000000000010

These are the plots which include resolution 
smearing. One plot of the cross section 
plot is of other peoples data.

Rik wanted to an explanation
for the form factor and it is
below. I'm trying to generate
a new plot with muon momentum 
resolution function Jorge suggested.

axial = vector

The idea in axial = vector is
you can write out the the
elastic part of the hadronic
tensor in the quasi-elastic limit.
You can then compare this to the
hadronic tensor for quasi-elastic
scattering. This gives you a value
of F1 (F2 and F3) in terms of the
quasi elastic form factors.
See hep-ph/0408018
In the limit of high Q2 the axial
and vector parts of F1 and F2
are supposed to become equal.
However, at low Q2 they do
not have to be equal. The dipole
and the form factor with the condition axial = vector
become equal at q2=-0.5 for F1. (you want a continuous
function ) If you do it with F2 they
cross around q2=-0.3 which is probably
too close to zero. Below is the code for
this form factor.

double Elastic::F_A_F1_V_eq_A(double q2)
// for q2 make axial = vector
{
  double gmv= G_M_p_nucleon(q2)-G_M_n_nucleon(q2);
  double fa_v=sqrt(tau(q2)/(1.+tau(q2)))*gmv;
  double fa_dipole=F_A_dipole(q2);
  if(fa_v<-fa_dipole&&q2>-2.0) // the q2>-2.0 is so we only use the F_A dipole near 0
  {
     return fa_dipole;
  }
  else
  {
     return -fa_v;
  }
}
August 22
in FindRoot.C if the incoming variables have the same sign
the routine gives up. ie see the line 
  double f= FuncToFindRoot(stg,x_low,cPara);
  double fmin= FuncToFindRoot(stg,x_hi,cPara);
  if(f*fmin>=0.0)
  {
    return -999.0;
  }



Q2[ibin]=-BinCenter_dsigma_dq2(ibin);
To do this solve 
del_Q2=Q2_binhi[nbin]-Q2_binlo[nbin]
diff=IntegFlux_dsigma_dq2_thy(xval)-sig_q2_thy[nbin]/del_Q2
IntegFlux_dsigma_dq2_thy = dsigma_dq2(*cPara,xval)*FluxSpline(xval)
integrated over qbinlo to qbinhi.
SumFlux_dsigma_dq2_thy(q2)=sum energy_bin_width*(flux at energy)*dsigma_dq2(E,q2) 
sig_q2_data[i_data_pt] is the data point in the file
sig_q2_thy=SumFlux_dsigma_dq2_thy(q2 at center of bin)*(q2 bin width)
sig_q2_thy[i_data_pt] =Integ_dsigma_dq2_thy(-Q2_binlo[i_data_pt],-Q2_binhi[i_data_pt]);
                      =intergral from Q2_binlo to Q2_binhi of dsigma_dq2
the problem was at the bins where the dsigma_dq2 turned
over the routine FindRoot::Solve didn't try to find the
solution since both values of dsigma_dq2 had the same 
sign. That means there is not a unique solution or 
no solution, so I wrote FindRoot::Solve to give up.

Kitagaki_91 does not fit. The problem is 
the bin size changes. What's in the plot is 
#/0.05 GeV. Therefore, what should be compared
is sig_q2_thy[i] = number of event in a bin
sig_q2_data[i]*bin[i]/bin[0] = number of events in a bin

In Write_td_file what's plotted is sig_q2_data[i]
what's in q2_*_mva_bin.dat for the y axis is
the sum of the bin. 


Oct 6 2006 new look at form factors
Published MA
Miller 1.05    0.05
Barish 1.01    0.09
Baker  1.07    0.06
Kit_83 1.05   +0.12 -0.16
Kit_90 1.070 +0.040 - 0.045


m_V=0.84 and ga=-1.23
                   Ma      error
Olsson, Miller   1.11648 0.055205
Olsson Barish    1.07492 0.0953527
Olsson Baker     1.07888 0.055406
Olsson Kit       1.19466 0.102615 
Olsson Kit_90    1.09613  0.0411179
(note for Kit_90 g_A=-1.254 as what was in their paper)

m_V=0.842615, g_A=-1.267     
dipole Miller    1.13594 0.055290
dipole Barish    1.09491 0.092983
dipole Baker     1.10502 0.0563096 
dipole Kit_83    1.22537 0.0978093
dipole Kit_90    1.12254 0.042656

m_V=0.842615, g_A=-1.267 
dip-Ols Miller  0.01935   
dip-Ols Barish  0.0200
dip-Ols Baker   0.0250
dip-Ols Kit_83  0.0309
dip-Ols Kit_90  0.0264 


m_V=0.84261 g_A=-1.267

AB25 Miller_82   1.08107 0.0541565
AB43 Miller_82   1.07946 0.0541294
AB25 Barish_77   1.04081 0.0938888
AB43 Barish_77   1.03902 0.093868
AB25 Baker_81    1.04653 0.0554137
AB43 Baker_81    1.04575 0.0516122
AB25 Kitagaki_83 1.1709  0.103566
AB43 Kitagaki_83 1.1686  0.104123
AB25 Kitagaki_90 1.05869 0.0427331
AB43 Kitagaki_90 1.05697 0.0422852

m_V=0.842615, g_A=-1.267 
AB25-Ols  Miller -0.03541
AB43-Ols  Miller -0.03702
AB25-Ols  Barish -0.03411
AB43-Ols  Barish -0.0359
AB25-Ols  Baker  -0.03235  
AB43-Ols  Baker  -0.03313 
AB25-Ols  Kit_83 -0.02376 
AB43-Ols  Kit_83 -0.02606 
AB25-Ols  Kit_90 -0.03744
AB43-Ols  Kit_90 -0.03916

m_V=0.842615, g_A=-1.267 
AB25-dip  Miller  -0.05487
AB43-dip  Miller -0.05648 
AB25-dip  Barish -0.0541 
AB43-dip  Barish -0.05589
AB25-dip  Baker  -0.05849 
AB43-dip  Baker  -0.05927
AB25-dip  Kit_83 -0.05447
AB43-dip  Kit_83 -0.05677
AB25-dip  Kit_90 -0.06385
AB43-dip  Kit_90 -0.06557

Oct 16 - 
Files which match the q2 files in q2data
diff q2_nu_Miller_82_orig_bin.dat q2_nu_Miller_82.dat 
diff  q2_nu_Kitagaki_83_orig_bin.dat q2_nu_Kitagaki_83.dat
diff q2_nu_Kitagaki_90_orig_bin.dat q2_nu_Kitagaki_90.dat
diff q2_nu_Baker_81_events.dat q2_nu_Baker_81.dat 

For extracting Ma we need to do 

cp q2_nu_Miller_82_mva_bin.dat   q2_nu_Miller_82.dat
cp q2_nu_Kitagaki_83_mva_bin.dat q2_nu_Kitagaki_83.dat
cp q2_nu_Baker_81_mva_bin.dat    q2_nu_Baker_81.dat
cp q2_nu_Kitagaki_90_mva_bin.dat q2_nu_Kitagaki_90.dat

and to go back
cp q2_nu_Miller_82_orig_bin.dat   q2_nu_Miller_82.dat 
cp q2_nu_Kitagaki_83_orig_bin.dat q2_nu_Kitagaki_83.dat
cp q2_nu_Kitagaki_90_orig_bin.dat q2_nu_Kitagaki_90.dat
cp q2_nu_Baker_81_events.dat      q2_nu_Baker_81.dat 

**************************************
nov 23
copied q2_nu_Kitagaki_90_mva_bin.dat to 
q2_nu_Kitagaki_90_mva_bin_0.dat
and modified q2_nu_Kitagaki_90_mva_bin.dat
to remove the bin from 0 to 0.05

Dec 9 06
make files from mva to mva_1 which
removes the part of the bin < 0.1

Jan 7 07
check Extrapolation to q2=0
 iExpPlot = 0 iExp = 1 ff_exp = ANL 82, D_{2}, Miller, b= 1.00000
0.0747429 0.867485 0.0567788
0.147823 0.972847 0.0436745
0.290566 1.05066 0.0391986
0.490555 0.976658 0.055941
0.690629 0.731521 0.0801116
0.890927 0.866537 0.113665
1.16659 1.16609 0.128065
1.56789 1.12199 0.237084
2.06786 0.413821 0.369285

  iExpPlot = 0 iExp = 3 ff_exp = BNL 90, D_{2}, Kitagaki, b=0.99993
0.0748039 0.946048 0.0555831
0.124569 0.990942 0.0588809
0.198264 1.07303 0.0460677
0.298367 1.13398 0.0527829
0.421286 1.12684 0.0506215
0.635671 1.18629 0.0477328
0.97595 0.99237 0.0637378
1.37781 1.12433 0.101805
1.77822 1.15139 0.156974
2.38286 0.951297 0.190842

 iExpPlot = 0 iExp = 2 ff_exp = FNAL 83, D_{2}, Kitagaki, b=1.00001
0.14873 0.966044 0.115217
0.294882 0.943711 0.0992347
0.495397 0.895157 0.126894
0.695833 0.619882 0.157282
0.896191 1.18879 0.190167
1.18649 1.12659 0.171454
1.58826 0.95672 0.229283
3.16243 0.509411 0.167342
 iExpPlot = 0 iExp = 0 ff_exp = BNL 81, D_{2}, Baker, b=1.00024
0.0895697 0.938215 0.0732946
0.149327 0.928649 0.0791705
0.264577 1.08569 0.0536255
0.444608 1.1793 0.0681899
0.624742 1.01127 0.086785
0.8049 0.94218 0.109518
1.06063 0.908237 0.106879
1.42208 1.00689 0.162219
1.78227 1.14116 0.239611
2.14235 0.675255 0.352984
2.55384 1.30838 0.456173

Jan 10 2007 

Tried to get a value of MA

    Their MA their err         AB25-Ols  Ma our assumptions
Miller 1.05    0.05           -0.03411  1.0159
Baker  1.07    0.06           -0.03235  1.0376
Kit_83 1.05   (+0.12 -0.16)   -0.02376  1.0262
Kit_90 1.070 (+0.040 - 0.045) -0.03744  1.0325
                          weighted ave  1.0282 +- 0.028

Ma from electro production = (1.069+-0.016)-0.055=1.014+-0.016
 
  The value that MA that will be used is 
               (1.028+1.014)/2.0 = 1.021 
  we say that they are from seperate techniques. 
 (In addition, I'm not sure he does the errors correctly
      for the electro production, but they could be correct.)

          The error given on MA be 0.028/sqrt(2)= 0.02

(I'll have to check the table to be sure these 
are all the correct numbers in the calculations)

 I'll use 1.02

Howard Budd

Jul4 07

  updated the files from laptop to be sure that
b0urpc15 is the current version without 
taring the directory and putting it over. 


Jul 11, tested trying to reproduce the old
answers
m_V=0.84 and ga=-1.23
                   Ma      error
Olsson, Miller   1.11648 0.055205  - OK
Olsson Barish    1.07492 0.0953527 - OK
Olsson Baker     1.07888 0.055406 - not OK get M_a=1.04043
Olsson Kit       1.19466 0.102615 - OK
Olsson Kit_90    1.09613  0.0411179

For Baker the file 
q2_nu_Baker_81.dat =  q2_nu_Baker_81_mva_bin_1.dat
cp q2_nu_Baker_81_events.dat q2_nu_Baker_orig_bin.dat

TO get things correct be sure:

THe q2 file is correct.
Mass of the nucleon is correct
const int IBIN_CHI_START=1; // the first bin used for chisquare calculation
const int IBIN_CHI_START=2; // for Kit 90

Jul 23
this uses tau with (m_proton+m_neutron)/2.0
"Miller_82","Olsson","zero","Olsson","Olsson",1.11649,-1.23,.84
"Miller_82","Lagr","Lagr25","Lagr","Lagr25",1.08656,-1.267,.842615
Miller_82, Lagr25 - olsson = 0.0299
"Miller_82","Lagr","Lagr43","Lagr","Lagr43",1.08519,-1.267,.842615
Miller_82, Lagr43 - olsson = 0.0313
"Barish_77","Olsson","zero","Olsson","Olsson",1.07493,-1.23,.84
"Barish_77","Lagr","Lagr25","Lagr","Lagr25",1.04614,-1.267,.842615
Barish_77, Lagr25 - olsson = 0.02879
"Barish_77","Lagr","Lagr43","Lagr","Lagr43",1.04492,-1.267,.842615
Barish_77, Lagr43 - olsson = 0.03001
"Baker_81","Olsson","zero","Olsson","Olsson",1.07888,-1.23,.84
"Baker_81","Lagr","Lagr25","Lagr","Lagr25",1.04981,-1.267,.842615
Baker_81, Lagr25 - olsson =  0.02907
"Baker_81","Lagr","Lagr43","Lagr","Lagr43",1.04963,-1.267,.842615
Baker_81, Lagr43 - olsson =  0.02925
"Kitagaki_83","Olsson","zero","Olsson","Olsson",1.19465,-1.23,.84
"Kitagaki_83","Lagr","Lagr25","Lagr","Lagr25",1.16876,-1.267,.842615
Kitagaki_83, Lagr25 - olsson = 0.02589
"Kitagaki_83","Lagr","Lagr43","Lagr","Lagr43",1.16945,-1.267,.842615
Kitagaki_83, Lagr43-olsson =  0.0252

Aug 12 2007
source mva.com
the files were the ones gotten by running original.com
commented out "double fact_time_fa=" in ichoice==12
const int IBIN_CHI_START=0; // the first bin used for chisquare calculation

Aug 13

Looks like I should interchange q2_nu_Miller_82_mva_bin_1.dat
and q2_nu_Miller_82_mva_bin.dat

Aug 26
made ibin_chi_start and ibin_chi_end internal variables to Experiment
This means that tdMvaPro.C and fa_inter.C will have to change 



Sep 7 Sent the following values for Ma to Arie


chimax="maxl"; // "chi"or"maxl";
accu=.0005;
"Allasia_90","nu","SinghD","dipole","zero","dipole","dipole",1.1136,-1.2546,0.105658,1.,.84,accu);
Ma = 1.1136, error= 0.0836052
"Allasia_90","nu","SinghD","Lagr","Lagr25","Lagr","Lagr25",1.03395,-1.267,0.105658,1.,.842615,accu);
Ma= 1.03395, error=0.10667 
"Allasia_90","nu","SinghD","Lagr","Lagr43","Lagr","Lagr43",1.03711,-1.267,0.105658,1.,.842615,accu);
     ma=1.03711, error=0.105259

Sep 10 extracted the values of Allasia_90 
and sent to Arie
 ( flux file =q2data/flux_spline_area_Allasia_90.dat in CreateFluxSplineArea
 ( sigma_theory = 950.018, nucleons=6.2147e+23, flux_scale = 1e-42
 ( cube size = 97.61
 ( number of QE events = 5.4908e-10
 ( Exp=Allasia_90 sigma_thy =950.018
 ( Intergration Accuracy =0.0005
 ( max_integ_times_q2_flux=20
 (ibin_chi_start = 0 ibin_chi_end = 0 m_P = 0.938919 M2 = 0.881569
 ( enuMinFlux = 10, enuMaxFlux = 100, enuMinCut = 10, enuMaxCut = 100
 ( solve_F_A_data_theory = data
 ( nu_nub=nu, m_A=1.015, g_A=-1.267, m_V=0.842615
 ( GEp=Lagr, GEn=Lagr25, GMp=Lagr, GMn=Lagr25,  F_A = dipole
 ( nucCorrType=SinghD
 ( fun_times_G_E_p = const, fact_G_E_p = 1
 ( fun_times_G_E_n = const, fact_G_E_n = 1
 ( fun_times_G_M_p = const, fact_G_M_p = 1
 ( fun_times_G_M_n = const, fact_G_M_n = 1
 ( fun_times_F_A = const, fact_F_A = 1
 ( fun_times_F_1_V = const, fact_F_1_V = 1
 ( fun_times_cF_2_V = const, fact_F_1_V = 1
 ( fun_times_F_A = const, fact_F_1_V = 1
 ( Write_td_file_F_A_calc, numThyPts = 100
0.193413 0.930972  0.0618166
0.394032 0.608902  0.0648657
0.594758 0.370952  0.0674293
0.795321 0.491341  0.0694247
1.08397 0.341589  0.0505237
1.48645 0.207178  0.0518328
1.97441 0.130441  0.0429566
2.66279 0.099879  0.0374063
3.46913 0.0962712  0.0371964

For exeriments which give events in bins
Kit 90 & q2_nu_Allasia_90.dat
have non constant bin size

Nov 18 2007
Bin width
Modify program to take into account 
 for bins with number of events in bin
For data files with errors, i. e. those
that have cross section modified code so
that the array sig_q2_data has the 
amount of cross section in a bin 
/ for data file with errors and cross section make sig_q2_data
// the total cross section in the bin
  if( strcmp(error_events,"errors")==0 )
  {
    for (int i=0; i<n_data_pt;i++)
    {
    double bin_wid=(Q2_binhi[i]-Q2_binlo[i])/ave_bin_width;
    sig_q2_data[i]=sig_q2_fl[i]*bin_wid;
    sig_q2_err[i]=sig_q2_err_fl[i]*bin_wid;
    }
  }

Dec 25 2009

  Problem integrating over a energy-q2 bin when the 
q2 limits are set to the kinematic limits (kin_lim). 
kin_lim is determined from the e_hi_bin.

  The CS formula is set to zero if energy-q2 are 
outside the kinimatic limits. Hence, the CS is
discontinuous and this can been seen in ...
This and the method of integration are the origin of
the error message. The solution is simple, just
decrease the limits of integration very slightly.

 The function
Integ_dsigma_dq2_thy(q2_low,q2_hi,e_low_bin,e_hi_bin)
   integrates 
dsigma_dq2(q2,energy)*Flux(energy) from e_low to e_hi over the q2 bin.
Hence, each integration is a 1-d integration. 

  The 1-d integration starts by averaging the endpoints. Next,
it doubles by a factor 2 and sums. It checks that 
abs diff((step i+1) - (step i)) < Integration Accuracy.
If not doubles by a factor 2 and continues until the
Integration Accuacy is achieved or it hits the max number 
of step. If too many steps, it prints out an error and returns
the last value calculated. 

  dsigma_dq2(q2_low=kin_lim,energy) !=0 and 
dsigma_dq2(q2_low=kin_lim,energy) only at e_hi.  
Between the q2 kinematic limits, the CS is not-zero not just at e_hi. 
Hence, when you integrate cs(q2=kinematic_limit,energy) !=0 at e_hi 
and = 0 evergy where else. Each iteration in the 
integration reduces the intergral by a factor of 2. This
1 dim integration never converses and a error is printed out.   

 By setting the q2 limits from an energy just lower than the kinematic
limits stops this problem. At some point in this 1d integration both
the !0 reqion and 0 reqion in energy start getting filled in in equal 
protions. When that happens the integration converges. 
 
  A solution to the problem is setting the q2 limits either above 
or outside their real value. If the q2 limits are set outside 
their real value, the problem could reoccur if q2 for
(Integration over energy dsigma_dq2(q2,energy)*Flux(energy))
gets too close to the kinematic limits. 

 Need to set the q2 limits in q2data and Write_td_file_ene
the same to get the same number of events. 
108000 from the data file and
108169 from Write_td_file_ene

 Write_td_file_F_A_calc_dip writes out the ratio
of FA/dipole.

version 4 of root is used

varied elas_nu_enu_meson_lagr.com

