GENIEGenerator
Loading...
Searching...
No Matches
gEvGenDM.cxx File Reference
#include <cstdlib>
#include <cassert>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <TFile.h>
#include <TTree.h>
#include <TSystem.h>
#include <TVector3.h>
#include <TH1.h>
#include <TF1.h>
#include "Framework/Algorithm/AlgConfigPool.h"
#include "Framework/Conventions/XmlParserStatus.h"
#include "Framework/Conventions/GBuild.h"
#include "Framework/Conventions/Controls.h"
#include "Framework/Conventions/Constants.h"
#include "Framework/Conventions/Units.h"
#include "Framework/EventGen/EventRecord.h"
#include "Framework/EventGen/GFluxI.h"
#include "Framework/EventGen/GEVGDriver.h"
#include "Framework/EventGen/GMCJDriver.h"
#include "Framework/EventGen/GMCJMonitor.h"
#include "Framework/Interaction/Interaction.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Ntuple/NtpWriter.h"
#include "Framework/Ntuple/NtpMCFormat.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Numerical/Spline.h"
#include "Framework/ParticleData/PDGCodes.h"
#include "Framework/ParticleData/PDGLibrary.h"
#include "Framework/ParticleData/PDGUtils.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/RunOpt.h"
#include "Framework/Utils/XSecSplineList.h"
#include "Framework/Utils/StringUtils.h"
#include "Framework/Utils/PrintUtils.h"
#include "Framework/Utils/SystemUtils.h"
#include "Framework/Utils/CmdLnArgParser.h"
Include dependency graph for gEvGenDM.cxx:

Go to the source code of this file.

Functions

void GetCommandLineArgs (int argc, char **argv)
void Initialize (void)
void PrintSyntax (void)
bool CheckUnitarityLimit (void)
void GenerateEventsAtFixedInitState (void)
int main (int argc, char **argv)

Variables

int kDefOptNevents = 0
NtpMCFormat_t kDefOptNtpFormat = kNFGHEP
Long_t kDefOptRunNu = 0
int gOptNevents
double gOptDMEnergy
double gOptDMEnergyRange
double gOptDMMass
double gOptZpCoupling
map< int, double > gOptTgtMix
double gOptMedRatio
Long_t gOptRunNu
string gOptFlux
bool gOptWeighted
bool gOptUsingFluxOrTgtMix = false
long int gOptRanSeed
string gOptInpXSecFile
string gOptOutFileName
string gOptStatFileName

Function Documentation

◆ CheckUnitarityLimit()

bool CheckUnitarityLimit ( void )

Definition at line 876 of file gEvGenDM.cxx.

877{
878 // Before generating the events, perform a simple sanity check
879 // We estimate the leading divergent piece of the cross-section
880 // We make sure it does not exceed the unitarity limit
881 double gzp;
882 Registry * r = AlgConfigPool::Instance()->CommonList("Param", "BoostedDarkMatter");
883 r->Get("ZpCoupling", gzp);
884 double gzp4 = TMath::Power(gzp,4);
885 double Mzp = gOptMedRatio * gOptDMMass;
886 double Mzp2 = Mzp*Mzp;
887 // The leading, forward-dominated piece is the same for both DM models
888 double xsec_est = gzp4 / (4. * kPi * Mzp2);
889 double ml = gOptDMMass;
890 double ml2 = ml*ml;
891 double M = kNucleonMass;
892 double M2 = M*M;
893 double Ed = gOptDMEnergy;
894 double Ed2 = Ed*Ed;
895 double pcm2 = M2 * (Ed2 - ml2) / (ml2 + M2 + 2.*M*Ed);
896 double xsec_lim = kPi / pcm2;
897 bool unitary = xsec_lim > xsec_est;
898 if (!unitary) {
899 LOG("gevgen_dm", pWARN)
900 << "Estimated a cross-section " << xsec_est/cm2 << " cm^2";
901 LOG("gevgen_dm", pWARN)
902 << "Unitarity limit set to " << xsec_lim/cm2 << " cm^2";
903 }
904 return unitary;
905}
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
#define pWARN
Definition Messenger.h:60
static AlgConfigPool * Instance()
Registry * CommonList(const string &file_id, const string &set_name) const
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
void Get(RgKey key, const RegistryItemI *&item) const
Definition Registry.cxx:325
double gOptDMEnergy
Definition gEvGenDM.cxx:219
double gOptMedRatio
Definition gEvGenDM.cxx:224
double gOptDMMass
Definition gEvGenDM.cxx:221
static constexpr double cm2
Definition Units.h:69

References genie::units::cm2, genie::AlgConfigPool::CommonList(), genie::Registry::Get(), gOptDMEnergy, gOptDMMass, gOptMedRatio, genie::AlgConfigPool::Instance(), genie::constants::kNucleonMass, genie::constants::kPi, LOG, and pWARN.

Referenced by GenerateEventsAtFixedInitState().

◆ GenerateEventsAtFixedInitState()

void GenerateEventsAtFixedInitState ( void )

Definition at line 291 of file gEvGenDM.cxx.

292{
293 int dark_matter = kPdgDarkMatter;
294 int target = gOptTgtMix.begin()->first;
295 double Ed = gOptDMEnergy;
296 double Md = gOptDMMass;
297 double pd = TMath::Sqrt(Ed*Ed - Md*Md);
298 assert(pd>=0.);
299 TLorentzVector dm_p4(0.,0.,pd,Ed); // px,py,pz,E (GeV)
300
301 // Create init state
302 InitialState init_state(target, dark_matter);
303
304 bool unitary = CheckUnitarityLimit();
305 if (!unitary) {
306 LOG("gevgen_dm", pFATAL)
307 << "Cross-section risks exceeding unitarity limit - Exiting";
308 exit(1);
309 }
310
311
312 // Create/config event generation driver
313 GEVGDriver evg_driver;
315 evg_driver.SetUnphysEventMask(*RunOpt::Instance()->UnphysEventMask());
316 evg_driver.Configure(init_state);
317
318 // Initialize an Ntuple Writer
320
321 // If an output file name has been specified... use it
322 if (!gOptOutFileName.empty()){
323 ntpw.CustomizeFilename(gOptOutFileName);
324 }
325 ntpw.Initialize();
326
327
328 // Create an MC Job Monitor
329 GMCJMonitor mcjmonitor(gOptRunNu);
330 mcjmonitor.SetRefreshRate(RunOpt::Instance()->MCJobStatusRefreshRate());
331
332 // If a status file name has been given... use it
333 if (!gOptStatFileName.empty()){
334 mcjmonitor.CustomizeFilename(gOptStatFileName);
335 }
336
337
338 LOG("gevgen_dm", pNOTICE)
339 << "\n ** Will generate " << gOptNevents << " events for \n"
340 << init_state << " at Ev = " << Ed << " GeV";
341
342 // Generate events / print the GHEP record / add it to the ntuple
343 int ievent = 0;
344 while (ievent < gOptNevents) {
345 LOG("gevgen_dm", pNOTICE)
346 << " *** Generating event............ " << ievent;
347
348 // generate a single event
349 EventRecord * event = evg_driver.GenerateEvent(dm_p4);
350
351 if(!event) {
352 LOG("gevgen_dm", pNOTICE)
353 << "Last attempt failed. Re-trying....";
354 continue;
355 }
356
357 LOG("gevgen_dm", pNOTICE)
358 << "Generated Event GHEP Record: " << *event;
359
360 // add event at the output ntuple, refresh the mc job monitor & clean up
361 ntpw.AddEventRecord(ievent, event);
362 mcjmonitor.Update(ievent,event);
363 ievent++;
364 delete event;
365 }
366
367 // Save the generated MC events
368 ntpw.Save();
369}
#define pNOTICE
Definition Messenger.h:61
#define pFATAL
Definition Messenger.h:56
A vector of EventGeneratorI objects.
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition EventRecord.h:37
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
Definition GEVGDriver.h:54
void SetUnphysEventMask(const TBits &mask)
void Configure(int nu_pdgc, int Z, int A)
EventRecord * GenerateEvent(const TLorentzVector &nu4p)
void SetEventGeneratorList(string listname)
Simple class to create & update MC job status files and env. vars. This is used to be able to keep tr...
Definition GMCJMonitor.h:31
Initial State information.
A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records.
Definition NtpWriter.h:39
static RunOpt * Instance(void)
Definition RunOpt.cxx:54
long int gOptRanSeed
NtpMCFormat_t kDefOptNtpFormat
Long_t gOptRunNu
map< int, double > gOptTgtMix
bool CheckUnitarityLimit(void)
Definition gEvGenDM.cxx:876
string gOptOutFileName
Definition gEvGen.cxx:241
int gOptNevents
Definition gEvGen.cxx:228
string gOptStatFileName
Definition gEvGen.cxx:242
const int kPdgDarkMatter
Definition PDGCodes.h:218

References genie::NtpWriter::AddEventRecord(), CheckUnitarityLimit(), genie::GEVGDriver::Configure(), genie::GMCJMonitor::CustomizeFilename(), genie::NtpWriter::CustomizeFilename(), genie::GEVGDriver::GenerateEvent(), gOptDMEnergy, gOptDMMass, gOptNevents, gOptOutFileName, gOptRanSeed, gOptRunNu, gOptStatFileName, gOptTgtMix, genie::NtpWriter::Initialize(), genie::RunOpt::Instance(), kDefOptNtpFormat, genie::kPdgDarkMatter, LOG, pFATAL, pNOTICE, genie::NtpWriter::Save(), genie::GEVGDriver::SetEventGeneratorList(), genie::GMCJMonitor::SetRefreshRate(), genie::GEVGDriver::SetUnphysEventMask(), and genie::GMCJMonitor::Update().

Referenced by main().

◆ GetCommandLineArgs()

void GetCommandLineArgs ( int argc,
char ** argv )

Definition at line 603 of file gEvGenDM.cxx.

604{
605 LOG("gevgen_dm", pINFO) << "Parsing command line arguments";
606
607 // Common run options. Set defaults and read.
610
611 // Parse run options for this app
612
613 CmdLnArgParser parser(argc,argv);
614
615 // help?
616 bool help = parser.OptionExists('h');
617 if(help) {
618 PrintSyntax();
619 exit(0);
620 }
621
622 if ( ! parser.OptionExists("tune") ) {
623 LOG("gevgen_dm", pFATAL) << "No Dark Matter tune selected, please select one ";
624 LOG("gevgen_dm", pFATAL) << "Exiting ";
625 exit( 0 ) ;
626 }
627
628 // number of events
629 if( parser.OptionExists('n') ) {
630 LOG("gevgen_dm", pINFO) << "Reading number of events to generate";
631 gOptNevents = parser.ArgAsInt('n');
632 } else {
633 LOG("gevgen_dm", pINFO)
634 << "Unspecified number of events to generate - Using default";
636 }
637
638 // run number
639 if( parser.OptionExists('r') ) {
640 LOG("gevgen_dm", pINFO) << "Reading MC run number";
641 gOptRunNu = parser.ArgAsLong('r');
642 } else {
643 LOG("gevgen_dm", pINFO) << "Unspecified run number - Using default";
645 }
646
647 // Output file name
648 if( parser.OptionExists('o') ) {
649 LOG("gevgen_dm", pINFO) << "Reading output file name";
650 gOptOutFileName = parser.ArgAsString('o');
651
653 // strip the output file format and replace with .status
654 if (gOptOutFileName.find_last_of(".") != string::npos)
656 gOptStatFileName.substr(0, gOptOutFileName.find_last_of("."));
657 gOptStatFileName .append(".status");
658 }
659
660 // flux functional form
661 bool using_flux = false;
662 if( parser.OptionExists('f') ) {
663 LOG("gevgen_dm", pINFO) << "Reading flux function";
664 gOptFlux = parser.ArgAsString('f');
665 using_flux = true;
666 }
667
668 if(parser.OptionExists('s')) {
669 LOG("gevgen_dm", pWARN)
670 << "-s option no longer available. Please read the revised code documentation";
671 gAbortingInErr = true;
672 exit(1);
673 }
674
675
676 // generate weighted events option (only relevant if using a flux)
677 gOptWeighted = parser.OptionExists('w');
678
679 // dark matter energy
680 if( parser.OptionExists('e') ) {
681 LOG("gevgen_dm", pINFO) << "Reading dark matter energy";
682 string dme = parser.ArgAsString('e');
683
684 // is it just a value or a range (comma separated set of values)
685 if(dme.find(",") != string::npos) {
686 // split the comma separated list
687 vector<string> nurange = utils::str::Split(dme, ",");
688 assert(nurange.size() == 2);
689 double emin = atof(nurange[0].c_str());
690 double emax = atof(nurange[1].c_str());
691 assert(emax>emin && emin>=0);
692 gOptDMEnergy = emin;
693 gOptDMEnergyRange = emax-emin;
694 if(!using_flux) {
695 LOG("gevgen_dm", pWARN)
696 << "No flux was specified but an energy range was input!";
697 LOG("gevgen_dm", pWARN)
698 << "Events will be generated at fixed E = " << gOptDMEnergy << " GeV";
700 }
701 } else {
702 gOptDMEnergy = atof(dme.c_str());
704 }
705 } else {
706 LOG("gevgen_dm", pFATAL) << "Unspecified dark matter energy - Exiting";
707 PrintSyntax();
708 exit(1);
709 }
710
711 // dark matter mass
712 if( parser.OptionExists('m') ) {
713 LOG("gevgen_dm", pINFO) << "Reading dark matter mass";
714 gOptDMMass = parser.ArgAsDouble('m');
715 } else {
716 LOG("gevgen_dm", pFATAL) << "Unspecified dark matter mass - Exiting";
717 PrintSyntax();
718 exit(1);
719 }
720
721 // mediator coupling
722 if( parser.OptionExists('g') ) {
723 LOG("gevgen_dm", pINFO) << "Reading mediator coupling";
724 gOptZpCoupling = parser.ArgAsDouble('g');
725 } else {
726 LOG("gevgen_dm", pINFO) << "Unspecified mediator coupling - Using value from config file";
727 gOptZpCoupling = -1.;
728 }
729
730 // target mix (their PDG codes with their corresponding weights)
731 bool using_tgtmix = false;
732 if( parser.OptionExists('t') ) {
733 LOG("gevgen_dm", pINFO) << "Reading target mix";
734 string stgtmix = parser.ArgAsString('t');
735 gOptTgtMix.clear();
736 vector<string> tgtmix = utils::str::Split(stgtmix,",");
737 if(tgtmix.size()==1) {
738 int pdg = atoi(tgtmix[0].c_str());
739 double wgt = 1.0;
740 gOptTgtMix.insert(map<int, double>::value_type(pdg, wgt));
741 } else {
742 using_tgtmix = true;
743 vector<string>::const_iterator tgtmix_iter = tgtmix.begin();
744 for( ; tgtmix_iter != tgtmix.end(); ++tgtmix_iter) {
745 string tgt_with_wgt = *tgtmix_iter;
746 string::size_type open_bracket = tgt_with_wgt.find("[");
747 string::size_type close_bracket = tgt_with_wgt.find("]");
748 string::size_type ibeg = 0;
749 string::size_type iend = open_bracket;
750 string::size_type jbeg = open_bracket+1;
751 string::size_type jend = close_bracket-1;
752 int pdg = atoi(tgt_with_wgt.substr(ibeg,iend).c_str());
753 double wgt = atof(tgt_with_wgt.substr(jbeg,jend).c_str());
754 LOG("Main", pNOTICE)
755 << "Adding to target mix: pdg = " << pdg << ", wgt = " << wgt;
756 gOptTgtMix.insert(map<int, double>::value_type(pdg, wgt));
757 }//tgtmix_iter
758 }//>1
759
760 } else {
761 LOG("gevgen_dm", pFATAL) << "Unspecified target PDG code - Exiting";
762 PrintSyntax();
763 exit(1);
764 }
765
766 // mediator mass ratio
767 if( parser.OptionExists('z') ) {
768 LOG("gevgen_dm", pINFO) << "Reading mediator mass ratio";
769 gOptMedRatio = parser.ArgAsDouble('z');
770 } else {
771 LOG("gevgen_dm", pINFO) << "Unspecified mediator mass ratio - Using default";
772 gOptMedRatio = 0.5;
773 }
774
775 gOptUsingFluxOrTgtMix = using_flux || using_tgtmix;
776
777 // random number seed
778 if( parser.OptionExists("seed") ) {
779 LOG("gevgen_dm", pINFO) << "Reading random number seed";
780 gOptRanSeed = parser.ArgAsLong("seed");
781 } else {
782 LOG("gevgen_dm", pINFO) << "Unspecified random number seed - Using default";
783 gOptRanSeed = -1;
784 }
785
786 // input cross-section file
787 if( parser.OptionExists("cross-sections") ) {
788 LOG("gevgen_dm", pINFO) << "Reading cross-section file";
789 gOptInpXSecFile = parser.ArgAsString("cross-sections");
790 } else {
791 LOG("gevgen_dm", pINFO) << "Unspecified cross-section file";
792 gOptInpXSecFile = "";
793 }
794
795 //
796 // print-out the command line options
797 //
798 LOG("gevgen_dm", pNOTICE)
799 << "\n"
800 << utils::print::PrintFramedMesg("gevgen_dm job configuration");
801 LOG("gevgen_dm", pNOTICE)
802 << "MC Run Number: " << gOptRunNu;
803 if(gOptRanSeed != -1) {
804 LOG("gevgen_dm", pNOTICE)
805 << "Random number seed: " << gOptRanSeed;
806 } else {
807 LOG("gevgen_dm", pNOTICE)
808 << "Random number seed was not set, using default";
809 }
810 LOG("gevgen_dm", pNOTICE)
811 << "Number of events requested: " << gOptNevents;
812 if(gOptInpXSecFile.size() > 0) {
813 LOG("gevgen_dm", pNOTICE)
814 << "Using cross-section splines read from: " << gOptInpXSecFile;
815 } else {
816 LOG("gevgen_dm", pNOTICE)
817 << "No input cross-section spline file";
818 }
819 LOG("gevgen_dm", pNOTICE)
820 << "Flux: " << gOptFlux;
821 LOG("gevgen_dm", pNOTICE)
822 << "Generate weighted events? " << gOptWeighted;
823 if(gOptDMEnergyRange>0) {
824 LOG("gevgen_dm", pNOTICE)
825 << "Dark matter energy: ["
826 << gOptDMEnergy << ", " << gOptDMEnergy+gOptDMEnergyRange << "]";
827 } else {
828 LOG("gevgen_dm", pNOTICE)
829 << "Dark matter energy: " << gOptDMEnergy;
830 }
831 LOG("gevgen_dm", pNOTICE)
832 << "Dark matter mass: " << gOptDMMass;
833 LOG("gevgen_dm", pNOTICE)
834 << "Target code (PDG) & weight fraction (in case of multiple targets): ";
835 LOG("gevgen_dm", pNOTICE)
836 << "Mediator mass ratio: " << gOptMedRatio;
837 map<int,double>::const_iterator iter;
838 for(iter = gOptTgtMix.begin(); iter != gOptTgtMix.end(); ++iter) {
839 int tgtpdgc = iter->first;
840 double wgt = iter->second;
841 LOG("gevgen_dm", pNOTICE)
842 << " >> " << tgtpdgc << " (weight fraction = " << wgt << ")";
843 }
844 LOG("gevgen_dm", pNOTICE) << "\n";
845
846 LOG("gevgen_dm", pNOTICE) << *RunOpt::Instance();
847
848}
#define pINFO
Definition Messenger.h:62
Command line argument parser.
void ReadFromCommandLine(int argc, char **argv)
Definition RunOpt.cxx:99
void EnableBareXSecPreCalc(bool flag)
Definition RunOpt.h:62
string gOptInpXSecFile
double gOptZpCoupling
Definition gEvGenDM.cxx:222
void PrintSyntax(void)
Definition gEvGenDM.cxx:850
double gOptDMEnergyRange
Definition gEvGenDM.cxx:220
string gOptFlux
Definition gEvGen.cxx:234
bool gOptWeighted
Definition gEvGen.cxx:236
Long_t kDefOptRunNu
Definition gEvGen.cxx:225
bool gOptUsingFluxOrTgtMix
Definition gEvGen.cxx:238
int kDefOptNevents
Definition gEvGen.cxx:223
Utilities for improving the code readability when using PDG codes.
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f=' *')
vector< string > Split(string input, string delim)
bool gAbortingInErr
Definition Messenger.cxx:34

References genie::CmdLnArgParser::ArgAsDouble(), genie::CmdLnArgParser::ArgAsInt(), genie::CmdLnArgParser::ArgAsLong(), genie::CmdLnArgParser::ArgAsString(), genie::RunOpt::EnableBareXSecPreCalc(), genie::gAbortingInErr, gOptDMEnergy, gOptDMEnergyRange, gOptDMMass, gOptFlux, gOptInpXSecFile, gOptMedRatio, gOptNevents, gOptOutFileName, gOptRanSeed, gOptRunNu, gOptStatFileName, gOptTgtMix, gOptUsingFluxOrTgtMix, gOptWeighted, gOptZpCoupling, genie::RunOpt::Instance(), kDefOptNevents, kDefOptRunNu, LOG, genie::CmdLnArgParser::OptionExists(), pFATAL, pINFO, pNOTICE, genie::utils::print::PrintFramedMesg(), PrintSyntax(), pWARN, genie::RunOpt::ReadFromCommandLine(), and genie::utils::str::Split().

Referenced by main().

◆ Initialize()

void Initialize ( void )

Definition at line 271 of file gEvGenDM.cxx.

272{
273
274 if ( ! RunOpt::Instance()->Tune() ) {
275 LOG("gmkspl", pFATAL) << " No TuneId in RunOption";
276 exit(-1);
277 }
279
280 // Initialization of random number generators, cross-section table,
281 // messenger thresholds, cache file
282 utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
286
287 // Set GHEP print level
288 GHepRecord::SetPrintLevel(RunOpt::Instance()->EventRecordPrintLevel());
289}
static void SetPrintLevel(int print_level)
void BuildTune()
build tune and inform XSecSplineList
Definition RunOpt.cxx:92
void XSecTable(string inpfile, bool require_table)
Definition AppInit.cxx:38
void RandGen(long int seed)
Definition AppInit.cxx:30
void MesgThresholds(string inpfile)
Definition AppInit.cxx:99
void CacheFile(string inpfile)
Definition AppInit.cxx:117

References genie::RunOpt::BuildTune(), genie::utils::app_init::CacheFile(), gOptInpXSecFile, gOptRanSeed, genie::RunOpt::Instance(), LOG, genie::utils::app_init::MesgThresholds(), pFATAL, genie::utils::app_init::RandGen(), genie::GHepRecord::SetPrintLevel(), and genie::utils::app_init::XSecTable().

Referenced by main().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 235 of file gEvGenDM.cxx.

236{
237 GetCommandLineArgs(argc,argv);
239 if (gOptZpCoupling > 0.) {
240 Registry * r = AlgConfigPool::Instance()->CommonList("Param", "BoostedDarkMatter");
241 r->UnLock();
242 r->Set("ZpCoupling", gOptZpCoupling);
243 r->Lock();
244 }
245 Initialize();
246
247
248 // throw on NaNs and Infs...
249#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
250 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
251#endif
252 //
253 // Generate dark matter events
254 //
255
257#ifdef __CAN_GENERATE_EVENTS_USING_A_FLUX_OR_TGTMIX__
258 GenerateEventsUsingFluxOrTgtMix();
259#else
260 LOG("gevgen_dm", pERROR)
261 << "\n To be able to generate dark matter events from a flux and/or a target mix"
262 << "\n you need to add the following config options at your GENIE installation:"
263 << "\n --enable-flux-drivers --enable-geom-drivers \n" ;
264#endif
265 } else {
267 }
268 return 0;
269}
#define pERROR
Definition Messenger.h:59
void AddDarkMatter(double mass, double med_ratio)
static PDGLibrary * Instance(void)
void Lock(void)
locks the registry
Definition Registry.cxx:148
void Set(RgIMapPair entry)
Definition Registry.cxx:267
void UnLock(void)
unlocks the registry (doesn't unlock items)
Definition Registry.cxx:153
void GenerateEventsAtFixedInitState(void)
Definition gEvGenDM.cxx:291
void Initialize(void)
Definition gEvGenDM.cxx:271
void GetCommandLineArgs(int argc, char **argv)
Definition gEvGenDM.cxx:603

References genie::PDGLibrary::AddDarkMatter(), genie::AlgConfigPool::CommonList(), GenerateEventsAtFixedInitState(), GetCommandLineArgs(), gOptDMMass, gOptMedRatio, gOptUsingFluxOrTgtMix, gOptZpCoupling, Initialize(), genie::AlgConfigPool::Instance(), genie::PDGLibrary::Instance(), genie::Registry::Lock(), LOG, pERROR, genie::Registry::Set(), and genie::Registry::UnLock().

◆ PrintSyntax()

void PrintSyntax ( void )

Definition at line 850 of file gEvGenDM.cxx.

851{
852 LOG("gevgen_dm", pNOTICE)
853 << "\n\n" << "Syntax:" << "\n"
854 << "\n gevgen_dm [-h]"
855 << "\n [-r run#]"
856 << "\n -n nev"
857 << "\n -e energy (or energy range) "
858 << "\n -m mass"
859 << "\n -t target_pdg "
860 << "\n [-g zp_coupling]"
861 << "\n [-z med_ratio]"
862 << "\n [-f flux_description]"
863 << "\n [-o outfile_name]"
864 << "\n [-w]"
865 << "\n [--seed random_number_seed]"
866 << "\n [--cross-sections xml_file]"
867 << "\n [--event-generator-list list_name]"
868 << "\n [--message-thresholds xml_file]"
869 << "\n [--unphysical-event-mask mask]"
870 << "\n [--event-record-print-level level]"
871 << "\n [--mc-job-status-refresh-rate rate]"
872 << "\n [--cache-file root_file]"
873 << "\n";
874}

References LOG, and pNOTICE.

Referenced by GetCommandLineArgs().

Variable Documentation

◆ gOptDMEnergy

double gOptDMEnergy

◆ gOptDMEnergyRange

double gOptDMEnergyRange

Definition at line 220 of file gEvGenDM.cxx.

Referenced by GetCommandLineArgs().

◆ gOptDMMass

double gOptDMMass

◆ gOptFlux

string gOptFlux

Definition at line 226 of file gEvGenDM.cxx.

◆ gOptInpXSecFile

string gOptInpXSecFile

Definition at line 230 of file gEvGenDM.cxx.

◆ gOptMedRatio

double gOptMedRatio

Definition at line 224 of file gEvGenDM.cxx.

Referenced by CheckUnitarityLimit(), GetCommandLineArgs(), and main().

◆ gOptNevents

int gOptNevents

Definition at line 218 of file gEvGenDM.cxx.

◆ gOptOutFileName

string gOptOutFileName

Definition at line 231 of file gEvGenDM.cxx.

◆ gOptRanSeed

long int gOptRanSeed

Definition at line 229 of file gEvGenDM.cxx.

◆ gOptRunNu

Long_t gOptRunNu

Definition at line 225 of file gEvGenDM.cxx.

◆ gOptStatFileName

string gOptStatFileName

Definition at line 232 of file gEvGenDM.cxx.

◆ gOptTgtMix

map<int,double> gOptTgtMix

Definition at line 223 of file gEvGenDM.cxx.

◆ gOptUsingFluxOrTgtMix

bool gOptUsingFluxOrTgtMix = false

Definition at line 228 of file gEvGenDM.cxx.

◆ gOptWeighted

bool gOptWeighted

Definition at line 227 of file gEvGenDM.cxx.

◆ gOptZpCoupling

double gOptZpCoupling

Definition at line 222 of file gEvGenDM.cxx.

Referenced by GetCommandLineArgs(), and main().

◆ kDefOptNevents

int kDefOptNevents = 0

Definition at line 213 of file gEvGenDM.cxx.

◆ kDefOptNtpFormat

NtpMCFormat_t kDefOptNtpFormat = kNFGHEP

Definition at line 214 of file gEvGenDM.cxx.

◆ kDefOptRunNu

Long_t kDefOptRunNu = 0

Definition at line 215 of file gEvGenDM.cxx.