GENIEGenerator
|
A simple GENIE flux driver for neutrinos following a power law spectrum. Can handle a mix of neutrinos with their corresponding weight. More...
#include <GPowerLawFlux.h>
Public Member Functions | |
GPowerLawFlux () | |
GPowerLawFlux (double alpha, double emin, double emax, int pdg) | |
GPowerLawFlux (double alpha, double emin, double emax, const map< int, double > &numap) | |
~GPowerLawFlux () | |
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... | |
void | SetDirectionCos (double dx, double dy, double dz) |
void | SetRayOrigin (double x, double y, double z) |
void | SetNuDirection (const TVector3 &direction) |
void | SetBeamSpot (const TVector3 &spot) |
void | Initialize (double alpha, double emin, double emax, int pdg) |
void | Initialize (double alpha, double emin, double emax, const map< int, double > &numap) |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
Private Member Functions | |
void | CleanUp (void) |
Private Attributes | |
double | fSpectralIndex |
spectral index (E^{-alpha}) More... | |
double | fMinEv |
minimum energy More... | |
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... | |
map< int, double > | fProb |
cumulative probability of neutrino types More... | |
double | fProbMax |
Additional Inherited Members | |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
A simple GENIE flux driver for neutrinos following a power law spectrum. Can handle a mix of neutrinos with their corresponding weight.
Definition at line 36 of file GPowerLawFlux.h.
GPowerLawFlux::GPowerLawFlux | ( | ) |
Definition at line 28 of file GPowerLawFlux.cxx.
GPowerLawFlux::GPowerLawFlux | ( | double | alpha, |
double | emin, | ||
double | emax, | ||
int | pdg | ||
) |
Definition at line 35 of file GPowerLawFlux.cxx.
References Initialize().
GPowerLawFlux::GPowerLawFlux | ( | double | alpha, |
double | emin, | ||
double | emax, | ||
const map< int, double > & | numap | ||
) |
Definition at line 41 of file GPowerLawFlux.cxx.
References Initialize().
GPowerLawFlux::~GPowerLawFlux | ( | ) |
|
private |
Definition at line 144 of file GPowerLawFlux.cxx.
References fPdgCList, LOG, and pNOTICE.
Referenced by ~GPowerLawFlux().
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 87 of file GPowerLawFlux.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 52 of file GPowerLawFlux.h.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 45 of file GPowerLawFlux.h.
References fPdgCList.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 53 of file GPowerLawFlux.cxx.
References fgP4, fgPdgC, fgX4, fMaxEv, fMinEv, fProb, fProbMax, fSpectralIndex, genie::RandomGen::Instance(), LOG, genie::utils::print::P4AsShortString(), pINFO, genie::RandomGen::RndFlux(), and genie::utils::print::X4AsString().
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 95 of file GPowerLawFlux.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 53 of file GPowerLawFlux.h.
void GPowerLawFlux::Initialize | ( | double | alpha, |
double | emin, | ||
double | emax, | ||
int | pdg | ||
) |
Definition at line 104 of file GPowerLawFlux.cxx.
Referenced by GPowerLawFlux().
void GPowerLawFlux::Initialize | ( | double | alpha, |
double | emin, | ||
double | emax, | ||
const map< int, double > & | numap | ||
) |
Definition at line 112 of file GPowerLawFlux.cxx.
References fgPdgC, fgX4, fMaxEv, fMinEv, fPdgCList, fProb, fProbMax, fSpectralIndex, LOG, pNOTICE, and genie::PDGCodeList::push_back().
|
inlinevirtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 46 of file GPowerLawFlux.h.
References fMaxEv.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 50 of file GPowerLawFlux.h.
References fgP4.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 48 of file GPowerLawFlux.h.
References fgPdgC.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 51 of file GPowerLawFlux.h.
References fgX4.
void GPowerLawFlux::SetBeamSpot | ( | const TVector3 & | spot | ) |
Definition at line 174 of file GPowerLawFlux.cxx.
References SetRayOrigin().
void GPowerLawFlux::SetDirectionCos | ( | double | dx, |
double | dy, | ||
double | dz | ||
) |
Definition at line 151 of file GPowerLawFlux.cxx.
References fgP4, LOG, genie::utils::print::P3AsString(), and pNOTICE.
Referenced by SetNuDirection().
void GPowerLawFlux::SetNuDirection | ( | const TVector3 & | direction | ) |
Definition at line 169 of file GPowerLawFlux.cxx.
References SetDirectionCos().
void GPowerLawFlux::SetRayOrigin | ( | double | x, |
double | y, | ||
double | z | ||
) |
Definition at line 161 of file GPowerLawFlux.cxx.
References fgX4, LOG, pNOTICE, and genie::utils::print::Vec3AsString().
Referenced by SetBeamSpot().
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 49 of file GPowerLawFlux.h.
|
private |
running generated nu 4-momentum
Definition at line 79 of file GPowerLawFlux.h.
Referenced by GenerateNext(), Momentum(), and SetDirectionCos().
|
private |
running generated nu pdg-code
Definition at line 78 of file GPowerLawFlux.h.
Referenced by GenerateNext(), Initialize(), and PdgCode().
|
private |
running generated nu 4-position
Definition at line 80 of file GPowerLawFlux.h.
Referenced by GenerateNext(), Initialize(), Position(), and SetRayOrigin().
|
private |
maximum energy
Definition at line 76 of file GPowerLawFlux.h.
Referenced by GenerateNext(), Initialize(), and MaxEnergy().
|
private |
minimum energy
Definition at line 75 of file GPowerLawFlux.h.
Referenced by GenerateNext(), and Initialize().
|
private |
list of neutrino pdg-codes
Definition at line 77 of file GPowerLawFlux.h.
Referenced by CleanUp(), FluxParticles(), and Initialize().
|
private |
cumulative probability of neutrino types
Definition at line 81 of file GPowerLawFlux.h.
Referenced by GenerateNext(), and Initialize().
|
private |
Definition at line 82 of file GPowerLawFlux.h.
Referenced by GenerateNext(), and Initialize().
|
private |
spectral index (E^{-alpha})
Definition at line 74 of file GPowerLawFlux.h.
Referenced by GenerateNext(), and Initialize().