LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Interface to the CRY cosmic-ray generator. More...
#include "CRYHelper.h"
Public Member Functions | |
CRYHelper () | |
CRYHelper (fhicl::ParameterSet const &pset, CLHEP::HepRandomEngine &engine, std::string const &worldVol="vWorld") | |
~CRYHelper () | |
double | Sample (simb::MCTruth &mctruth, double const &surfaceY, double const &detectorLength, double *w, double rantime=0) |
Private Member Functions | |
void | WorldBox (double *xlo_cm, double *xhi_cm, double *ylo_cm, double *yhi_cm, double *zlo_cm, double *zhi_cm) const |
void | ProjectToBoxEdge (const double xyz[], const double dxyz[], double &xlo, double &xhi, double &ylo, double &yhi, double &zlo, double &zhi, double xyzout[]) |
Private Attributes | |
CRYSetup * | fSetup |
CRY configuration. More... | |
CRYGenerator * | fGen |
The CRY generator. More... | |
double | fSampleTime |
Amount of time to sample (seconds) More... | |
double | fToffset |
Shift in time of particles (s) More... | |
double | fEthresh |
Cut on kinetic energy (GeV) More... | |
std::string | fWorldVolume |
Name of the world volume. More... | |
std::string | fLatitude |
Latitude of detector need space after value. More... | |
std::string | fAltitude |
Altitude of detector need space after value. More... | |
std::string | fSubBoxL |
Length of subbox (m) need space after value. More... | |
double | fBoxDelta |
bool | fSingleEventMode |
flag to turn on producing only a single cosmic ray More... | |
Interface to the CRY cosmic-ray generator.
Definition at line 26 of file CRYHelper.h.
evgb::CRYHelper::CRYHelper | ( | ) |
Definition at line 36 of file CRYHelper.cxx.
|
explicit |
Definition at line 41 of file CRYHelper.cxx.
References fAltitude, fGen, fLatitude, fSetup, fSubBoxL, fhicl::ParameterSet::get(), and evgb::RNGWrapper< T >::set().
evgb::CRYHelper::~CRYHelper | ( | ) |
Definition at line 90 of file CRYHelper.cxx.
|
private |
Project along a direction from a particular starting point to the edge of a box
xyz | - The starting x,y,z location. Must be inside box. |
dxyz | - Direction vector |
xlo | - Low edge of box in x |
xhi | - Low edge of box in x |
ylo | - Low edge of box in y |
yhi | - Low edge of box in y |
zlo | - Low edge of box in z |
zhi | - Low edge of box in z |
xyzout | - On output, the position at the box edge |
Note: It should be safe to use the same array for input and output.
Definition at line 264 of file CRYHelper.cxx.
Referenced by Sample().
double evgb::CRYHelper::Sample | ( | simb::MCTruth & | mctruth, |
double const & | surfaceY, | ||
double const & | detectorLength, | ||
double * | w, | ||
double | rantime = 0 |
||
) |
Definition at line 97 of file CRYHelper.cxx.
References simb::MCTruth::Add(), simb::MCParticle::AddTrajectoryPoint(), fEthresh, fGen, fSampleTime, fSingleEventMode, fToffset, simb::kCosmicRay, evgb::kCosmicRayGenerator, LOG_DEBUG, ProjectToBoxEdge(), simb::MCTruth::SetOrigin(), WorldBox(), x1, x2, y1, and y2.
Referenced by evgen::CosmicsGen::produce().
|
private |
Return the ranges of x,y and z for the "world volume" that the entire geometry lives in. If any pointers are 0, then those coordinates are ignored.
xlo | : On return, lower bound on x positions |
xhi | : On return, upper bound on x positions |
ylo | : On return, lower bound on y positions |
yhi | : On return, upper bound on y positions |
zlo | : On return, lower bound on z positions |
zhi | : On return, upper bound on z positions |
Definition at line 225 of file CRYHelper.cxx.
References fWorldVolume, s, x1, x2, y1, and y2.
Referenced by Sample().
|
private |
Altitude of detector need space after value.
Definition at line 63 of file CRYHelper.h.
Referenced by CRYHelper().
|
private |
Adjustment to the size of the world box in each dimension to avoid G4 rounding errors
Definition at line 65 of file CRYHelper.h.
Referenced by ProjectToBoxEdge().
|
private |
|
private |
The CRY generator.
Definition at line 57 of file CRYHelper.h.
Referenced by CRYHelper(), Sample(), and ~CRYHelper().
|
private |
Latitude of detector need space after value.
Definition at line 62 of file CRYHelper.h.
Referenced by CRYHelper().
|
private |
Amount of time to sample (seconds)
Definition at line 58 of file CRYHelper.h.
Referenced by Sample().
|
private |
CRY configuration.
Definition at line 56 of file CRYHelper.h.
Referenced by CRYHelper(), and ~CRYHelper().
|
private |
flag to turn on producing only a single cosmic ray
Definition at line 67 of file CRYHelper.h.
Referenced by Sample().
|
private |
Length of subbox (m) need space after value.
Definition at line 64 of file CRYHelper.h.
Referenced by CRYHelper().
|
private |
|
private |