GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
gFNALExptEvGen.cxx File Reference
#include <cassert>
#include <cstdlib>
#include <csignal>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include <algorithm>
#include <fstream>
#include <TSystem.h>
#include <TError.h>
#include <TTree.h>
#include <TFile.h>
#include <TH1D.h>
#include <TMath.h>
#include <TGeoVolume.h>
#include <TGeoShape.h>
#include "Framework/Conventions/Units.h"
#include "Framework/EventGen/EventRecord.h"
#include "Framework/EventGen/GFluxI.h"
#include "Framework/EventGen/GMCJDriver.h"
#include "Framework/EventGen/GMCJMonitor.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Ntuple/NtpWriter.h"
#include "Framework/ParticleData/PDGLibrary.h"
#include "Framework/ParticleData/PDGCodes.h"
#include "Framework/ParticleData/PDGCodeList.h"
#include "Framework/Ntuple/NtpMCFormat.h"
#include "Framework/Utils/XSecSplineList.h"
#include "Framework/Utils/StringUtils.h"
#include "Framework/Utils/UnitUtils.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/RunOpt.h"
#include "Framework/Utils/CmdLnArgParser.h"
#include "Framework/Utils/PrintUtils.h"
#include "Framework/Utils/SystemUtils.h"
Include dependency graph for gFNALExptEvGen.cxx:

Go to the source code of this file.

Functions

void LoadExtraOptions (void)
 
void GetCommandLineArgs (int argc, char **argv)
 
void PrintSyntax (void)
 
void CreateFidSelection (string fidcut, GeomAnalyzerI *geom_driver)
 
void CreateRockBoxSelection (string fidcut, GeomAnalyzerI *geom_driver)
 
void DetermineFluxDriver (string fopt)
 
void ParseFluxHst (string fopt)
 
void ParseFluxFileConfig (string fopt)
 
static void gsSIGTERMhandler (int)
 
int main (int argc, char **argv)
 

Variables

string kDefOptGeomLUnits = "mm"
 
string kDefOptGeomDUnits = "g_cm3"
 
NtpMCFormat_t kDefOptNtpFormat = kNFGHEP
 
string kDefOptEvFilePrefix = "gntp"
 
Long_t gOptRunNu
 
bool gOptUsingRootGeom = false
 
bool gOptUsingHistFlux = false
 
string gOptFluxDriver = ""
 
map< string, string > gOptFluxShortNames
 
PDGCodeList gOptFluxPdg
 
map< int, double > gOptTgtMix
 
map< int, TH1D * > gOptFluxHst
 
TVector3 gOptBeamDir = TVector3(0,0,1)
 
TVector3 gOptBeamSpot = TVector3(0,0,0)
 
Double_t gOptBeamRadius = -1
 
string gOptBeamRtDependence = "x"
 
string gOptRootGeom
 
string gOptRootGeomTopVol = ""
 
string gOptRootGeomMasterVol = ""
 
double gOptGeomLUnits = 0
 
double gOptGeomDUnits = 0
 
string gOptExtMaxPlXml = ""
 
bool gOptWriteMaxPlXml = false
 
string gOptFluxFile
 
string gOptDetectorLocation
 
int gOptNev
 
double gOptPOT
 
string gOptFidCut
 
int gOptNScan = 0
 
double gOptZmin = -2.0e30
 
string gOptEvFilePrefix
 
int gOptDebug = 0
 
long int gOptRanSeed
 
string gOptInpXSecFile
 
bool gSigTERM = false
 

Function Documentation

void CreateFidSelection ( string  fidcut,
GeomAnalyzerI geom_driver 
)

User defined fiducial volume cut [0][M]<SHAPE>:val1,val2,... "0" means reverse the cut (i.e. exclude the volume) "M" means the coordinates are given in the ROOT geometry "master" system and need to be transformed to "top vol" system <SHAPE> can be any of "zcyl" "box" "zpoly" "sphere" [each takes different # of args] This must be followed by a ":" and a list of values separated by punctuation (allowed separators: commas , parentheses () braces {} or brackets [] ) Value mapping: zcyl:x0,y0,radius,zmin,zmax - cylinder along z at (x0,y0) capped at z's xcyl:y0,z0,radius,xmin,ymax - cylinder along x ycyl:x0,z0,radius,ymin,ymax - cylinder along y gcyl:{x0,y0,z0}{dx,dy,dz},radius,{plane1}{plane2} – generic cylinder w/ arbitrary orientation and caps {planeX} = 4 values to define plane and orientation box:xmin,ymin,zmin,xmax,ymax,zmax - box w/ upper & lower extremes zpoly:nfaces,x0,y0,r_in,phi,zmin,zmax - nfaces sided polygon in x-y plane

Examples: 1) 0mbox:0,0,0.25,1,1,8.75 exclude (i.e. reverse) a box in master coordinates w/ corners (0,0,0.25) (1,1,8.75) 2) mzpoly:6,(2,-1),1.75,0,{0.25,8.75} six sided polygon in x-y plane, centered at x,y=(2,-1) w/ inscribed radius 1.75 no rotation (so first face is in y-z plane +r from center, i.e. hex sits on point) limited to the z range of {0.25,8.75} in the master ROOT geom coordinates 3) zcyl:(3,4),5.5,-2,10 a cylinder oriented parallel to the z axis in the "top vol" coordinates at x,y=(3,4) with radius 5.5 and z range of {-2,10}

void CreateRockBoxSelection ( string  fidcut,
GeomAnalyzerI geom_driver 
)
void DetermineFluxDriver ( string  fopt)

Definition at line 1574 of file gFNALExptEvGen.cxx.

References gOptFluxDriver, gOptFluxShortNames, gOptUsingHistFlux, ParseFluxFileConfig(), and ParseFluxHst().

1575 {
1576  // based on the -f option string determine which flux driver to use
1577  // this may take some guessing
1578 
1579  // first look for strings that look like "<proto>:..."
1580  // or ....<proto>.root,....
1581  // where "<proto>" is a key the gOptFluxShortNames map
1582 
1583  map<string,string>::const_iterator mitr = gOptFluxShortNames.begin();
1584  map<string,string>::const_iterator mitr_end = gOptFluxShortNames.end();
1585  for ( ; mitr != mitr_end; ++mitr ) {
1586  string proto = mitr->first + string(":");
1587  string gproto = string("g") + proto;
1588  string protor = proto + ".root,";
1589  string full = mitr->second;
1590  if ( fopt.find(proto) == 0 ) {
1591  fopt.erase(0,proto.size());
1592  gOptFluxDriver = full;
1593  break;
1594  } else if ( fopt.find(gproto) == 0 ) {
1595  fopt.erase(0,gproto.size());
1596  gOptFluxDriver = full;
1597  break;
1598  } else if ( fopt.find(protor) != std::string::npos ) {
1599  gOptFluxDriver = full;
1600  break;
1601  }
1602  }
1603  // tested all cases where user might have specified explicitly
1604  // or been part of an extended file extension
1605  // this is where it gets messy
1606  if ( gOptFluxDriver == "" ) {
1607 
1608  // not specified ? guess from file name itself
1609  if ( fopt.find("gsimple") != std::string::npos ) {
1610  // put dk2nu after gsimple in case simple files are derived from dk2nu
1611  // then both are in name we should choose gsimple
1612  gOptFluxDriver = "genie::flux::GSimpleNtpFlux";
1613  } else if ( fopt.find("dk2nu") != std::string::npos ) {
1614  gOptFluxDriver = "genie::flux::GDk2NuFlux";
1615  } else {
1616  // does it look like the histogram format
1617  const char* hstrings[] = { ",12[", ",+12[", ",-12[",
1618  ",14[", ",+14[", ",-14[",
1619  ",16[", ",+16[", ",-16[" };
1620  size_t nh = sizeof(hstrings)/sizeof(const char*);
1621  for (size_t ih=0; ih<nh; ++ih) {
1622  if ( fopt.find(hstrings[ih]) != std::string::npos ) {
1623  // hey!
1624  gOptFluxDriver = "genie::flux::GCylindTH1Flux";
1625  break;
1626  }
1627  } // loop over possible histogram specifiers
1628  }
1629 
1630  // fall through default ... hope it works
1631  if ( gOptFluxDriver == "" ) {
1632  gOptFluxDriver = "genie::flux::GNuMIFlux";
1633  }
1634  }
1635 
1636  gOptUsingHistFlux = ( gOptFluxDriver == "genie::flux::GCylindTH1Flux" );
1637  if ( gOptUsingHistFlux ) ParseFluxHst(fopt);
1638  else ParseFluxFileConfig(fopt);
1639 }
void ParseFluxFileConfig(string fopt)
map< string, string > gOptFluxShortNames
void ParseFluxHst(string fopt)
string gOptFluxDriver
bool gOptUsingHistFlux
void GetCommandLineArgs ( int  argc,
char **  argv 
)
static void gsSIGTERMhandler ( int  )
static

Definition at line 419 of file gFNALExptEvGen.cxx.

References gSigTERM.

Referenced by main().

420 {
421  gSigTERM = true;
422  std::cerr << "Caught SIGTERM" << std::endl;
423 }
bool gSigTERM
void LoadExtraOptions ( void  )

potentially load extra libraries that might extend the list of potential flux drivers, and how to map short names to classes ...

******* done with fake "read"

int main ( int  argc,
char **  argv 
)

Definition at line 426 of file gFNALExptEvGen.cxx.

References genie::flux::GCylindTH1Flux::AddEnergySpectrum(), genie::NtpWriter::AddEventRecord(), genie::flux::GFluxDriverFactory::AvailableFluxDrivers(), genie::RunOpt::BuildTune(), genie::utils::app_init::CacheFile(), genie::GMCJDriver::Configure(), CreateFidSelection(), CreateRockBoxSelection(), genie::NtpWriter::CustomizeFilenamePrefix(), genie::GFluxI::End(), genie::RunOpt::EventRecordPrintLevel(), genie::NtpWriter::EventTree(), genie::GMCJDriver::ForceSingleProbScale(), genie::GMCJDriver::GenerateEvent(), genie::flux::GFluxFileConfigI::GetBranchInfo(), GetCommandLineArgs(), genie::flux::GFluxExposureI::GetExposureUnits(), genie::flux::GFluxDriverFactory::GetFluxDriver(), genie::geometry::ROOTGeomAnalyzer::GetGeometry(), genie::geometry::ROOTGeomAnalyzer::GetMaxPathLengths(), genie::flux::GFluxFileConfigI::GetMetaDataTree(), genie::flux::GFluxExposureI::GetTotalExposure(), genie::GMCJDriver::GlobProbScale(), gOptBeamDir, gOptBeamRadius, gOptBeamSpot, gOptDebug, gOptDetectorLocation, gOptEvFilePrefix, gOptExtMaxPlXml, gOptFidCut, gOptFluxDriver, gOptFluxFile, gOptFluxHst, gOptFluxPdg, gOptGeomDUnits, gOptGeomLUnits, gOptInpXSecFile, gOptNev, gOptNScan, gOptPOT, gOptRanSeed, gOptRootGeom, gOptRootGeomMasterVol, gOptRootGeomTopVol, gOptRunNu, gOptTgtMix, gOptUsingHistFlux, gOptUsingRootGeom, gOptWriteMaxPlXml, gOptZmin, gSigTERM, gsSIGTERMhandler(), genie::NtpWriter::Initialize(), genie::RunOpt::Instance(), genie::flux::GFluxDriverFactory::Instance(), kDefOptNtpFormat, genie::flux::GFluxFileConfigI::LoadBeamSimData(), LoadExtraOptions(), LOG, genie::utils::app_init::MesgThresholds(), genie::flux::GFluxExposureI::NFluxNeutrinos(), pERROR, pFATAL, pINFO, pNOTICE, genie::flux::GFluxFileConfigI::PrintConfig(), pWARN, genie::utils::app_init::RandGen(), genie::utils::geometry::RecursiveExhaust(), genie::units::s, genie::NtpWriter::Save(), genie::PathLengthList::SaveAsXml(), genie::flux::GCylindTH1Flux::SetBeamSpot(), genie::GMCJDriver::SetEventGeneratorList(), genie::flux::GFluxFileConfigI::SetFluxParticles(), genie::flux::GCylindTH1Flux::SetNuDirection(), genie::flux::GFluxFileConfigI::SetNumOfCycles(), genie::GHepRecord::SetPrintLevel(), genie::GMCJMonitor::SetRefreshRate(), genie::geometry::ROOTGeomAnalyzer::SetScannerFlux(), genie::geometry::ROOTGeomAnalyzer::SetScannerNParticles(), genie::geometry::ROOTGeomAnalyzer::SetScannerNPoints(), genie::geometry::ROOTGeomAnalyzer::SetScannerNRays(), genie::flux::GCylindTH1Flux::SetTransverseRadius(), genie::flux::GFluxFileConfigI::SetUpstreamZ(), genie::GMCJMonitor::Update(), genie::GMCJDriver::UseFluxDriver(), genie::GMCJDriver::UseGeomAnalyzer(), genie::GMCJDriver::UseMaxPathLengths(), genie::GMCJDriver::UseSplines(), and genie::utils::app_init::XSecTable().

427 {
429  GetCommandLineArgs(argc,argv);
430 
431  if ( ! RunOpt::Instance()->Tune() ) {
432  LOG("gmkspl", pFATAL) << " No TuneId in RunOption";
433  exit(-1);
434  }
435  RunOpt::Instance()->BuildTune();
436 
437  // Initialization of random number generators, cross-section table,
438  // messenger thresholds, cache file
439  utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
440  utils::app_init::CacheFile(RunOpt::Instance()->CacheFile());
443 
444  // Set GHEP print level
445  int print_level = RunOpt::Instance()->EventRecordPrintLevel();
446  GHepRecord::SetPrintLevel(print_level);
447 
448  // *************************************************************************
449  // * Create / configure the geometry driver
450  // *************************************************************************
451  GeomAnalyzerI * geom_driver = 0;
452 
453  if(gOptUsingRootGeom) {
454  //
455  // *** Using a realistic root-based detector geometry description
456  //
457 
458  // creating & configuring a root geometry driver
461  TGeoVolume * topvol = rgeom->GetGeometry()->GetTopVolume();
462  if ( ! topvol ) {
463  LOG("gevgen_fnal", pFATAL) << "Null top ROOT geometry volume!";
464  exit(1);
465  }
466  // retrieve the master volume name
467  gOptRootGeomMasterVol = topvol->GetName();
468 
469  rgeom -> SetLengthUnits (gOptGeomLUnits);
470  rgeom -> SetDensityUnits (gOptGeomDUnits);
471  rgeom -> SetTopVolName (gOptRootGeomTopVol); // set user defined "topvol"
472 
473  // getting the bounding box dimensions along z so as to set the
474  // appropriate upstream generation surface for the NuMI flux driver
475 
476  // RWH 2010-07-16: do not try to automatically get zmin from geometry, rather
477  // by default let the flux start from the window. If the user wants to
478  // override this then they need to explicitly set a "zmin". Trying to use
479  // the geometry is fraught with problems in local vs. global coordinates and
480  // units where it can appear to work in some cases but it actually isn't really
481  // universally correct.
482  //was// TGeoShape * bounding_box = topvol->GetShape();
483  //was// bounding_box->GetAxisRange(3, zmin, zmax);
484  //was// zmin *= rgeom->LengthUnits();
485  //was// zmax *= rgeom->LengthUnits();
486 
487  // switch on/off volumes as requested
488  if ( (gOptRootGeomTopVol[0] == '+') || (gOptRootGeomTopVol[0] == '-') ) {
489  bool exhaust = (*gOptRootGeomTopVol.c_str() == '+');
491  }
492 
493  // casting to the GENIE geometry driver interface
494  geom_driver = dynamic_cast<GeomAnalyzerI *> (rgeom);
495 
496  // user specifid a fiducial volume cut ... parse that out
497  if ( gOptFidCut.find("rock") != std::string::npos )
499  else if ( gOptFidCut != "" ) CreateFidSelection(gOptFidCut,rgeom);
500 
501  }
502  else {
503  //
504  // *** Using a 'point' geometry with the specified target mix
505  // *** ( = a list of targets with their corresponding weight fraction)
506  //
507 
508  // creating & configuring a point geometry driver
511  // casting to the GENIE geometry driver interface
512  geom_driver = dynamic_cast<GeomAnalyzerI *> (pgeom);
513  }
514 
515  // *************************************************************************
516  // * Create / configure the flux driver
517  // *************************************************************************
518  GFluxI * flux_driver =
520  if ( ! flux_driver ) {
521  // couldn't get the requested flux driver ?
522  std::ostringstream s;
523  s << "Known FluxDrivers:\n";
524  const std::vector<std::string>& known =
526  std::vector<std::string>::const_iterator itr = known.begin();
527  for ( ; itr != known.end(); ++itr ) s << " " << (*itr) << "\n";
528  LOG("gevgen_fnal", pFATAL)
529  << "Failed to get any flux driver from GFluxDriverFactory\n"
530  << "when using \"" << gOptFluxDriver << "\"\n" << s.str();
531  exit(1);
532  }
533 
534  if ( ! gOptUsingHistFlux ) {
535  genie::flux::GFluxFileConfigI* flux_file_config =
536  dynamic_cast<genie::flux::GFluxFileConfigI*>(flux_driver);
537  if ( ! flux_file_config ) {
538  LOG("gevgen_fnal", pFATAL)
539  << "Failed to get GFluxFileConfigI driver from GFluxDriverFactory\n"
540  << "when using \"" << gOptFluxDriver << "\"";
541  exit(1);
542  }
543 
544  //
545  // *** Using the detailed ntuple neutrino flux description
546  //
548  flux_file_config->SetUpstreamZ(gOptZmin); // was "zmin" from bounding_box
549  flux_file_config->SetNumOfCycles(0);
550 
551  if ( gOptFluxPdg.size() > 0 ) {
552  // user specified list of neutrino PDGs
553  flux_file_config->SetFluxParticles(gOptFluxPdg);
554  std::ostringstream s;
555  PDGCodeList::const_iterator itr = gOptFluxPdg.begin();
556  for ( ; itr != gOptFluxPdg.end(); ++itr) s << (*itr) << " ";
557  LOG("gevgen_fnal", pNOTICE)
558  << "Limiting to nu PDGs: " << s.str();
559  }
560  }
561  else {
562  //
563  // *** Using fluxes from histograms (for all specified neutrino species)
564  //
565  genie::flux::GCylindTH1Flux * hist_flux_driver =
566  dynamic_cast<genie::flux::GCylindTH1Flux*>(flux_driver);
567  if ( ! hist_flux_driver ) {
568  LOG("gevgen_fnal", pFATAL)
569  << "Failed to get GCylinderTH1Flux driver from GFluxDriverFactory\n"
570  << "when using " << gOptFluxDriver;
571  exit(1);
572  }
573 
574  // creating & configuring a generic GCylindTH1Flux flux driver
575  hist_flux_driver->SetNuDirection (gOptBeamDir);
576  hist_flux_driver->SetBeamSpot (gOptBeamSpot);
577  hist_flux_driver->SetTransverseRadius (gOptBeamRadius);
578  //hist_flux_driver->SetRtDependence (gOptBeamRtDependence); // "x");
579 
580  map<int,TH1D*>::iterator it = gOptFluxHst.begin();
581  for( ; it != gOptFluxHst.end(); ++it) {
582  int pdg_code = it->first;
583  TH1D * spectrum = it->second;
584  hist_flux_driver->AddEnergySpectrum(pdg_code, spectrum);
585  // once the histogram has been added to the GCylindTH1Flux driver
586  // it is owned by the driver and it is up to the the driver
587  // to clean up (i.e. delete it).
588  // remove it from this map to avoid double deletion.
589  it->second = 0;
590  }
591  }
592 
593  // these might come in handy ... avoid repeated dynamic_cast<> calls
594  genie::flux::GFluxExposureI* fluxExposureI =
595  dynamic_cast<genie::flux::GFluxExposureI*>(flux_driver);
596  genie::flux::GFluxFileConfigI* fluxFileConfigI =
597  dynamic_cast<genie::flux::GFluxFileConfigI*>(flux_driver);
598 
599 
600  // *************************************************************************
601  // * Handle chicken/egg problem: geom analyzer vs. flux.
602  // * Need both at this point change geom scan defaults.
603  // *************************************************************************
605 
607  dynamic_cast<geometry::ROOTGeomAnalyzer *>(geom_driver);
608  if ( ! rgeom ) assert(0);
609 
610  rgeom -> SetDebugFlags(gOptDebug);
611 
612  // even if user doesn't specify gOptNScan configure to scan using flux
613  if ( gOptNScan >= 0 ) {
614  LOG("gevgen_fnal", pNOTICE)
615  << "Using ROOTGeomAnalyzer: geom scan using flux: nparticles=" << gOptNScan;
616  rgeom->SetScannerFlux(flux_driver);
617  if ( gOptNScan > 0 ) rgeom->SetScannerNParticles(gOptNScan);
618  } else {
619  int nabs = TMath::Abs(gOptNScan);
620  LOG("gevgen_fnal", pNOTICE)
621  << "Using ROOTGeomAnalyzer: geom scan using box: npoints=nrays=" << nabs;
622  rgeom->SetScannerNPoints(nabs);
623  rgeom->SetScannerNRays(nabs);
624  }
625  }
626 
627  // *************************************************************************
628  // * Create/configure the event generation driver
629  // *************************************************************************
630  GMCJDriver * mcj_driver = new GMCJDriver;
631  mcj_driver->SetEventGeneratorList(RunOpt::Instance()->EventGeneratorList());
632  mcj_driver->UseFluxDriver(flux_driver);
633  mcj_driver->UseGeomAnalyzer(geom_driver);
634  if ( ( gOptExtMaxPlXml != "" ) && ! gOptWriteMaxPlXml ) {
635  mcj_driver->UseMaxPathLengths(gOptExtMaxPlXml);
636  }
637  mcj_driver->Configure();
638  mcj_driver->UseSplines();
639  mcj_driver->ForceSingleProbScale();
640 
641  if ( ( gOptExtMaxPlXml != "" ) && gOptWriteMaxPlXml ) {
643  dynamic_cast<geometry::ROOTGeomAnalyzer *>(geom_driver);
644  if ( rgeom ) {
645  const genie::PathLengthList& maxpath = rgeom->GetMaxPathLengths();
646  std::string maxplfile = gOptExtMaxPlXml;
647  maxpath.SaveAsXml(maxplfile);
648  // append extra info to file
649  std::ofstream mpfile(maxplfile.c_str(), std::ios_base::app);
650  mpfile
651  << std::endl
652  << "<!-- this file is only relevant for a setup compatible with:"
653  << std::endl
654  << "geom: " << gOptRootGeom << " top: \"" << gOptRootGeomTopVol << "\""
655  << std::endl
656  << "flux: " << gOptFluxFile
657  << std::endl
658  << "location: " << gOptDetectorLocation
659  << std::endl
660  << "fidcut: " << gOptFidCut
661  << std::endl
662  << "nscan: " << gOptNScan << " (0>= use flux, <0 use box |nscan| points/rays)"
663  << std::endl
664  << "zmin: " << gOptZmin << " (if |zmin| > 1e30, leave ray on flux window)"
665  << std::endl
666  << "-->"
667  << std::endl;
668  mpfile.close();
669  }
670  }
671 
672  // *************************************************************************
673  // * Prepare for writing the output event tree & status file
674  // *************************************************************************
675 
676  // Initialize an Ntuple Writer to save GHEP records into a TTree
678  ntpw.CustomizeFilenamePrefix(gOptEvFilePrefix);
679  ntpw.Initialize();
680 
681 
682  std::vector<TBranch*> extraBranches;
683  std::vector<std::string> branchNames;
684  std::vector<std::string> branchClassNames;
685  std::vector<void**> branchObjPointers;
686 
687  // Add custom branch(s) to the standard GENIE event tree so that
688  // info on the flux neutrino parent particle can be passed-through
689  if ( fluxFileConfigI ) {
690  fluxFileConfigI->GetBranchInfo(branchNames,branchClassNames,
691  branchObjPointers);
692  size_t nn = branchNames.size();
693  size_t nc = branchClassNames.size();
694  size_t np = branchObjPointers.size();
695  if ( nn != nc || nc != np ) {
696  LOG("gevgen_fnal", pERROR)
697  << "Inconsistent info back from \"" << gOptFluxDriver << "\" "
698  << "for branch info: " << nn << " " << nc << " " << np;
699  } else {
700  for (size_t ii = 0; ii < nn; ++ii) {
701  const char* bname = branchNames[ii].c_str();
702  const char* cname = branchClassNames[ii].c_str();
703  void**& optr = branchObjPointers[ii]; // note critical '&' !
704  if ( ! optr || ! *optr ) continue; // no pointer supplied, skip it
705  int split = 99; // 1
706  LOG("gevgen_fnal", pNOTICE)
707  << "Adding extra branch \"" << bname << "\" of type \""
708  << cname << "\" (" << optr << ") to output tree";
709  TBranch* bptr = ntpw.EventTree()->Branch(bname,cname,optr,32000,split);
710  extraBranches.push_back(bptr);
711 
712  if ( bptr ) {
713  // don't delete this !!! we're sharing
714  bptr->SetAutoDelete(false);
715  } else {
716  LOG("gevgen_fnal", pERROR)
717  << "FAILED to add extra branch \"" << bname << "\" of type \""
718  << cname << "\" to output tree";
719  }
720  } // loop over additions
721  } // same # of entries
722  } // of genie::flux::GFluxFileConfigI type
723 
724  // Create a MC job monitor for a periodically updated status file
725  GMCJMonitor mcjmonitor(gOptRunNu);
726  mcjmonitor.SetRefreshRate(RunOpt::Instance()->MCJobStatusRefreshRate());
727 
728  // *************************************************************************
729  // * Event generation loop
730  // *************************************************************************
731 
732  // define handler to allow signal to end job gracefully
733  signal(SIGTERM,gsSIGTERMhandler);
734 
735  int ievent = 0;
736  while ( ! gSigTERM )
737  {
738  LOG("gevgen_fnal", pINFO)
739  << " *** Generating event............ " << ievent;
740 
741  // In case the required statistics was expressed as 'number of events'
742  // then quit if that number has been generated
743  if ( ievent == gOptNev ) break;
744 
745  // In case the required statistics was expressed as 'number of POT'
746  // then exit the event loop if the requested POT has been generated.
747  if ( gOptPOT > 0 && fluxExposureI ) {
748  double fpot = fluxExposureI->GetTotalExposure(); // current POTs used
749  double psc = mcj_driver->GlobProbScale(); // interaction prob. scale
750  double pot = fpot / psc; // POTs for generated sample
751  if ( pot >= gOptPOT ) break;
752  }
753 
754  // Generate a single event using neutrinos coming from the specified flux
755  // and hitting the specified geometry or target mix
756  EventRecord * event = mcj_driver->GenerateEvent();
757 
758  // Check whether a null event was returned due to the flux driver reaching
759  // the end of the input flux ntuple - exit the event generation loop
760  if ( ! event && flux_driver->End() ) {
761  LOG("gevgen_fnal", pWARN)
762  << "** The flux driver read all the input flux entries: End()==true";
763  break;
764  }
765  if ( ! event ) {
766  LOG("gevgen_fnal", pERROR)
767  << "Got a null generated neutino event! Retrying ...";
768  continue;
769  }
770  if ( print_level >= 0 ) {
771  LOG("gevgen_fnal", pINFO)
772  << "Generated event: " << *event;
773  }
774  // A valid event was generated: flux info (parent decay/prod
775  // position/kinematics) for that simulated event should already
776  // be connected to the right output tree branch
777 
778  // Add event at the output ntuple, refresh the mc job monitor & clean-up
779  ntpw.AddEventRecord(ievent, event);
780  mcjmonitor.Update(ievent,event);
781  delete event;
782  ievent++;
783 
784  } //1
785 
786  // Copy metadata tree, if available
787  if ( fluxFileConfigI ) {
788  TTree* t1 = fluxFileConfigI->GetMetaDataTree();
789  if ( t1 ) {
790  TTree* t2 = (TTree*)t1->CloneTree();
791  t2->Write();
792  }
793  }
794 
795  LOG("gevgen_fnal", pINFO)
796  << "The GENIE MC job is done generating events - Cleaning up & exiting...";
797 
798  // *************************************************************************
799  // * Print job statistics &
800  // * calculate normalization factor for the generated sample
801  // *************************************************************************
803  // POT normalization will only be calculated if event generation was based
804  // on beam simulation ntuples (not just histograms) & a detailed detector
805  // geometry description.
806  // Get nunber of flux neutrinos read-in by flux driver, number of flux
807  // neutrinos actually thrown to the event generation driver and number
808  // of neutrino interactions actually generated
809  long int nflx = 0;
810  long int nflx_evg = mcj_driver-> NFluxNeutrinos();
811  double fpot = 0;
812  const char* exposureUnits = "(unknown units)";
813  if ( fluxExposureI ) {
814  fpot = fluxExposureI->GetTotalExposure(); // POTs used so far
815  nflx = fluxExposureI->NFluxNeutrinos();
816  //genie::flux::Exposure_t etype = fluxExposureI->GetExposureType();
817  //exposureUnits = genie::flux::GFluxExposureI::AsString(etype);
818  exposureUnits = fluxExposureI->GetExposureUnits();
819  }
820  if ( fluxFileConfigI ) {
821  fluxFileConfigI->PrintConfig();
822  }
823  double psc = mcj_driver->GlobProbScale(); // interaction prob. scale
824  if ( psc <= 0.0 ) {
825  LOG("gevgen_fnal", pFATAL) << "MCJobDriver GlobalProbScale was " << psc;
826  }
827  double pot = fpot / psc; // POT for generated sample
828  long int nev = ievent;
829 
830  LOG("gevgen_fnal", pNOTICE)
831  << "\n >> Interaction probability scaling factor: " << psc
832  << "\n >> using: " << gOptFluxDriver
833  << "\n >> N of flux v read-in by flux driver: " << nflx
834  << "\n >> N of flux v thrown to event gen driver: " << nflx_evg
835  << "\n >> N of generated v interactions: " << nev
836  << "\n ** Normalization for generated sample: " << pot
837  << " " << exposureUnits << " * detector";
838 
839  ntpw.EventTree()->SetWeight(pot); // store POT
840 
841  }
842 
843  // *************************************************************************
844  // * Save & clean-up
845  // *************************************************************************
846 
847  // Save the generated event tree & close the output file
848  ntpw.Save();
849 
850  // Clean-up
851  delete geom_driver;
852  delete flux_driver;
853  delete mcj_driver;
854  // this list should only be histograms that have (for some reason)
855  // not been handed over to the GCylindTH1Flux driver.
856  map<int,TH1D*>::iterator it = gOptFluxHst.begin();
857  for( ; it != gOptFluxHst.end(); ++it) {
858  TH1D * spectrum = it->second;
859  if(spectrum) delete spectrum;
860  }
861  gOptFluxHst.clear();
862 
863  LOG("gevgen_fnal", pNOTICE) << "Done!";
864 
865  return 0;
866 }
void RandGen(long int seed)
Definition: AppInit.cxx:30
const char * GetExposureUnits() const
what units are returned by GetTotalExposure?
void XSecTable(string inpfile, bool require_table)
Definition: AppInit.cxx:38
void CreateRockBoxSelection(string fidcut, GeomAnalyzerI *geom_driver)
PDGCodeList gOptFluxPdg
virtual void LoadBeamSimData(const std::vector< std::string > &filenames, const std::string &det_loc)=0
string gOptEvFilePrefix
Definition: gAtmoEvGen.cxx:310
#define pERROR
Definition: Messenger.h:59
int gOptDebug
string gOptRootGeomMasterVol
void SetEventGeneratorList(string listname)
Definition: GMCJDriver.cxx:66
virtual void PrintConfig()=0
print the current configuration
#define pFATAL
Definition: Messenger.h:56
double gOptGeomDUnits
Definition: gAtmoEvGen.cxx:303
string gOptDetectorLocation
virtual const PathLengthList & GetMaxPathLengths(void) const
static constexpr double s
Definition: Units.h:95
double gOptZmin
const std::vector< std::string > & AvailableFluxDrivers() const
int gOptNScan
static void gsSIGTERMhandler(int)
map< int, double > gOptTgtMix
Definition: gAtmoEvGen.cxx:299
string gOptFidCut
virtual void SetNumOfCycles(long int ncycle)
limit cycling through input files
virtual void SetScannerNParticles(int np)
virtual long int NFluxNeutrinos() const =0
of rays generated
bool gOptWriteMaxPlXml
TVector3 gOptBeamDir
void CreateFidSelection(string fidcut, GeomAnalyzerI *geom_driver)
virtual void SetUpstreamZ(double z0)
void UseFluxDriver(GFluxI *flux)
Definition: GMCJDriver.cxx:83
Object to be filled with the neutrino path-length, for all detector geometry materials, when starting from a position x and travelling along the direction of the neutrino 4-momentum.
Simple class to create &amp; update MC job status files and env. vars. This is used to be able to keep tr...
Definition: GMCJMonitor.h:31
A GENIE `MC Job Driver&#39;. Can be used for setting up complicated event generation cases involving deta...
Definition: GMCJDriver.h:46
double GlobProbScale(void) const
Definition: GMCJDriver.h:76
void SaveAsXml(string filename) const
string gOptInpXSecFile
Definition: gAtmoEvGen.cxx:313
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
string gOptRootGeomTopVol
Definition: gAtmoEvGen.cxx:301
void ForceSingleProbScale(void)
Definition: GMCJDriver.cxx:172
virtual void SetScannerNRays(int nr)
A generic GENIE flux driver. Generates a &#39;cylindrical&#39; neutrino beam along the input direction...
bool UseMaxPathLengths(string xml_filename)
Definition: GMCJDriver.cxx:99
bool gSigTERM
GENIE interface for uniform flux exposure iterface.
int gOptNev
Definition: gAtmoEvGen.cxx:305
TVector3 gOptBeamSpot
void Configure(bool calc_prob_scales=true)
Definition: GMCJDriver.cxx:399
Double_t gOptBeamRadius
A ROOT/GEANT4 geometry driver.
#define pINFO
Definition: Messenger.h:62
void SetTransverseRadius(double Rt)
void SetNuDirection(const TVector3 &direction)
string gOptRootGeom
Definition: gAtmoEvGen.cxx:300
#define pWARN
Definition: Messenger.h:60
EventRecord * GenerateEvent(void)
Definition: GMCJDriver.cxx:815
virtual void GetBranchInfo(std::vector< std::string > &branchNames, std::vector< std::string > &branchClassNames, std::vector< void ** > &branchObjPointers)
Long_t gOptRunNu
Definition: gAtmoEvGen.cxx:295
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
void LoadExtraOptions(void)
A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records...
Definition: NtpWriter.h:39
virtual void SetScannerNPoints(int np)
set geometry driver&#39;s configuration options
virtual void SetScannerFlux(GFluxI *f)
static GFluxDriverFactory & Instance()
string gOptFluxFile
virtual bool End(void)=0
true if no more flux nu&#39;s can be thrown (eg reaching end of beam sim ntuples)
virtual double GetTotalExposure() const =0
NtpMCFormat_t kDefOptNtpFormat
Definition: gAtmoEvGen.cxx:319
A vector of EventGeneratorI objects.
virtual void SetFluxParticles(const PDGCodeList &particles)
specify list of flux neutrino species
void SetBeamSpot(const TVector3 &spot)
void MesgThresholds(string inpfile)
Definition: AppInit.cxx:99
void AddEnergySpectrum(int nu_pdgc, TH1D *spectrum)
#define pNOTICE
Definition: Messenger.h:61
void GetCommandLineArgs(int argc, char **argv)
Definition: gAtmoEvGen.cxx:563
double gOptPOT
Defines the GENIE Geometry Analyzer Interface.
Definition: GeomAnalyzerI.h:29
void RecursiveExhaust(TGeoVolume *topvol, string volnames, bool exhaust)
Definition: GeoUtils.cxx:16
double gOptGeomLUnits
Definition: gAtmoEvGen.cxx:302
void UseGeomAnalyzer(GeomAnalyzerI *geom)
Definition: GMCJDriver.cxx:88
void UseSplines(bool useLogE=true)
Definition: GMCJDriver.cxx:93
The PointGeomAnalyzer class is the simplest implementation of the GeomAnalyserI interface and defines...
void CacheFile(string inpfile)
Definition: AppInit.cxx:117
string gOptExtMaxPlXml
Definition: gAtmoEvGen.cxx:304
bool gOptUsingRootGeom
Definition: gAtmoEvGen.cxx:298
map< int, TH1D * > gOptFluxHst
virtual TGeoManager * GetGeometry(void) const
genie::GFluxI * GetFluxDriver(const std::string &)
GENIE Interface for user-defined flux classes.
Definition: GFluxI.h:29
string gOptFluxDriver
long int gOptRanSeed
Definition: gAtmoEvGen.cxx:312
bool gOptUsingHistFlux
void ParseFluxFileConfig ( string  fopt)

Definition at line 1813 of file gFNALExptEvGen.cxx.

References gOptDetectorLocation, gOptFluxFile, gOptFluxPdg, LOG, pFATAL, PrintSyntax(), genie::PDGCodeList::push_back(), and genie::utils::str::Split().

Referenced by DetermineFluxDriver().

1814 {
1815  // Using gnumi/gsimple/dk2nu beam flux ntuples
1816  // Extract beam flux (root) file name & detector location
1817  //
1818  vector<string> fluxv = utils::str::Split(flux,",");
1819  if(fluxv.size()<2) {
1820  LOG("gevgen_fnal", pFATAL)
1821  << "You need to specify both a flux ntuple ROOT file "
1822  << " _AND_ a detector location";
1823  PrintSyntax();
1824  exit(1);
1825  }
1826  gOptFluxFile = fluxv[0];
1827  gOptDetectorLocation = fluxv[1];
1828 
1829  for ( size_t j = 2; j < fluxv.size(); ++j ) {
1830  int ipdg = atoi(fluxv[j].c_str());
1831  gOptFluxPdg.push_back(ipdg);
1832  }
1833 
1834 }
PDGCodeList gOptFluxPdg
#define pFATAL
Definition: Messenger.h:56
string gOptDetectorLocation
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
vector< string > Split(string input, string delim)
Definition: StringUtils.cxx:36
string gOptFluxFile
void PrintSyntax(void)
void push_back(int pdg_code)
Definition: PDGCodeList.cxx:58
void ParseFluxHst ( string  fopt)

Definition at line 1641 of file gFNALExptEvGen.cxx.

References gOptBeamDir, gOptBeamRadius, gOptBeamSpot, gOptFluxFile, gOptFluxHst, genie::pdg::IsAntiNeutrino(), genie::pdg::IsNeutrino(), LOG, pDEBUG, pFATAL, pNOTICE, PrintSyntax(), and genie::utils::str::Split().

Referenced by DetermineFluxDriver().

1642 {
1643  // Using flux from histograms
1644  // Extract the root file name & the list of histogram names & neutrino
1645  // species (specified as 'filename,histo1[species1],histo2[species2],...')
1646  // for variable width histograms, default to multiply in the width
1647  // histo1[species1]WIDTH = multiply in the width
1648  // histo1[species1]NOWIDTH = don't multiply in the width
1649  // possibly with configuration ";r=1.1,dir=(0.1,0.2,0.3),spot=(-1,-2,-3)"
1650  // appended
1651  // See documentation on top section of this file.
1652 
1653  vector<string> fluxtop = utils::str::Split(flux,";");
1654  string beamsettings;
1655  string histosettings;
1656  if ( fluxtop.size() == 1 ) {
1657  histosettings = fluxtop[0];
1658  LOG("gevgen_fnal", pNOTICE)
1659  << "ParseFluxHst: no settings for radius, direction, spot position"
1660  << " using defaults, r=" << gOptBeamRadius;
1661  } else if ( fluxtop.size() > 2 ) {
1662  LOG("gevgen_fnal", pFATAL)
1663  << "ParseFluxHst: too many ';' separated fields";
1664  PrintSyntax();
1665  exit(1);
1666  } else {
1667  // decide which is which depending on which has "=" in it
1668  string::size_type eqpos0 = fluxtop[0].find("=");
1669  string::size_type eqpos1 = fluxtop[1].find("=");
1670  if (eqpos0 == string::npos && eqpos1 != string::npos ) {
1671  histosettings = fluxtop[0];
1672  beamsettings = fluxtop[1];
1673  } else if (eqpos0 != string::npos && eqpos1 == string::npos ) {
1674  beamsettings = fluxtop[0];
1675  histosettings = fluxtop[1];
1676  } else {
1677  LOG("gevgen_fnal", pFATAL)
1678  << "ParseFluxHst: too many / not enough fields with '=' "
1679  << "\n" << fluxtop[0] << "\n" << fluxtop[1];
1680  PrintSyntax();
1681  exit(1);
1682  }
1683  // now parse the string we have
1684  double r=-1, dx=0, dy=0, dz=1, x=0, y=0, z=0;
1685  int nscan = sscanf(beamsettings.c_str(),
1686  "r=%lf,dir=(%lf,%lf,%lf),spot=(%lf,%lf,%lf)",
1687  &r,&dx,&dy,&dz,&x,&y,&z);
1688  cout << "nscan = " << nscan << endl;
1689  gOptBeamRadius = r;
1690  gOptBeamDir = TVector3(dx,dy,dz);
1691  gOptBeamSpot = TVector3(x,y,z);
1692 
1693  }
1694  LOG("gevgen_fnal", pNOTICE)
1695  << "ParseFluxHst: "
1696  << " using r=" << gOptBeamRadius
1697  << ",dir=("
1698  << gOptBeamDir.Px() << ","
1699  << gOptBeamDir.Py() << ","
1700  << gOptBeamDir.Pz() << ")"
1701  << ",spot=("
1702  << gOptBeamSpot.X() << ","
1703  << gOptBeamSpot.Y() << ","
1704  << gOptBeamSpot.Z() << ")";
1705 
1706 
1707  vector<string> fluxv = utils::str::Split(histosettings,",");
1708  if(fluxv.size()<2) {
1709  LOG("gevgen_fnal", pFATAL)
1710  << "You need to specify both a flux histogram ROOT file "
1711  << " _AND_ at least one histogram[pdg] mapping";
1712  PrintSyntax();
1713  exit(1);
1714  }
1715  gOptFluxFile = fluxv[0];
1716  bool accessible_flux_file = !(gSystem->AccessPathName(gOptFluxFile.c_str()));
1717  if (!accessible_flux_file) {
1718  LOG("gevgen_fnal", pFATAL)
1719  << "Can not access flux file: " << gOptFluxFile;
1720  PrintSyntax();
1721  exit(1);
1722  }
1723  // Extract energy spectra for all specified neutrino species
1724  TFile flux_file(gOptFluxFile.c_str(), "read");
1725  for(unsigned int inu=1; inu<fluxv.size(); inu++) {
1726  string nutype_and_histo = fluxv[inu];
1727  string::size_type open_bracket = nutype_and_histo.find("[");
1728  string::size_type close_bracket = nutype_and_histo.find("]");
1729  if (open_bracket ==string::npos ||
1730  close_bracket==string::npos)
1731  {
1732  LOG("gevgen_fnal", pFATAL)
1733  << "You made an error in specifying the flux histograms";
1734  PrintSyntax();
1735  exit(1);
1736  }
1737  string::size_type ibeg = 0;
1738  string::size_type iend = open_bracket;
1739  string::size_type jbeg = open_bracket+1;
1740  string::size_type jend = close_bracket;
1741  string nutype = nutype_and_histo.substr(ibeg,iend-ibeg);
1742  string histo = nutype_and_histo.substr(jbeg,jend-jbeg);
1743  string extra = nutype_and_histo.substr(jend+1,string::npos);
1744  std::transform(extra.begin(),extra.end(),extra.begin(),::toupper);
1745  LOG("gevgen_fnal", pNOTICE) // pDEBUG
1746  << " =======> nutype " << nutype << " histo " << histo << " extra " << extra;
1747  // access specified histogram from the input root file
1748  TH1D * ihst = (TH1D*) flux_file.Get(histo.c_str());
1749  if(!ihst) {
1750  LOG("gevgen_fnal", pFATAL)
1751  << "Can not find histogram: " << histo
1752  << " in flux file: " << gOptFluxFile;
1753  PrintSyntax();
1754  exit(1);
1755  }
1756 
1757  // Copy in the flux histogram from the root file
1758  // use Clone rather than assuming fix bin widths and rebooking
1759  TH1D* spectrum = (TH1D*)ihst->Clone();
1760  spectrum->SetNameTitle("spectrum","neutrino_flux");
1761  spectrum->SetDirectory(0);
1762  // get rid of original
1763  delete ihst;
1764 
1765  bool force_binwidth = false;
1766 #if ROOT_VERSION_CODE <= ROOT_VERSION(9,99,99)
1767  // GetRandom() sampling on variable bin width histograms does not
1768  // correctly account for bin widths for all versions of ROOT prior
1769  // to (currently forever). At some point this might change and
1770  // the necessity of this code snippet will go away
1771  TAxis* xaxis = spectrum->GetXaxis();
1772  if (xaxis->IsVariableBinSize()) force_binwidth = true;
1773 #endif
1774  if ( extra == "WIDTH" ) force_binwidth = true;
1775  if ( extra == "NOWIDTH" ) force_binwidth = false;
1776  if ( force_binwidth ) {
1777  LOG("gevgen_fnal", pNOTICE)
1778  << "multiplying by bin width for histogram " << histo
1779  << " as " << spectrum->GetName() << " for nutype " << nutype
1780  << " from " << gOptFluxFile;
1781  for(int ibin = 1; ibin <= spectrum->GetNbinsX(); ++ibin) {
1782  double data = spectrum->GetBinContent(ibin);
1783  double width = spectrum->GetBinWidth(ibin);
1784  spectrum->SetBinContent(ibin,data*width);
1785  }
1786  }
1787 
1788  // convert neutrino name -> pdg code
1789  int pdg = atoi(nutype.c_str());
1790  if(!pdg::IsNeutrino(pdg) && !pdg::IsAntiNeutrino(pdg)) {
1791  LOG("gevgen_fnal", pFATAL)
1792  << "Unknown neutrino type: " << nutype;
1793  PrintSyntax();
1794  exit(1);
1795  }
1796  // store flux neutrino code / energy spectrum
1797  LOG("gevgen_fnal", pDEBUG)
1798  << "Adding energy spectrum for flux neutrino: pdg = " << pdg;
1799  gOptFluxHst.insert(map<int, TH1D*>::value_type(pdg, spectrum));
1800  }//inu
1801 
1802  if(gOptFluxHst.size()<1) {
1803  LOG("gevgen_fnal", pFATAL)
1804  << "You have not specified any flux histogram!";
1805  PrintSyntax();
1806  exit(1);
1807  }
1808 
1809  flux_file.Close();
1810 }
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
#define pFATAL
Definition: Messenger.h:56
TVector3 gOptBeamDir
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:118
TVector3 gOptBeamSpot
Double_t gOptBeamRadius
vector< string > Split(string input, string delim)
Definition: StringUtils.cxx:36
string gOptFluxFile
#define pNOTICE
Definition: Messenger.h:61
void PrintSyntax(void)
map< int, TH1D * > gOptFluxHst
#define pDEBUG
Definition: Messenger.h:63
void PrintSyntax ( void  )

Variable Documentation

TVector3 gOptBeamDir = TVector3(0,0,1)

Definition at line 392 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxHst().

Double_t gOptBeamRadius = -1

Definition at line 394 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxHst().

string gOptBeamRtDependence = "x"

Definition at line 395 of file gFNALExptEvGen.cxx.

TVector3 gOptBeamSpot = TVector3(0,0,0)

Definition at line 393 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxHst().

int gOptDebug = 0

Definition at line 413 of file gFNALExptEvGen.cxx.

string gOptDetectorLocation

Definition at line 406 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxFileConfig().

string gOptEvFilePrefix

Definition at line 412 of file gFNALExptEvGen.cxx.

string gOptExtMaxPlXml = ""

Definition at line 402 of file gFNALExptEvGen.cxx.

string gOptFidCut

Definition at line 409 of file gFNALExptEvGen.cxx.

string gOptFluxDriver = ""

Definition at line 386 of file gFNALExptEvGen.cxx.

Referenced by DetermineFluxDriver(), and main().

string gOptFluxFile

Definition at line 405 of file gFNALExptEvGen.cxx.

map<int,TH1D*> gOptFluxHst

Definition at line 391 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxHst().

PDGCodeList gOptFluxPdg

Definition at line 388 of file gFNALExptEvGen.cxx.

Referenced by main(), and ParseFluxFileConfig().

map<string,string> gOptFluxShortNames

Definition at line 387 of file gFNALExptEvGen.cxx.

Referenced by DetermineFluxDriver().

double gOptGeomDUnits = 0

Definition at line 401 of file gFNALExptEvGen.cxx.

double gOptGeomLUnits = 0

Definition at line 400 of file gFNALExptEvGen.cxx.

string gOptInpXSecFile

Definition at line 415 of file gFNALExptEvGen.cxx.

int gOptNev

Definition at line 407 of file gFNALExptEvGen.cxx.

int gOptNScan = 0

Definition at line 410 of file gFNALExptEvGen.cxx.

double gOptPOT

Definition at line 408 of file gFNALExptEvGen.cxx.

Referenced by main().

long int gOptRanSeed

Definition at line 414 of file gFNALExptEvGen.cxx.

string gOptRootGeom

Definition at line 397 of file gFNALExptEvGen.cxx.

string gOptRootGeomMasterVol = ""

Definition at line 399 of file gFNALExptEvGen.cxx.

string gOptRootGeomTopVol = ""

Definition at line 398 of file gFNALExptEvGen.cxx.

Long_t gOptRunNu

Definition at line 383 of file gFNALExptEvGen.cxx.

map<int,double> gOptTgtMix

Definition at line 389 of file gFNALExptEvGen.cxx.

bool gOptUsingHistFlux = false

Definition at line 385 of file gFNALExptEvGen.cxx.

Referenced by DetermineFluxDriver(), and main().

bool gOptUsingRootGeom = false

Definition at line 384 of file gFNALExptEvGen.cxx.

bool gOptWriteMaxPlXml = false

Definition at line 403 of file gFNALExptEvGen.cxx.

double gOptZmin = -2.0e30

Definition at line 411 of file gFNALExptEvGen.cxx.

bool gSigTERM = false

Definition at line 417 of file gFNALExptEvGen.cxx.

string kDefOptEvFilePrefix = "gntp"

Definition at line 379 of file gFNALExptEvGen.cxx.

string kDefOptGeomDUnits = "g_cm3"

Definition at line 377 of file gFNALExptEvGen.cxx.

string kDefOptGeomLUnits = "mm"

Definition at line 376 of file gFNALExptEvGen.cxx.

NtpMCFormat_t kDefOptNtpFormat = kNFGHEP

Definition at line 378 of file gFNALExptEvGen.cxx.