39 using std::ostringstream;
41 using namespace genie;
80 LOG(
"RESSelector",
pNOTICE) <<
"Selecting a baryon resonance";
106 vector<double> xsec_vec(nres);
108 for(
unsigned int ires = 0; ires < nres; ires++) {
125 <<
" would not conserve charge -- skipping it";
130 xsec_vec[ires] = xsec_sum;
133 <<
"Resonances (0->" << ires <<
"): " 134 <<
"Sum{ BW(W) * d^2xsec(E,W,Q^2)/dWd*Q^2 } = " << xsec_sum;
146 double R = xsec_sum * rnd->
RndGen().Rndm();
150 for(
unsigned int ires = 0; ires < nres; ires++) {
152 <<
"SUM-XSEC(0->" << ires <<
") = " << xsec_vec[ires];
154 if(R < xsec_vec[ires]) {
161 LOG(
"RESSelector",
pERROR) <<
"** Failed to select a resonance";
177 <<
"Adding RES with PDGC = " << pdgc <<
", Q = " << charge;
184 pdgc, ist, mom,-1,-1,-1, p4.Px(),p4.Py(),p4.Pz(),p4.E(), 0,0,0,0);
202 string resonances =
"";
203 this->
GetParam(
"ResonanceNameList", resonances);
204 SLOG(
"RESSelector",
pDEBUG) <<
"Resonance list: " << resonances;
bool IsDelta(Resonance_t res)
is it a Delta resonance?
Cross Section Calculation Interface.
THE MAIN GENIE PROJECT NAMESPACE
Resonance_t SelectResonance(GHepRecord *event_rec) const
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
virtual Interaction * Summary(void) const
static RandomGen * Instance()
Access instance.
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
enum genie::EGHepStatus GHepStatus_t
void DecodeFromNameList(string list, string delimiter=",")
Defines the EventGeneratorI interface.
virtual int HitNucleonPosition(void) const
enum genie::EResonance Resonance_t
A singleton holding random number generator classes. All random number generation in GENIE should tak...
unsigned int NResonances(void) const
void SetResonance(Resonance_t res)
Summary information for an interaction.
void UseSelectedKinematics(void)
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -> PDG code
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void ProcessEventRecord(GHepRecord *event_rec) const
virtual void Configure(const Registry &config)
Resonance_t Resonance(void) const
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
XclsTag * ExclTagPtr(void) const
static RunningThreadInfo * Instance(void)
void AddResonance(GHepRecord *event_rec) const
A registry. Provides the container for algorithm configuration parameters.
const XclsTag & ExclTag(void) const
int ResonanceCharge(GHepRecord *event_rec) const
TRandom3 & RndGen(void) const
rnd number generator for generic usage
assert(nhit_max >=nhit_nbins)
virtual void AddParticle(const GHepParticle &p)
const char * AsString(Resonance_t res)
resonance id -> string
Abstract class. Is used to pass some commonly recurring methods to all concrete implementations of th...
void ClearRunningValues(void)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const EventGeneratorI * RunningThread(void)
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
GENIE's GHEP MC event record.
Keep info on the event generation thread currently on charge. This is used so that event generation m...
BaryonResList fResList
baryon resonances taken into account
void Configure(const Registry &config)
const UInt_t kISkipProcessChk
if set, skip process validity checks
Resonance_t ResonanceId(unsigned int ires) const