24 #define LOG_BEGIN(a,b) LOG(a,b)
130 "No GenerateWeighted(bool gen_weighted) method implemented for " <<
131 "gen_weighted: " << gen_weighted;
164 for (
size_t indx = 0; indx <
fNPDGOut; ++indx ) {
168 sumprob +=
fProb[indx];
170 if ( ! isset &&
fRndm < sumprob ) {
185 <<
" fRealGFluxI is a \""
190 <<
" fRealGFluxI is not initialized" <<
LOG_END;
194 <<
" fFlavorMixer is a \""
199 <<
" fFlavorMixer is not initialized" <<
LOG_END;
206 <<
"PDG List after mixing (n=" <<
fNPDGOut <<
")"
221 for (
size_t indx = 0; indx <
fNPDGOut; ++indx ) {
223 <<
" [" << indx <<
"] "
226 <<
" p = " << std::setw(10) <<
fProb[indx]
long int Index(void)
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current ent...
void Clear(Option_t *opt)
reset state variables based on opt
static RandomGen * Instance()
Access instance.
A GENIE flux driver using a simple ntuple format.
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
GSimpleNtpFlux * fGSimpleFlux
ref to avoid repeat dynamic_cast
void PrintState(bool verbose=true)
double fEnergy
current neutrino's energy
double fDistance
current neutrino's travel distance
int fPdgCMixed
current neutrino's new flavor
GFluxI * AdoptFluxGenerator(GFluxI *generator)
return previous
GFluxI * fRealGFluxI
actual flux generator
int fPdgCGenerated
current neutrino's original flavor
PDGCodeList fPDGListMixed
possible flavors after mixing
std::vector< double > fProb
individual transition probs
virtual double Probability(int pdg_initial, int pdg_final, double energy, double dist)=0
virtual long int Index(void)=0
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current ent...
A GENIE flux driver encapsulating the NuMI neutrino flux. It reads-in the official GNUMI neutrino flu...
double fRndm
random # used to make choice
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
GFlavorMixerI * AdoptFlavorMixer(GFlavorMixerI *mixer)
return previous
GENIE interface for flavor modification.
double fBaselineDist
travel dist for mixing (if flux doesn't support GetDecayDist())
size_t fNPDGOut
of possible output flavors
GNuMIFlux * fGNuMIFlux
ref to avoid repeat dynamic_cast
virtual void Clear(Option_t *opt)=0
reset state variables based on opt
virtual bool GenerateNext(void)=0
generate the next flux neutrino (return false in err)
double GetDecayDist() const
dist (user units) from dk to current pos
virtual const PDGCodeList & FluxParticles(void)=0
declare list of flux neutrinos that can be generated (for init. purposes)
int ChooseFlavor(int pdg_init, double energy, double dist)
virtual int PdgCode(void)=0
returns the flux neutrino pdg code
virtual const TLorentzVector & Momentum(void)=0
returns the flux neutrino 4-momentum
GFlavorMixerI * fFlavorMixer
flavor modification schema
const PDGCodeList & FluxParticles(void)
declare list of flux neutrinos that can be generated (for init. purposes)
double GetDecayDist() const
dist (user units) from dk to current pos
TRandom3 & RndFlux(void) const
rnd number generator used by flux drivers
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
std::vector< double > fSumProb
cummulative probability
void push_back(int pdg_code)
PDGCodeList fPDGListGenerator
possible flavors from generator
GENIE Interface for user-defined flux classes.