291 #include <TGeoVolume.h> 292 #include <TGeoShape.h> 315 #ifdef __GENIE_FLUX_DRIVERS_ENABLED__ 332 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 343 using std::ostringstream;
345 using namespace genie;
400 std::cerr <<
"Caught SIGTERM" <<
std::endl;
410 LOG(
"gmkspl",
pFATAL) <<
" No TuneId in RunOption";
439 TGeoVolume * topvol = rgeom->
GetGeometry()->GetTopVolume();
441 LOG(
"gevgen_fnal",
pFATAL) <<
"Null top ROOT geometry volume!";
475 if (
gOptFidCut.find(
"rock") != std::string::npos )
498 if ( ! flux_driver ) {
500 std::ostringstream
s;
501 s <<
"Known FluxDrivers:\n";
502 const std::vector<std::string>& known =
505 for ( ; itr != known.end(); ++itr ) s <<
" " << (*itr) <<
"\n";
507 <<
"Failed to get any flux driver from GFluxDriverFactory\n" 515 if ( ! flux_file_config ) {
517 <<
"Failed to get GFluxFileConfigI driver from GFluxDriverFactory\n" 529 if ( gOptFluxPdg.
size() > 0 ) {
532 std::ostringstream
s;
534 for ( ; itr != gOptFluxPdg.end(); ++itr) s << (*itr) <<
" ";
536 <<
"Limiting to nu PDGs: " << s.str();
545 if ( ! hist_flux_driver ) {
547 <<
"Failed to get GCylinderTH1Flux driver from GFluxDriverFactory\n" 553 TVector3 bdir (0,0,1);
554 TVector3 bspot(0,0,0);
560 for( ; it != gOptFluxHst.end(); ++it) {
561 int pdg_code = it->first;
562 TH1D * spectrum = it->second;
587 if ( ! rgeom ) assert(0);
594 <<
"Using ROOTGeomAnalyzer: geom scan using flux: nparticles=" <<
gOptNScan;
600 <<
"Using ROOTGeomAnalyzer: geom scan using box: npoints=nrays=" << nabs;
628 std::ofstream mpfile(maxplfile.c_str(), std::ios_base::app);
631 <<
"<!-- this file is only relevant for a setup compatible with:" 641 <<
"nscan: " <<
gOptNScan <<
" (0>= use flux, <0 use box |nscan| points/rays)" 643 <<
"zmin: " <<
gOptZmin <<
" (if |zmin| > 1e30, leave ray on flux window)" 661 std::vector<TBranch*> extraBranches;
662 std::vector<std::string> branchNames;
663 std::vector<std::string> branchClassNames;
664 std::vector<void**> branchObjPointers;
668 if ( fluxFileConfigI ) {
671 size_t nn = branchNames.size();
672 size_t nc = branchClassNames.size();
673 size_t np = branchObjPointers.size();
674 if ( nn != nc || nc != np ) {
677 <<
"for branch info: " << nn <<
" " << nc <<
" " << np;
679 for (
size_t ii = 0; ii < nn; ++ii) {
680 const char* bname = branchNames[ii].c_str();
681 const char* cname = branchClassNames[ii].c_str();
682 void**& optr = branchObjPointers[ii];
683 if ( ! optr || ! *optr )
continue;
686 <<
"Adding extra branch \"" << bname <<
"\" of type \"" 687 << cname <<
"\" (" << optr <<
") to output tree";
688 TBranch* bptr = ntpw.
EventTree()->Branch(bname,cname,optr,32000,split);
689 extraBranches.push_back(bptr);
693 bptr->SetAutoDelete(
false);
696 <<
"FAILED to add extra branch \"" << bname <<
"\" of type \"" 697 << cname <<
"\" to output tree";
718 <<
" *** Generating event............ " << ievent;
722 if ( ievent ==
gOptNev )
break;
726 if (
gOptPOT > 0 && fluxExposureI ) {
729 double pot = fpot / psc;
739 if ( !
event && flux_driver->
End() ) {
741 <<
"** The flux driver read all the input flux entries: End()==true";
746 <<
"Got a null generated neutino event! Retrying ...";
749 if ( print_level >= 0 ) {
751 <<
"Generated event: " << *
event;
766 if ( fluxFileConfigI ) {
769 size_t nmeta = t1->GetEntries();
770 TTree* t2 = (TTree*)t1->Clone(0);
771 for (
size_t i = 0; i < nmeta; ++i) {
780 <<
"The GENIE MC job is done generating events - Cleaning up & exiting...";
794 long int nflx_evg = mcj_driver-> NFluxNeutrinos();
796 const char* exposureUnits =
"(unknown units)";
797 if ( fluxExposureI ) {
804 if ( fluxFileConfigI ) {
809 LOG(
"gevgen_fnal",
pFATAL) <<
"MCJobDriver GlobalProbScale was " << psc;
811 double pot = fpot / psc;
812 long int nev = ievent;
815 <<
"\n >> Interaction probability scaling factor: " << psc
817 <<
"\n >> N of flux v read-in by flux driver: " << nflx
818 <<
"\n >> N of flux v thrown to event gen driver: " << nflx_evg
819 <<
"\n >> N of generated v interactions: " << nev
820 <<
"\n ** Normalization for generated sample: " << pot
821 <<
" " << exposureUnits <<
" * detector";
841 for( ; it != gOptFluxHst.end(); ++it) {
842 TH1D * spectrum = it->second;
843 if(spectrum)
delete spectrum;
860 vector<string> extraLibs;
865 extraLibs.push_back(
"libdk2nuTree");
866 extraLibs.push_back(
"libdk2nuGenie");
870 gOptFluxShortNames[
"histo"] =
"genie::flux::GCylindTH1Flux";
871 gOptFluxShortNames[
"hist"] =
"genie::flux::GCylindTH1Flux";
873 gOptFluxShortNames[
"simple"] =
"genie::flux::GSimpleNtpFlux";
874 gOptFluxShortNames[
"numi"] =
"genie::flux::GNuMIFlux";
875 gOptFluxShortNames[
"dk2nu"] =
"genie::flux::GDk2NuFlux";
887 for (
size_t ilib=0; ilib < extraLibs.size(); ++ilib) {
890 int loadStatus = gSystem->Load(extraLibs[ilib].c_str());
891 const char* statWords =
"failed to load";
892 if ( loadStatus == 0 ) { statWords =
"successfully loaded"; }
893 else if ( loadStatus == 1 ) { statWords =
"already had loaded"; }
894 else if ( loadStatus == -1 ) { statWords =
"couldn't find library"; }
895 else if ( loadStatus == -2 ) { statWords =
"mismatched version"; }
898 << statWords <<
" (" << loadStatus <<
") " << extraLibs[ilib];
908 LOG(
"gevgen_fnal",
pINFO) <<
"Parsing command line arguments";
927 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading MC run number";
931 <<
"Unspecified run number - Using default";
940 string lunits, dunits;
942 LOG(
"gevgen_fnal",
pDEBUG) <<
"Getting input geometry";
946 bool accessible_geom_file =
947 ! (gSystem->AccessPathName(geom.c_str()));
948 if (accessible_geom_file) {
954 <<
"No geometry option specified - Exiting";
965 <<
"Checking for input geometry length units";
968 LOG(
"gevgen_fnal",
pDEBUG) <<
"Using default geometry length units";
974 <<
"Checking for input geometry density units";
977 LOG(
"gevgen_fnal",
pDEBUG) <<
"Using default geometry density units";
986 LOG(
"gevgen_fnal",
pDEBUG) <<
"Checking for input volume name";
989 LOG(
"gevgen_fnal",
pDEBUG) <<
"Using the <master volume>";
998 <<
"Checking for maximum path lengths XML file";
1009 <<
"Will compute the maximum path lengths at job init";
1015 LOG(
"gevgen_fnal",
pDEBUG) <<
"Using Fiducial cut?";
1018 LOG(
"gevgen_fnal",
pDEBUG) <<
"No fiducial volume cut";
1025 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading requested geom scan count";
1028 LOG(
"gevgen_fnal",
pDEBUG) <<
"No geom scan count was requested";
1034 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading requested zmin";
1037 LOG(
"gevgen_fnal",
pDEBUG) <<
"No zmin was requested";
1043 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading debug flag value";
1046 LOG(
"gevgen_fnal",
pDEBUG) <<
"Unspecified debug flags - Using default";
1062 if(tgtmix.size()==1) {
1063 int pdg = atoi(tgtmix[0].c_str());
1065 gOptTgtMix.insert(map<int, double>::value_type(pdg, wgt));
1068 for( ; tgtmix_iter != tgtmix.end(); ++tgtmix_iter) {
1069 string tgt_with_wgt = *tgtmix_iter;
1070 string::size_type open_bracket = tgt_with_wgt.find(
"[");
1071 string::size_type close_bracket = tgt_with_wgt.find(
"]");
1072 if (open_bracket ==string::npos ||
1073 close_bracket==string::npos)
1076 <<
"You made an error in specifying the target mix";
1080 string::size_type ibeg = 0;
1081 string::size_type iend = open_bracket;
1082 string::size_type jbeg = open_bracket+1;
1083 string::size_type jend = close_bracket;
1084 int pdg = atoi(tgt_with_wgt.substr(ibeg,iend-ibeg).c_str());
1085 double wgt = atof(tgt_with_wgt.substr(jbeg,jend-jbeg).c_str());
1087 <<
"Adding to target mix: pdg = " << pdg <<
", wgt = " << wgt;
1088 gOptTgtMix.insert(map<int, double>::value_type(pdg, wgt));
1098 LOG(
"gevgen_fnal",
pDEBUG) <<
"Getting input flux";
1101 LOG(
"gevgen_fnal",
pFATAL) <<
"No flux info was specified - Exiting";
1109 <<
"Reading limit on number of events to generate";
1113 <<
"Will keep on generating events till the flux driver stops";
1119 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading requested exposure in POT";
1122 LOG(
"gevgen_fnal",
pDEBUG) <<
"No POT exposure was requested";
1128 LOG(
"gevgen_fnal",
pDEBUG) <<
"Reading the event filename prefix";
1132 <<
"Will set the default event filename prefix";
1139 LOG(
"gevgen_fnal",
pINFO) <<
"Reading random number seed";
1142 LOG(
"gevgen_fnal",
pINFO) <<
"Unspecified random number seed - Using default";
1148 LOG(
"gevgen_fnal",
pINFO) <<
"Reading cross-section file";
1151 LOG(
"gevgen_fnal",
pINFO) <<
"Unspecified cross-section file";
1170 <<
"** To use a gNuMI flux ntuple you need to specify an exposure, " 1171 <<
"either via the -e or -n options";
1177 <<
"You can not specify more than one of the -e or -n options";
1187 <<
"If you're using flux from histograms you need to specify the -n option";
1199 <<
"You may not use the -e option without a detector geometry description";
1210 ostringstream gminfo;
1212 gminfo <<
"Using ROOT geometry - file = " <<
gOptRootGeom 1213 <<
", top volume = " 1215 <<
", max{PL} file = " 1217 <<
", length units = " << lunits
1218 <<
", density units = " << dunits;
1220 gminfo <<
"Using target mix: ";
1222 for(iter = gOptTgtMix.begin(); iter != gOptTgtMix.end(); ++iter) {
1223 int pdg_code = iter->first;
1224 double wgt = iter->second;
1225 TParticlePDG *
p = pdglib->
Find(pdg_code);
1227 string name = p->GetName();
1228 gminfo <<
"(" << name <<
") -> " << 100*wgt <<
"% / ";
1233 ostringstream fluxinfo;
1235 fluxinfo <<
"Using histograms: ";
1237 for(iter = gOptFluxHst.begin(); iter != gOptFluxHst.end(); ++iter) {
1238 int pdg_code = iter->first;
1239 TH1D * spectrum = iter->second;
1240 TParticlePDG *
p = pdglib->
Find(pdg_code);
1242 string name = p->GetName();
1243 fluxinfo <<
"(" << name <<
") -> " << spectrum->GetName() <<
" / ";
1252 ostringstream exposure;
1254 exposure <<
"Number of POTs = " <<
gOptPOT;
1256 exposure <<
"Number of events = " <<
gOptNev;
1267 <<
"\n - Flux @ " << fluxinfo.str()
1268 <<
"\n - Geometry @ " << gminfo.str()
1269 <<
"\n - Exposure @ " << exposure.str();
1278 <<
"\n gevgen_fnal [-h] [-r run#]" 1279 <<
"\n -f flux -g geometry" 1280 <<
"\n [-t top_volume_name_at_geom] [-m max_path_lengths_xml_file]" 1281 <<
"\n [-L length_units_at_geom] [-D density_units_at_geom]" 1282 <<
"\n [-n n_of_events] [-e exposure_in_POTs]" 1283 <<
"\n [-o output_event_file_prefix]" 1284 <<
"\n [-F fid_cut_string] [-S nrays_scan]" 1285 <<
"\n [-z zmin_start]" 1286 <<
"\n [--seed random_number_seed]" 1287 <<
"\n --cross-sections xml_file" 1288 <<
"\n [--event-generator-list list_name]" 1289 <<
"\n [--message-thresholds xml_file]" 1290 <<
"\n [--unphysical-event-mask mask]" 1291 <<
"\n [--event-record-print-level level]" 1292 <<
"\n [--mc-job-status-refresh-rate rate]" 1293 <<
"\n [--cache-file root_file]" 1295 <<
" Please also read the detailed documentation at " 1296 <<
"$GENIE/src/Apps/gFNALExptEvGen.cxx" 1336 <<
"Can not create GeomVolSelectorFiduction," 1337 <<
" geometry driver is not ROOTGeomAnalyzer";
1341 LOG(
"gevgen_fnal",
pNOTICE) <<
"-F " << fidcut;
1349 std::transform(fidcut.begin(),fidcut.end(),fidcut.begin(),::tolower);
1352 if ( strtok.size() != 2 ) {
1354 <<
"Can not create GeomVolSelectorFiduction," 1355 <<
" no \":\" separating type from values. nsplit=" << strtok.size();
1356 for (
unsigned int i=0; i < strtok.size(); ++i )
1358 <<
"strtok[" << i <<
"] = \"" << strtok[i] <<
"\"";
1363 string stype = strtok[0];
1364 bool reverse = ( stype.find(
"0") != string::npos );
1365 bool master = ( stype.find(
"m") != string::npos );
1371 for ( ; iter != valstrs.end(); ++iter ) {
1372 const string& valstr1 = *iter;
1373 if ( valstr1 !=
"" ) vals.push_back(atof(valstr1.c_str()));
1375 size_t nvals = vals.
size();
1377 std::cout <<
"ivals = [";
1378 for (
unsigned int i=0; i < nvals; ++i) {
1379 if (i>0) cout <<
",";
1380 std::cout << vals[i];
1386 if ( stype.find(
"zcyl") != string::npos ) {
1389 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeZCylinder needs 5 values, not " << nvals
1390 <<
" fidcut=\"" << fidcut <<
"\"";
1391 fidsel->
MakeZCylinder(vals[0],vals[1],vals[2],vals[3],vals[4]);
1393 }
else if ( stype.find(
"xcyl") != string::npos ) {
1396 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeXCylinder needs 5 values, not " << nvals
1397 <<
" fidcut=\"" << fidcut <<
"\"";
1398 fidsel->
MakeXCylinder(vals[0],vals[1],vals[2],vals[3],vals[4]);
1400 }
else if ( stype.find(
"ycyl") != string::npos ) {
1403 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeYCylinder needs 5 values, not " << nvals
1404 <<
" fidcut=\"" << fidcut <<
"\"";
1405 fidsel->
MakeYCylinder(vals[0],vals[1],vals[2],vals[3],vals[4]);
1407 }
else if ( stype.find(
"gcyl") != string::npos ) {
1410 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeYCylinder needs 14 values, not " << nvals
1411 <<
" fidcut=\"" << fidcut <<
"\"";
1412 Double_t
base[3] = { vals[0], vals[1], vals[2] };
1413 Double_t axis[3] = { vals[3], vals[4], vals[5] };
1414 Double_t radius = vals[6];
1415 Double_t cap1[4] = { vals[ 7], vals[ 8], vals[ 9], vals[10] };
1416 Double_t cap2[4] = { vals[11], vals[12], vals[13], vals[14] };
1420 }
else if ( stype.find(
"box") != string::npos ) {
1423 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeBox needs 6 values, not " << nvals
1424 <<
" fidcut=\"" << fidcut <<
"\"";
1425 double xyzmin[3] = { vals[0], vals[1], vals[2] };
1426 double xyzmax[3] = { vals[3], vals[4], vals[5] };
1427 fidsel->
MakeBox(xyzmin,xyzmax);
1429 }
else if ( stype.find(
"zpoly") != string::npos ) {
1432 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeZPolygon needs 7 values, not " << nvals
1433 <<
" fidcut=\"" << fidcut <<
"\"";
1434 int nfaces = (
int)vals[0];
1436 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeZPolygon needs nfaces>=3, not " << nfaces
1437 <<
" fidcut=\"" << fidcut <<
"\"";
1438 fidsel->
MakeZPolygon(nfaces,vals[1],vals[2],vals[3],vals[4],vals[5],vals[6]);
1440 }
else if ( stype.find(
"sphere") != string::npos ) {
1443 LOG(
"gevgen_fnal",
pFATAL) <<
"MakeZSphere needs 4 values, not " << nvals
1444 <<
" fidcut=\"" << fidcut <<
"\"";
1445 fidsel->
MakeSphere(vals[0],vals[1],vals[2],vals[3]);
1449 <<
"Can not create GeomVolSelectorFiduction for shape \"" << stype <<
"\"";
1454 LOG(
"gevgen_fnal",
pNOTICE) <<
"Convert fiducial volume from master to topvol coords";
1458 LOG(
"gevgen_fnal",
pNOTICE) <<
"Reverse sense of fiducial volume cut";
1467 if( fidcut.find_first_not_of(
" \t\n") != 0)
1468 fidcut.erase( 0, fidcut.find_first_not_of(
" \t\n") );
1471 std::transform(fidcut.begin(),fidcut.end(),fidcut.begin(),::tolower);
1477 <<
"Can not create GeomVolSelectorRockBox," 1478 <<
" geometry driver is not ROOTGeomAnalyzer";
1482 LOG(
"gevgen_fnal",
pWARN) <<
"fiducial (rock) cut: " << fidcut;
1489 if ( strtok.size() != 2 ) {
1491 <<
"Can not create GeomVolSelectorRockBox," 1492 <<
" no \":\" separating type from values. nsplit=" << strtok.size();
1493 for (
unsigned int i=0; i < strtok.size(); ++i )
1495 <<
"strtok[" << i <<
"] = \"" << strtok[i] <<
"\"";
1499 string stype = strtok[0];
1505 for ( ; iter != valstrs.end(); ++iter ) {
1506 const string& valstr1 = *iter;
1507 if ( valstr1 !=
"" ) {
1508 double aval = atof(valstr1.c_str());
1509 LOG(
"gevgen_fnal",
pWARN) <<
"rock value [" << vals.
size() <<
"] " 1511 vals.push_back(aval);
1514 size_t nvals = vals.
size();
1526 LOG(
"gevgen_fnal",
pFATAL) <<
"rockbox needs at " 1527 <<
"least 6 values, found " 1529 << strtok[1] <<
"\"";
1533 double xyzmin[3] = { vals[0], vals[1], vals[2] };
1534 double xyzmax[3] = { vals[3], vals[4], vals[5] };
1536 bool rockonly =
true;
1537 double wallmin = 800.;
1538 double dedx = 2.5 * 1.7e-3;
1539 double fudge = 1.05;
1541 if ( nvals >= 7 ) rockonly = vals[6];
1542 if ( nvals >= 8 ) wallmin = vals[7];
1543 if ( nvals >= 9 ) dedx = vals[8];
1544 if ( nvals >= 10 ) fudge = vals[9];
1555 if ( ! rockonly ) rocksel->
MakeSphere(0,0,0,1.0
e-10);
1556 else rocksel->
MakeBox(xyzmin,xyzmax);
1558 rgeom->AdoptGeomVolSelector(rocksel);
1574 for ( ; mitr != mitr_end; ++mitr ) {
1576 string gproto =
string(
"g") + proto;
1577 string protor = proto +
".root,";
1578 string full = mitr->second;
1579 if ( fopt.find(proto) == 0 ) {
1580 fopt.erase(0,proto.size());
1583 }
else if ( fopt.find(gproto) == 0 ) {
1584 fopt.erase(0,gproto.size());
1587 }
else if ( fopt.find(protor) != std::string::npos ) {
1598 if ( fopt.find(
"gsimple") != std::string::npos ) {
1602 }
else if ( fopt.find(
"dk2nu") != std::string::npos ) {
1606 const char* hstrings[] = {
",12[",
",+12[",
",-12[",
1607 ",14[",
",+14[",
",-14[",
1608 ",16[",
",+16[",
",-16[" };
1609 size_t nh =
sizeof(hstrings)/
sizeof(
const char*);
1610 for (
size_t ih=0;
ih<nh; ++
ih) {
1611 if ( fopt.find(hstrings[
ih]) != std::string::npos ) {
1639 if(fluxv.size()<2) {
1641 <<
"You need to specify both a flux ntuple ROOT file " 1642 <<
" _AND_ a detector location";
1647 bool accessible_flux_file = !(gSystem->AccessPathName(
gOptFluxFile.c_str()));
1648 if (!accessible_flux_file) {
1656 for(
unsigned int inu=1;
inu<fluxv.size();
inu++) {
1657 string nutype_and_histo = fluxv[
inu];
1658 string::size_type open_bracket = nutype_and_histo.find(
"[");
1659 string::size_type close_bracket = nutype_and_histo.find(
"]");
1660 if (open_bracket ==string::npos ||
1661 close_bracket==string::npos)
1664 <<
"You made an error in specifying the flux histograms";
1668 string::size_type ibeg = 0;
1669 string::size_type iend = open_bracket;
1670 string::size_type jbeg = open_bracket+1;
1671 string::size_type jend = close_bracket;
1672 string nutype = nutype_and_histo.substr(ibeg,iend-ibeg);
1673 string histo = nutype_and_histo.substr(jbeg,jend-jbeg);
1675 TH1D * ihst = (TH1D*) flux_file.Get(histo.c_str());
1678 <<
"Can not find histogram: " << histo
1686 TH1D* spectrum = (TH1D*)ihst->Clone();
1687 spectrum->SetNameTitle(
"spectrum",
"neutrino_flux");
1688 spectrum->SetDirectory(0);
1701 int pdg = atoi(nutype.c_str());
1704 <<
"Unknown neutrino type: " << nutype;
1710 <<
"Adding energy spectrum for flux neutrino: pdg = " <<
pdg;
1711 gOptFluxHst.insert(map<int, TH1D*>::value_type(pdg, spectrum));
1714 if(gOptFluxHst.size()<1) {
1716 <<
"You have not specified any flux histogram!";
1731 if(fluxv.size()<2) {
1733 <<
"You need to specify both a flux ntuple ROOT file " 1734 <<
" _AND_ a detector location";
1741 for (
size_t j = 2; j < fluxv.size(); ++j ) {
1742 int ipdg = atoi(fluxv[j].c_str());
void MakeSphere(Double_t x0, Double_t y0, Double_t z0, Double_t radius)
void RandGen(long int seed)
static void SetPrintLevel(int print_level)
const char * GetExposureUnits() const
what units are returned by GetTotalExposure?
GENIE Interface for user-defined volume selector functors Trim path segments based on the intersectio...
void XSecTable(string inpfile, bool require_table)
virtual GeomVolSelectorI * AdoptGeomVolSelector(GeomVolSelectorI *selector)
configure processing to perform path segment trimming
double ArgAsDouble(char opt)
void ParseFluxFileConfig(string fopt)
string kDefOptEvFilePrefix
virtual void LoadBeamSimData(const std::vector< std::string > &filenames, const std::string &det_loc)=0
bool IsNeutrino(int pdgc)
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
void LoadExtraOptions(void)
void MakeZCylinder(Double_t x0, Double_t y0, Double_t radius, Double_t zmin, Double_t zmax)
void SetEventGeneratorList(string listname)
void GetCommandLineArgs(int argc, char **argv)
virtual void PrintConfig()=0
print the current configuration
void ReadFromCommandLine(int argc, char **argv)
string gOptDetectorLocation
void MakeCylinder(Double_t *base, Double_t *axis, Double_t radius, Double_t *cap1, Double_t *cap2)
virtual const PathLengthList & GetMaxPathLengths(void) const
void CreateRockBoxSelection(string fidcut, GeomAnalyzerI *geom_driver)
void MakeXCylinder(Double_t y0, Double_t z0, Double_t radius, Double_t xmin, Double_t xmax)
virtual void ConvertShapeMaster2Top(const ROOTGeomAnalyzer *rgeom)
void Update(int iev, const EventRecord *event)
const std::vector< std::string > & AvailableFluxDrivers() const
static void gsSIGTERMhandler(int)
void SetMinimumWall(Double_t w)
virtual void SetNumOfCycles(long int ncycle)
limit cycling through input files
string gOptRootGeomMasterVol
virtual void SetScannerNParticles(int np)
void DetermineFluxDriver(string fopt)
virtual long int NFluxNeutrinos() const =0
of rays generated
NtpMCFormat_t kDefOptNtpFormat
virtual void SetUpstreamZ(double z0)
void SetRefreshRate(int rate)
void UseFluxDriver(GFluxI *flux)
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 & update MC job status files and env. vars. This is used to be able to keep tr...
virtual TTree * GetMetaDataTree()
A GENIE `MC Job Driver'. Can be used for setting up complicated event generation cases involving deta...
double GlobProbScale(void) const
void SaveAsXml(string filename) const
void SetDeDx(Double_t dedx)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void MakeYCylinder(Double_t x0, Double_t z0, Double_t radius, Double_t ymin, Double_t ymax)
void ForceSingleProbScale(void)
void ParseFluxHst(string fopt)
virtual void SetScannerNRays(int nr)
A generic GENIE flux driver. Generates a 'cylindrical' neutrino beam along the input direction...
bool IsAntiNeutrino(int pdgc)
bool UseMaxPathLengths(string xml_filename)
double UnitFromString(string u)
GENIE interface for uniform flux exposure iterface.
GENIE Interface for limiting vertex selection in the rock to a volume that depends (in part) on the n...
void SetRemoveEntries(bool rmset)
void Configure(bool calc_prob_scales=true)
void MakeZPolygon(Int_t n, Double_t x0, Double_t y0, Double_t inradius, Double_t phi0deg, Double_t zmin, Double_t zmax)
A ROOT/GEANT4 geometry driver.
map< string, string > gOptFluxShortNames
void Save(void)
get the even tree
General LArSoft Utilities.
map< int, double > gOptTgtMix
string gOptRootGeomTopVol
void AddEventRecord(int ievent, const EventRecord *ev_rec)
save the event tree
void SetTransverseRadius(double Rt)
void SetNuDirection(const TVector3 &direction)
void BuildTune()
build tune and inform XSecSplineList
EventRecord * GenerateEvent(void)
virtual void GetBranchInfo(std::vector< std::string > &branchNames, std::vector< std::string > &branchClassNames, std::vector< void ** > &branchObjPointers)
void SetExpandFromInclusion(bool how=false)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
void CustomizeFilenamePrefix(string prefix)
void Initialize(void)
add event
int main(int argc, char **argv)
static PDGLibrary * Instance(void)
static RunOpt * Instance(void)
vector< string > Split(string input, string delim)
A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records...
Singleton class to load & serve a TDatabasePDG.
static unsigned int reverse(QString &chars, unsigned char *level, unsigned int a, unsigned int b)
virtual void SetScannerNPoints(int np)
set geometry driver's configuration options
virtual void SetScannerFlux(GFluxI *f)
virtual double GetTotalExposure() const =0
static GFluxDriverFactory & Instance()
virtual bool End(void)=0
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
void SetReverseFiducial(Bool_t reverse=true)
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f='*')
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)
void split(std::string const &s, char c, OutIter dest)
void AddEnergySpectrum(int nu_pdgc, TH1D *spectrum)
TParticlePDG * Find(int pdgc, bool must_exist=true)
Command line argument parser.
enum genie::ENtpMCFormat NtpMCFormat_t
void SetRockBoxMinimal(Double_t *xyzmin, Double_t *xyzmax)
void MakeBox(Double_t *xyzmin, Double_t *xyzmax)
Defines the GENIE Geometry Analyzer Interface.
int EventRecordPrintLevel(void) const
void CreateFidSelection(string fidcut, GeomAnalyzerI *geom_driver)
void RecursiveExhaust(TGeoVolume *topvol, string volnames, bool exhaust)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
void UseGeomAnalyzer(GeomAnalyzerI *geom)
void UseSplines(bool useLogE=true)
The PointGeomAnalyzer class is the simplest implementation of the GeomAnalyserI interface and defines...
bool OptionExists(char opt)
was option set?
void CacheFile(string inpfile)
void EnableBareXSecPreCalc(bool flag)
QTextStream & endl(QTextStream &s)
void push_back(int pdg_code)
map< int, TH1D * > gOptFluxHst
Event finding and building.
virtual TGeoManager * GetGeometry(void) const
genie::GFluxI * GetFluxDriver(const std::string &)
GENIE Interface for user-defined flux classes.