23 using namespace
genie;
24 using namespace genie::constants;
25 using namespace genie::flux;
35 GMonoEnergeticFlux::GMonoEnergeticFlux(
double Ev,
int pdg) :
42 double Ev,
const map<int,double> & numap) :
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";
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);
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
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.