#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 |
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}
Definition at line 1300 of file gFNALExptEvGen.cxx.
void CreateRockBoxSelection | ( | string | fidcut, |
GeomAnalyzerI * | geom_driver | ||
) |
Definition at line 1464 of file gFNALExptEvGen.cxx.
void DetermineFluxDriver | ( | string | fopt | ) |
Definition at line 1563 of file gFNALExptEvGen.cxx.
void GetCommandLineArgs | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 906 of file gFNALExptEvGen.cxx.
|
static |
Definition at line 397 of file gFNALExptEvGen.cxx.
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 853 of file gFNALExptEvGen.cxx.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 404 of file gFNALExptEvGen.cxx.
void ParseFluxFileConfig | ( | string | fopt | ) |
Definition at line 1725 of file gFNALExptEvGen.cxx.
void ParseFluxHst | ( | string | fopt | ) |
Definition at line 1630 of file gFNALExptEvGen.cxx.
void PrintSyntax | ( | void | ) |
Definition at line 1274 of file gFNALExptEvGen.cxx.
int gOptDebug = 0 |
Definition at line 391 of file gFNALExptEvGen.cxx.
string gOptDetectorLocation |
Definition at line 384 of file gFNALExptEvGen.cxx.
string gOptEvFilePrefix |
Definition at line 390 of file gFNALExptEvGen.cxx.
string gOptExtMaxPlXml = "" |
Definition at line 380 of file gFNALExptEvGen.cxx.
string gOptFidCut |
Definition at line 387 of file gFNALExptEvGen.cxx.
string gOptFluxDriver = "" |
Definition at line 370 of file gFNALExptEvGen.cxx.
string gOptFluxFile |
Definition at line 383 of file gFNALExptEvGen.cxx.
map<int,TH1D*> gOptFluxHst |
Definition at line 374 of file gFNALExptEvGen.cxx.
PDGCodeList gOptFluxPdg |
Definition at line 372 of file gFNALExptEvGen.cxx.
Definition at line 371 of file gFNALExptEvGen.cxx.
double gOptGeomDUnits = 0 |
Definition at line 379 of file gFNALExptEvGen.cxx.
double gOptGeomLUnits = 0 |
Definition at line 378 of file gFNALExptEvGen.cxx.
string gOptInpXSecFile |
Definition at line 393 of file gFNALExptEvGen.cxx.
int gOptNev |
Definition at line 385 of file gFNALExptEvGen.cxx.
int gOptNScan = 0 |
Definition at line 388 of file gFNALExptEvGen.cxx.
double gOptPOT |
Definition at line 386 of file gFNALExptEvGen.cxx.
long int gOptRanSeed |
Definition at line 392 of file gFNALExptEvGen.cxx.
string gOptRootGeom |
Definition at line 375 of file gFNALExptEvGen.cxx.
string gOptRootGeomMasterVol = "" |
Definition at line 377 of file gFNALExptEvGen.cxx.
string gOptRootGeomTopVol = "" |
Definition at line 376 of file gFNALExptEvGen.cxx.
Long_t gOptRunNu |
Definition at line 367 of file gFNALExptEvGen.cxx.
map<int,double> gOptTgtMix |
Definition at line 373 of file gFNALExptEvGen.cxx.
bool gOptUsingHistFlux = false |
Definition at line 369 of file gFNALExptEvGen.cxx.
bool gOptUsingRootGeom = false |
Definition at line 368 of file gFNALExptEvGen.cxx.
bool gOptWriteMaxPlXml = false |
Definition at line 381 of file gFNALExptEvGen.cxx.
double gOptZmin = -2.0e30 |
Definition at line 389 of file gFNALExptEvGen.cxx.
bool gSigTERM = false |
Definition at line 395 of file gFNALExptEvGen.cxx.
string kDefOptEvFilePrefix = "gntp" |
Definition at line 363 of file gFNALExptEvGen.cxx.
string kDefOptGeomDUnits = "g_cm3" |
Definition at line 361 of file gFNALExptEvGen.cxx.
string kDefOptGeomLUnits = "mm" |
Definition at line 360 of file gFNALExptEvGen.cxx.
NtpMCFormat_t kDefOptNtpFormat = kNFGHEP |
Definition at line 362 of file gFNALExptEvGen.cxx.