GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
gMaxPathLengths.cxx File Reference
#include <cassert>
#include <string>
#include <TMath.h>
#include "Framework/EventGen/PathLengthList.h"
#include "Tools/Geometry/ROOTGeomAnalyzer.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Utils/CmdLnArgParser.h"
#include "Framework/Utils/UnitUtils.h"
#include "Framework/Utils/PrintUtils.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/RunOpt.h"
Include dependency graph for gMaxPathLengths.cxx:

Go to the source code of this file.

Functions

void GetCommandLineArgs (int argc, char **argv)
 
void PrintSyntax (void)
 
int main (int argc, char **argv)
 

Variables

string kDefOptXMLFilename = "maxpl.xml"
 
string kDefOptGeomLUnits = "mm"
 
string kDefOptGeomDUnits = "g_cm3"
 
string gOptGeomFilename = ""
 
string gOptXMLFilename = ""
 
string gOptRootGeomTopVol = ""
 
double gOptGeomLUnits = 0
 
double gOptGeomDUnits = 0
 
int gOptNPoints = -1
 
int gOptNRays = -1
 
long int gOptRanSeed = -1
 

Function Documentation

void GetCommandLineArgs ( int  argc,
char **  argv 
)
int main ( int  argc,
char **  argv 
)

Definition at line 112 of file gMaxPathLengths.cxx.

References genie::geometry::ROOTGeomAnalyzer::ComputeMaxPathLengths(), geom, GetCommandLineArgs(), gOptGeomDUnits, gOptGeomFilename, gOptGeomLUnits, gOptNPoints, gOptNRays, gOptRanSeed, gOptRootGeomTopVol, gOptXMLFilename, genie::RunOpt::Instance(), LOG, genie::utils::app_init::MesgThresholds(), pINFO, genie::utils::app_init::RandGen(), genie::PathLengthList::SaveAsXml(), genie::geometry::ROOTGeomAnalyzer::SetScannerNPoints(), and genie::geometry::ROOTGeomAnalyzer::SetScannerNRays().

113 {
114  GetCommandLineArgs(argc,argv);
115 
117  utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
118 
119  // Create the geometry driver
120  LOG("gmxpl", pINFO)
121  << "Creating/configuring a ROOT geom. driver";
122 
124  geom -> SetLengthUnits (gOptGeomLUnits);
125  geom -> SetDensityUnits (gOptGeomDUnits);
126  geom -> SetWeightWithDensity (true);
127 
128  // Set the top volume name
129  geom -> SetTopVolName (gOptRootGeomTopVol);
130  geom -> SetWeightWithDensity (true);
131 
133  if(gOptNRays > 0) geom->SetScannerNRays (gOptNRays);
134 
135  // Compute the maximum path lengths
136  LOG("gmxpl", pINFO)
137  << "Asking input GeomAnalyzerI for the max path-lengths";
138  const PathLengthList & plmax = geom->ComputeMaxPathLengths();
139 
140  // Print & save the maximum path lengths in XML format
141  LOG("gmxpl", pINFO)
142  << "Maximum path lengths: " << plmax;
143  plmax.SaveAsXml(gOptXMLFilename);
144 
145  delete geom;
146 
147  return 0;
148 }
void RandGen(long int seed)
Definition: AppInit.cxx:30
virtual const PathLengthList & ComputeMaxPathLengths(void)
int gOptNRays
double gOptGeomDUnits
Definition: gAtmoEvGen.cxx:303
int gOptNPoints
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.
void SaveAsXml(string filename) const
#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
virtual void SetScannerNRays(int nr)
string geom
A ROOT/GEANT4 geometry driver.
#define pINFO
Definition: Messenger.h:62
virtual void SetScannerNPoints(int np)
set geometry driver&#39;s configuration options
void MesgThresholds(string inpfile)
Definition: AppInit.cxx:99
void GetCommandLineArgs(int argc, char **argv)
Definition: gAtmoEvGen.cxx:563
string gOptXMLFilename
double gOptGeomLUnits
Definition: gAtmoEvGen.cxx:302
string gOptGeomFilename
long int gOptRanSeed
Definition: gAtmoEvGen.cxx:312
void PrintSyntax ( void  )

Variable Documentation

double gOptGeomDUnits = 0

Definition at line 106 of file gMaxPathLengths.cxx.

string gOptGeomFilename = ""

Definition at line 102 of file gMaxPathLengths.cxx.

double gOptGeomLUnits = 0

Definition at line 105 of file gMaxPathLengths.cxx.

int gOptNPoints = -1

Definition at line 107 of file gMaxPathLengths.cxx.

Referenced by main().

int gOptNRays = -1

Definition at line 108 of file gMaxPathLengths.cxx.

Referenced by main().

long int gOptRanSeed = -1

Definition at line 109 of file gMaxPathLengths.cxx.

string gOptRootGeomTopVol = ""

Definition at line 104 of file gMaxPathLengths.cxx.

string gOptXMLFilename = ""

Definition at line 103 of file gMaxPathLengths.cxx.

Referenced by LoadSplines(), and main().

string kDefOptGeomDUnits = "g_cm3"

Definition at line 99 of file gMaxPathLengths.cxx.

string kDefOptGeomLUnits = "mm"

Definition at line 98 of file gMaxPathLengths.cxx.

string kDefOptXMLFilename = "maxpl.xml"

Definition at line 97 of file gMaxPathLengths.cxx.