42 double Ev,
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;
69 <<
"Generated neutrino: "
70 <<
"\n pdg-code: " <<
fgPdgC
82 "No Clear(Option_t * opt) method implemented for opt: "<< opt;
90 "No GenerateWeighted(bool gen_weighted) method implemented for " <<
91 "gen_weighted: " << gen_weighted;
96 map<int,double> numap;
97 numap.insert( map<int, double>::value_type(
pdg, 1.) );
104 LOG(
"Flux",
pNOTICE) <<
"Initializing GMonoEnergeticFlux driver";
114 map<int,double>::const_iterator iter;
115 for(iter = numap.begin(); iter != numap.end(); ++iter) {
116 int nupdgc = iter->first;
117 double nuwgt = iter->second;
126 fgP4.SetPxPyPzE (0.,0.,Ev,Ev);
127 fgX4.SetXYZT (0.,0.,0.,0.);
139 TVector3 dircos1 = TVector3(dx,dy,dz).Unit();
143 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 monoenergetic neutrinos along the z direction. Can handle a mix of neu...
TLorentzVector fgX4
running generated nu 4-position
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
void SetNuDirection(const TVector3 &direction)
int fgPdgC
running generated nu pdg-code
void SetBeamSpot(const TVector3 &spot)
void Initialize(double Ev, int pdg)
double fMaxEv
maximum energy
TLorentzVector fgP4
running generated nu 4-momentum
void SetDirectionCos(double dx, double dy, double dz)
void Clear(Option_t *opt)
reset state variables based on opt
void SetRayOrigin(double x, double y, double z)
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
PDGCodeList * fPdgCList
list of neutrino pdg-codes
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