diff --git a/config/ZExpAxialFormFactorModel.xml b/config/ZExpAxialFormFactorModel.xml
index 345c12d305..b68b9a1b55 100644
--- a/config/ZExpAxialFormFactorModel.xml
+++ b/config/ZExpAxialFormFactorModel.xml
@@ -7,23 +7,18 @@ Configuration sets for the z-expansion axial form factor model.
Algorithm Configurable Parameters:
.........................................................................................
-Name Type Optional Comment Default
+Name Type Optional Comment Default
.........................................................................................
-QEL-T0 double Yes z convergence parameter GPL value: QEL-T0
-QEL-Z_A1 double Yes z expansion coefficient GPL value: QEL-Z_A1
-QEL-Z_A2 double Yes z expansion coefficient GPL value: QEL-Z_A2
-QEL-Z_A3 double Yes z expansion coefficient GPL value: QEL-Z_A3
-QEL-Z_A4 double Yes z expansion coefficient GPL value: QEL-Z_A4
-QEL-Z_A5 double Yes z expansion coefficient GPL value: QEL-Z_A5
-QEL-Z_A6 double Yes z expansion coefficient GPL value: QEL-Z_A6
-QEL-Z_A7 double Yes z expansion coefficient GPL value: QEL-Z_A7
-QEL-Z_A8 double Yes z expansion coefficient GPL value: QEL-Z_A8
-QEL-Z_A9 double Yes z expansion coefficient GPL value: QEL-Z_A9
-QEL-Z_A10 double Yes z expansion coefficient GPL value: QEL-Z_A10
-QEL-Kmax int Yes max summation index GPL value: QEL-Kmax
-QEL-Tcut double Yes ?? GPL value
-
-QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
+QEL-T0 double Yes z convergence parameter GPL value: QEL-T0
+QEL-Z_A vec-double Yes z expansion coefficient GPL value: QEL-Z_A
+QEL-Kmax int Yes max summation index GPL value: QEL-Kmax
+QEL-Tcut double Yes ?? GPL value
+
+QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
+
+
+Only using for reweight
+ZExpZAFF@CovarianceMatrix mat-double Yes covariance matrix GPL value: ZExpZAFF@CovarianceMatrix
-->
@@ -38,27 +33,40 @@ QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
-0.28
0.1764
- 2.30
- -0.6
- -3.8
- 2.3
-
+ 2.30; -0.6; -3.8; 2.3
+
+ data/covariances/FormFactor/Axial/AxialZExpFF_Deuterium.dat
-
+
QuasiElastic
true
2
+ -0.5
+ 0.161604
+
+ 1.72089706; -0.30982708
+ data/covariances/FormFactor/Axial/AxialZExpFF_LQCD.dat
+
+
+
+
+
+ QuasiElastic
+
+ true
+ 2
+
-0.5
0.161604
- 1.65
- -0.94
-
+ 1.64778080; -0.94181417
+ data/covariances/FormFactor/Axial/AxialZExpFF_minervaElementaryTarget.dat
+
@@ -71,26 +79,16 @@ QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
-0.75
0.1764
- 1.50
- -1.2
- -0.1
- 0.2
+ 1.50; -1.2; -0.1; 0.2
+ data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature4x4.dat
+
+
-
-
- QuasiElastic
-
- true
- 2
-
- -0.5
- 0.161604
-
- 1.721
- -0.31
-
-
diff --git a/config/ZExpELFormFactorModel.xml b/config/ZExpELFormFactorModel.xml
index 03bf5420f1..3e9188e71a 100644
--- a/config/ZExpELFormFactorModel.xml
+++ b/config/ZExpELFormFactorModel.xml
@@ -7,24 +7,20 @@ Configuration sets for the z-expansion axial form factor model.
Algorithm Configurable Parameters:
.........................................................................................
-Name Type Optional Comment Default
+Name Type Optional Comment Default
.........................................................................................
-QEL-T0 double Yes z convergence parameter GPL value: QEL-T0
-QEL-Z_A1 double Yes z expansion coefficient GPL value: QEL-Z_A1
-QEL-Z_A2 double Yes z expansion coefficient GPL value: QEL-Z_A2
-QEL-Z_A3 double Yes z expansion coefficient GPL value: QEL-Z_A3
-QEL-Z_A4 double Yes z expansion coefficient GPL value: QEL-Z_A4
-QEL-Z_A5 double Yes z expansion coefficient GPL value: QEL-Z_A5
-QEL-Z_A6 double Yes z expansion coefficient GPL value: QEL-Z_A6
-QEL-Z_A7 double Yes z expansion coefficient GPL value: QEL-Z_A7
-QEL-Z_A8 double Yes z expansion coefficient GPL value: QEL-Z_A8
-QEL-Z_A9 double Yes z expansion coefficient GPL value: QEL-Z_A9
-QEL-Z_A10 double Yes z expansion coefficient GPL value: QEL-Z_A10
-QEL-Kmax int Yes max summation index GPL value: QEL-Kmax
-QEL-Tcut double Yes ?? GPL value
-
-QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
-
+QEL-T0 double Yes z convergence parameter GPL value: QEL-T0
+QEL-Z_AP vec-double Yes z expansion coefficient GPL value: QEL-Z_AP
+QEL-Z_BP vec-double Yes z expansion coefficient GPL value: QEL-Z_BP
+QEL-Z_AN vec-double Yes z expansion coefficient GPL value: QEL-Z_AN
+QEL-Z_BN vec-double Yes z expansion coefficient GPL value: QEL-Z_BN
+QEL-Kmax int Yes max summation index GPL value: QEL-Kmax
+QEL-Tcut double Yes ?? GPL value
+
+QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
+
+Only using for reweight
+ZExpELFF@CovarianceMatrix mat-double Yes covariance matrix GPL value: ZExpELFF@CovarianceMatrix
-->
@@ -42,6 +38,7 @@ QEL-Q4limit bool Yes 1/Q^4 limit conditions GPL value: QEL-Q4limit
0.084252682465; -0.278572218873; -0.153916309312; 0.353999966588
2.706784556423; -0.424305225602; -2.662453066640; 0.067583076040
+ data/covariances/FormFactor/Vector/ELZExpFF.dat
diff --git a/data/covariances/AxialZExpFF_minervaNature.dat b/data/covariances/AxialZExpFF_minervaNature.dat
deleted file mode 100644
index 1e7431a031..0000000000
--- a/data/covariances/AxialZExpFF_minervaNature.dat
+++ /dev/null
@@ -1,8 +0,0 @@
-% error matrix for z expansion axial form factor
-% based on T. Cai et al (MINERvA), Nature 614 (2023) 48-53 (kmax=8, the 4 free parameters)
-% See Supplementary Table 5
-% | an | an is a 4x4 matrix
-0.31 0.005589991 -0.713740919 0.541649333
-0.005589991 0.7 -0.369042003 -1.220893116
--0.713740919 -0.369042003 1.9 -0.696265036
-0.541649333 -1.220893116 -0.696265036 3.5
\ No newline at end of file
diff --git a/data/covariances/FormFactor/Axial/AxialZExpFF_Deuterium.dat b/data/covariances/FormFactor/Axial/AxialZExpFF_Deuterium.dat
new file mode 100644
index 0000000000..14e54030e1
--- /dev/null
+++ b/data/covariances/FormFactor/Axial/AxialZExpFF_Deuterium.dat
@@ -0,0 +1,9 @@
+% error matrix for z expansion axial form factor
+% based on A. Meyer et al (MINERvA), https://arxiv.org/pdf/1603.03048 (LQCD kmax=8, the 4 free parameters)
+% See Eq. 31, 32, 33
+% Using Eq. 32 and Eq.33 to get covariance matrix
+% | an | an is a 4x4 matrix
+ 2.3716000e-04 5.8212000e-03 -6.8285448e-02 6.9629560e-02
+ 5.8212000e-03 1.1664000e+00 -6.3427536e+00 2.9330640e+00
+-6.8285448e-02 -6.3427536e+00 4.2771600e+01 -3.3151260e+01
+ 6.9629560e-02 2.9330640e+00 -3.3151260e+01 5.4760000e+01
diff --git a/data/covariances/AxialZExpFF_LQCD.dat b/data/covariances/FormFactor/Axial/AxialZExpFF_LQCD.dat
similarity index 89%
rename from data/covariances/AxialZExpFF_LQCD.dat
rename to data/covariances/FormFactor/Axial/AxialZExpFF_LQCD.dat
index f1fe2e3295..67b325ef1a 100644
--- a/data/covariances/AxialZExpFF_LQCD.dat
+++ b/data/covariances/FormFactor/Axial/AxialZExpFF_LQCD.dat
@@ -3,4 +3,4 @@
% See Eq. 40
% | an | an is a 2x2 matrix
0.00265598 -0.00562374
--0.00562374 0.01596000
\ No newline at end of file
+-0.00562374 0.01596000
diff --git a/data/covariances/AxialZExpFF_minervaElementaryTarget.dat b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaElementaryTarget.dat
similarity index 89%
rename from data/covariances/AxialZExpFF_minervaElementaryTarget.dat
rename to data/covariances/FormFactor/Axial/AxialZExpFF_minervaElementaryTarget.dat
index 43cf8a2a64..f3157c7797 100644
--- a/data/covariances/AxialZExpFF_minervaElementaryTarget.dat
+++ b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaElementaryTarget.dat
@@ -3,4 +3,4 @@
% See Eq. 32
% | an | an is a 2x2 matrix
0.05554150 -0.03262482
--0.03262482 0.09151761
\ No newline at end of file
+-0.03262482 0.09151761
diff --git a/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature2x2.dat b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature2x2.dat
new file mode 100644
index 0000000000..99dff747a8
--- /dev/null
+++ b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature2x2.dat
@@ -0,0 +1,6 @@
+% error matrix for z expansion axial form factor
+% based on MINERvA nature, (kmax=6, the 2 free parameters)
+% See Supplementary information Table 4 and Table 5
+% | an | an is a 2x2 matrix
+ 0.1089 -0.12045
+-0.12045 0.25
diff --git a/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature4x4.dat b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature4x4.dat
new file mode 100644
index 0000000000..148fc9bd2c
--- /dev/null
+++ b/data/covariances/FormFactor/Axial/AxialZExpFF_minervaNature4x4.dat
@@ -0,0 +1,8 @@
+% error matrix for z expansion axial form factor
+% based on MINERvA nature, (kmax=8, the 4 free parameters)
+% See Supplementary information Table 4 and Table 5
+% | an | an is a 4x4 matrix
+ 9.6100e-02 2.6040e-03 -5.4777e-01 5.6420e-01
+ 2.6040e-03 4.9000e-01 -4.2560e-01 -1.9110e+00
+-5.4777e-01 -4.2560e-01 3.6100e+00 -1.7955e+00
+ 5.6420e-01 -1.9110e+00 -1.7955e+00 1.2250e+01
diff --git a/data/covariances/ELZExpFF.dat b/data/covariances/FormFactor/Vector/ELZExpFF.dat
similarity index 100%
rename from data/covariances/ELZExpFF.dat
rename to data/covariances/FormFactor/Vector/ELZExpFF.dat
diff --git a/data/covariances/Readme b/data/covariances/Readme
new file mode 100644
index 0000000000..c11d3ab501
--- /dev/null
+++ b/data/covariances/Readme
@@ -0,0 +1,5 @@
+This directory contains covariance matrices for the parameters of neutrino–nucleus interaction models.
+
+Now we have
+- z expension vector form factor
+- z expension axial form factor
diff --git a/data/covariances/testmat.dat b/data/covariances/testmat.dat
deleted file mode 100644
index b409741dd4..0000000000
--- a/data/covariances/testmat.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-% a matrix with 2 columns and 5 rows
-1.0 1.1
-2.0 2.1
-2.0 2.1
-2.0 2.1
-1.0 5.3
diff --git a/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.cxx b/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.cxx
index 93f462eb08..921b6df6f4 100644
--- a/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.cxx
+++ b/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.cxx
@@ -42,7 +42,6 @@ AxialFormFactorModelI("genie::ZExpAxialFormFactorModel", config)
//____________________________________________________________________________
ZExpAxialFormFactorModel::~ZExpAxialFormFactorModel()
{
- delete[] fZ_An;
}
//____________________________________________________________________________
double ZExpAxialFormFactorModel::FA(const Interaction * interaction) const
@@ -230,15 +229,21 @@ void ZExpAxialFormFactorModel::LoadConfig(void)
assert(fKmax > 0);
// z expansion coefficients
- if (fQ4limit) fZ_An = new double [fKmax+5];
- else fZ_An = new double [fKmax+1];
-
+ if(fQ4limit){
+ fZ_An.resize(fKmax+5);
+ }
+ else{
+ fZ_An.resize(fKmax+1);
+ }
// load the user-defined coefficient values
// -- A0 and An for n tmp_Z_A;
+ if(this->GetParamVect("QEL-Z_A", tmp_Z_A) != fKmax){
+ LOG("ZExpAxialFormFactorModel",pERROR) << "Wrong size of QEL-Z_A coefficients " << tmp_Z_A.size();
+ exit(1);
+ }
for (int ip=1;ipFixCoeffs();
diff --git a/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.h b/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.h
index d349041bd6..86c424db49 100644
--- a/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.h
+++ b/src/Physics/QuasiElastic/XSection/ZExpAxialFormFactorModel.h
@@ -60,8 +60,7 @@ class ZExpAxialFormFactorModel : public AxialFormFactorModelI {
double fT0;
double fTcut;
double fFA0;
- //double fZ_An[11];
- double* fZ_An;
+ std::vector fZ_An;
};
} // genie namespace
diff --git a/src/Physics/QuasiElastic/XSection/ZExpELFormFactorModel.h b/src/Physics/QuasiElastic/XSection/ZExpELFormFactorModel.h
index d87cfd0257..afa4b889fd 100644
--- a/src/Physics/QuasiElastic/XSection/ZExpELFormFactorModel.h
+++ b/src/Physics/QuasiElastic/XSection/ZExpELFormFactorModel.h
@@ -65,7 +65,6 @@ class ZExpELFormFactorModel : public ELFormFactorsModelI {
double fGmp0;
double fGen0;
double fGmn0;
- //double fZ_An[11];
std::vector fZ_APn;
std::vector fZ_BPn;
std::vector fZ_ANn;