GENIEGenerator
|
A simple GENIE flux driver for monoenergetic neutrinos along the z direction. Can handle a mix of neutrinos with their corresponding weight. This trivial flux driver was added in so that single energy neutrinos can be easily used with the event generation driver that can handle a target mix or detailed geometries. More...
#include <GMonoEnergeticFlux.h>
Public Member Functions | |
GMonoEnergeticFlux () | |
GMonoEnergeticFlux (double Ev, int pdg) | |
GMonoEnergeticFlux (double Ev, const map< int, double > &numap) | |
~GMonoEnergeticFlux () | |
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 Ev, int pdg) |
void | Initialize (double Ev, const map< int, double > &numap) |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
Private Member Functions | |
void | CleanUp (void) |
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... | |
map< int, double > | fProb |
double | fProbMax |
Additional Inherited Members | |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
A simple GENIE flux driver for monoenergetic neutrinos along the z direction. Can handle a mix of neutrinos with their corresponding weight. This trivial flux driver was added in so that single energy neutrinos can be easily used with the event generation driver that can handle a target mix or detailed geometries.
Definition at line 38 of file GMonoEnergeticFlux.h.
GMonoEnergeticFlux::GMonoEnergeticFlux | ( | ) |
Definition at line 28 of file GMonoEnergeticFlux.cxx.
GMonoEnergeticFlux::GMonoEnergeticFlux | ( | double | Ev, |
int | pdg | ||
) |
Definition at line 35 of file GMonoEnergeticFlux.cxx.
References Initialize().
GMonoEnergeticFlux::GMonoEnergeticFlux | ( | double | Ev, |
const map< int, double > & | numap | ||
) |
Definition at line 41 of file GMonoEnergeticFlux.cxx.
References Initialize().
GMonoEnergeticFlux::~GMonoEnergeticFlux | ( | ) |
|
private |
Definition at line 130 of file GMonoEnergeticFlux.cxx.
References fPdgCList, LOG, and pNOTICE.
Referenced by ~GMonoEnergeticFlux().
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 77 of file GMonoEnergeticFlux.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 54 of file GMonoEnergeticFlux.h.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 47 of file GMonoEnergeticFlux.h.
References fPdgCList.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 53 of file GMonoEnergeticFlux.cxx.
References fgP4, fgPdgC, fgX4, fProb, fProbMax, 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 85 of file GMonoEnergeticFlux.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 55 of file GMonoEnergeticFlux.h.
void GMonoEnergeticFlux::Initialize | ( | double | Ev, |
int | pdg | ||
) |
Definition at line 94 of file GMonoEnergeticFlux.cxx.
Referenced by GMonoEnergeticFlux().
void GMonoEnergeticFlux::Initialize | ( | double | Ev, |
const map< int, double > & | numap | ||
) |
Definition at line 102 of file GMonoEnergeticFlux.cxx.
References fgP4, fgPdgC, fgX4, fMaxEv, fPdgCList, fProb, fProbMax, 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 48 of file GMonoEnergeticFlux.h.
References fMaxEv.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 52 of file GMonoEnergeticFlux.h.
References fgP4.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 50 of file GMonoEnergeticFlux.h.
References fgPdgC.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 53 of file GMonoEnergeticFlux.h.
References fgX4.
void GMonoEnergeticFlux::SetBeamSpot | ( | const TVector3 & | spot | ) |
Definition at line 160 of file GMonoEnergeticFlux.cxx.
References SetRayOrigin().
void GMonoEnergeticFlux::SetDirectionCos | ( | double | dx, |
double | dy, | ||
double | dz | ||
) |
Definition at line 137 of file GMonoEnergeticFlux.cxx.
References fgP4, LOG, genie::utils::print::P3AsString(), and pNOTICE.
Referenced by SetNuDirection().
void GMonoEnergeticFlux::SetNuDirection | ( | const TVector3 & | direction | ) |
Definition at line 155 of file GMonoEnergeticFlux.cxx.
References SetDirectionCos().
void GMonoEnergeticFlux::SetRayOrigin | ( | double | x, |
double | y, | ||
double | z | ||
) |
Definition at line 147 of file GMonoEnergeticFlux.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 51 of file GMonoEnergeticFlux.h.
|
private |
running generated nu 4-momentum
Definition at line 79 of file GMonoEnergeticFlux.h.
Referenced by GenerateNext(), Initialize(), Momentum(), and SetDirectionCos().
|
private |
running generated nu pdg-code
Definition at line 78 of file GMonoEnergeticFlux.h.
Referenced by GenerateNext(), Initialize(), and PdgCode().
|
private |
running generated nu 4-position
Definition at line 80 of file GMonoEnergeticFlux.h.
Referenced by GenerateNext(), Initialize(), Position(), and SetRayOrigin().
|
private |
maximum energy
Definition at line 76 of file GMonoEnergeticFlux.h.
Referenced by Initialize(), and MaxEnergy().
|
private |
list of neutrino pdg-codes
Definition at line 77 of file GMonoEnergeticFlux.h.
Referenced by CleanUp(), FluxParticles(), and Initialize().
|
private |
Definition at line 81 of file GMonoEnergeticFlux.h.
Referenced by GenerateNext(), and Initialize().
|
private |
Definition at line 82 of file GMonoEnergeticFlux.h.
Referenced by GenerateNext(), and Initialize().