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__
131 using namespace genie::geometry;
153 int 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";
245 if( parser.OptionExists(
'o') ||
246 parser.OptionExists(
"output-cross-sections") )
248 LOG(
"gmkspl_dm",
pINFO) <<
"Reading output filename";
249 if( parser.OptionExists(
'o') ) {
256 LOG(
"gmkspl_dm",
pINFO) <<
"Unspecified filename - Using default";
261 if( parser.OptionExists(
'n') ) {
262 LOG(
"gmkspl_dm",
pINFO) <<
"Reading number of knots/spline";
266 <<
"Unspecified number of knots - Using default";
271 if( parser.OptionExists(
'e') ) {
272 LOG(
"gmkspl_dm",
pINFO) <<
"Reading maximum spline energy";
276 <<
"Unspecified maximum spline energy - Using default";
281 if( parser.OptionExists(
'm') ) {
282 LOG(
"gmkspl_dm",
pINFO) <<
"Reading dark matter mass";
283 string dmm = parser.ArgAsString(
'm');
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";
303 if( parser.OptionExists(
'z') ) {
304 LOG(
"gmkspl_dm",
pINFO) <<
"Reading mediator mass ratios";
305 string mr = parser.ArgAsString(
'z');
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";
324 if( parser.OptionExists(
"no-copy") ) {
325 LOG(
"gmkspl_dm",
pINFO) <<
"Not copying input splines to output";
330 if( parser.OptionExists(
'g') ) {
331 LOG(
"gmkspl_dm",
pINFO) <<
"Reading mediator couplings";
332 string gzp = parser.ArgAsString(
'g');
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";
351 if( parser.OptionExists(
"no-copy") ) {
352 LOG(
"gmkspl_dm",
pINFO) <<
"Not copying input splines to output";
359 if( parser.OptionExists(
't') ) {
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;
368 if( parser.OptionExists(
'f') ) {
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";
393 if( parser.OptionExists(
"seed") ) {
394 LOG(
"gmkspl_dm",
pINFO) <<
"Reading random number seed";
397 LOG(
"gmkspl_dm",
pINFO) <<
"Unspecified random number seed - Using default";
402 if( parser.OptionExists(
"input-cross-sections") ) {
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!";
void RandGen(long int seed)
PDGCodeList * GetTargetCodes(void)
void XSecTable(string inpfile, bool require_table)
static constexpr double g
void AddDarkMatter(double mass, double med_ratio)
void ReadFromCommandLine(int argc, char **argv)
vector< double > gOptDMMasses
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
string gOptTgtPdgCodeList
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.
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.
void GetCommandLineArgs(int argc, char **argv)
List of cross section vs energy splines.
void Set(RgIMapPair entry)
static constexpr double m
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
void EnableBareXSecPreCalc(bool flag)
void push_back(int pdg_code)
static AlgConfigPool * Instance()
Initial State information.