|
GENIEGenerator
|
#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"
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 |
| 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().
| void GetCommandLineArgs | ( | int | argc, |
| char ** | argv | ||
| ) |
|
static |
| 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().
| 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().
| 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().
| void PrintSyntax | ( | void | ) |
| 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.
1.8.5