23 #ifndef _SPP_CHANNEL_H_
24 #define _SPP_CHANNEL_H_
28 #include <TDecayChannel.h>
40 using namespace genie::constants;
98 default :
return "Unknown";
break;
125 default :
return 0;
break;
152 default :
return 0;
break;
179 default :
return 0;
break;
206 default :
return 0;
break;
233 default :
return 0;
break;
245 double iw_1_3 = 1./3;
246 double iw_2_3 = 2./3;
274 default :
return 0;
break;
362 static std::map<Resonance_t, double> cache ;
364 auto it = cache.find( res ) ;
365 if ( it != cache.end() ) {
374 TParticlePDG * res_pdg = pdglib->
Find( pdg );
377 for (
int nch = 0; nch < res_pdg->NDecayChannels(); nch++)
379 TDecayChannel * ch = res_pdg->DecayChannel(nch);
380 if (ch->NDaughters() == 2)
382 int first_daughter_pdg = ch->DaughterPdgCode (0);
383 int second_daughter_pdg = ch->DaughterPdgCode (1);
387 BR += ch->BranchingRatio();
397 LOG(
"SppChannel",
pFATAL) <<
"Unknown resonance " << res;
419 bool fs_pi_plus = ( xcls_tag.
NPiPlus() == 1 );
420 bool fs_pi_minus = ( xcls_tag.
NPiMinus() == 1 );
421 bool fs_pi_0 = ( xcls_tag.
NPi0() == 1 );
422 bool fs_p = ( xcls_tag.
NProtons() == 1 );
423 bool fs_n = ( xcls_tag.
NNeutrons() == 1 );
436 }
else if ( proc_info.
IsWeakNC() ) {
451 }
else if ( proc_info.
IsWeakNC() ) {
467 #endif // _SPP_CHANNEL_H_
bool IsDelta(Resonance_t res)
is it a Delta resonance?
static const double kSqrt3
static SppChannel_t FromInteraction(const Interaction *interaction)
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
int HitNucPdg(void) const
Enumeration of single pion production channels.
int NNeutrons(void) const
static double Isospin1Coefficients(SppChannel_t channel)
static int FinStateNucleon(SppChannel_t channel)
static const double k1_Sqrt3
static double IsospinWeight(SppChannel_t channel, Resonance_t res)
enum genie::EResonance Resonance_t
Contains minimal information for tagging exclusive processes.
enum genie::ESppChannel SppChannel_t
static string AsString(SppChannel_t channel)
Summary information for an interaction.
static constexpr double second
bool IsWeakNC(void) const
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...
static int ResonanceCharge(SppChannel_t channel)
static int InitStateNucleon(SppChannel_t channel)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsAntiNeutrino(int pdgc)
int NNucleons(void) const
static int FinStatePion(SppChannel_t channel)
static double Isospin3Coefficients(SppChannel_t channel)
static PDGLibrary * Instance(void)
Singleton class to load & serve a TDatabasePDG.
const XclsTag & ExclTag(void) const
bool IsNeutronOrProton(int pdgc)
static const double kSqrt2_3
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
TParticlePDG * Find(int pdgc, bool must_exist=true)
const Target & Tgt(void) const
bool IsSinglePion(void) const
static double BranchingRatio(Resonance_t res)
static int FinStateIsospin(SppChannel_t channel)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Initial State information.