36 using std::ostringstream;
42 using namespace genie;
63 LOG(
"GiBUUData",
pINFO) <<
"GiBUUData late initialization";
97 cout <<
"GiBUUData singleton dtor: Deleting all f/f splines" << endl;
101 for(
int r=0;
r<kNRes;
r++) {
102 for(
int i=0;
i<kNCurr;
i++) {
103 for(
int j=0; j<kNHitNuc; j++) {
104 for(
int k=0;
k<kNFFRes;
k++) {
105 if (fFFRes[
r][
i][j][
k]) {
106 delete fFFRes[
r][
i][j][
k];
107 fFFRes[
r][
i][j][
k] = 0;
119 for(
int r=0;
r<kNRes;
r++) {
120 for(
int i=0;
i<kNCurr;
i++) {
121 for(
int j=0; j<kNHitNuc; j++) {
122 for(
int k=0;
k<kNFFRes;
k++) {
123 fFFRes[
r][
i][j][
k] = 0;
130 string(
"/data/evgen/gibuu");
137 for(
int r=0;
r<kNRes;
r++) {
138 for(
int i=0;
i<kNCurr;
i++) {
139 for(
int j=0; j<kNHitNuc; j++) {
145 ostringstream datafile;
146 datafile << data_dir <<
"/form_factors/";
149 case ( 0): datafile <<
"P33_1232";
break;
150 case ( 1): datafile <<
"S11_1535";
break;
151 case ( 2): datafile <<
"D13_1520";
break;
152 case ( 3): datafile <<
"S11_1650";
break;
153 case ( 5): datafile <<
"D15_1675";
break;
154 case ( 6): datafile <<
"S31_1620";
break;
155 case ( 7): datafile <<
"D33_1700";
break;
156 case ( 8): datafile <<
"P11_1440";
break;
157 case (10): datafile <<
"P13_1720";
break;
158 case (11): datafile <<
"F15_1680";
break;
159 case (12): datafile <<
"P31_1910";
break;
160 case (14): datafile <<
"F35_1905";
break;
161 case (15): datafile <<
"F37_1950";
break;
162 default : skip =
true;
166 case (0): datafile <<
"_CC";
break;
167 case (1): datafile <<
"_NC";
break;
168 case (2): datafile <<
"_EM";
break;
169 default : skip =
true;
172 case (0): datafile <<
"_neutron";
break;
173 case (1): datafile <<
"_proton";
break;
174 default : skip =
true;
176 datafile <<
"_FFres.dat";
181 assert( ! gSystem->AccessPathName(datafile.str().c_str()) );
191 data_ffres.ReadFile(datafile.str().c_str(),
192 "Q2/D:f1/D:f2/D:f3/D:f4/D:f5/D:f6/D:f7/D:f8/D");
195 <<
"Number of data rows: " << data_ffres.GetEntries();
201 fFFRes[
r][
i][j][0] =
new Spline(&data_ffres,
"Q2:f1");
202 fFFRes[
r][
i][j][1] =
new Spline(&data_ffres,
"Q2:f2");
203 fFFRes[
r][
i][j][2] =
new Spline(&data_ffres,
"Q2:f5");
204 fFFRes[
r][
i][j][3] =
new Spline(&data_ffres,
"Q2:f6");
211 fFFRes[
r][
i][j][4] =
new Spline(&data_ffres,
"Q2:f1");
212 fFFRes[
r][
i][j][5] =
new Spline(&data_ffres,
"Q2:f2");
213 fFFRes[
r][
i][j][6] =
new Spline(&data_ffres,
"Q2:f3");
214 fFFRes[
r][
i][j][7] =
new Spline(&data_ffres,
"Q2:f4");
215 fFFRes[
r][
i][j][8] =
new Spline(&data_ffres,
"Q2:f5");
216 fFFRes[
r][
i][j][9] =
new Spline(&data_ffres,
"Q2:f6");
217 fFFRes[
r][
i][j][10] =
new Spline(&data_ffres,
"Q2:f7");
218 fFFRes[
r][
i][j][11] =
new Spline(&data_ffres,
"Q2:f8");
226 for(
int r=0;
r<kNRes;
r++) {
227 for(
int i=0;
i<kNCurr;
i++) {
228 for(
int j=0; j<kNHitNuc; j++) {
229 for(
int k=0;
k<kNFFRes;
k++) {
230 if(fFFRes[
r][
i][j][
k]) fFFRes[
r][
i][j][
k]->YCanBeNegative(
true);
237 <<
"Done loading all resonance form factor files...";
244 return this->FFRes(Q2,res,hit_nucleon_pdg,it,4);
251 return this->FFRes(Q2,res,hit_nucleon_pdg,it,5);
258 return this->FFRes(Q2,res,hit_nucleon_pdg,it,6);
265 return this->FFRes(Q2,res,hit_nucleon_pdg,it,7);
272 return this->FFRes(Q2,res,hit_nucleon_pdg,it,8);
279 return this->FFRes(Q2,res,hit_nucleon_pdg,it,9);
286 return this->FFRes(Q2,res,hit_nucleon_pdg,it,10);
293 return this->FFRes(Q2,res,hit_nucleon_pdg,it,11);
300 return this->FFRes(Q2,res,hit_nucleon_pdg,it,0);
307 return this->FFRes(Q2,res,hit_nucleon_pdg,it,1);
314 return this->FFRes(Q2,res,hit_nucleon_pdg,it,2);
321 return this->FFRes(Q2,res,hit_nucleon_pdg,it,3);
328 if(Q2 < fMinQ2 || Q2 > fMaxQ2)
return 0.;
330 int r = -1,
i = -1, j = -1;
332 if(ffresid<0 || ffresid >= kNFFRes)
return 0.;
335 if(r<0 || r >= kNRes)
return 0.;
339 else if (it ==
kIntEM) {
i = 2; }
342 else if (hit_nucleon_pdg ==
kPdgProton ) { j = 1; }
344 const Spline * spl = fFFRes[
r][
i][j][ffresid];
bool IsDelta(Resonance_t res)
is it a Delta resonance?
Singleton to load and serve data tables provided by the GiBUU group.
#include "Numerical/GSFunc.h"
double Q2(const Interaction *const i)
A numeric analysis tool class for interpolating 1-D functions.
void DummyMethodAndSilentCompiler()
static GiBUUData * fInstance
double Evaluate(double x) const
enum genie::EResonance Resonance_t
bool IsN(Resonance_t res)
is it an N resonance?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
const FormFactors & FF(void) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
enum genie::EInteractionType InteractionType_t
static GiBUUData * Instance(void)
Root of GENIE utility namespaces.