GENIE GFluxI adapter to allow flavor modification. More...
#include <GFluxBlender.h>
Public Member Functions | |
GFluxBlender () | |
~GFluxBlender () | |
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... | |
int | PdgCodeGenerated (void) |
returns the flux neutrino original pdg code More... | |
double | Energy (void) |
double | TravelDist (void) |
returns the distance used in the flavor mixing More... | |
void | SetBaselineDist (double dist) |
double | GetBaselineDist (void) |
GFluxI * | AdoptFluxGenerator (GFluxI *generator) |
return previous More... | |
GFlavorMixerI * | AdoptFlavorMixer (GFlavorMixerI *mixer) |
return previous More... | |
GFluxI * | GetFluxGenerator () |
access, not ownership More... | |
GFlavorMixerI * | GetFlavorMixer () |
access, not ownership More... | |
void | PrintConfig (void) |
void | PrintState (bool verbose=true) |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
Private Member Functions | |
int | ChooseFlavor (int pdg_init, double energy, double dist) |
Private Attributes | |
GFluxI * | fRealGFluxI |
actual flux generator More... | |
GNuMIFlux * | fGNuMIFlux |
ref to avoid repeat dynamic_cast More... | |
GSimpleNtpFlux * | fGSimpleFlux |
ref to avoid repeat dynamic_cast More... | |
GFlavorMixerI * | fFlavorMixer |
flavor modification schema More... | |
PDGCodeList | fPDGListGenerator |
possible flavors from generator More... | |
PDGCodeList | fPDGListMixed |
possible flavors after mixing More... | |
size_t | fNPDGOut |
of possible output flavorsMore... | |
double | fBaselineDist |
travel dist for mixing (if flux doesn't support GetDecayDist()) More... | |
double | fEnergy |
current neutrino's energy More... | |
double | fDistance |
current neutrino's travel distance More... | |
int | fPdgCGenerated |
current neutrino's original flavor More... | |
int | fPdgCMixed |
current neutrino's new flavor More... | |
std::vector< double > | fProb |
individual transition probs More... | |
std::vector< double > | fSumProb |
cummulative probability More... | |
double | fRndm |
random # used to make choice More... | |
Additional Inherited Members | |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
GENIE GFluxI adapter to allow flavor modification.
This adapter intervenes between the GENIE GMCJDriver class (MC job driver) and a concrete GFluxI flux generator, to allow user modification of the neutrino flavor. This modification could be a fixed "swap" or an energy and/or distance dependent (standard oscillations) one.
Because the GMCJDriver only queries the flavor of a generated neutrino once, prior to propagation through the geometry, this approach is not appropriate with use of an oscillatory model in situations where the flavor might change significantly over the scale of the geometry. In such cases one would have to generate with a fixed flavor (energy/distance independent) swap and reweight after the fact.
Do not use this as a means of selecting only certain flavor from flux generators that support other means (e.g. GNuMIFlux, GSimpleNtpFlux which have SetFluxParticles(PDGCodeList)) as those will be more efficient.
2010/12/22
Copyright (c) 2003-2020, The GENIE Collaboration for the full text of the license visit http://copyright.genie-mc.org
Definition at line 52 of file GFluxBlender.h.
genie::flux::GFluxBlender::GFluxBlender | ( | ) |
Definition at line 32 of file GFluxBlender.cxx.
genie::flux::GFluxBlender::~GFluxBlender | ( | ) |
Definition at line 48 of file GFluxBlender.cxx.
GFlavorMixerI * genie::flux::GFluxBlender::AdoptFlavorMixer | ( | GFlavorMixerI * | mixer | ) |
return previous
Definition at line 148 of file GFluxBlender.cxx.
return previous
Definition at line 134 of file GFluxBlender.cxx.
|
private |
Definition at line 156 of file GFluxBlender.cxx.
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 111 of file GFluxBlender.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 72 of file GFluxBlender.h.
|
inline |
Definition at line 81 of file GFluxBlender.h.
|
virtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Return (reference to) list of possible neutrinos after mixing. These are PDG code that might be interacted.
Implements genie::GFluxI.
Definition at line 55 of file GFluxBlender.cxx.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 84 of file GFluxBlender.cxx.
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 125 of file GFluxBlender.cxx.
|
inline |
Definition at line 90 of file GFluxBlender.h.
|
inline |
access, not ownership
Definition at line 98 of file GFluxBlender.h.
|
inline |
access, not ownership
Definition at line 97 of file GFluxBlender.h.
|
virtual |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Implements genie::GFluxI.
Definition at line 118 of file GFluxBlender.cxx.
|
inlinevirtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 66 of file GFluxBlender.h.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 70 of file GFluxBlender.h.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 68 of file GFluxBlender.h.
|
inline |
returns the flux neutrino original pdg code
Definition at line 80 of file GFluxBlender.h.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 71 of file GFluxBlender.h.
void genie::flux::GFluxBlender::PrintConfig | ( | void | ) |
Definition at line 180 of file GFluxBlender.cxx.
void genie::flux::GFluxBlender::PrintState | ( | bool | verbose = true | ) |
Definition at line 212 of file GFluxBlender.cxx.
|
inline |
Definition at line 89 of file GFluxBlender.h.
|
inline |
returns the distance used in the flavor mixing
Definition at line 82 of file GFluxBlender.h.
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 69 of file GFluxBlender.h.
|
private |
travel dist for mixing (if flux doesn't support GetDecayDist())
Definition at line 116 of file GFluxBlender.h.
|
private |
current neutrino's travel distance
Definition at line 119 of file GFluxBlender.h.
|
private |
current neutrino's energy
Definition at line 118 of file GFluxBlender.h.
|
private |
flavor modification schema
Definition at line 110 of file GFluxBlender.h.
|
private |
ref to avoid repeat dynamic_cast
Definition at line 107 of file GFluxBlender.h.
|
private |
ref to avoid repeat dynamic_cast
Definition at line 108 of file GFluxBlender.h.
|
private |
Definition at line 114 of file GFluxBlender.h.
|
private |
current neutrino's original flavor
Definition at line 120 of file GFluxBlender.h.
|
private |
current neutrino's new flavor
Definition at line 121 of file GFluxBlender.h.
|
private |
possible flavors from generator
Definition at line 112 of file GFluxBlender.h.
|
private |
possible flavors after mixing
Definition at line 113 of file GFluxBlender.h.
|
private |
individual transition probs
Definition at line 123 of file GFluxBlender.h.
|
private |
actual flux generator
Definition at line 106 of file GFluxBlender.h.
|
private |
random # used to make choice
Definition at line 125 of file GFluxBlender.h.
|
private |
cummulative probability
Definition at line 124 of file GFluxBlender.h.