59 cout <<
"Initializing event generation drivers!" << endl;
77 numu_H1. UseSplines();
78 numu_O16. UseSplines();
79 numubar_H1. UseSplines();
82 nue_O16. UseSplines();
83 nuebar_H1. UseSplines();
84 nuebar_O16. UseSplines();
91 cout <<
"Calculating total interaction cross-sections" << endl;
93 int splNumKnots = 300;
94 double splEvMin = 0.010;
95 double splEvMax = 50.000;
96 bool splInLogE =
true;
97 numu_H1. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
98 numu_O16. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
99 numubar_H1. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
101 nue_H1. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
102 nue_O16. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
103 nuebar_H1. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
104 nuebar_O16. CreateXSecSumSpline (splNumKnots, splEvMin, splEvMax, splInLogE);
110 cout <<
"Writing out the GENIE cross-section table" << endl;
112 ofstream
outf(
"./genie_sk_xsec_table.dat",ios::out);
119 double xsec_numu_H1 = numu_H1. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
120 double xsec_numu_O16 = numu_O16. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
121 double xsec_numubar_H1 = numubar_H1. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
122 double xsec_numubar_O16 = numubar_O16. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
123 double xsec_nue_H1 = nue_H1. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
124 double xsec_nue_O16 = nue_O16. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
125 double xsec_nuebar_H1 = nuebar_H1. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
126 double xsec_nuebar_O16 = nuebar_O16. XSecSumSpline() -> Evaluate(Ev) / (1
E-38 *
units::cm2);
128 double xsec_numu_H20 = w_H1 * xsec_numu_H1 + w_O16 * xsec_numu_O16 ;
129 double xsec_numubar_H20 = w_H1 * xsec_numubar_H1 + w_O16 * xsec_numubar_O16 ;
130 double xsec_nue_H20 = w_H1 * xsec_nue_H1 + w_O16 * xsec_nue_O16 ;
131 double xsec_nuebar_H20 = w_H1 * xsec_nuebar_H1 + w_O16 * xsec_nuebar_O16 ;
133 outf << setfill(
' ') << setw(10) << std::fixed << setprecision(5) << Ev
134 << setfill(
' ') << setw(12) << std::fixed << setprecision(5) << xsec_numu_H20
135 << setfill(
' ') << setw(12) << std::fixed << setprecision(5) << xsec_numubar_H20
136 << setfill(
' ') << setw(12) << std::fixed << setprecision(5) << xsec_nue_H20
137 << setfill(
' ') << setw(12) << std::fixed << setprecision(5) << xsec_nuebar_H20
141 if(Ev > EvMax)
break;
146 cout <<
"Done!" << endl;
void CreateXSecSumSpline(int nk, double Emin, double Emax, bool inlogE=true)
int IonPdgCodeToA(int pdgc)
the ParameterSet object passed in for the configuration of a destination should be the only source that can affect the behavior of that destination This is to eliminate the dependencies of configuring a destination from multiple mostly from the defaults It suppresses possible glitches about changing the configuration file somewhere outside of a destination segament might still affect the behavior of that destination In the previous configuration for a specific the value of a certain e may come from following and have been suppressed It the configuring ParameterSet object for each destination will be required to carry a parameter list as complete as possible If a parameter still cannot be found in the ParameterSet the configuration code will go look for a hardwired default directly The model is a great simplicity comparing with the previous especially when looking for default values Another great advantage is most of the parameters now have very limited places that allows to appear Usually they can only appear at one certain level in a configuration file For in the old configuring model or in a default ParameterSet object inside of a or in a category or in a severity object This layout of multiple sources for a single parameter brings great confusion in both writing a configuration and in processing the configuration file Under the new the only allowed place for the parameter limit to appear is inside of a category which is inside of a destination object Other improvements simplify the meaning of a destination name In the old a destination name has multiple folds of meanings the e cout and cerr have the special meaning of logging messages to standard output or standard error the name also serves as the output filename if the destination is a file these names are also references to look up for detailed configurations in configuring the MessageFacility The multi purpose of the destination name might cause some unwanted behavior in either writing or parsing the configuration file To amend in the new model the destination name is now merely a name for a which might represent the literal purpose of this or just an id All other meanings of the destinations names now go into the destination ParameterSet as individual such as the type parameter and filename parameter Following is the deatiled rule for the new configuring Everything that is related with MessageFacility configuration must be wrapped in a single ParameterSet object with the name MessageFacility The MessageFacility ParameterSet object contains a series of top level parameters These parameters can be chosen a vector of string listing the name of debug enabled models Or use *to enable debug messages in all modules a vector of string a vector of string a vector of string a ParameterSet object containing the list of all destinations The destinations ParameterSet object is a combination of ParameterSet objects for individual destinations There are two types of destinations that you can insert in the destinations ParameterSet ordinary including cout
XmlParserStatus_t LoadFromXml(string filename, bool keep=false)
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
void Configure(string mesg)
void Configure(int nu_pdgc, int Z, int A)
int IonPdgCodeToZ(int pdgc)
enum genie::EXmlParseStatus XmlParserStatus_t
List of cross section vs energy splines.