54 GMonoEnergeticFlux::GMonoEnergeticFlux(
double Ev,
int pdg) :
61 double Ev,
const map<int,double> & numap) :
77 map<int,double>::const_iterator iter;
78 for(iter =
fProb.begin(); iter !=
fProb.end(); ++iter) {
79 int nupdgc = iter->first;
80 double prob = iter->second;
88 <<
"Generated neutrino: " 89 <<
"\n pdg-code: " <<
fgPdgC 101 "No Clear(Option_t * opt) method implemented for opt: "<<
opt;
109 "No GenerateWeighted(bool gen_weighted) method implemented for " <<
110 "gen_weighted: " << gen_weighted;
115 map<int,double> numap;
116 numap.insert( map<int, double>::value_type(pdg, 1.) );
123 LOG(
"Flux",
pNOTICE) <<
"Initializing GMonoEnergeticFlux driver";
133 map<int,double>::const_iterator iter;
134 for(iter = numap.begin(); iter != numap.end(); ++iter) {
135 int nupdgc = iter->first;
136 double nuwgt = iter->second;
145 fgP4.SetPxPyPzE (0.,0.,Ev,Ev);
146 fgX4.SetXYZT (0.,0.,0.,0.);
158 TVector3 dircos1 = TVector3(dx,dy,dz).Unit();
162 fgP4.SetVect(E*dircos1);
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
A class for generating concrete GFluxI derived classes based on the factory pattern. This code supplies a CPP macro which allows the classes to self-register and thus no modification of this class is needed in order to expand the list of classes it knows about.
string P4AsShortString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE
static RandomGen * Instance()
Access instance.
int fgPdgC
running generated nu pdg-code
TLorentzVector fgP4
running generated nu 4-momentum
string P3AsString(const TVector3 *vec)
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
A singleton holding random number generator classes. All random number generation in GENIE should tak...
void Initialize(double Ev, int pdg)
void SetNuDirection(const TVector3 &direction)
void SetDirectionCos(double dx, double dy, double dz)
void SetRayOrigin(double x, double y, double z)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
PDGCodeList * fPdgCList
list of neutrino pdg-codes
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
void SetBeamSpot(const TVector3 &spot)
TRandom3 & RndFlux(void) const
rnd number generator used by flux drivers
string X4AsString(const TLorentzVector *x)
double fMaxEv
maximum energy
void Clear(Option_t *opt)
reset state variables based on opt
#define FLUXDRIVERREG4(_nsa, _nsb, _name, _fqname)
string Vec3AsString(const TVector3 *vec)
void push_back(int pdg_code)
GENIE Interface for user-defined flux classes.