42 double alpha,
double emin,
double emax,
const map<int,double> & numap) :
58 map<int,double>::const_iterator iter;
59 for(iter =
fProb.begin(); iter !=
fProb.end(); ++iter) {
60 int nupdgc = iter->first;
61 double prob = iter->second;
76 fgP4.SetPxPyPzE (0.,0.,Ev,Ev);
79 <<
"Generated neutrino: "
80 <<
"\n pdg-code: " <<
fgPdgC
92 "No Clear(Option_t * opt) method implemented for opt: "<< opt;
100 "No GenerateWeighted(bool gen_weighted) method implemented for " <<
101 "gen_weighted: " << gen_weighted;
106 map<int,double> numap;
107 numap.insert( map<int, double>::value_type(
pdg, 1.) );
114 LOG(
"Flux",
pNOTICE) <<
"Initializing GPowerLawFlux driver";
129 map<int,double>::const_iterator iter;
130 for(iter = numap.begin(); iter != numap.end(); ++iter) {
131 int nupdgc = iter->first;
132 double nuwgt = iter->second;
141 fgX4.SetXYZT (0.,0.,0.,0.);
153 TVector3 dircos1 = TVector3(dx,dy,dz).Unit();
157 fgP4.SetVect(E*dircos1);
#define FLUXDRIVERREG4(_nsa, _nsb, _name, _fqname)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
A singleton holding random number generator classes. All random number generation in GENIE should tak...
static RandomGen * Instance()
Access instance.
TRandom3 & RndFlux(void) const
rnd number generator used by flux drivers
A simple GENIE flux driver for neutrinos following a power law spectrum. Can handle a mix of neutrino...
void Initialize(double alpha, double emin, double emax, int pdg)
double fMaxEv
maximum energy
void SetNuDirection(const TVector3 &direction)
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
double fSpectralIndex
spectral index (E^{-alpha})
TLorentzVector fgX4
running generated nu 4-position
void SetDirectionCos(double dx, double dy, double dz)
TLorentzVector fgP4
running generated nu 4-momentum
int fgPdgC
running generated nu pdg-code
map< int, double > fProb
cumulative probability of neutrino types
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
void SetRayOrigin(double x, double y, double z)
void SetBeamSpot(const TVector3 &spot)
PDGCodeList * fPdgCList
list of neutrino pdg-codes
void Clear(Option_t *opt)
reset state variables based on opt
double fMinEv
minimum energy
Utilities for improving the code readability when using PDG codes.
string Vec3AsString(const TVector3 *vec)
string X4AsString(const TLorentzVector *x)
string P3AsString(const TVector3 *vec)
string P4AsShortString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE