15 #include <TDecayChannel.h>
19 #include "Framework/Conventions/GBuild.h"
30 using namespace genie;
31 using namespace genie::constants;
32 using namespace genie::utils;
55 const std::array<std::array<double, 3>, 7> &fBR = !isDeuterium?
fBRp:
fBRD;
69 double Mpi2 = Mpi*Mpi;
70 double Meta2 = Meta*Meta;
75 double k = (W2 - Mp2)/2./Mp;
77 double kcm = (W2 - Mp2)/2./W;
79 double Epicm = (W2 + Mpi2 - Mp2)/2./W;
80 double ppicm = TMath::Sqrt(TMath::Max(0.0, Epicm*Epicm - Mpi2));
81 double Epi2cm = (W2 + 4*Mpi2 - Mp2)/2./W;
82 double ppi2cm = TMath::Sqrt(TMath::Max(0.0, Epi2cm*Epi2cm - 4*Mpi2));
83 double Eetacm = (W2 + Meta2 - Mp2 )/2./W;
84 double petacm = TMath::Sqrt(TMath::Max(0.0, Eetacm*Eetacm - Meta2));
94 double x0 = i!=0?0.215:!isDeuterium?0.14462:0.1446;
96 double kr = (MassRes2-Mp2)/2./Mp;
98 double kcmr = (MassRes2-Mp2)/2./fMassRes[i];
101 double Epicmr = (MassRes2 + Mpi2 - Mp2)/2./fMassRes[i];
102 double ppicmr = TMath::Sqrt(TMath::Max(0.0, Epicmr*Epicmr - Mpi2));
103 double Epi2cmr = (MassRes2 + 4.*Mpi2 - Mp2)/2./fMassRes[i];
104 double ppi2cmr = TMath::Sqrt(TMath::Max(0.0, Epi2cmr*Epi2cmr - 4.*Mpi2));
105 double Eetacmr = (MassRes2 + Meta2 - Mp2)/2./fMassRes[i];
106 double petacmr = TMath::Sqrt(TMath::Max(0.0, Eetacmr*Eetacmr - Meta2));
111 TMath::Power((ppicmr*ppicmr + x0*x0)/(ppicm*ppicm+x0*x0),
fAngRes[i]);
114 if (!isDeuterium || (isDeuterium && i!=1))
115 pwid1 = W/fMassRes[i]*
fWidthRes[i]*TMath::Power(ppi2cm/ppi2cmr, 4.+2.*
fAngRes[i])*
116 TMath::Power((ppi2cmr*ppi2cmr + x0*x0)/(ppi2cm*ppi2cm + x0*x0), 2.+
fAngRes[i]);
118 pwid1 =
fWidthRes[i]*TMath::Power(petacm/petacmr, 1.+2.*
fAngRes[i])*TMath::Power((ppi2cmr*ppi2cmr + x0*x0)/(ppi2cm*ppi2cm + x0*x0),
fAngRes[i]);
123 if(!isDeuterium && (i==1 || i==4))
124 pwid2 =
fWidthRes[i]*TMath::Power(petacm/petacmr, 1.+2.*
fAngRes[i])*TMath::Power((petacmr*petacmr + x0*x0)/(petacm*petacm + x0*x0),
fAngRes[i]);
127 double pgam =
fWidthRes[i]*(kcm/kcmr)*(kcm/kcmr)*(kcmr*kcmr+x0*x0)/(kcm*kcm+x0*x0);
129 double width = fBR[i][0]*pwid0+fBR[i][1]*pwid1+fBR[i][2]*pwid2;
136 A = fRescoefT[i][0]*(1.+fRescoefT[i][1]*Q2/(1.+fRescoefT[i][2]*
Q2))/TMath::Power(1.+Q2/0.91, fRescoefT[i][3]);
143 double BW = kr/k*kcmr/kcm/
fWidthRes[i]*width*pgam/((W2 - MassRes2)*(W2 - MassRes2) + MassRes2*width*width);
157 const std::array<std::array<double, 5>, 2> &fNRcoefT = !isDeuterium?
fNRcoefTp:
fNRcoefTD;
165 double Wdif = W - (Mp + Mpi);
167 double m0 = (sf==0) ? 0.125 : 4.2802;
169 double Q20 = (sf==0) ? 0.05 : 0.125;
171 double xpr = 1./(1.+(W2-(Mp+Mpi)*(Mp+Mpi))/(Q2+Q20));
179 for (
int i=0;i<2;i++)
181 double h_nr = fNRcoefT[i][0]/TMath::Power(Q2+fNRcoefT[i][1], fNRcoefT[i][2]+fNRcoefT[i][3]*Q2+fNRcoefT[i][4]*Q2*Q2);
182 xsec += h_nr*TMath::Power(Wdif, 1.5+i);
189 double xb = Q2/(Q2+W2-Mp2);
190 double t = TMath::Log(TMath::Log((Q2+m0)/0.330/0.330)/TMath::Log(m0/0.330/0.330));
203 static constexpr std::array<double, 99> fyp
204 {0.0272,0.0326,0.0390,0.0464,0.0551,0.0651,0.0766,0.0898,0.1049,
205 0.1221,0.1416,0.1636,0.1883,0.2159,0.2466,0.2807,0.3182,0.3595,
206 0.4045,0.4535,0.5066,0.5637,0.6249,0.6901,0.7593,0.8324,0.9090,
207 0.9890,1.0720,1.1577,1.2454,1.3349,1.4254,1.5163,1.6070,1.6968,
208 1.7849,1.8705,1.9529,2.0313,2.1049,2.1731,2.2350,2.2901,2.3379,
209 2.3776,2.4090,2.4317,2.4454,2.4500,2.4454,2.4317,2.4090,2.3776,
210 2.3379,2.2901,2.2350,2.1731,2.1049,2.0313,1.9529,1.8705,1.7849,
211 1.6968,1.6070,1.5163,1.4254,1.3349,1.2454,1.1577,1.0720,0.9890,
212 0.9090,0.8324,0.7593,0.6901,0.6249,0.5637,0.5066,0.4535,0.4045,
213 0.3595,0.3182,0.2807,0.2466,0.2159,0.1883,0.1636,0.1416,0.1221,
214 0.1049,0.0898,0.0766,0.0651,0.0551,0.0464,0.0390,0.0326,0.0272};
216 static constexpr std::array<double, 99> xxp
217 {-3.000,-2.939,-2.878,-2.816,-2.755,-2.694,-2.633,-2.571,-2.510,
218 -2.449,-2.388,-2.327,-2.265,-2.204,-2.143,-2.082,-2.020,-1.959,
219 -1.898,-1.837,-1.776,-1.714,-1.653,-1.592,-1.531,-1.469,-1.408,
220 -1.347,-1.286,-1.224,-1.163,-1.102,-1.041,-0.980,-0.918,-0.857,
221 -0.796,-0.735,-0.673,-0.612,-0.551,-0.490,-0.429,-0.367,-0.306,
222 -0.245,-0.184,-0.122,-0.061, 0.000, 0.061, 0.122, 0.184, 0.245,
223 0.306, 0.367, 0.429, 0.490, 0.551, 0.612, 0.673, 0.735, 0.796,
224 0.857, 0.918, 0.980, 1.041, 1.102, 1.163, 1.224, 1.286, 1.347,
225 1.408, 1.469, 1.531, 1.592, 1.653, 1.714, 1.776, 1.837, 1.898,
226 1.959, 2.020, 2.082, 2.143, 2.204, 2.265, 2.327, 2.388, 2.449,
227 2.510, 2.571, 2.633, 2.694, 2.755, 2.816, 2.878, 2.939, 3.000};
235 double nu = (W2 - MN2 +
Q2)/2./MN;
236 double qv = TMath::Sqrt(nu*nu + Q2);
238 double dW2dpF = 2.*qv;
239 double dW2dEs = 2.*(nu + MN);
245 for (
int i=0; i<99; i++)
247 double fyuse = fyp[i]/100.;
248 double W2p = W2 + xxp[i]*pF*dW2dpF - Es*dW2dEs;
252 double Wp = TMath::Sqrt(W2p);
255 double F1pp = sigmaTp*(W2p-Mp2)/8./
kPi2/
kAem;
257 double sigmaTd =
sigmaR(0, Q2, Wp,
true) +
sigmaNR(0, Q2, Wp,
true);
258 double F1dp = sigmaTd*(W2p-Mp2)/8./
kPi2/
kAem;
261 sigmaT += sigmaTp*fyuse;
262 sigmaL += sigmaLp*fyuse;
273 static constexpr std::array<double, 20> fyd
274 {0.4965, 0.4988, 0.4958, 0.5008, 0.5027, 0.5041, 0.5029, 0.5034,
275 0.4993, 0.5147, 0.5140, 0.4975, 0.5007, 0.4992, 0.4994, 0.4977,
276 0.5023, 0.4964, 0.4966, 0.4767};
278 static constexpr std::array<double, 20> avpz
279 {-0.1820,-0.0829,-0.0590,-0.0448,-0.0345,-0.0264,-0.0195, -0.0135,
280 -0.0079,-0.0025, 0.0029, 0.0083, 0.0139, 0.0199, 0.0268, 0.0349,
281 0.0453, 0.0598, 0.0844, 0.1853};
283 static constexpr std::array<double, 20> avp2
284 {0.0938, 0.0219, 0.0137, 0.0101, 0.0081, 0.0068, 0.0060, 0.0054,
285 0.0051, 0.0049, 0.0050, 0.0051, 0.0055, 0.0060, 0.0069, 0.0081,
286 0.0102, 0.0140, 0.0225, 0.0964};
289 static constexpr std::array<double, 200> fydf
290 {0.00001,0.00002,0.00003,0.00005,0.00006,0.00009,0.00010,0.00013,
291 0.00015,0.00019,0.00021,0.00026,0.00029,0.00034,0.00038,0.00044,
292 0.00049,0.00057,0.00062,0.00071,0.00078,0.00089,0.00097,0.00109,
293 0.00119,0.00134,0.00146,0.00161,0.00176,0.00195,0.00211,0.00232,
294 0.00252,0.00276,0.00299,0.00326,0.00352,0.00383,0.00412,0.00447,
295 0.00482,0.00521,0.00560,0.00603,0.00648,0.00698,0.00747,0.00803,
296 0.00859,0.00921,0.00985,0.01056,0.01126,0.01205,0.01286,0.01376,
297 0.01467,0.01569,0.01671,0.01793,0.01912,0.02049,0.02196,0.02356,
298 0.02525,0.02723,0.02939,0.03179,0.03453,0.03764,0.04116,0.04533,
299 0.05004,0.05565,0.06232,0.07015,0.07965,0.09093,0.10486,0.12185,
300 0.14268,0.16860,0.20074,0.24129,0.29201,0.35713,0.44012,0.54757,
301 0.68665,0.86965,1.11199,1.43242,1.86532,2.44703,3.22681,4.24972,
302 5.54382,7.04016,8.48123,9.40627,9.40627,8.48123,7.04016,5.54382,
303 4.24972,3.22681,2.44703,1.86532,1.43242,1.11199,0.86965,0.68665,
304 0.54757,0.44012,0.35713,0.29201,0.24129,0.20074,0.16860,0.14268,
305 0.12185,0.10486,0.09093,0.07965,0.07015,0.06232,0.05565,0.05004,
306 0.04533,0.04116,0.03764,0.03453,0.03179,0.02939,0.02723,0.02525,
307 0.02356,0.02196,0.02049,0.01912,0.01793,0.01671,0.01569,0.01467,
308 0.01376,0.01286,0.01205,0.01126,0.01056,0.00985,0.00921,0.00859,
309 0.00803,0.00747,0.00698,0.00648,0.00603,0.00560,0.00521,0.00482,
310 0.00447,0.00412,0.00383,0.00352,0.00326,0.00299,0.00276,0.00252,
311 0.00232,0.00211,0.00195,0.00176,0.00161,0.00146,0.00134,0.00119,
312 0.00109,0.00097,0.00089,0.00078,0.00071,0.00062,0.00057,0.00049,
313 0.00044,0.00038,0.00034,0.00029,0.00026,0.00021,0.00019,0.00015,
314 0.00013,0.00010,0.00009,0.00006,0.00005,0.00003,0.00002,0.00001};
316 static constexpr std::array<double, 200> avp2f
317 {1.0,0.98974,0.96975,0.96768,0.94782,0.94450,0.92494,0.92047,
318 0.90090,0.89563,0.87644,0.87018,0.85145,0.84434,0.82593,0.81841,
319 0.80021,0.79212,0.77444,0.76553,0.74866,0.73945,0.72264,0.71343,
320 0.69703,0.68740,0.67149,0.66182,0.64631,0.63630,0.62125,0.61154,
321 0.59671,0.58686,0.57241,0.56283,0.54866,0.53889,0.52528,0.51581,
322 0.50236,0.49291,0.47997,0.47063,0.45803,0.44867,0.43665,0.42744,
323 0.41554,0.40656,0.39511,0.38589,0.37488,0.36611,0.35516,0.34647,
324 0.33571,0.32704,0.31656,0.30783,0.29741,0.28870,0.27820,0.26945,
325 0.25898,0.25010,0.23945,0.23023,0.21943,0.20999,0.19891,0.18911,
326 0.17795,0.16793,0.15669,0.14667,0.13553,0.12569,0.11504,0.10550,
327 0.09557,0.08674,0.07774,0.06974,0.06184,0.05484,0.04802,0.04203,
328 0.03629,0.03129,0.02654,0.02247,0.01867,0.01545,0.01251,0.01015,
329 0.00810,0.00664,0.00541,0.00512,0.00512,0.00541,0.00664,0.00810,
330 0.01015,0.01251,0.01545,0.01867,0.02247,0.02654,0.03129,0.03629,
331 0.04203,0.04802,0.05484,0.06184,0.06974,0.07774,0.08674,0.09557,
332 0.10550,0.11504,0.12569,0.13553,0.14667,0.15669,0.16793,0.17795,
333 0.18911,0.19891,0.20999,0.21943,0.23023,0.23945,0.25010,0.25898,
334 0.26945,0.27820,0.28870,0.29741,0.30783,0.31656,0.32704,0.33571,
335 0.34647,0.35516,0.36611,0.37488,0.38589,0.39511,0.40656,0.41554,
336 0.42744,0.43665,0.44867,0.45803,0.47063,0.47997,0.49291,0.50236,
337 0.51581,0.52528,0.53889,0.54866,0.56283,0.57241,0.58686,0.59671,
338 0.61154,0.62125,0.63630,0.64631,0.66182,0.67149,0.68740,0.69703,
339 0.71343,0.72264,0.73945,0.74866,0.76553,0.77444,0.79212,0.80021,
340 0.81841,0.82593,0.84434,0.85145,0.87018,0.87644,0.89563,0.90090,
341 0.92047,0.92494,0.94450,0.94782,0.96768,0.96975,0.98974,1.0};
349 double nu = (W2 - MN2 +
Q2)/2./MN;
350 double qv = TMath::Sqrt(nu*nu + Q2);
358 for (
int ism = 0; ism<20; ism++)
360 double W2p = TMath::Power(MD + nu - sqrt(MN2 + avp2[ism]),2) - qv*qv + 2.*qv*avpz[ism] - avp2[ism];
363 double Wp = TMath::Sqrt(W2p);
364 double sigtp =
sigmaR(0, Q2, Wp, isDeuterium) +
sigmaNR(0, Q2, Wp, isDeuterium);
365 double F1p = sigtp*(W2p-Mp2)/8./
kPi2/
kAem;
366 F1 += F1p*fyd[ism]/10.;
370 sigmaL += siglp*fyd[ism]/10.;
371 sigmaT += sigtp*fyd[ism]/10.;
378 for (
int ism = 0;ism<200;ism++)
380 double pz = -1. + 0.01*(ism + 0.5);
382 double W2p = TMath::Power(MD + nu - sqrt(MN2 + avp2f[ism]),2) - qv*qv + 2.*qv*pz - avp2f[ism];
385 double Wp = TMath::Sqrt(W2p);
386 double sigtp =
sigmaR(0, Q2, Wp, isDeuterium) +
sigmaNR(0, Q2, Wp, isDeuterium);
387 double F1p = sigtp*(W2p-Mp2)/8./
kPi2/
kAem;
388 F1 += F1p*fydf[ism]/100.;
392 sigmaT += sigtp*fydf[ism]/100.;
393 sigmaL += siglp*fydf[ism]/100.;
402 if(!isDeuterium && sigmaT!=0.)
415 double nu = (W2 - Mp2 +
Q2)/2./Mp;
416 double x = Q2/2.0/Mp/nu;
446 const Kinematics & kinematics = interaction -> Kine();
447 const InitialState & init_state = interaction -> InitState();
448 const Target & target = init_state.
Tgt();
452 double W = kinematics.
W();
453 double Q2 = kinematics.
Q2();
462 double nu = (Wsq - MN2 +
Q2)/2./MN;
463 double x = Q2/2./MN/nu;
465 double sigmaT, sigmaL, F1p, R, W1;
467 if (A<2 && Wsq>1.155)
469 double xb = Q2/(Wsq+Q2-Mp2);
472 F1p = sigmaT*(Wsq-Mp2)/8./
kPi2/
kAem;
479 double F1d = sigmaT*(Wsq-Mp2)/8./
kPi2/
kAem;
521 W1 = (2.*Z*F1d + (A - 2.*Z)*(2.*F1d - F1p))/MN;
528 double F1M =
MEC2009(A, Q2, W);
535 double emcfac =
FitEMC(x, A);
540 double Eprime = E - nu;
541 double sin2theta_2 = Q2/4/E/Eprime;
542 double cos2theta_2 = 1 - sin2theta_2;
543 double W2 = W1*(1 + R)/ (1+nu2/Q2);
544 double xsec = 4*Eprime*Eprime*
kAem2/Q2/Q2*(2*W1*sin2theta_2 + W2*cos2theta_2);
545 double jacobian = W*
kPi/E/Eprime/MN;
589 if (x>0.70 || x<0.0085)
600 double ln_c =
fEMCc[0];
601 for (
int i = 1; i<=2; i++)
602 ln_c +=
fEMCc[i]*TMath::Power(TMath::Log(x_u), i);
603 double c = TMath::Exp(ln_c);
606 for (
int i = 1; i<=8; i++)
607 alpha +=
fEMCalpha[i]*TMath::Power(x_u, i);
609 fitemc = c*TMath::Power(A, alpha);
632 if (!is_pn)
return false;
635 bool is_em = proc_info.
IsEM();
639 if (!l_em)
return false;
646 const Kinematics & kinematics = interaction -> Kine();
647 double W = kinematics.
W();
648 double Q2 = kinematics.
Q2();
649 if (W<fWmin || W>
fWmax)
651 if (Q2<fQ2min || Q2>
fQ2max)
674 TParticlePDG * res_pdg = pdglib->
Find(respdg);
677 for (
int nch = 0; nch < res_pdg->NDecayChannels(); nch++)
679 TDecayChannel * ch = res_pdg->DecayChannel(nch);
680 if (ch->NDaughters() == 2)
682 int first_daughter_pdg = ch->DaughterPdgCode (0);
683 int second_daughter_pdg = ch->DaughterPdgCode (1);
686 brpi += ch->BranchingRatio();
687 if (first_daughter_pdg ==
kPdgEta || second_daughter_pdg ==
kPdgEta)
688 breta += ch->BranchingRatio();
713 std::vector<double> vBRpi1;
714 std::vector<double> vBRpi2;
715 std::vector<double> vBReta;
718 bool useBRpi1Default = (
GetParamVect(
"BostedChristyFitEM-PionBRp", vBRpi1,
false)<7);
719 bool useBRpi2Default = (
GetParamVect(
"BostedChristyFitEM-PionBRD", vBRpi2,
false)<7);
721 bool useBRetaDefault = (
GetParamVect(
"BostedChristyFitEM-EtaBR", vBReta,
false)<7);
723 if (useBRpi1Default || useBRpi2Default || useBRetaDefault)
843 if (!useBRpi1Default)
845 for (
int i=0; i<7; i++)
846 fBRp[i][0] = vBRpi1[i];
847 if (!useBRpi2Default)
849 for (
int i=0; i<7; i++)
850 fBRD[i][0] = vBRpi2[i];
851 if (!useBRetaDefault)
853 for (
int i=0; i<7; i++)
854 fBRp[i][2] = vBReta[i];
856 for (
int i=0; i<7; i++)
859 if (useBRpi1Default || useBRpi2Default)
860 LOG(
"BostedChristyEMPXSec",
pALERT) <<
"*** Use branching ratios for pion decay from PDG table";
863 LOG(
"BostedChristyEMPXSec",
pALERT) <<
"*** Use branching ratios for eta decay from PDG table";
866 for (
int i=0;i<7;i++)
881 std::vector<double> vResMass;
883 bool useResMassDefault = (
GetParamVect(
"BostedChristyFitEM-ResMass", vResMass,
false)<7);
885 if (useResMassDefault)
887 LOG(
"BostedChristyEMPXSec",
pALERT) <<
"*** Use resonance masses from PDG table";
899 for (
int i=0; i<7; i++)
902 std::vector<double> vResWidth;
904 bool useResWidthDefault = (
GetParamVect(
"BostedChristyFitEM-ResWidth", vResWidth,
false)<7);
906 if (useResWidthDefault)
908 LOG(
"BostedChristyEMPXSec",
pALERT) <<
"*** Use resonance widths from PDG table";
920 for (
int i=0; i<7; i++)
925 std::vector<double> vRescoef;
927 bool isOk = (
GetParamVect(
"BostedChristyFitEM-ResAT0p", vRescoef)>=length);
930 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton AT(0)-parameters for xsec^R_T in the config file!";
934 for (
int i=0;i<length;i++)
938 isOk = (
GetParamVect(
"BostedChristyFitEM-Resap", vRescoef)>=length);
941 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton a-parameters for xsec^R_T in the config file!";
945 for (
int i=0;i<length;i++)
949 isOk = (
GetParamVect(
"BostedChristyFitEM-Resbp", vRescoef)>=length);
952 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton b-parameters parameters for xsec^R_T in the config file!";
956 for (
int i=0;i<length;i++)
960 isOk = (
GetParamVect(
"BostedChristyFitEM-Rescp", vRescoef)>=length);
963 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton c-parameters parameters for xsec^R_T in the config file!";
967 for (
int i=0;i<length;i++)
971 isOk = (
GetParamVect(
"BostedChristyFitEM-ResAT0D", vRescoef)>=length);
974 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium AT(0)-parameters for xsec^R_T in the config file!";
978 for (
int i=0;i<length;i++)
982 isOk = (
GetParamVect(
"BostedChristyFitEM-ResaD", vRescoef)>=length);
985 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium a-parameters for xsec^R_T in the config file!";
989 for (
int i=0;i<length;i++)
993 isOk = (
GetParamVect(
"BostedChristyFitEM-ResbD", vRescoef)>=length);
996 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium b-parameters parameters for xsec^R_T in the config file!";
1000 for (
int i=0;i<length;i++)
1004 isOk = (
GetParamVect(
"BostedChristyFitEM-RescD", vRescoef)>=length);
1007 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium c-parameters parameters for xsec^R_T in the config file!";
1011 for (
int i=0;i<length;i++)
1015 isOk = (
GetParamVect(
"BostedChristyFitEM-ResAL0", vRescoef)>=length);
1018 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton AL0-parameters parameters for xsec^R_T in the config file!";
1022 for (
int i=0;i<length;i++)
1026 isOk = (
GetParamVect(
"BostedChristyFitEM-Resd", vRescoef)>=length);
1029 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton d-parameters parameters for xsec^R_L in the config file!";
1033 for (
int i=0;i<length;i++)
1037 isOk = (
GetParamVect(
"BostedChristyFitEM-Rese", vRescoef)>=length);
1040 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton e-parameters parameters for xsec^R_L in the config file!";
1044 for (
int i=0;i<length;i++)
1048 std::vector<double> vNRcoef;
1050 isOk = (
GetParamVect(
"BostedChristyFitEM-NRXSecT1p", vNRcoef)>=length);
1053 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton bkg parameters for xsec^NR_T in the config file!";
1057 for (
int i=0;i<length;i++)
1061 isOk = (
GetParamVect(
"BostedChristyFitEM-NRXSecT2p", vNRcoef)>=length);
1064 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton bkg parameters for xsec^NR_T in the config file!";
1068 for (
int i=0;i<length;i++)
1072 isOk = (
GetParamVect(
"BostedChristyFitEM-NRXSecT1D", vNRcoef)>=length);
1075 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium bkg parameters for xsec^NR_T in the config file!";
1079 for (
int i=0;i<length;i++)
1083 isOk = (
GetParamVect(
"BostedChristyFitEM-NRXSecT2D", vNRcoef)>=length);
1086 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough deuterium bkg parameters for xsec^NR_T in the config file!";
1090 for (
int i=0;i<length;i++)
1094 isOk = (
GetParamVect(
"BostedChristyFitEM-NRXSecL", vNRcoef)>=length);
1097 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough proton bkg parameters for xsec^NR_L in the config file!";
1101 for (
int i=0;i<length;i++)
1105 isOk = (
GetParamVect(
"BostedChristyFitEM-MEC", vNRcoef)>=length);
1108 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough parameters for MEC in the config file!";
1111 for (
int i=0;i<length;i++)
1115 isOk = (
GetParamVect(
"BostedChristyFitEM-MEC2009", vNRcoef)>=length);
1118 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough parameters for MEC2009 in the config file!";
1121 for (
int i=0;i<length;i++)
1125 isOk = (
GetParamVect(
"BostedChristyFitEM-Afit", vNRcoef)>=length);
1128 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough parameters for nuclei fit (A-fit) in the config file!";
1131 for (
int i=0;i<length;i++)
1136 isOk = (
GetParamVect(
"BostedChristyFitEM-EMCalpha", vNRcoef)>=length);
1139 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough alpha coefficients for EMC correction in the config file!";
1142 for (
int i=0;i<length;i++)
1146 isOk = (
GetParamVect(
"BostedChristyFitEM-EMCc", vNRcoef)>=length);
1149 LOG(
"BostedChristyEMPXSec",
pFATAL) <<
"*** Can't find enough c coefficients for EMC correction in the config file!";
1152 for (
int i=0;i<length;i++)
1153 fEMCc[i] = vNRcoef[i];
1156 std::string keyStart =
"BostedChristy-SeparationE@Pdg=";
1158 for(RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it)
1160 const std::string& key = it->first;
1163 if (0 == key.compare(0, keyStart.size(), keyStart.c_str()))
1165 pdg = atoi(key.c_str() + keyStart.size());
1168 if (0 != pdg && A != 0)
1170 std::ostringstream key_ss ;
1171 key_ss << keyStart << pdg;
1172 RgKey rgkey = key_ss.str();
1175 eb = TMath::Max(eb, 0.);
1176 fNucRmvE.insert(map<int,double>::value_type(A,eb));
1180 keyStart =
"BostedChristy-FermiMomentum@Pdg=";
1181 for(RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it)
1183 const std::string& key = it->first;
1186 if (0 == key.compare(0, keyStart.size(), keyStart.c_str()))
1188 pdg = atoi(key.c_str() + keyStart.size());
1191 if (0 != pdg && A != 0)
1193 std::ostringstream key_ss ;
1194 key_ss << keyStart << pdg;
1195 RgKey rgkey = key_ss.str();
1198 pf = TMath::Max(pf, 0.);
1199 fKFTable.insert(map<int,double>::value_type(A,pf));
1203 keyStart =
"BostedChristy-p18@Pdg=";
1204 for(RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it)
1206 const std::string& key = it->first;
1209 if (0 == key.compare(0, keyStart.size(), keyStart.c_str()))
1211 pdg = atoi(key.c_str() + keyStart.size());
1214 if (0 != pdg && A != 0)
1216 std::ostringstream key_ss ;
1217 key_ss << keyStart << pdg;
1218 RgKey rgkey = key_ss.str();
1221 fMEC2009p18.insert(map<int,double>::value_type(A,p18));
std::array< double, 7 > fMassRes
resonance mass
bool IsResonant(void) const
Cross Section Calculation Interface.
const int kPdgP33m1232_DeltaPP
double W(bool selected=false) const
void Configure(const Registry &config)
double J(double q0, double q3, double Enu, double ml)
std::array< std::array< double, 4 >, 7 > fRescoefTp
tunable parameters from Ref.1, Table III for resonance
double Q2(const Interaction *const i)
int HitNucPdg(void) const
double Integral(const Interaction *i) const
std::array< std::array< double, 5 >, 2 > fNRcoefTp
tunable parameters from Ref.1, Table III for nonres bkg
std::array< double, 9 > fEMCalpha
tunable parameters for EMC fit
const int kPdgF15m1680_NP
double sigmaR(int, double, double, bool) const
std::array< double, 8 > fMEC2009coef
tunable parameters for MEC2009 function
int GetParamVect(const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
Handle to load vectors of parameters.
int IonPdgCodeToA(int pdgc)
Generated/set kinematical variables for an event.
bool IsChargedLepton(int pdgc)
std::array< double, 3 > fEMCc
tunable parameters for EMC fit
double Mass(Resonance_t res)
resonance mass (GeV)
map< int, double > fKFTable
virtual ~BostedChristyEMPXSec()
const int kPdgS11m1650_N0
std::array< std::array< double, 3 >, 7 > fBRD
branching ratios of resonances for deterium fit
double Width(Resonance_t res)
resonance width (GeV)
const int kPdgF37m1950_DeltaM
const int kPdgF37m1950_DeltaP
enum genie::EKinePhaseSpace KinePhaseSpace_t
static constexpr double ub
const int kPdgS11m1535_N0
virtual const Registry & GetConfig(void) const
std::array< double, 6 > fMECcoef
tunable parameters for Eqs.(20), (21) Ref.2
const int kPdgP33m1232_DeltaP
const int kPdgP33m1232_DeltaM
void FermiSmearingA(double, double, double, double, double &, double &, double &, double &) const
double W(const Interaction *const i)
map< int, double > fNucRmvE
Summary information for an interaction.
std::array< double, 13 > fAfitcoef
tunable parameters for nuclei fit
const int kPdgF37m1950_Delta0
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
const RgIMap & GetItemMap(void) const
static constexpr double A
static const double kAem2
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
void BranchingRatios(int, double &, double &) const
int OrbitalAngularMom(Resonance_t res)
orbital angular momentum
const int kPdgF37m1950_DeltaPP
std::array< std::array< double, 3 >, 7 > fBRp
branching ratios of resonances for proton fit
const int kPdgD13m1520_NP
const int kPdgF15m1680_N0
std::array< double, 7 > fWidthRes
resonance width
const int kPdgS11m1650_NP
Resonance_t FromPdgCode(int pdgc)
PDG code -> resonance id.
const int kPdgP33m1232_Delta0
const int kPdgP11m1440_N0
std::array< std::array< double, 5 >, 2 > fNRcoefTD
tunable parameters from Ref.1, Table IV for nonres bkg
const int kPdgD13m1520_N0
const XSecIntegratorI * fXSecIntegrator
const int kPdgP11m1440_NP
static PDGLibrary * Instance(void)
bool fUseMEC
account for MEC contribution?
Singleton class to load & serve a TDatabasePDG.
A registry. Provides the container for algorithm configuration parameters.
std::array< std::array< double, 4 >, 7 > fRescoefTD
tunable parameters from Ref.2, Table III for resonance
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
double FitEMC(double, int) const
std::array< double, 6 > fNRcoefL
tunable parameters from Ref.1, Table III for nonres bkg
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
TParticlePDG * Find(int pdgc, bool must_exist=true)
std::array< int, 7 > fAngRes
resonance angular momentum
double MEC2009(int, double, double) const
double Q2(bool selected=false) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
void FermiSmearingD(double, double, double &, double &, double &, double &, bool) const
const int kPdgS11m1535_NP
bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
const int kPdgTgtDeuterium
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
std::array< std::array< double, 3 >, 7 > fRescoefL
tunable parameters from Ref.1, Table III for resonance
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
const UInt_t kISkipProcessChk
if set, skip process validity checks
double sigmaNR(int, double, double, bool) const
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
map< int, double > fMEC2009p18
Initial State information.
map< RgKey, RegistryItemI * > RgIMap