98#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
105#include "Framework/Conventions/GBuild.h"
121#ifdef __GENIE_GEOM_DRIVERS_ENABLED__
128using namespace genie;
130#ifdef __GENIE_GEOM_DRIVERS_ENABLED__
153int main(
int argc,
char ** argv)
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;
206 PDGCodeList::const_iterator tgtiter;
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);
288 for (vector<string>::iterator m = massrange.begin(); m != massrange.end(); ++m) {
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);
310 for (vector<string>::iterator r = ratiorange.begin(); r != ratiorange.end(); ++r) {
319 <<
"Unspecified mediator mass ratios - Using default";
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);
337 for (vector<string>::iterator g = couprange.begin(); g != couprange.end(); ++g) {
346 <<
"Unspecified mediator couplings - Using value from config";
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";
466 vector<string>::const_iterator iter;
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!";
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
static AlgConfigPool * Instance()
Registry * CommonList(const string &file_id, const string &set_name) const
Command line argument parser.
string ArgAsString(char opt)
double ArgAsDouble(char opt)
bool OptionExists(char opt)
was option set?
A vector of EventGeneratorI objects.
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
void Configure(int nu_pdgc, int Z, int A)
void CreateSplines(int nknots=-1, double emax=-1, bool inLogE=true)
void SetEventGeneratorList(string listname)
Initial State information.
void push_back(int pdg_code)
void AddDarkMatter(double mass, double med_ratio)
static PDGLibrary * Instance(void)
A registry. Provides the container for algorithm configuration parameters.
void Lock(void)
locks the registry
void Set(RgIMapPair entry)
void UnLock(void)
unlocks the registry (doesn't unlock items)
void ReadFromCommandLine(int argc, char **argv)
void BuildTune()
build tune and inform XSecSplineList
void EnableBareXSecPreCalc(bool flag)
static RunOpt * Instance(void)
List of cross section vs energy splines.
void SaveAsXml(const string &filename, bool save_init=true) const
static XSecSplineList * Instance()
A ROOT/GEANT4 geometry driver.
PDGCodeList * GetTargetCodes(void)
vector< double > gOptMedRatios
void GetCommandLineArgs(int argc, char **argv)
vector< double > gOptDMMasses
vector< double > gOptZpCouplings
string gOptTgtPdgCodeList
void XSecTable(string inpfile, bool require_table)
void RandGen(long int seed)
void MesgThresholds(string inpfile)
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f=' *')
vector< string > Split(string input, string delim)
THE MAIN GENIE PROJECT NAMESPACE