A generic GENIE flux driver. Generates a 'cylindrical' neutrino beam along the input direction, with the input transverse radius and centered at the input position. The energies are generated from the input energy spectrum (TH1D). Multiple neutrino species can be generated (you will need to supply an energy spectrum for each). More...
Public Member Functions | |
GCylindTH1Flux () | |
~GCylindTH1Flux () | |
void | SetNuDirection (const TVector3 &direction) |
void | SetBeamSpot (const TVector3 &spot) |
void | SetTransverseRadius (double Rt) |
void | AddEnergySpectrum (int nu_pdgc, TH1D *spectrum) |
void | SetRtDependence (string rdep) |
const PDGCodeList & | FluxParticles (void) |
declare list of flux neutrinos that can be generated (for init. purposes) More... | |
double | MaxEnergy (void) |
declare the max flux neutrino energy that can be generated (for init. purposes) More... | |
bool | GenerateNext (void) |
generate the next flux neutrino (return false in err) More... | |
int | PdgCode (void) |
returns the flux neutrino pdg code More... | |
double | Weight (void) |
returns the flux neutrino weight (if any) More... | |
const TLorentzVector & | Momentum (void) |
returns the flux neutrino 4-momentum More... | |
const TLorentzVector & | Position (void) |
returns the flux neutrino 4-position (note: expect SI rather than physical units) More... | |
bool | End (void) |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples) More... | |
long int | Index (void) |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number) More... | |
void | Clear (Option_t *opt) |
reset state variables based on opt More... | |
void | GenerateWeighted (bool gen_weighted) |
set whether to generate weighted or unweighted neutrinos More... | |
Private Member Functions | |
void | Initialize (void) |
void | CleanUp (void) |
void | ResetSelection (void) |
void | AddAllFluxes (void) |
int | SelectNeutrino (double Ev) |
double | GeneratePhi (void) const |
double | GenerateRt (void) const |
Private Attributes | |
double | fMaxEv |
maximum energy More... | |
PDGCodeList * | fPdgCList |
list of neutrino pdg-codes More... | |
int | fgPdgC |
running generated nu pdg-code More... | |
TLorentzVector | fgP4 |
running generated nu 4-momentum More... | |
TLorentzVector | fgX4 |
running generated nu 4-position More... | |
vector< TH1D * > | fSpectrum |
flux = f(Ev), 1/neutrino species More... | |
TH1D * | fTotSpectrum |
combined flux = f(Ev) More... | |
TVector3 * | fDirVec |
neutrino direction More... | |
TVector3 * | fBeamSpot |
beam spot position More... | |
double | fRt |
transverse size of neutrino beam More... | |
TF1 * | fRtDep |
transverse radius dependence More... | |
A generic GENIE flux driver. Generates a 'cylindrical' neutrino beam along the input direction, with the input transverse radius and centered at the input position. The energies are generated from the input energy spectrum (TH1D). Multiple neutrino species can be generated (you will need to supply an energy spectrum for each).
July 4, 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 44 of file GCylindTH1Flux.h.
GCylindTH1Flux::GCylindTH1Flux | ( | ) |
GCylindTH1Flux::~GCylindTH1Flux | ( | ) |
Definition at line 222 of file GCylindTH1Flux.cxx.
References fSpectrum, fTotSpectrum, LOG, and pNOTICE.
Referenced by AddEnergySpectrum(), and Index().
Definition at line 187 of file GCylindTH1Flux.cxx.
References AddAllFluxes(), confusionMatrixTree::count, fMaxEv, fPdgCList, fSpectrum, LOG, cet::sqlite::max(), genie::units::nb, pNOTICE, genie::PDGCodeList::push_back(), and pWARN.
Referenced by GenerateEventsAtFixedInitState(), and main().
Definition at line 149 of file GCylindTH1Flux.cxx.
References fBeamSpot, fDirVec, fPdgCList, fRtDep, fSpectrum, fTotSpectrum, MECModelEnuComparisons::i, LOG, and pNOTICE.
Referenced by Index(), and ~GCylindTH1Flux().
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 107 of file GCylindTH1Flux.cxx.
References LOG, MECModelEnuComparisons::opt, and pERROR.
Referenced by Index().
|
inlinevirtual |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
Implements genie::GFluxI.
Definition at line 65 of file GCylindTH1Flux.h.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 58 of file GCylindTH1Flux.h.
References fPdgCList.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 54 of file GCylindTH1Flux.cxx.
References fBeamSpot, fDirVec, fgP4, fgPdgC, fgX4, fRt, fTotSpectrum, GeneratePhi(), GenerateRt(), LOG, make_associated_cosmic_defs::p3, genie::utils::print::P4AsShortString(), pINFO, ResetSelection(), SelectNeutrino(), submit_syst::x, genie::utils::print::X4AsString(), submit_syst::y, and test::z.
Referenced by MaxEnergy().
|
private |
Definition at line 275 of file GCylindTH1Flux.cxx.
References genie::RandomGen::Instance(), kPi, generate_hists::rnd, and genie::RandomGen::RndFlux().
Referenced by GenerateNext(), and Index().
|
private |
Definition at line 282 of file GCylindTH1Flux.cxx.
References fRtDep.
Referenced by GenerateNext(), and Index().
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 115 of file GCylindTH1Flux.cxx.
Referenced by Index().
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Implements genie::GFluxI.
Definition at line 66 of file GCylindTH1Flux.h.
References AddAllFluxes(), CleanUp(), Clear(), GeneratePhi(), GenerateRt(), GenerateWeighted(), Initialize(), MECModelEnuComparisons::opt, ResetSelection(), and SelectNeutrino().
Definition at line 124 of file GCylindTH1Flux.cxx.
References fBeamSpot, fDirVec, fMaxEv, fPdgCList, fRt, fRtDep, fTotSpectrum, LOG, pNOTICE, ResetSelection(), and SetRtDependence().
Referenced by Index().
|
inlinevirtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 59 of file GCylindTH1Flux.h.
References fMaxEv, and GenerateNext().
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 63 of file GCylindTH1Flux.h.
References fgP4.
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 61 of file GCylindTH1Flux.h.
References fgPdgC.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 64 of file GCylindTH1Flux.h.
References fgX4.
Definition at line 141 of file GCylindTH1Flux.cxx.
References fgP4, fgPdgC, and fgX4.
Referenced by GenerateNext(), Index(), and Initialize().
|
private |
Definition at line 241 of file GCylindTH1Flux.cxx.
References ana::assert(), fPdgCList, fSpectrum, genie::RandomGen::Instance(), LOG, getGoodRuns4SAM::n, pDEBUG, pERROR, R, generate_hists::rnd, genie::RandomGen::RndFlux(), and sum.
Referenced by GenerateNext(), and Index().
void GCylindTH1Flux::SetBeamSpot | ( | const TVector3 & | spot | ) |
Definition at line 173 of file GCylindTH1Flux.cxx.
References fBeamSpot.
Referenced by GenerateEventsAtFixedInitState(), and main().
void GCylindTH1Flux::SetNuDirection | ( | const TVector3 & | direction | ) |
Definition at line 167 of file GCylindTH1Flux.cxx.
References fDirVec.
Referenced by GenerateEventsAtFixedInitState(), and main().
Definition at line 211 of file GCylindTH1Flux.cxx.
Referenced by Initialize().
void GCylindTH1Flux::SetTransverseRadius | ( | double | Rt | ) |
Definition at line 179 of file GCylindTH1Flux.cxx.
References fRt, fRtDep, LOG, and pNOTICE.
Referenced by GenerateEventsAtFixedInitState(), and main().
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 62 of file GCylindTH1Flux.h.
|
private |
beam spot position
Definition at line 90 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateNext(), Initialize(), and SetBeamSpot().
|
private |
neutrino direction
Definition at line 89 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateNext(), Initialize(), and SetNuDirection().
|
private |
running generated nu 4-momentum
Definition at line 85 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Momentum(), and ResetSelection().
|
private |
running generated nu pdg-code
Definition at line 84 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), PdgCode(), and ResetSelection().
|
private |
running generated nu 4-position
Definition at line 86 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Position(), and ResetSelection().
|
private |
maximum energy
Definition at line 82 of file GCylindTH1Flux.h.
Referenced by AddEnergySpectrum(), Initialize(), and MaxEnergy().
|
private |
list of neutrino pdg-codes
Definition at line 83 of file GCylindTH1Flux.h.
Referenced by AddEnergySpectrum(), CleanUp(), FluxParticles(), Initialize(), and SelectNeutrino().
|
private |
transverse size of neutrino beam
Definition at line 91 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Initialize(), SetRtDependence(), and SetTransverseRadius().
|
private |
transverse radius dependence
Definition at line 92 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateRt(), Initialize(), SetRtDependence(), and SetTransverseRadius().
|
private |
flux = f(Ev), 1/neutrino species
Definition at line 87 of file GCylindTH1Flux.h.
Referenced by AddAllFluxes(), AddEnergySpectrum(), CleanUp(), and SelectNeutrino().
|
private |
combined flux = f(Ev)
Definition at line 88 of file GCylindTH1Flux.h.
Referenced by AddAllFluxes(), CleanUp(), GenerateNext(), and Initialize().