29 using std::ostringstream;
31 using namespace genie;
70 LOG(
"RESSelector",
pNOTICE) <<
"Selecting a baryon resonance";
98 for(
unsigned int ires = 0; ires < nres; ires++) {
115 <<
" would not conserve charge -- skipping it";
120 xsec_vec[ires] = xsec_sum;
123 <<
"Resonances (0->" << ires <<
"): " 124 <<
"Sum{ BW(W) * d^2xsec(E,W,Q^2)/dWd*Q^2 } = " << xsec_sum;
136 double R = xsec_sum * rnd->
RndGen().Rndm();
140 for(
unsigned int ires = 0; ires < nres; ires++) {
142 <<
"SUM-XSEC(0->" << ires <<
") = " << xsec_vec[ires];
144 if(R < xsec_vec[ires]) {
151 LOG(
"RESSelector",
pERROR) <<
"** Failed to select a resonance";
167 <<
"Adding RES with PDGC = " << pdgc <<
", Q = " << charge;
174 pdgc, ist, mom,-1,-1,-1, p4.Px(),p4.Py(),p4.Pz(),p4.E(), 0,0,0,0);
192 string resonances =
"";
193 this->
GetParam(
"ResonanceNameList", resonances);
194 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.
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
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
enum genie::EGHepStatus GHepStatus_t
Resonance_t ResonanceId(unsigned int ires) const