29using std::ostringstream;
70 LOG(
"RESSelector",
pNOTICE) <<
"Selecting a baryon resonance";
95 unsigned int nres =
fResList.NResonances();
96 vector<double> xsec_vec(nres);
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;
196 fResList.DecodeFromNameList(resonances);
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
Defines the EventGeneratorI interface.
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
GENIE's GHEP MC event record.
virtual Interaction * Summary(void) const
virtual void AddParticle(const GHepParticle &p)
virtual int HitNucleonPosition(void) const
TLorentzVector Hadronic4pLAB(GHepRecord *event_rec) const
int ResonanceCharge(GHepRecord *event_rec) const
HadronicSystemGenerator()
Summary information for an interaction.
const XclsTag & ExclTag(void) const
XclsTag * ExclTagPtr(void) const
Kinematics * KinePtr(void) const
void ClearRunningValues(void)
void UseSelectedKinematics(void)
Resonance_t SelectResonance(GHepRecord *event_rec) const
BaryonResList fResList
baryon resonances taken into account
void ProcessEventRecord(GHepRecord *event_rec) const
void AddResonance(GHepRecord *event_rec) const
void Configure(const Registry &config)
A singleton holding random number generator classes. All random number generation in GENIE should tak...
static RandomGen * Instance()
Access instance.
TRandom3 & RndGen(void) const
rnd number generator for generic usage
A registry. Provides the container for algorithm configuration parameters.
Keep info on the event generation thread currently on charge. This is used so that event generation m...
static RunningThreadInfo * Instance(void)
const EventGeneratorI * RunningThread(void)
Cross Section Calculation Interface.
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
void SetResonance(Resonance_t res)
Resonance_t Resonance(void) const
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -> PDG code
bool IsDelta(Resonance_t res)
is it a Delta resonance?
const char * AsString(Resonance_t res)
resonance id -> string
THE MAIN GENIE PROJECT NAMESPACE
@ kIStPreDecayResonantState
enum genie::EResonance Resonance_t
enum genie::EGHepStatus GHepStatus_t
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
const UInt_t kISkipProcessChk
if set, skip process validity checks