98 #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT) 105 #include "Framework/Conventions/GBuild.h" 121 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 128 using namespace genie;
130 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 159 LOG(
"gmkspl",
pFATAL) <<
" No TuneId in RunOption";
173 r->
Set(
"ZpCoupling", *coup);
179 #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT) 180 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
193 if(!targets || targets->
size() == 0 ) {
194 LOG(
"gmkspl_dm",
pFATAL) <<
"Empty target PDG code list";
199 LOG(
"gmkspl_dm",
pINFO) <<
"Targets: " << *targets;
208 for(tgtiter = targets->begin(); tgtiter != targets->end(); ++tgtiter) {
210 int tgtpdgc = *tgtiter;
234 LOG(
"gmkspl_dm",
pINFO) <<
"Parsing command line arguments";
248 LOG(
"gmkspl_dm",
pINFO) <<
"Reading output filename";
256 LOG(
"gmkspl_dm",
pINFO) <<
"Unspecified filename - Using default";
262 LOG(
"gmkspl_dm",
pINFO) <<
"Reading number of knots/spline";
266 <<
"Unspecified number of knots - Using default";
272 LOG(
"gmkspl_dm",
pINFO) <<
"Reading maximum spline energy";
276 <<
"Unspecified maximum spline energy - Using default";
282 LOG(
"gmkspl_dm",
pINFO) <<
"Reading dark matter mass";
285 if(dmm.find(
",") != string::npos) {
287 assert(massrange.size() > 1);
289 gOptDMMasses.push_back(atof((*m).c_str()));
293 gOptDMMasses.push_back(atof(dmm.c_str()));
297 <<
"Unspecified dark matter masses - Exiting";
304 LOG(
"gmkspl_dm",
pINFO) <<
"Reading mediator mass ratios";
307 if(mr.find(
",") != string::npos) {
309 assert(ratiorange.size() > 1);
311 gOptMedRatios.push_back(atof((*r).c_str()));
315 gOptMedRatios.push_back(atof(mr.c_str()));
319 <<
"Unspecified mediator mass ratios - Using default";
320 gOptMedRatios.push_back(0.5);
325 LOG(
"gmkspl_dm",
pINFO) <<
"Not copying input splines to output";
331 LOG(
"gmkspl_dm",
pINFO) <<
"Reading mediator couplings";
334 if(gzp.find(
",") != string::npos) {
336 assert(couprange.size() > 1);
338 gOptZpCouplings.push_back(atof((*g).c_str()));
342 gOptZpCouplings.push_back(atof(gzp.c_str()));
346 <<
"Unspecified mediator couplings - Using value from config";
347 gOptZpCouplings.push_back(-1.);
352 LOG(
"gmkspl_dm",
pINFO) <<
"Not copying input splines to output";
360 LOG(
"gmkspl_dm",
pINFO) <<
"Reading target nuclei PDG codes";
363 LOG(
"gmkspl_dm",
pINFO) <<
"No code list specified from the command line";
367 bool tgt_geom =
true;
369 LOG(
"gmkspl_dm",
pINFO) <<
"Reading ROOT geometry filename";
372 LOG(
"gmkspl_dm",
pINFO) <<
"No geometry file was specified";
376 bool both = tgt_geom && tgt_cmd;
377 bool none = !tgt_geom && !tgt_cmd;
380 <<
"No geom file or cmd line target list was specified - Exiting";
386 <<
"You specified both a geom file and a cmd line target list " 387 <<
"- Exiting confused";
394 LOG(
"gmkspl_dm",
pINFO) <<
"Reading random number seed";
397 LOG(
"gmkspl_dm",
pINFO) <<
"Unspecified random number seed - Using default";
403 LOG(
"gmkspl_dm",
pINFO) <<
"Reading cross-section file";
406 LOG(
"gmkspl_dm",
pINFO) <<
"Unspecified input cross-section file";
426 <<
"Considering DM mass : " << *
m;
430 <<
"Considering mediator mass ratio : " << *
r;
434 <<
"Considering Z' couplings : " << *
g;
442 <<
"\n\n" <<
"Syntax:" <<
"\n" 443 <<
" gmkspl_dm -m dm_masses " 444 <<
" <-t tgtpdg, -f geomfile> " 445 <<
" <-o | --output-cross-section> xsec_xml_file_name" 446 <<
" [-g zp_couplings] " 447 <<
" [-z med_ratios] " 448 <<
" [-n nknots] [-e max_energy] " 449 <<
" [--seed seed_number]" 450 <<
" [--input-cross-section xml_file]" 451 <<
" [--event-generator-list list_name]" 452 <<
" [--message-thresholds xml_file]\n\n";
467 for(iter = tgtvec.begin(); iter != tgtvec.end(); ++iter) {
473 if (from_geom_file) {
474 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 476 LOG(
"gmkspl_dm",
pINFO) <<
"Creating/configuring a ROOT geom. driver";
485 <<
"To read-in a ROOT geometry you need to enable the geometry drivers!";
void RandGen(long int seed)
void XSecTable(string inpfile, bool require_table)
double ArgAsDouble(char opt)
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
static constexpr double g
void AddDarkMatter(double mass, double med_ratio)
void ReadFromCommandLine(int argc, char **argv)
string gOptTgtPdgCodeList
vector< double > gOptDMMasses
void GetCommandLineArgs(int argc, char **argv)
static XSecSplineList * Instance()
virtual const PDGCodeList & ListOfTargetNuclei(void)
implement the GeomAnalyzerI interface
Registry * CommonList(const string &file_id, const string &set_name) const
int main(int argc, char **argv)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void SetEventGeneratorList(string listname)
vector< double > gOptMedRatios
vector< double > gOptZpCouplings
A ROOT/GEANT4 geometry driver.
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
void Lock(void)
locks the registry
void BuildTune()
build tune and inform XSecSplineList
void SaveAsXml(const string &filename, bool save_init=true) const
void UnLock(void)
unlocks the registry (doesn't unlock items)
static PDGLibrary * Instance(void)
static RunOpt * Instance(void)
vector< string > Split(string input, string delim)
A registry. Provides the container for algorithm configuration parameters.
PDGCodeList * GetTargetCodes(void)
void Configure(int nu_pdgc, int Z, int A)
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f='*')
A vector of EventGeneratorI objects.
void CreateSplines(int nknots=-1, double emax=-1, bool inLogE=true)
void MesgThresholds(string inpfile)
Command line argument parser.
List of cross section vs energy splines.
void Set(RgIMapPair entry)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
bool OptionExists(char opt)
was option set?
void EnableBareXSecPreCalc(bool flag)
void push_back(int pdg_code)
static AlgConfigPool * Instance()
Initial State information.