GENIEGenerator
|
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.
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.
References fFlavorMixer, and fRealGFluxI.
GFlavorMixerI * genie::flux::GFluxBlender::AdoptFlavorMixer | ( | GFlavorMixerI * | mixer | ) |
return previous
Definition at line 148 of file GFluxBlender.cxx.
References fFlavorMixer.
return previous
Definition at line 134 of file GFluxBlender.cxx.
References fGNuMIFlux, fGSimpleFlux, FluxParticles(), fRealGFluxI, and generator().
|
private |
Definition at line 156 of file GFluxBlender.cxx.
References fFlavorMixer, fNPDGOut, fPDGListMixed, fProb, fRndm, fSumProb, genie::RandomGen::Instance(), genie::flux::GFlavorMixerI::Probability(), and genie::RandomGen::RndFlux().
Referenced by GenerateNext().
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 111 of file GFluxBlender.cxx.
References genie::GFluxI::Clear(), and fRealGFluxI.
|
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.
References genie::GFluxI::End(), and fRealGFluxI.
|
inline |
Definition at line 81 of file GFluxBlender.h.
References fEnergy.
|
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.
References fFlavorMixer, genie::GFluxI::FluxParticles(), fNPDGOut, fPDGListGenerator, fPDGListMixed, fProb, fRealGFluxI, fSumProb, genie::kPdgAntiNuE, genie::kPdgAntiNuMu, genie::kPdgAntiNuTau, genie::kPdgNuE, genie::kPdgNuMu, genie::kPdgNuTau, and genie::PDGCodeList::push_back().
Referenced by AdoptFluxGenerator().
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 84 of file GFluxBlender.cxx.
References ChooseFlavor(), fBaselineDist, fDistance, fEnergy, fFlavorMixer, fGNuMIFlux, fGSimpleFlux, fPdgCGenerated, fPdgCMixed, fRealGFluxI, genie::GFluxI::GenerateNext(), genie::flux::GSimpleNtpFlux::GetDecayDist(), genie::flux::GNuMIFlux::GetDecayDist(), genie::GFluxI::Momentum(), and genie::GFluxI::PdgCode().
|
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.
References fBaselineDist.
|
inline |
|
inline |
|
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.
References fRealGFluxI, and genie::GFluxI::Index().
|
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.
References fRealGFluxI, and genie::GFluxI::MaxEnergy().
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 70 of file GFluxBlender.h.
References fRealGFluxI, and genie::GFluxI::Momentum().
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 68 of file GFluxBlender.h.
References fPdgCMixed.
|
inline |
returns the flux neutrino original pdg code
Definition at line 80 of file GFluxBlender.h.
References fPdgCGenerated.
|
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.
References fRealGFluxI, and genie::GFluxI::Position().
void genie::flux::GFluxBlender::PrintConfig | ( | void | ) |
Definition at line 180 of file GFluxBlender.cxx.
References fBaselineDist, fFlavorMixer, fNPDGOut, fPDGListGenerator, fPDGListMixed, fRealGFluxI, LOG_BEGIN, LOG_END, and pINFO.
void genie::flux::GFluxBlender::PrintState | ( | bool | verbose = true | ) |
Definition at line 212 of file GFluxBlender.cxx.
References fDistance, fEnergy, fNPDGOut, fPdgCGenerated, fPdgCMixed, fPDGListMixed, fProb, fRndm, fSumProb, LOG_BEGIN, LOG_END, and pINFO.
|
inline |
Definition at line 89 of file GFluxBlender.h.
References fBaselineDist.
|
inline |
returns the distance used in the flavor mixing
Definition at line 82 of file GFluxBlender.h.
References fDistance.
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 69 of file GFluxBlender.h.
References fRealGFluxI, and genie::GFluxI::Weight().
|
private |
travel dist for mixing (if flux doesn't support GetDecayDist())
Definition at line 116 of file GFluxBlender.h.
Referenced by GenerateNext(), GetBaselineDist(), PrintConfig(), and SetBaselineDist().
|
private |
current neutrino's travel distance
Definition at line 119 of file GFluxBlender.h.
Referenced by GenerateNext(), PrintState(), and TravelDist().
|
private |
current neutrino's energy
Definition at line 118 of file GFluxBlender.h.
Referenced by Energy(), GenerateNext(), and PrintState().
|
private |
flavor modification schema
Definition at line 110 of file GFluxBlender.h.
Referenced by AdoptFlavorMixer(), ChooseFlavor(), FluxParticles(), GenerateNext(), GetFlavorMixer(), PrintConfig(), and ~GFluxBlender().
|
private |
ref to avoid repeat dynamic_cast
Definition at line 107 of file GFluxBlender.h.
Referenced by AdoptFluxGenerator(), and GenerateNext().
|
private |
ref to avoid repeat dynamic_cast
Definition at line 108 of file GFluxBlender.h.
Referenced by AdoptFluxGenerator(), and GenerateNext().
|
private |
Definition at line 114 of file GFluxBlender.h.
Referenced by ChooseFlavor(), FluxParticles(), PrintConfig(), and PrintState().
|
private |
current neutrino's original flavor
Definition at line 120 of file GFluxBlender.h.
Referenced by GenerateNext(), PdgCodeGenerated(), and PrintState().
|
private |
current neutrino's new flavor
Definition at line 121 of file GFluxBlender.h.
Referenced by GenerateNext(), PdgCode(), and PrintState().
|
private |
possible flavors from generator
Definition at line 112 of file GFluxBlender.h.
Referenced by FluxParticles(), and PrintConfig().
|
private |
possible flavors after mixing
Definition at line 113 of file GFluxBlender.h.
Referenced by ChooseFlavor(), FluxParticles(), PrintConfig(), and PrintState().
|
private |
individual transition probs
Definition at line 123 of file GFluxBlender.h.
Referenced by ChooseFlavor(), FluxParticles(), and PrintState().
|
private |
actual flux generator
Definition at line 106 of file GFluxBlender.h.
Referenced by AdoptFluxGenerator(), Clear(), End(), FluxParticles(), GenerateNext(), GetFluxGenerator(), Index(), MaxEnergy(), Momentum(), Position(), PrintConfig(), Weight(), and ~GFluxBlender().
|
private |
random # used to make choice
Definition at line 125 of file GFluxBlender.h.
Referenced by ChooseFlavor(), and PrintState().
|
private |
cummulative probability
Definition at line 124 of file GFluxBlender.h.
Referenced by ChooseFlavor(), FluxParticles(), and PrintState().