GENIEGenerator
|
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...
#include <GCylindTH1Flux.h>
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... | |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
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).
Definition at line 43 of file GCylindTH1Flux.h.
GCylindTH1Flux::GCylindTH1Flux | ( | ) |
GCylindTH1Flux::~GCylindTH1Flux | ( | ) |
|
private |
Definition at line 218 of file GCylindTH1Flux.cxx.
References fSpectrum, fTotSpectrum, LOG, and pNOTICE.
Referenced by AddEnergySpectrum().
void GCylindTH1Flux::AddEnergySpectrum | ( | int | nu_pdgc, |
TH1D * | spectrum | ||
) |
Definition at line 183 of file GCylindTH1Flux.cxx.
References AddAllFluxes(), fMaxEv, fPdgCList, fSpectrum, LOG, genie::units::nb, pNOTICE, genie::PDGCodeList::push_back(), and pWARN.
Referenced by main().
|
private |
Definition at line 145 of file GCylindTH1Flux.cxx.
References fBeamSpot, fDirVec, fPdgCList, fRtDep, fSpectrum, fTotSpectrum, LOG, and pNOTICE.
Referenced by ~GCylindTH1Flux().
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 103 of file GCylindTH1Flux.cxx.
|
inlinevirtual |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
Implements genie::GFluxI.
Definition at line 64 of file GCylindTH1Flux.h.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 57 of file GCylindTH1Flux.h.
References fPdgCList.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 45 of file GCylindTH1Flux.cxx.
References genie::PDGCodeList::ExistsInPDGCodeList(), fBeamSpot, fDirVec, fgP4, fgPdgC, fgX4, genie::PDGLibrary::Find(), fPdgCList, fRt, fTotSpectrum, GeneratePhi(), GenerateRt(), genie::PDGLibrary::Instance(), genie::kPdgAntiDarkMatter, genie::kPdgDarkMatter, LOG, genie::utils::print::P4AsShortString(), pINFO, ResetSelection(), SelectNeutrino(), and genie::utils::print::X4AsString().
|
private |
Definition at line 271 of file GCylindTH1Flux.cxx.
References genie::RandomGen::Instance(), genie::constants::kPi, and genie::RandomGen::RndFlux().
Referenced by GenerateNext().
|
private |
Definition at line 278 of file GCylindTH1Flux.cxx.
References fRtDep.
Referenced by GenerateNext().
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 111 of file GCylindTH1Flux.cxx.
|
inlinevirtual |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Implements genie::GFluxI.
Definition at line 65 of file GCylindTH1Flux.h.
|
private |
Definition at line 120 of file GCylindTH1Flux.cxx.
References fBeamSpot, fDirVec, fMaxEv, fPdgCList, fRt, fRtDep, fTotSpectrum, LOG, pNOTICE, ResetSelection(), and SetRtDependence().
|
inlinevirtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 58 of file GCylindTH1Flux.h.
References fMaxEv.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 62 of file GCylindTH1Flux.h.
References fgP4.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 60 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 63 of file GCylindTH1Flux.h.
References fgX4.
|
private |
Definition at line 137 of file GCylindTH1Flux.cxx.
References fgP4, fgPdgC, and fgX4.
Referenced by GenerateNext(), and Initialize().
|
private |
Definition at line 237 of file GCylindTH1Flux.cxx.
References fPdgCList, fSpectrum, genie::RandomGen::Instance(), LOG, pDEBUG, pERROR, and genie::RandomGen::RndFlux().
Referenced by GenerateNext().
void GCylindTH1Flux::SetBeamSpot | ( | const TVector3 & | spot | ) |
Definition at line 169 of file GCylindTH1Flux.cxx.
References fBeamSpot.
Referenced by main().
void GCylindTH1Flux::SetNuDirection | ( | const TVector3 & | direction | ) |
Definition at line 163 of file GCylindTH1Flux.cxx.
References fDirVec.
Referenced by main().
void GCylindTH1Flux::SetRtDependence | ( | string | rdep | ) |
Definition at line 207 of file GCylindTH1Flux.cxx.
Referenced by Initialize().
void GCylindTH1Flux::SetTransverseRadius | ( | double | Rt | ) |
Definition at line 175 of file GCylindTH1Flux.cxx.
References fRt, fRtDep, LOG, and pNOTICE.
Referenced by main().
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 61 of file GCylindTH1Flux.h.
|
private |
beam spot position
Definition at line 89 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateNext(), Initialize(), and SetBeamSpot().
|
private |
neutrino direction
Definition at line 88 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateNext(), Initialize(), and SetNuDirection().
|
private |
running generated nu 4-momentum
Definition at line 84 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Momentum(), and ResetSelection().
|
private |
running generated nu pdg-code
Definition at line 83 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), PdgCode(), and ResetSelection().
|
private |
running generated nu 4-position
Definition at line 85 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Position(), and ResetSelection().
|
private |
maximum energy
Definition at line 81 of file GCylindTH1Flux.h.
Referenced by AddEnergySpectrum(), Initialize(), and MaxEnergy().
|
private |
list of neutrino pdg-codes
Definition at line 82 of file GCylindTH1Flux.h.
Referenced by AddEnergySpectrum(), CleanUp(), FluxParticles(), GenerateNext(), Initialize(), and SelectNeutrino().
|
private |
transverse size of neutrino beam
Definition at line 90 of file GCylindTH1Flux.h.
Referenced by GenerateNext(), Initialize(), SetRtDependence(), and SetTransverseRadius().
|
private |
transverse radius dependence
Definition at line 91 of file GCylindTH1Flux.h.
Referenced by CleanUp(), GenerateRt(), Initialize(), SetRtDependence(), and SetTransverseRadius().
|
private |
flux = f(Ev), 1/neutrino species
Definition at line 86 of file GCylindTH1Flux.h.
Referenced by AddAllFluxes(), AddEnergySpectrum(), CleanUp(), and SelectNeutrino().
|
private |
combined flux = f(Ev)
Definition at line 87 of file GCylindTH1Flux.h.
Referenced by AddAllFluxes(), CleanUp(), GenerateNext(), and Initialize().