A GENIE `MC Job Driver'. Can be used for setting up complicated event generation cases involving detailed flux descriptions and detector geometry descriptions. More...
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 | 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... | |
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 | 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.
May 25, 2005
Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE
Definition at line 47 of file GMCJDriver.h.
GMCJDriver::GMCJDriver | ( | ) |
Definition at line 134 of file GMCJDriver.cxx.
GMCJDriver::~GMCJDriver | ( | ) |
Definition at line 139 of file GMCJDriver.cxx.
References pmax.
Definition at line 642 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), genie::GEVGDriver::CreateSplines(), LOG, pINFO, and pNOTICE.
Referenced by GeomAnalyzerPtr().
Definition at line 669 of file GMCJDriver.cxx.
References ana::assert(), genie::GEVGDriver::CreateXSecSumSpline(), dE, LOG, cet::sqlite::max(), genie::Range1D_t::max, min(), genie::Range1D_t::min, pFATAL, pNOTICE, and genie::GEVGDriver::ValidEnergyRange().
Referenced by GeomAnalyzerPtr().
Definition at line 1264 of file GMCJDriver.cxx.
References genie::units::A, ana::assert(), genie::pdg::IonPdgCodeToA(), P, genie::GHepParticle::P4(), genie::GHepParticle::Pdg(), pmax, ana::weight, and xsec.
Referenced by GeomAnalyzerPtr().
|
private |
Definition at line 1108 of file GMCJDriver.cxx.
References genie::units::A, ana::assert(), genie::InitialState::AsString(), genie::units::cm2, genie::Spline::Evaluate(), exit(), genie::pdg::IonPdgCodeToA(), LOG, pDEBUG, pFATAL, std_candles::pl, pmax, pNOTICE, xsec, and genie::GEVGDriver::XSecSumSpline().
Referenced by GeomAnalyzerPtr().
|
private |
Definition at line 1079 of file GMCJDriver.cxx.
References LOG, pFATAL, and pNOTICE.
Referenced by GeomAnalyzerPtr().
Definition at line 705 of file GMCJDriver.cxx.
References genie::units::A, ana::assert(), genie::InitialState::AsString(), emax, emin, genie::Spline::Evaluate(), makeTrainCVSamples::int, genie::pdg::IonPdgCodeToA(), LOG, getGoodRuns4SAM::n, pDEBUG, pINFO, pmax, pNOTICE, pWARN, and genie::GEVGDriver::XSecSumSpline().
Referenced by GeomAnalyzerPtr().
void GMCJDriver::Configure | ( | bool | calc_prob_scales = true | ) |
Definition at line 446 of file GMCJDriver.cxx.
References LOG, pNOTICE, and genie::utils::print::PrintFramedMesg().
Referenced by GenerateEventsAtFixedInitState(), main(), and supernova::SnovaGen::SnovaGen().
Definition at line 77 of file GMCJDriver.h.
References fFluxDriver.
Definition at line 79 of file GMCJDriver.h.
References fFluxDriver.
Definition at line 219 of file GMCJDriver.cxx.
Referenced by GenerateEventsAtFixedInitState(), and main().
EventRecord * GMCJDriver::GenerateEvent | ( | void | ) |
Definition at line 838 of file GMCJDriver.cxx.
References LOG, pINFO, and pNOTICE.
Referenced by GenerateEventsAtFixedInitState(), supernova::SnovaGen::GenerateNextRecord(), and main().
|
private |
Definition at line 867 of file GMCJDriver.cxx.
References exit(), genie::gAbortingInErr, genie::RandomGen::Instance(), genie::controls::kASmallNum, LOG, genie::utils::print::P4AsString(), pDEBUG, genie::utils::res::PdgCode(), pERROR, pFATAL, pNOTICE, pWARN, R, generate_hists::rnd, genie::RandomGen::RndEvg(), and genie::utils::print::X4AsString().
Referenced by GeomAnalyzerPtr().
Definition at line 1212 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), exit(), genie::GEVGDriver::GenerateEvent(), LOG, pFATAL, pNOTICE, and genie::GEVGDriver::SetUnphysEventMask().
Referenced by GeomAnalyzerPtr().
|
private |
Definition at line 1035 of file GMCJDriver.cxx.
References LOG, genie::utils::print::P4AsString(), genie::utils::res::PdgCode(), pERROR, pFATAL, pNOTICE, and genie::utils::print::X4AsString().
Referenced by GeomAnalyzerPtr().
Definition at line 1237 of file GMCJDriver.cxx.
References plot_validation_datamc::c, CLHEP::dL, makeHTMLView::dt, genie::constants::kLightSpeed, LOG, genie::units::meter, make_associated_cosmic_defs::p4, pNOTICE, and genie::units::second.
Referenced by GeomAnalyzerPtr().
|
inline |
Definition at line 78 of file GMCJDriver.h.
References fGeomAnalyzer.
|
inline |
Definition at line 80 of file GMCJDriver.h.
References genie::units::A, BootstrapXSecSplines(), BootstrapXSecSplineSummation(), ComputeEventProbability(), ComputeInteractionProbabilities(), ComputePathLengths(), ComputeProbScales(), fGeomAnalyzer, GenerateEvent1Try(), GenerateEventKinematics(), GenerateFluxNeutrino(), GenerateVertexPosition(), GetMaxFluxEnergy(), GetMaxPathLengthList(), GetParticleLists(), InitEventGeneration(), InitJob(), InteractionProbability(), std_candles::pl, PopulateEventGenDriverPool(), PreGenFluxInteractionProbability(), R, SelectTargetMaterial(), and xsec.
Definition at line 595 of file GMCJDriver.cxx.
Referenced by GeomAnalyzerPtr().
Definition at line 577 of file GMCJDriver.cxx.
Referenced by GeomAnalyzerPtr().
Definition at line 560 of file GMCJDriver.cxx.
Referenced by GeomAnalyzerPtr().
|
inline |
Definition at line 72 of file GMCJDriver.h.
References fGlobPmax.
Referenced by main(), and supernova::SnovaGen::SnovaGen().
Definition at line 830 of file GMCJDriver.cxx.
Referenced by GeomAnalyzerPtr().
Definition at line 494 of file GMCJDriver.cxx.
References ana::assert(), MECModelEnuComparisons::i, genie::AlgConfigPool::Instance(), genie::Messenger::Instance(), and genie::GHepFlags::NFlags().
Referenced by GeomAnalyzerPtr().
|
private |
Definition at line 1305 of file GMCJDriver.cxx.
References genie::units::cm2, genie::units::gram, genie::units::kilogram, genie::constants::kNA, and genie::units::m2.
Referenced by GeomAnalyzerPtr().
void GMCJDriver::KeepOnThrowingFluxNeutrinos | ( | bool | keep_on | ) |
Definition at line 211 of file GMCJDriver.cxx.
References genie::utils::print::BoolAsYNString(), LOG, and pNOTICE.
bool GMCJDriver::LoadFluxProbabilities | ( | string | filename | ) |
Definition at line 390 of file GMCJDriver.cxx.
References LOG, pERROR, pNOTICE, and pWARN.
Referenced by main().
Definition at line 73 of file GMCJDriver.h.
References fNFluxNeutrinos.
Definition at line 605 of file GMCJDriver.cxx.
References genie::InitialState::AsString(), genie::GEVGDriver::Configure(), LOG, pDEBUG, pNOTICE, genie::GEVGDriver::SetEventGeneratorList(), and genie::GEVGDriver::UseSplines().
Referenced by GeomAnalyzerPtr().
bool GMCJDriver::PreCalcFluxProbabilities | ( | void | ) |
Definition at line 239 of file GMCJDriver.cxx.
References ana::assert(), exit(), MECModelEnuComparisons::i, genie::controls::kASmallNum, LOG, pFATAL, pNOTICE, pWARN, and log::success().
Referenced by main().
|
private |
Definition at line 1318 of file GMCJDriver.cxx.
References ana::assert(), exit(), genie::controls::kASmallNum, LOG, pERROR, pFATAL, and log::success().
Referenced by GeomAnalyzerPtr().
void GMCJDriver::PreSelectEvents | ( | bool | preselect = true | ) |
Definition at line 231 of file GMCJDriver.cxx.
Definition at line 437 of file GMCJDriver.cxx.
References make_template_knob_config::outfilename.
Referenced by main().
|
private |
Definition at line 1190 of file GMCJDriver.cxx.
References LOG, pERROR, and pNOTICE.
Referenced by GeomAnalyzerPtr().
Definition at line 157 of file GMCJDriver.cxx.
Referenced by GenerateEventsAtFixedInitState(), main(), and supernova::SnovaGen::SnovaGen().
void GMCJDriver::SetUnphysEventMask | ( | const TBits & | mask | ) |
Definition at line 165 of file GMCJDriver.cxx.
References LOG, lem_server::mask, genie::GHepFlags::NFlags(), and pNOTICE.
Referenced by GenerateEventsAtFixedInitState().
Definition at line 74 of file GMCJDriver.h.
References fSumFluxIntProbs.
Referenced by main().
Definition at line 174 of file GMCJDriver.cxx.
Referenced by GenerateEventsAtFixedInitState(), main(), and supernova::SnovaGen::SnovaGen().
void GMCJDriver::UseGeomAnalyzer | ( | GeomAnalyzerI * | geom | ) |
Definition at line 179 of file GMCJDriver.cxx.
Referenced by GenerateEventsAtFixedInitState(), main(), and supernova::SnovaGen::SnovaGen().
bool GMCJDriver::UseMaxPathLengths | ( | string | xml_filename | ) |
Definition at line 190 of file GMCJDriver.cxx.
Referenced by main(), and supernova::SnovaGen::SnovaGen().
void GMCJDriver::UseSplines | ( | bool | useLogE = true | ) |
Definition at line 184 of file GMCJDriver.cxx.
Referenced by GenerateEventsAtFixedInitState(), and main().
|
private |
corresponding flux P4 (set to address of branch:"FluxP4")
Definition at line 134 of file GMCJDriver.h.
|
private |
corresponding entry in flux input tree (set to address of branch:"FluxEntry")
Definition at line 133 of file GMCJDriver.h.
|
private |
flux interaction probability (set to branch:"FluxIntProb")
Definition at line 132 of file GMCJDriver.h.
|
private |
corresponding flux pdg code (set to address of branch: "FluxPDG")
Definition at line 136 of file GMCJDriver.h.
|
private |
corresponding flux weight (set to address of branch: "FluxWeight")
Definition at line 135 of file GMCJDriver.h.
|
private |
[current] cummulative interaction probabilities
Definition at line 117 of file GMCJDriver.h.
|
private |
[current] generated event
Definition at line 115 of file GMCJDriver.h.
|
private |
[current] path length list for current flux neutrino
Definition at line 113 of file GMCJDriver.h.
|
private |
[current] interaction vertex
Definition at line 114 of file GMCJDriver.h.
|
private |
[declared by the flux driver] maximum neutrino energy
Definition at line 109 of file GMCJDriver.h.
|
private |
[config] list of event generators loaded by this driver (what used to be the $GEVGL setting)
Definition at line 121 of file GMCJDriver.h.
|
private |
[input] neutrino flux driver
Definition at line 107 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 137 of file GMCJDriver.h.
|
private |
[input] pre-generated flux interaction probability file
Definition at line 130 of file GMCJDriver.h.
|
private |
[computed-or-loaded] pre-computed flux interaction probabilities (expected tree name is "gFlxIntProbs")
Definition at line 131 of file GMCJDriver.h.
|
private |
name for tree holding flux probabilities
Definition at line 138 of file GMCJDriver.h.
|
private |
[config] force single probability scale?
Definition at line 128 of file GMCJDriver.h.
|
private |
[input] detector geometry analyzer
Definition at line 108 of file GMCJDriver.h.
Referenced by GeomAnalyzer(), and GeomAnalyzerPtr().
|
private |
[computed at init] global interaction probability scale for given flux & geometry
Definition at line 120 of file GMCJDriver.h.
Referenced by GlobProbScale().
|
private |
A pool of GEVGDrivers properly configured event generation drivers / one per init state.
Definition at line 106 of file GMCJDriver.h.
|
private |
[config] keep firing flux neutrinos till one of them interacts
Definition at line 127 of file GMCJDriver.h.
|
private |
[declared by the geom driver] maximum path length list
Definition at line 112 of file GMCJDriver.h.
|
private |
[config] input file with max density-weighted path lengths for all materials
Definition at line 123 of file GMCJDriver.h.
|
private |
[current] number of flux nuetrinos fired by the flux driver so far
Definition at line 118 of file GMCJDriver.h.
Referenced by NFluxNeutrinos().
|
private |
[declared by the flux driver] list of neutrino codes
Definition at line 110 of file GMCJDriver.h.
|
private |
[computed at init] interaction probability scale /neutrino /energy for given geometry
Definition at line 119 of file GMCJDriver.h.
|
private |
[config] set whether to pre-select events using max interaction paths
Definition at line 129 of file GMCJDriver.h.
|
private |
[current] selected target material PDG code
Definition at line 116 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 139 of file GMCJDriver.h.
Referenced by SumFluxIntProbs().
|
private |
[declared by the geom driver] list of target codes
Definition at line 111 of file GMCJDriver.h.
|
private |
[config] controls whether unphysical events are returned (what used to be the $GUNPHYSMASK setting)
Definition at line 122 of file GMCJDriver.h.
|
private |
[config] using external max path length estimate?
Definition at line 124 of file GMCJDriver.h.
|
private |
[config] build splines = f(logE) (rather than f(E)) ?
Definition at line 126 of file GMCJDriver.h.
|
private |
[config] compute all needed & not-loaded splines at init
Definition at line 125 of file GMCJDriver.h.