GENIEGenerator
|
A GENIE `MC Job Driver'. Can be used for setting up complicated event generation cases involving detailed flux descriptions and detector geometry descriptions. More...
#include <GMCJDriver.h>
Public Member Functions | |
GMCJDriver () | |
~GMCJDriver () | |
void | SetEventGeneratorList (string listname) |
void | SetUnphysEventMask (const TBits &mask) |
void | UseFluxDriver (GFluxI *flux) |
void | UseGeomAnalyzer (GeomAnalyzerI *geom) |
void | UseSplines (bool useLogE=true) |
bool | UseMaxPathLengths (string xml_filename) |
void | KeepOnThrowingFluxNeutrinos (bool keep_on) |
void | SetXSecSplineNbins (int nbins) |
void | SetPmaxLogBinning (void) |
void | SetPmaxNbins (int nbins) |
void | SetPmaxSafetyFactor (double sf) |
void | ForceInteraction (void) |
void | ForceSingleProbScale (void) |
void | PreSelectEvents (bool preselect=true) |
bool | PreCalcFluxProbabilities (void) |
bool | LoadFluxProbabilities (string filename) |
void | SaveFluxProbabilities (string outfilename) |
void | Configure (bool calc_prob_scales=true) |
EventRecord * | GenerateEvent (void) |
double | GlobProbScale (void) const |
long int | NFluxNeutrinos (void) const |
map< int, double > | SumFluxIntProbs (void) const |
const GFluxI & | FluxDriver (void) const |
const GeomAnalyzerI & | GeomAnalyzer (void) const |
GFluxI * | FluxDriverPtr (void) const |
GeomAnalyzerI * | GeomAnalyzerPtr (void) const |
Private Member Functions | |
void | InitJob (void) |
void | InitEventGeneration (void) |
void | GetParticleLists (void) |
void | GetMaxPathLengthList (void) |
void | GetMaxFluxEnergy (void) |
void | PopulateEventGenDriverPool (void) |
void | BootstrapXSecSplines (void) |
void | BootstrapXSecSplineSummation (void) |
void | ComputeProbScales (void) |
EventRecord * | GenerateEvent1Try (void) |
bool | GenerateFluxNeutrino (void) |
bool | ComputePathLengths (void) |
double | ComputeInteractionProbabilities (bool use_max_path_length) |
int | SelectTargetMaterial (double R) |
void | GenerateEventKinematics (void) |
void | GenerateVertexPosition (void) |
void | ComputeEventProbability (void) |
double | InteractionProbability (double xsec, double pl, int A) |
double | PreGenFluxInteractionProbability (void) |
Private Attributes | |
GEVGPool * | fGPool |
A pool of GEVGDrivers properly configured event generation drivers / one per init state. More... | |
GFluxI * | fFluxDriver |
[input] neutrino flux driver More... | |
GeomAnalyzerI * | fGeomAnalyzer |
[input] detector geometry analyzer More... | |
double | fEmax |
[declared by the flux driver] maximum neutrino energy More... | |
PDGCodeList | fNuList |
[declared by the flux driver] list of neutrino codes More... | |
PDGCodeList | fTgtList |
[declared by the geom driver] list of target codes More... | |
PathLengthList | fMaxPathLengths |
[declared by the geom driver] maximum path length list More... | |
PathLengthList | fCurPathLengths |
[current] path length list for current flux neutrino More... | |
TLorentzVector | fCurVtx |
[current] interaction vertex More... | |
EventRecord * | fCurEvt |
[current] generated event More... | |
int | fSelTgtPdg |
[current] selected target material PDG code More... | |
map< int, double > | fCurCumulProbMap |
[current] cummulative interaction probabilities More... | |
double | fNFluxNeutrinos |
[current] number of flux nuetrinos fired by the flux driver so far More... | |
int | fXSecSplineNbins |
[config] number of bins in energy used in the xsec splines More... | |
bool | fPmaxLogBinning |
[config] maximum interaction probability is computed in logarithmic energy bins More... | |
int | fPmaxNbins |
[config] number of bins in energy used in the maximum interaction probability More... | |
double | fPmaxSafetyFactor |
[config] safety factor to compute the maximum interaction probability More... | |
map< int, TH1D * > | fPmax |
[computed at init] interaction probability scale /neutrino /energy for given geometry More... | |
double | fGlobPmax |
[computed at init] global interaction probability scale for given flux & geometry More... | |
string | fEventGenList |
[config] list of event generators loaded by this driver (what used to be the $GEVGL setting) More... | |
TBits * | fUnphysEventMask |
[config] controls whether unphysical events are returned (what used to be the $GUNPHYSMASK setting) More... | |
string | fMaxPlXmlFilename |
[config] input file with max density-weighted path lengths for all materials More... | |
bool | fUseExtMaxPl |
[config] using external max path length estimate? More... | |
bool | fUseSplines |
[config] compute all needed & not-loaded splines at init More... | |
bool | fUseLogE |
[config] build splines = f(logE) (rather than f(E)) ? More... | |
bool | fKeepThrowingFluxNu |
[config] keep firing flux neutrinos till one of them interacts More... | |
bool | fGenerateUnweighted |
[config] force single probability scale? More... | |
bool | fForceInteraction |
[config] force intearction? More... | |
bool | fPreSelect |
[config] set whether to pre-select events using max interaction paths More... | |
TFile * | fFluxIntProbFile |
[input] pre-generated flux interaction probability file More... | |
TTree * | fFluxIntTree |
[computed-or-loaded] pre-computed flux interaction probabilities (expected tree name is "gFlxIntProbs") More... | |
double | fBrFluxIntProb |
flux interaction probability (set to branch:"FluxIntProb") More... | |
int | fBrFluxIndex |
corresponding entry in flux input tree (set to address of branch:"FluxEntry") More... | |
double | fBrFluxEnu |
corresponding flux P4 (set to address of branch:"FluxP4") More... | |
double | fBrFluxWeight |
corresponding flux weight (set to address of branch: "FluxWeight") More... | |
int | fBrFluxPDG |
corresponding flux pdg code (set to address of branch: "FluxPDG") More... | |
string | fFluxIntFileName |
whether to save pre-generated flux tree for use in later jobs More... | |
string | fFluxIntTreeName |
name for tree holding flux probabilities More... | |
map< int, double > | fSumFluxIntProbs |
map where the key is flux pdg code and the value is sum of fBrFluxWeight * fBrFluxIntProb for all these flux neutrinos More... | |
A GENIE `MC Job Driver'. Can be used for setting up complicated event generation cases involving detailed flux descriptions and detector geometry descriptions.
Definition at line 46 of file GMCJDriver.h.
GMCJDriver::GMCJDriver | ( | ) |
Definition at line 43 of file GMCJDriver.cxx.
GMCJDriver::~GMCJDriver | ( | ) |
Definition at line 48 of file GMCJDriver.cxx.
|
private |
Definition at line 601 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), genie::GEVGDriver::CreateSplines(), LOG, pINFO, and pNOTICE.
|
private |
Definition at line 628 of file GMCJDriver.cxx.
References genie::GEVGDriver::CreateXSecSumSpline(), LOG, genie::Range1D_t::max, genie::Range1D_t::min, pFATAL, pNOTICE, and genie::GEVGDriver::ValidEnergyRange().
|
private |
Definition at line 1267 of file GMCJDriver.cxx.
References genie::units::A, genie::pdg::IonPdgCodeToA(), genie::GHepParticle::P4(), and genie::GHepParticle::Pdg().
|
private |
Definition at line 1110 of file GMCJDriver.cxx.
References genie::units::A, genie::InitialState::AsString(), genie::units::cm2, genie::Spline::Evaluate(), genie::pdg::IonPdgCodeToA(), LOG, pDEBUG, pFATAL, pNOTICE, and genie::GEVGDriver::XSecSumSpline().
|
private |
Definition at line 1081 of file GMCJDriver.cxx.
References LOG, pFATAL, and pNOTICE.
|
private |
Definition at line 670 of file GMCJDriver.cxx.
References genie::units::A, genie::InitialState::AsString(), genie::Spline::Evaluate(), genie::pdg::IonPdgCodeToA(), LOG, pDEBUG, pINFO, pNOTICE, pWARN, and genie::GEVGDriver::XSecSumSpline().
void GMCJDriver::Configure | ( | bool | calc_prob_scales = true | ) |
Definition at line 399 of file GMCJDriver.cxx.
References LOG, pNOTICE, and genie::utils::print::PrintFramedMesg().
Referenced by main().
|
inline |
Definition at line 81 of file GMCJDriver.h.
References fFluxDriver.
|
inline |
Definition at line 83 of file GMCJDriver.h.
References fFluxDriver.
void GMCJDriver::ForceInteraction | ( | void | ) |
Definition at line 162 of file GMCJDriver.cxx.
void GMCJDriver::ForceSingleProbScale | ( | void | ) |
Definition at line 172 of file GMCJDriver.cxx.
Referenced by main().
EventRecord * GMCJDriver::GenerateEvent | ( | void | ) |
Definition at line 815 of file GMCJDriver.cxx.
References LOG, pINFO, and pNOTICE.
Referenced by main().
|
private |
Definition at line 844 of file GMCJDriver.cxx.
References genie::gAbortingInErr, genie::RandomGen::Instance(), genie::controls::kASmallNum, LOG, genie::utils::print::P4AsString(), pDEBUG, genie::utils::res::PdgCode(), pERROR, pFATAL, pNOTICE, pWARN, genie::RandomGen::RndEvg(), and genie::utils::print::X4AsString().
|
private |
Definition at line 1215 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), genie::GEVGDriver::GenerateEvent(), LOG, pFATAL, pNOTICE, and genie::GEVGDriver::SetUnphysEventMask().
|
private |
Definition at line 1037 of file GMCJDriver.cxx.
References LOG, genie::utils::print::P4AsString(), genie::utils::res::PdgCode(), pERROR, pFATAL, pNOTICE, and genie::utils::print::X4AsString().
|
private |
Definition at line 1240 of file GMCJDriver.cxx.
References genie::constants::kLightSpeed, LOG, genie::units::meter, pNOTICE, and genie::units::second.
|
inline |
Definition at line 82 of file GMCJDriver.h.
References fGeomAnalyzer.
|
inline |
Definition at line 84 of file GMCJDriver.h.
References fGeomAnalyzer.
|
private |
Definition at line 554 of file GMCJDriver.cxx.
|
private |
Definition at line 536 of file GMCJDriver.cxx.
|
private |
Definition at line 519 of file GMCJDriver.cxx.
|
inline |
Definition at line 76 of file GMCJDriver.h.
References fGlobPmax.
Referenced by main().
|
private |
Definition at line 807 of file GMCJDriver.cxx.
|
private |
Definition at line 448 of file GMCJDriver.cxx.
References genie::AlgConfigPool::Instance(), genie::Messenger::Instance(), and genie::GHepFlags::NFlags().
|
private |
Definition at line 1308 of file GMCJDriver.cxx.
References genie::units::cm2, genie::units::gram, genie::units::kilogram, genie::constants::kNA, and genie::units::m2.
void GMCJDriver::KeepOnThrowingFluxNeutrinos | ( | bool | keep_on | ) |
Definition at line 120 of file GMCJDriver.cxx.
References genie::utils::print::BoolAsYNString(), LOG, and pNOTICE.
bool GMCJDriver::LoadFluxProbabilities | ( | string | filename | ) |
Definition at line 343 of file GMCJDriver.cxx.
References LOG, pERROR, pNOTICE, and pWARN.
Referenced by main().
|
inline |
Definition at line 77 of file GMCJDriver.h.
References fNFluxNeutrinos.
Referenced by main().
|
private |
Definition at line 564 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), genie::GEVGDriver::Configure(), LOG, pDEBUG, pNOTICE, genie::GEVGDriver::SetEventGeneratorList(), and genie::GEVGDriver::UseSplines().
bool GMCJDriver::PreCalcFluxProbabilities | ( | void | ) |
Definition at line 192 of file GMCJDriver.cxx.
References genie::controls::kASmallNum, LOG, pFATAL, pNOTICE, and pWARN.
Referenced by main().
|
private |
Definition at line 1321 of file GMCJDriver.cxx.
References genie::controls::kASmallNum, LOG, pERROR, and pFATAL.
void GMCJDriver::PreSelectEvents | ( | bool | preselect = true | ) |
Definition at line 184 of file GMCJDriver.cxx.
void GMCJDriver::SaveFluxProbabilities | ( | string | outfilename | ) |
Definition at line 390 of file GMCJDriver.cxx.
Referenced by main().
|
private |
Definition at line 1193 of file GMCJDriver.cxx.
References LOG, pERROR, and pNOTICE.
void GMCJDriver::SetEventGeneratorList | ( | string | listname | ) |
Definition at line 66 of file GMCJDriver.cxx.
Referenced by main().
void GMCJDriver::SetPmaxLogBinning | ( | void | ) |
Definition at line 137 of file GMCJDriver.cxx.
void GMCJDriver::SetPmaxNbins | ( | int | nbins | ) |
Definition at line 145 of file GMCJDriver.cxx.
void GMCJDriver::SetPmaxSafetyFactor | ( | double | sf | ) |
Definition at line 154 of file GMCJDriver.cxx.
void GMCJDriver::SetUnphysEventMask | ( | const TBits & | mask | ) |
Definition at line 74 of file GMCJDriver.cxx.
References LOG, genie::GHepFlags::NFlags(), and pNOTICE.
void GMCJDriver::SetXSecSplineNbins | ( | int | nbins | ) |
Definition at line 128 of file GMCJDriver.cxx.
|
inline |
Definition at line 78 of file GMCJDriver.h.
References fSumFluxIntProbs.
Referenced by main().
void GMCJDriver::UseFluxDriver | ( | GFluxI * | flux | ) |
Definition at line 83 of file GMCJDriver.cxx.
Referenced by main().
void GMCJDriver::UseGeomAnalyzer | ( | GeomAnalyzerI * | geom | ) |
Definition at line 88 of file GMCJDriver.cxx.
Referenced by main().
bool GMCJDriver::UseMaxPathLengths | ( | string | xml_filename | ) |
Definition at line 99 of file GMCJDriver.cxx.
Referenced by main().
void GMCJDriver::UseSplines | ( | bool | useLogE = true | ) |
Definition at line 93 of file GMCJDriver.cxx.
Referenced by main().
|
private |
corresponding flux P4 (set to address of branch:"FluxP4")
Definition at line 143 of file GMCJDriver.h.
|
private |
corresponding entry in flux input tree (set to address of branch:"FluxEntry")
Definition at line 142 of file GMCJDriver.h.
|
private |
flux interaction probability (set to branch:"FluxIntProb")
Definition at line 141 of file GMCJDriver.h.
|
private |
corresponding flux pdg code (set to address of branch: "FluxPDG")
Definition at line 145 of file GMCJDriver.h.
|
private |
corresponding flux weight (set to address of branch: "FluxWeight")
Definition at line 144 of file GMCJDriver.h.
|
private |
[current] cummulative interaction probabilities
Definition at line 121 of file GMCJDriver.h.
|
private |
[current] generated event
Definition at line 119 of file GMCJDriver.h.
|
private |
[current] path length list for current flux neutrino
Definition at line 117 of file GMCJDriver.h.
|
private |
[current] interaction vertex
Definition at line 118 of file GMCJDriver.h.
|
private |
[declared by the flux driver] maximum neutrino energy
Definition at line 113 of file GMCJDriver.h.
|
private |
[config] list of event generators loaded by this driver (what used to be the $GEVGL setting)
Definition at line 129 of file GMCJDriver.h.
|
private |
[input] neutrino flux driver
Definition at line 111 of file GMCJDriver.h.
Referenced by FluxDriver(), and FluxDriverPtr().
|
private |
whether to save pre-generated flux tree for use in later jobs
Definition at line 146 of file GMCJDriver.h.
|
private |
[input] pre-generated flux interaction probability file
Definition at line 139 of file GMCJDriver.h.
|
private |
[computed-or-loaded] pre-computed flux interaction probabilities (expected tree name is "gFlxIntProbs")
Definition at line 140 of file GMCJDriver.h.
|
private |
name for tree holding flux probabilities
Definition at line 147 of file GMCJDriver.h.
|
private |
[config] force intearction?
Definition at line 137 of file GMCJDriver.h.
|
private |
[config] force single probability scale?
Definition at line 136 of file GMCJDriver.h.
|
private |
[input] detector geometry analyzer
Definition at line 112 of file GMCJDriver.h.
Referenced by GeomAnalyzer(), and GeomAnalyzerPtr().
|
private |
[computed at init] global interaction probability scale for given flux & geometry
Definition at line 128 of file GMCJDriver.h.
Referenced by GlobProbScale().
|
private |
A pool of GEVGDrivers properly configured event generation drivers / one per init state.
Definition at line 110 of file GMCJDriver.h.
|
private |
[config] keep firing flux neutrinos till one of them interacts
Definition at line 135 of file GMCJDriver.h.
|
private |
[declared by the geom driver] maximum path length list
Definition at line 116 of file GMCJDriver.h.
|
private |
[config] input file with max density-weighted path lengths for all materials
Definition at line 131 of file GMCJDriver.h.
|
private |
[current] number of flux nuetrinos fired by the flux driver so far
Definition at line 122 of file GMCJDriver.h.
Referenced by NFluxNeutrinos().
|
private |
[declared by the flux driver] list of neutrino codes
Definition at line 114 of file GMCJDriver.h.
|
private |
[computed at init] interaction probability scale /neutrino /energy for given geometry
Definition at line 127 of file GMCJDriver.h.
|
private |
[config] maximum interaction probability is computed in logarithmic energy bins
Definition at line 124 of file GMCJDriver.h.
|
private |
[config] number of bins in energy used in the maximum interaction probability
Definition at line 125 of file GMCJDriver.h.
|
private |
[config] safety factor to compute the maximum interaction probability
Definition at line 126 of file GMCJDriver.h.
|
private |
[config] set whether to pre-select events using max interaction paths
Definition at line 138 of file GMCJDriver.h.
|
private |
[current] selected target material PDG code
Definition at line 120 of file GMCJDriver.h.
|
private |
map where the key is flux pdg code and the value is sum of fBrFluxWeight * fBrFluxIntProb for all these flux neutrinos
Definition at line 148 of file GMCJDriver.h.
Referenced by SumFluxIntProbs().
|
private |
[declared by the geom driver] list of target codes
Definition at line 115 of file GMCJDriver.h.
|
private |
[config] controls whether unphysical events are returned (what used to be the $GUNPHYSMASK setting)
Definition at line 130 of file GMCJDriver.h.
|
private |
[config] using external max path length estimate?
Definition at line 132 of file GMCJDriver.h.
|
private |
[config] build splines = f(logE) (rather than f(E)) ?
Definition at line 134 of file GMCJDriver.h.
|
private |
[config] compute all needed & not-loaded splines at init
Definition at line 133 of file GMCJDriver.h.
|
private |
[config] number of bins in energy used in the xsec splines
Definition at line 123 of file GMCJDriver.h.