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/Algorithm/AlgConfigPool.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" |
double | gOptZpCoupling |
double | gOptDMMass |
double | gOptMedRatio |
Long_t | gOptRunNu |
bool | gOptUsingRootGeom = false |
map< int, double > | gOptTgtMix |
string | gOptRootGeom |
string | gOptRootGeomTopVol = "" |
string | gOptRootGeomMasterVol = "" |
double | gOptGeomLUnits = 0 |
double | gOptGeomDUnits = 0 |
string | gOptExtMaxPlXml = "" |
bool | gOptWriteMaxPlXml = false |
string | gOptFluxFile |
int | gOptNev |
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: zcly:x0,y0,radius,zmin,zmax - cylinder along z at (x0,y0) capped at z's 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) zcly:(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}
Definition at line 1117 of file gEvGenLArDM.cxx.
References genie::geometry::ROOTGeomAnalyzer::AdoptGeomVolSelector(), genie::geometry::GeomVolSelectorFiducial::ConvertShapeMaster2Top(), LOG, genie::geometry::GeomVolSelectorFiducial::MakeBox(), genie::geometry::GeomVolSelectorFiducial::MakeSphere(), genie::geometry::GeomVolSelectorFiducial::MakeZCylinder(), genie::geometry::GeomVolSelectorFiducial::MakeZPolygon(), pFATAL, pNOTICE, pWARN, genie::geometry::GeomVolSelectorI::SetRemoveEntries(), genie::geometry::GeomVolSelectorFiducial::SetReverseFiducial(), and genie::utils::str::Split().
Referenced by main().
void CreateRockBoxSelection | ( | string | fidcut, |
GeomAnalyzerI * | geom_driver | ||
) |
Definition at line 1250 of file gEvGenLArDM.cxx.
References e, gOptRootGeomMasterVol, gOptRootGeomTopVol, LOG, genie::geometry::GeomVolSelectorFiducial::MakeBox(), genie::geometry::GeomVolSelectorFiducial::MakeSphere(), pFATAL, pWARN, genie::geometry::GeomVolSelectorRockBox::SetDeDx(), genie::geometry::GeomVolSelectorRockBox::SetExpandFromInclusion(), genie::geometry::GeomVolSelectorRockBox::SetMinimumWall(), genie::geometry::GeomVolSelectorI::SetRemoveEntries(), genie::geometry::GeomVolSelectorRockBox::SetRockBoxMinimal(), and genie::utils::str::Split().
Referenced by main().
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"
Definition at line 730 of file gEvGenLArDM.cxx.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 383 of file gEvGenLArDM.cxx.
References genie::PDGLibrary::AddDarkMatter(), genie::NtpWriter::AddEventRecord(), genie::flux::GFluxDriverFactory::AvailableFluxDrivers(), genie::RunOpt::BuildTune(), genie::utils::app_init::CacheFile(), genie::AlgConfigPool::CommonList(), genie::GMCJDriver::Configure(), CreateFidSelection(), CreateRockBoxSelection(), genie::NtpWriter::CustomizeFilenamePrefix(), genie::GFluxI::End(), genie::NtpWriter::EventTree(), genie::GMCJDriver::ForceSingleProbScale(), genie::GMCJDriver::GenerateEvent(), genie::flux::GFluxFileConfigI::GetBranchInfo(), GetCommandLineArgs(), genie::flux::GFluxDriverFactory::GetFluxDriver(), genie::geometry::ROOTGeomAnalyzer::GetGeometry(), genie::geometry::ROOTGeomAnalyzer::GetMaxPathLengths(), genie::flux::GFluxFileConfigI::GetMetaDataTree(), gOptDebug, gOptDMMass, gOptEvFilePrefix, gOptExtMaxPlXml, gOptFidCut, gOptFluxFile, gOptGeomDUnits, gOptGeomLUnits, gOptInpXSecFile, gOptMedRatio, gOptNev, gOptNScan, gOptRanSeed, gOptRootGeom, gOptRootGeomMasterVol, gOptRootGeomTopVol, gOptRunNu, gOptTgtMix, gOptUsingRootGeom, gOptWriteMaxPlXml, gOptZmin, gOptZpCoupling, gSigTERM, gsSIGTERMhandler(), genie::NtpWriter::Initialize(), genie::RunOpt::Instance(), genie::PDGLibrary::Instance(), genie::AlgConfigPool::Instance(), genie::flux::GFluxDriverFactory::Instance(), kDefOptNtpFormat, genie::kPdgDarkMatter, genie::flux::GFluxFileConfigI::LoadBeamSimData(), LoadExtraOptions(), genie::Registry::Lock(), LOG, genie::utils::app_init::MesgThresholds(), pERROR, pFATAL, pINFO, pNOTICE, genie::PDGCodeList::push_back(), pWARN, genie::utils::app_init::RandGen(), genie::utils::geometry::RecursiveExhaust(), genie::units::s, genie::NtpWriter::Save(), genie::PathLengthList::SaveAsXml(), genie::Registry::Set(), genie::GMCJDriver::SetEventGeneratorList(), genie::flux::GFluxFileConfigI::SetFluxParticles(), 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::GFluxFileConfigI::SetUpstreamZ(), genie::Registry::UnLock(), 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 | ) |
int gOptDebug = 0 |
Definition at line 370 of file gEvGenLArDM.cxx.
Referenced by main().
double gOptDMMass |
Definition at line 351 of file gEvGenLArDM.cxx.
string gOptEvFilePrefix |
Definition at line 369 of file gEvGenLArDM.cxx.
string gOptExtMaxPlXml = "" |
Definition at line 361 of file gEvGenLArDM.cxx.
string gOptFidCut |
Definition at line 366 of file gEvGenLArDM.cxx.
Referenced by main().
string gOptFluxFile |
Definition at line 364 of file gEvGenLArDM.cxx.
Referenced by main(), ParseFluxFileConfig(), and ParseFluxHst().
double gOptGeomDUnits = 0 |
Definition at line 360 of file gEvGenLArDM.cxx.
double gOptGeomLUnits = 0 |
Definition at line 359 of file gEvGenLArDM.cxx.
string gOptInpXSecFile |
Definition at line 372 of file gEvGenLArDM.cxx.
double gOptMedRatio |
Definition at line 352 of file gEvGenLArDM.cxx.
int gOptNev |
Definition at line 365 of file gEvGenLArDM.cxx.
int gOptNScan = 0 |
Definition at line 367 of file gEvGenLArDM.cxx.
Referenced by main().
long int gOptRanSeed |
Definition at line 371 of file gEvGenLArDM.cxx.
string gOptRootGeom |
Definition at line 356 of file gEvGenLArDM.cxx.
string gOptRootGeomMasterVol = "" |
Definition at line 358 of file gEvGenLArDM.cxx.
Referenced by CreateRockBoxSelection(), and main().
string gOptRootGeomTopVol = "" |
Definition at line 357 of file gEvGenLArDM.cxx.
Long_t gOptRunNu |
Definition at line 353 of file gEvGenLArDM.cxx.
map<int,double> gOptTgtMix |
Definition at line 355 of file gEvGenLArDM.cxx.
bool gOptUsingRootGeom = false |
Definition at line 354 of file gEvGenLArDM.cxx.
bool gOptWriteMaxPlXml = false |
Definition at line 362 of file gEvGenLArDM.cxx.
Referenced by main().
double gOptZmin = -2.0e30 |
Definition at line 368 of file gEvGenLArDM.cxx.
Referenced by main().
double gOptZpCoupling |
Definition at line 350 of file gEvGenLArDM.cxx.
bool gSigTERM = false |
Definition at line 374 of file gEvGenLArDM.cxx.
Referenced by gsSIGTERMhandler(), and main().
string kDefOptEvFilePrefix = "gntp" |
Definition at line 346 of file gEvGenLArDM.cxx.
string kDefOptGeomDUnits = "g_cm3" |
Definition at line 344 of file gEvGenLArDM.cxx.
string kDefOptGeomLUnits = "mm" |
Definition at line 343 of file gEvGenLArDM.cxx.
NtpMCFormat_t kDefOptNtpFormat = kNFGHEP |
Definition at line 345 of file gEvGenLArDM.cxx.