GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
genie::utils::res Namespace Reference

Baryon Resonance utilities. More...

Functions

const char * AsString (Resonance_t res)
 resonance id -> string More...
 
Resonance_t FromString (const char *res)
 string -> resonance id More...
 
int PdgCode (Resonance_t res, int Q)
 (resonance id, charge) -> PDG code More...
 
Resonance_t FromPdgCode (int pdgc)
 PDG code -> resonance id. More...
 
bool IsBaryonResonance (int pdgc)
 is input a baryon resonance? More...
 
bool IsDelta (Resonance_t res)
 is it a Delta resonance? More...
 
bool IsN (Resonance_t res)
 is it an N resonance? More...
 
double Mass (Resonance_t res)
 resonance mass (GeV) More...
 
double Width (Resonance_t res)
 resonance width (GeV) More...
 
double BWNorm (Resonance_t res, double N0ResMaxNWidths=6, double N2ResMaxNWidths=2, double GnResMaxNWidths=4)
 breit-wigner normalization factor More...
 
int OrbitalAngularMom (Resonance_t res)
 orbital angular momentum More...
 
int ResonanceIndex (Resonance_t res)
 resonance idx, quark model / SU(6) More...
 
int Isospin (Resonance_t res)
 
int AngularMom (Resonance_t res)
 
int Cjsgn_plus (Resonance_t res)
 
int Dsgn (Resonance_t res)
 

Detailed Description

Baryon Resonance utilities.

Authors
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Updates were made by Igor Kakorin kakor.nosp@m.in@j.nosp@m.inr.r.nosp@m.u Joint Institute for Nuclear Research
Created:
November 25, 2004

November 12, 2019 Added extra functions for MK model.
Updated resonance masses and widths according to PDG-2018.
Added previously missing resonances P33(1600) and F17(1970).
Now mass and widths are taken from PDG table via TDatabasePDG and cached.

License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Function Documentation

int genie::utils::res::AngularMom ( Resonance_t  res)

Definition at line 622 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by genie::MKSPPPXSec2020::XSec().

623 {
624  switch(res) {
625  case kP33_1232: return 3; break;
626  case kS11_1535: return 1; break;
627  case kD13_1520: return 3; break;
628  case kS11_1650: return 1; break;
629  case kD13_1700: return 3; break;
630  case kD15_1675: return 5; break;
631  case kS31_1620: return 1; break;
632  case kD33_1700: return 3; break;
633  case kP11_1440: return 1; break;
634  case kP33_1600: return 3; break;
635  case kP13_1720: return 3; break;
636  case kF15_1680: return 5; break;
637  case kP31_1910: return 1; break;
638  case kP33_1920: return 3; break;
639  case kF35_1905: return 5; break;
640  case kF37_1950: return 7; break;
641  case kP11_1710: return 1; break;
642  case kF17_1970: return 7; break;
643  default:
644  // should not be here - meaningless to return anything
645  gAbortingInErr = true;
646  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
647  exit(1);
648  }
649  return 0;
650 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
const char * genie::utils::res::AsString ( Resonance_t  res)

resonance id -> string

Definition at line 35 of file BaryonResUtils.cxx.

References genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, and genie::kS31_1620.

Referenced by genie::ReinSehgalRESXSecWithCache::CacheBranchName(), genie::ReinSehgalRESXSecWithCacheFast::CacheBranchName(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), main(), genie::BaryonResList::Print(), genie::XclsTag::Print(), genie::BaryonResList::ResonanceName(), SaveGraphsToRootFile(), genie::RSPPResonanceSelector::SelectResonance(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), genie::ReinSehgalSPPPXSec::XSec(), and genie::ReinSehgalSPPPXSec::XSecNRES().

36 {
37  switch(res) {
38  case kP33_1232 : return "P33(1232)" ; break;
39  case kS11_1535 : return "S11(1535)" ; break;
40  case kD13_1520 : return "D13(1520)" ; break;
41  case kS11_1650 : return "S11(1650)" ; break;
42  case kD13_1700 : return "D13(1700)" ; break;
43  case kD15_1675 : return "D15(1675)" ; break;
44  case kS31_1620 : return "S31(1620)" ; break;
45  case kD33_1700 : return "D33(1700)" ; break;
46  case kP11_1440 : return "P11(1440)" ; break;
47  case kP33_1600 : return "P33(1600)" ; break;
48  case kP13_1720 : return "P13(1720)" ; break;
49  case kF15_1680 : return "F15(1680)" ; break;
50  case kP31_1910 : return "P31(1910)" ; break;
51  case kP33_1920 : return "P33(1920)" ; break;
52  case kF35_1905 : return "F35(1905)" ; break;
53  case kF37_1950 : return "F37(1950)" ; break;
54  case kP11_1710 : return "P11(1710)" ; break;
55  case kF17_1970 : return "F17(1970)" ; break;
56  default: break;
57  }
58  return "unknown resonance!";
59 }
double genie::utils::res::BWNorm ( Resonance_t  res,
double  N0ResMaxNWidths = 6,
double  N2ResMaxNWidths = 2,
double  GnResMaxNWidths = 4 
)

breit-wigner normalization factor

Definition at line 490 of file BaryonResUtils.cxx.

References genie::utils::bwfunc::BreitWignerL(), genie::kNoResonance, Mass(), OrbitalAngularMom(), ResonanceIndex(), genie::units::second, genie::utils::kinematics::W(), and Width().

Referenced by main(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

491  {
492 
493  if (res == kNoResonance)
494  return -1;
495 
496  static std::map<Resonance_t, double> cache ;
497 
498  auto it = cache.find( res ) ;
499  if ( it != cache.end() )
500  return it -> second ;
501 
502  // Get baryon resonance parameters
503  int IR = utils::res::ResonanceIndex (res);
504  int LR = utils::res::OrbitalAngularMom (res);
505  double MR = utils::res::Mass (res);
506  double WR = utils::res::Width (res);
507 
508  // imported part of code from src/contrib/misc/bwnorm.C
509 
510  double NW = GnResMaxNWidths;
511  if(IR==2) NW = N2ResMaxNWidths;
512  if(IR==0) NW = N0ResMaxNWidths;
513 
514  double Wmin = 0.001;
515  double Wmax = MR + NW*WR;
516  int N = 1000* TMath::Nint( (Wmax-Wmin)/WR );
517  if(N%2==0) N++;
518 
519  double dW = (Wmax-Wmin)/(N-1);
520 
521  double norm = 0.5 * (genie::utils::bwfunc::BreitWignerL(Wmin,LR,MR,WR,1.0) + genie::utils::bwfunc::BreitWignerL(Wmax,LR,MR,WR,1.0));
522 
523  for(int i=1; i<N-1; i++) {
524  double W = Wmin + i*dW;
525  norm += ( genie::utils::bwfunc::BreitWignerL(W,LR,MR,WR,1.0) * (i%2+1) );
526  }
527  norm *= (2.*dW/3.);
528  return cache[res] = norm;
529 }
double Mass(Resonance_t res)
resonance mass (GeV)
double Width(Resonance_t res)
resonance width (GeV)
double BreitWignerL(double W, int L, double mass, double width0, double norm)
Definition: BWFunc.cxx:99
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
static constexpr double second
Definition: Units.h:37
int OrbitalAngularMom(Resonance_t res)
orbital angular momentum
int ResonanceIndex(Resonance_t res)
resonance idx, quark model / SU(6)
int genie::utils::res::Cjsgn_plus ( Resonance_t  res)

Definition at line 652 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by genie::MKSPPPXSec2020::XSec().

654 {
655 
656  switch(res) {
657  case kP33_1232: return 1; break;
658  case kS11_1535: return 1; break;
659  case kD13_1520: return -1; break;
660  case kS11_1650: return 1; break;
661  case kD13_1700: return -1; break;
662  case kD15_1675: return 1; break;
663  case kS31_1620: return 1; break;
664  case kD33_1700: return -1; break;
665  case kP11_1440: return -1; break;
666  case kP33_1600: return 1; break;
667  case kP13_1720: return 1; break;
668  case kF15_1680: return -1; break;
669  case kP31_1910: return -1; break;
670  case kP33_1920: return 1; break;
671  case kF35_1905: return -1; break;
672  case kF37_1950: return 1; break;
673  case kP11_1710: return -1; break;
674  case kF17_1970: return 1; break;
675  default:
676  // should not be here - meaningless to return anything
677  gAbortingInErr = true;
678  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
679  exit(1);
680  }
681  return 0;
682 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
int genie::utils::res::Dsgn ( Resonance_t  res)

Definition at line 685 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by genie::MKSPPPXSec2020::XSec().

686 {
687 
688  switch(res) {
689  case kP33_1232: return 1; break;
690  case kS11_1535: return 1; break;
691  case kD13_1520: return -1; break;
692  case kS11_1650: return 1; break;
693  case kD13_1700: return -1; break;
694  case kD15_1675: return -1; break;
695  case kS31_1620: return -1; break;
696  case kD33_1700: return 1; break;
697  case kP11_1440: return -1; break;
698  case kP33_1600: return 1; break;
699  case kP13_1720: return -1; break;
700  case kF15_1680: return 1; break;
701  case kP31_1910: return -1; break;
702  case kP33_1920: return -1; break;
703  case kF35_1905: return 1; break;
704  case kF37_1950: return 1; break;
705  case kP11_1710: return -1; break;
706  case kF17_1970: return -1; break;
707  default:
708  // should not be here - meaningless to return anything
709  gAbortingInErr = true;
710  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
711  exit(1);
712  }
713  return 0;
714 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
Resonance_t genie::utils::res::FromPdgCode ( int  pdgc)

PDG code -> resonance id.

Definition at line 84 of file BaryonResUtils.cxx.

References genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kNoResonance, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kPdgD13m1520_N0, genie::kPdgD13m1520_NP, genie::kPdgD13m1700_N0, genie::kPdgD13m1700_NP, genie::kPdgD15m1675_N0, genie::kPdgD15m1675_NP, genie::kPdgD33m1700_Delta0, genie::kPdgD33m1700_DeltaM, genie::kPdgD33m1700_DeltaP, genie::kPdgD33m1700_DeltaPP, genie::kPdgF15m1680_N0, genie::kPdgF15m1680_NP, genie::kPdgF17m1970_N0, genie::kPdgF17m1970_NP, genie::kPdgF35m1905_Delta0, genie::kPdgF35m1905_DeltaM, genie::kPdgF35m1905_DeltaP, genie::kPdgF35m1905_DeltaPP, genie::kPdgF37m1950_Delta0, genie::kPdgF37m1950_DeltaM, genie::kPdgF37m1950_DeltaP, genie::kPdgF37m1950_DeltaPP, genie::kPdgP11m1440_N0, genie::kPdgP11m1440_NP, genie::kPdgP11m1710_N0, genie::kPdgP11m1710_NP, genie::kPdgP13m1720_N0, genie::kPdgP13m1720_NP, genie::kPdgP31m1910_Delta0, genie::kPdgP31m1910_DeltaM, genie::kPdgP31m1910_DeltaP, genie::kPdgP31m1910_DeltaPP, genie::kPdgP33m1232_Delta0, genie::kPdgP33m1232_DeltaM, genie::kPdgP33m1232_DeltaP, genie::kPdgP33m1232_DeltaPP, genie::kPdgP33m1600_Delta0, genie::kPdgP33m1600_DeltaM, genie::kPdgP33m1600_DeltaP, genie::kPdgP33m1600_DeltaPP, genie::kPdgP33m1920_Delta0, genie::kPdgP33m1920_DeltaM, genie::kPdgP33m1920_DeltaP, genie::kPdgP33m1920_DeltaPP, genie::kPdgS11m1535_N0, genie::kPdgS11m1535_NP, genie::kPdgS11m1650_N0, genie::kPdgS11m1650_NP, genie::kPdgS31m1620_Delta0, genie::kPdgS31m1620_DeltaM, genie::kPdgS31m1620_DeltaP, genie::kPdgS31m1620_DeltaPP, genie::kS11_1535, genie::kS11_1650, and genie::kS31_1620.

Referenced by genie::BaryonResonanceDecayer::EvolveDeltaDecayWidth(), and genie::BostedChristyEMPXSec::LoadConfig().

85 {
86 
87  switch(pdgc) {
88 
89  case (kPdgP33m1232_DeltaM ) : /* Delta- */
90  case (kPdgP33m1232_Delta0 ) : /* Delta0 */
91  case (kPdgP33m1232_DeltaP ) : /* Delta+ */
92  case (kPdgP33m1232_DeltaPP) : /* Delta++ */
93  return kP33_1232; break;
94 
95  case (kPdgS11m1535_N0) : /* N0 */
96  case (kPdgS11m1535_NP) : /* N+ */
97  return kS11_1535; break;
98 
99  case (kPdgD13m1520_N0) : /* N0 */
100  case (kPdgD13m1520_NP) : /* N+ */
101  return kD13_1520; break;
102 
103  case (kPdgS11m1650_N0) : /* N0 */
104  case (kPdgS11m1650_NP) : /* N+ */
105  return kS11_1650; break;
106 
107  case (kPdgD13m1700_N0) : /* N0 */
108  case (kPdgD13m1700_NP) : /* N+ */
109  return kD13_1700; break;
110 
111  case (kPdgD15m1675_N0) : /* N0 */
112  case (kPdgD15m1675_NP) : /* N+ */
113  return kD15_1675; break;
114 
115  case (kPdgS31m1620_DeltaM ) : /* Delta- */
116  case (kPdgS31m1620_Delta0 ) : /* Delta0 */
117  case (kPdgS31m1620_DeltaP ) : /* Delta+ */
118  case (kPdgS31m1620_DeltaPP) : /* Delta++ */
119  return kS31_1620; break;
120 
121  case (kPdgD33m1700_DeltaM ) : /* Delta- */
122  case (kPdgD33m1700_Delta0 ) : /* Delta0 */
123  case (kPdgD33m1700_DeltaP ) : /* Delta+ */
124  case (kPdgD33m1700_DeltaPP) : /* Delta++ */
125  return kD33_1700; break;
126 
127  case (kPdgP11m1440_N0) : /* N0 */
128  case (kPdgP11m1440_NP) : /* N+ */
129  return kP11_1440; break;
130 
131  case (kPdgP33m1600_DeltaM) : /* Delta- */
132  case (kPdgP33m1600_Delta0) : /* Delta0 */
133  case (kPdgP33m1600_DeltaP) : /* Delta+ */
134  case (kPdgP33m1600_DeltaPP) : /* Delta++ */
135  return kP33_1600; break;
136 
137  case (kPdgP13m1720_N0) : /* N0 */
138  case (kPdgP13m1720_NP) : /* N+ */
139  return kP13_1720; break;
140 
141  case (kPdgF15m1680_N0) : /* N0 */
142  case (kPdgF15m1680_NP) : /* N+ */
143  return kF15_1680; break;
144 
145  case (kPdgP31m1910_DeltaM ) : /* Delta- */
146  case (kPdgP31m1910_Delta0 ) : /* Delta0 */
147  case (kPdgP31m1910_DeltaP ) : /* Delta+ */
148  case (kPdgP31m1910_DeltaPP) : /* Delta++ */
149  return kP31_1910; break;
150 
151  case (kPdgP33m1920_DeltaM ) : /* Delta- */
152  case (kPdgP33m1920_Delta0 ) : /* Delta0 */
153  case (kPdgP33m1920_DeltaP ) : /* Delta+ */
154  case (kPdgP33m1920_DeltaPP) : /* Delta++ */
155  return kP33_1920; break;
156 
157  case (kPdgF35m1905_DeltaM ) : /* Delta- */
158  case (kPdgF35m1905_Delta0 ) : /* Delta0 */
159  case (kPdgF35m1905_DeltaP ) : /* Delta+ */
160  case (kPdgF35m1905_DeltaPP) : /* Delta++ */
161  return kF35_1905; break;
162 
163  case (kPdgF37m1950_DeltaM ) : /* Delta- */
164  case (kPdgF37m1950_Delta0 ) : /* Delta0 */
165  case (kPdgF37m1950_DeltaP ) : /* Delta+ */
166  case (kPdgF37m1950_DeltaPP) : /* Delta++ */
167  return kF37_1950; break;
168 
169  case (kPdgP11m1710_N0) : /* N0 */
170  case (kPdgP11m1710_NP) : /* N+ */
171  return kP11_1710; break;
172 
173  case (kPdgF17m1970_N0) : /* N0 */
174  case (kPdgF17m1970_NP) : /* N+ */
175  return kF17_1970; break;
176  }
177 
178  return kNoResonance;
179 }
const int kPdgP31m1910_DeltaP
Definition: PDGCodes.h:138
const int kPdgS31m1620_DeltaM
Definition: PDGCodes.h:118
const int kPdgP33m1232_DeltaPP
Definition: PDGCodes.h:107
const int kPdgF35m1905_DeltaM
Definition: PDGCodes.h:144
const int kPdgD15m1675_N0
Definition: PDGCodes.h:116
const int kPdgF35m1905_Delta0
Definition: PDGCodes.h:145
const int kPdgF15m1680_NP
Definition: PDGCodes.h:135
const int kPdgD33m1700_Delta0
Definition: PDGCodes.h:123
const int kPdgD13m1700_NP
Definition: PDGCodes.h:115
const int kPdgP33m1600_DeltaP
Definition: PDGCodes.h:130
const int kPdgS11m1650_N0
Definition: PDGCodes.h:112
const int kPdgF37m1950_DeltaM
Definition: PDGCodes.h:148
const int kPdgF37m1950_DeltaP
Definition: PDGCodes.h:150
const int kPdgP33m1600_Delta0
Definition: PDGCodes.h:129
const int kPdgS11m1535_N0
Definition: PDGCodes.h:108
const int kPdgP33m1232_DeltaP
Definition: PDGCodes.h:106
const int kPdgP33m1232_DeltaM
Definition: PDGCodes.h:104
const int kPdgP31m1910_DeltaM
Definition: PDGCodes.h:136
const int kPdgP33m1600_DeltaPP
Definition: PDGCodes.h:131
const int kPdgF37m1950_Delta0
Definition: PDGCodes.h:149
const int kPdgD33m1700_DeltaPP
Definition: PDGCodes.h:125
const int kPdgF35m1905_DeltaP
Definition: PDGCodes.h:146
const int kPdgD15m1675_NP
Definition: PDGCodes.h:117
const int kPdgF35m1905_DeltaPP
Definition: PDGCodes.h:147
const int kPdgS31m1620_DeltaPP
Definition: PDGCodes.h:121
const int kPdgP31m1910_DeltaPP
Definition: PDGCodes.h:139
const int kPdgP33m1920_DeltaPP
Definition: PDGCodes.h:143
const int kPdgP31m1910_Delta0
Definition: PDGCodes.h:137
const int kPdgP33m1920_DeltaP
Definition: PDGCodes.h:142
const int kPdgD33m1700_DeltaM
Definition: PDGCodes.h:122
const int kPdgP33m1920_DeltaM
Definition: PDGCodes.h:140
const int kPdgF37m1950_DeltaPP
Definition: PDGCodes.h:151
const int kPdgD13m1520_NP
Definition: PDGCodes.h:111
const int kPdgF15m1680_N0
Definition: PDGCodes.h:134
const int kPdgP11m1710_N0
Definition: PDGCodes.h:152
const int kPdgS11m1650_NP
Definition: PDGCodes.h:113
const int kPdgP33m1600_DeltaM
Definition: PDGCodes.h:128
const int kPdgP33m1232_Delta0
Definition: PDGCodes.h:105
const int kPdgP13m1720_N0
Definition: PDGCodes.h:132
const int kPdgP11m1440_N0
Definition: PDGCodes.h:126
const int kPdgP33m1920_Delta0
Definition: PDGCodes.h:141
const int kPdgD13m1520_N0
Definition: PDGCodes.h:110
const int kPdgP11m1440_NP
Definition: PDGCodes.h:127
const int kPdgS31m1620_Delta0
Definition: PDGCodes.h:119
const int kPdgP11m1710_NP
Definition: PDGCodes.h:153
const int kPdgF17m1970_N0
Definition: PDGCodes.h:154
const int kPdgF17m1970_NP
Definition: PDGCodes.h:155
const int kPdgS11m1535_NP
Definition: PDGCodes.h:109
const int kPdgS31m1620_DeltaP
Definition: PDGCodes.h:120
const int kPdgP13m1720_NP
Definition: PDGCodes.h:133
const int kPdgD13m1700_N0
Definition: PDGCodes.h:114
const int kPdgD33m1700_DeltaP
Definition: PDGCodes.h:124
Resonance_t genie::utils::res::FromString ( const char *  res)

string -> resonance id

Definition at line 61 of file BaryonResUtils.cxx.

References genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kNoResonance, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, and genie::kS31_1620.

Referenced by genie::SPPEventGenerator::ComputeMaxXSec(), and genie::BaryonResList::DecodeFromNameList().

62 {
63  if ( strcmp( res,"P33(1232)" ) == 0 ) return kP33_1232;
64  else if( strcmp( res,"S11(1535)" ) == 0 ) return kS11_1535;
65  else if( strcmp( res,"D13(1520)" ) == 0 ) return kD13_1520;
66  else if( strcmp( res,"S11(1650)" ) == 0 ) return kS11_1650;
67  else if( strcmp( res,"D13(1700)" ) == 0 ) return kD13_1700;
68  else if( strcmp( res,"D15(1675)" ) == 0 ) return kD15_1675;
69  else if( strcmp( res,"S31(1620)" ) == 0 ) return kS31_1620;
70  else if( strcmp( res,"D33(1700)" ) == 0 ) return kD33_1700;
71  else if( strcmp( res,"P11(1440)" ) == 0 ) return kP11_1440;
72  else if( strcmp( res,"P33(1600)" ) == 0 ) return kP33_1600;
73  else if( strcmp( res,"P13(1720)" ) == 0 ) return kP13_1720;
74  else if( strcmp( res,"F15(1680)" ) == 0 ) return kF15_1680;
75  else if( strcmp( res,"P31(1910)" ) == 0 ) return kP31_1910;
76  else if( strcmp( res,"P33(1920)" ) == 0 ) return kP33_1920;
77  else if( strcmp( res,"F35(1905)" ) == 0 ) return kF35_1905;
78  else if( strcmp( res,"F37(1950)" ) == 0 ) return kF37_1950;
79  else if( strcmp( res,"P11(1710)" ) == 0 ) return kP11_1710;
80  else if( strcmp( res,"F17(1970)" ) == 0 ) return kF17_1970;
81  else return kNoResonance;
82 }
bool genie::utils::res::IsBaryonResonance ( int  pdgc)

is input a baryon resonance?

Definition at line 299 of file BaryonResUtils.cxx.

References genie::kPdgD13m1520_N0, genie::kPdgD13m1520_NP, genie::kPdgD13m1700_N0, genie::kPdgD13m1700_NP, genie::kPdgD15m1675_N0, genie::kPdgD15m1675_NP, genie::kPdgD33m1700_Delta0, genie::kPdgD33m1700_DeltaM, genie::kPdgD33m1700_DeltaP, genie::kPdgD33m1700_DeltaPP, genie::kPdgF15m1680_N0, genie::kPdgF15m1680_NP, genie::kPdgF17m1970_N0, genie::kPdgF17m1970_NP, genie::kPdgF35m1905_Delta0, genie::kPdgF35m1905_DeltaM, genie::kPdgF35m1905_DeltaP, genie::kPdgF35m1905_DeltaPP, genie::kPdgF37m1950_Delta0, genie::kPdgF37m1950_DeltaM, genie::kPdgF37m1950_DeltaP, genie::kPdgF37m1950_DeltaPP, genie::kPdgP11m1440_N0, genie::kPdgP11m1440_NP, genie::kPdgP11m1710_N0, genie::kPdgP11m1710_NP, genie::kPdgP13m1720_N0, genie::kPdgP13m1720_NP, genie::kPdgP31m1910_Delta0, genie::kPdgP31m1910_DeltaM, genie::kPdgP31m1910_DeltaP, genie::kPdgP31m1910_DeltaPP, genie::kPdgP33m1232_Delta0, genie::kPdgP33m1232_DeltaM, genie::kPdgP33m1232_DeltaP, genie::kPdgP33m1232_DeltaPP, genie::kPdgP33m1600_Delta0, genie::kPdgP33m1600_DeltaM, genie::kPdgP33m1600_DeltaP, genie::kPdgP33m1600_DeltaPP, genie::kPdgP33m1920_Delta0, genie::kPdgP33m1920_DeltaM, genie::kPdgP33m1920_DeltaP, genie::kPdgP33m1920_DeltaPP, genie::kPdgS11m1535_N0, genie::kPdgS11m1535_NP, genie::kPdgS11m1650_N0, genie::kPdgS11m1650_NP, genie::kPdgS31m1620_Delta0, genie::kPdgS31m1620_DeltaM, genie::kPdgS31m1620_DeltaP, and genie::kPdgS31m1620_DeltaPP.

Referenced by genie::pdg::IsBaryonResonance(), genie::PythiaDecayer::IsHandled(), genie::BaryonResonanceDecayer::IsHandled(), and genie::Decayer::IsUnstable().

300 {
301 
302  switch(pdgc) {
303 
304  /* ------ P33(1232) ------*/
305  case (kPdgP33m1232_DeltaM ) : /* Delta- */
306  case (kPdgP33m1232_Delta0 ) : /* Delta0 */
307  case (kPdgP33m1232_DeltaP ) : /* Delta+ */
308  case (kPdgP33m1232_DeltaPP) : /* Delta++ */
309 
310  /* ------ S11(1535) ------*/
311  case (kPdgS11m1535_N0) : /* N0 */
312  case (kPdgS11m1535_NP) : /* N+ */
313 
314  /* ------ D13(1520) ------*/
315  case (kPdgD13m1520_N0) : /* N0 */
316  case (kPdgD13m1520_NP) : /* N+ */
317 
318  /* ------ S11(1650) ------*/
319  case (kPdgS11m1650_N0) : /* N0 */
320  case (kPdgS11m1650_NP) : /* N+ */
321 
322  /* ------ D13(1700) ------*/
323  case (kPdgD13m1700_N0) : /* N0 */
324  case (kPdgD13m1700_NP) : /* N+ */
325 
326  /* ------ D15(1675) ------*/
327  case (kPdgD15m1675_N0) : /* N0 */
328  case (kPdgD15m1675_NP) : /* N+ */
329 
330  /* ------ S31(1620) ------*/
331  case (kPdgS31m1620_DeltaM ) : /* Delta- */
332  case (kPdgS31m1620_Delta0 ) : /* Delta0 */
333  case (kPdgS31m1620_DeltaP ) : /* Delta+ */
334  case (kPdgS31m1620_DeltaPP) : /* Delta++ */
335 
336  /* ------ D33(1700) ------*/
337  case (kPdgD33m1700_DeltaM ) : /* Delta- */
338  case (kPdgD33m1700_Delta0 ) : /* Delta0 */
339  case (kPdgD33m1700_DeltaP ) : /* Delta+ */
340  case (kPdgD33m1700_DeltaPP) : /* Delta++ */
341 
342  /* ------ P11(1440) ------*/
343  case (kPdgP11m1440_N0) : /* N0 */
344  case (kPdgP11m1440_NP) : /* N+ */
345 
346  /* ------ P33(1600) ------*/
347  case (kPdgP33m1600_DeltaM ) : /* Delta- */
348  case (kPdgP33m1600_Delta0 ) : /* Delta0 */
349  case (kPdgP33m1600_DeltaP ) : /* Delta+ */
350  case (kPdgP33m1600_DeltaPP) : /* Delta++ */
351 
352  /* ------ P13(1720) ------*/
353  case (kPdgP13m1720_N0) : /* N0 */
354  case (kPdgP13m1720_NP) : /* N+ */
355 
356  /* ------ F15(1680) ------*/
357  case (kPdgF15m1680_N0) : /* N0 */
358  case (kPdgF15m1680_NP) : /* N+ */
359 
360  /* ------ P31(1910) ------*/
361  case (kPdgP31m1910_DeltaM ) : /* Delta- */
362  case (kPdgP31m1910_Delta0 ) : /* Delta0 */
363  case (kPdgP31m1910_DeltaP ) : /* Delta+ */
364  case (kPdgP31m1910_DeltaPP) : /* Delta++ */
365 
366  /* ------ P33(1920) ------*/
367  case (kPdgP33m1920_DeltaM ) : /* Delta- */
368  case (kPdgP33m1920_Delta0 ) : /* Delta0 */
369  case (kPdgP33m1920_DeltaP ) : /* Delta+ */
370  case (kPdgP33m1920_DeltaPP) : /* Delta++ */
371 
372  /* ------ F35(1905) ------*/
373  case (kPdgF35m1905_DeltaM ) : /* Delta- */
374  case (kPdgF35m1905_Delta0 ) : /* Delta0 */
375  case (kPdgF35m1905_DeltaP ) : /* Delta+ */
376  case (kPdgF35m1905_DeltaPP) : /* Delta++ */
377 
378  /* ------ F37(1950) ------*/
379  case (kPdgF37m1950_DeltaM ) : /* Delta- */
380  case (kPdgF37m1950_Delta0 ) : /* Delta0 */
381  case (kPdgF37m1950_DeltaP ) : /* Delta+ */
382  case (kPdgF37m1950_DeltaPP) : /* Delta++ */
383 
384  /* ------ P11(1710) ------*/
385  case (kPdgP11m1710_N0) : /* N0 */
386  case (kPdgP11m1710_NP) : /* N+ */
387 
388  /* ------ F17(1970) ------*/
389  case (kPdgF17m1970_N0) : /* N0 */
390  case (kPdgF17m1970_NP) : /* N+ */
391 
392  return true;
393  }
394 
395  return false;
396 }
const int kPdgP31m1910_DeltaP
Definition: PDGCodes.h:138
const int kPdgS31m1620_DeltaM
Definition: PDGCodes.h:118
const int kPdgP33m1232_DeltaPP
Definition: PDGCodes.h:107
const int kPdgF35m1905_DeltaM
Definition: PDGCodes.h:144
const int kPdgD15m1675_N0
Definition: PDGCodes.h:116
const int kPdgF35m1905_Delta0
Definition: PDGCodes.h:145
const int kPdgF15m1680_NP
Definition: PDGCodes.h:135
const int kPdgD33m1700_Delta0
Definition: PDGCodes.h:123
const int kPdgD13m1700_NP
Definition: PDGCodes.h:115
const int kPdgP33m1600_DeltaP
Definition: PDGCodes.h:130
const int kPdgS11m1650_N0
Definition: PDGCodes.h:112
const int kPdgF37m1950_DeltaM
Definition: PDGCodes.h:148
const int kPdgF37m1950_DeltaP
Definition: PDGCodes.h:150
const int kPdgP33m1600_Delta0
Definition: PDGCodes.h:129
const int kPdgS11m1535_N0
Definition: PDGCodes.h:108
const int kPdgP33m1232_DeltaP
Definition: PDGCodes.h:106
const int kPdgP33m1232_DeltaM
Definition: PDGCodes.h:104
const int kPdgP31m1910_DeltaM
Definition: PDGCodes.h:136
const int kPdgP33m1600_DeltaPP
Definition: PDGCodes.h:131
const int kPdgF37m1950_Delta0
Definition: PDGCodes.h:149
const int kPdgD33m1700_DeltaPP
Definition: PDGCodes.h:125
const int kPdgF35m1905_DeltaP
Definition: PDGCodes.h:146
const int kPdgD15m1675_NP
Definition: PDGCodes.h:117
const int kPdgF35m1905_DeltaPP
Definition: PDGCodes.h:147
const int kPdgS31m1620_DeltaPP
Definition: PDGCodes.h:121
const int kPdgP31m1910_DeltaPP
Definition: PDGCodes.h:139
const int kPdgP33m1920_DeltaPP
Definition: PDGCodes.h:143
const int kPdgP31m1910_Delta0
Definition: PDGCodes.h:137
const int kPdgP33m1920_DeltaP
Definition: PDGCodes.h:142
const int kPdgD33m1700_DeltaM
Definition: PDGCodes.h:122
const int kPdgP33m1920_DeltaM
Definition: PDGCodes.h:140
const int kPdgF37m1950_DeltaPP
Definition: PDGCodes.h:151
const int kPdgD13m1520_NP
Definition: PDGCodes.h:111
const int kPdgF15m1680_N0
Definition: PDGCodes.h:134
const int kPdgP11m1710_N0
Definition: PDGCodes.h:152
const int kPdgS11m1650_NP
Definition: PDGCodes.h:113
const int kPdgP33m1600_DeltaM
Definition: PDGCodes.h:128
const int kPdgP33m1232_Delta0
Definition: PDGCodes.h:105
const int kPdgP13m1720_N0
Definition: PDGCodes.h:132
const int kPdgP11m1440_N0
Definition: PDGCodes.h:126
const int kPdgP33m1920_Delta0
Definition: PDGCodes.h:141
const int kPdgD13m1520_N0
Definition: PDGCodes.h:110
const int kPdgP11m1440_NP
Definition: PDGCodes.h:127
const int kPdgS31m1620_Delta0
Definition: PDGCodes.h:119
const int kPdgP11m1710_NP
Definition: PDGCodes.h:153
const int kPdgF17m1970_N0
Definition: PDGCodes.h:154
const int kPdgF17m1970_NP
Definition: PDGCodes.h:155
const int kPdgS11m1535_NP
Definition: PDGCodes.h:109
const int kPdgS31m1620_DeltaP
Definition: PDGCodes.h:120
const int kPdgP13m1720_NP
Definition: PDGCodes.h:133
const int kPdgD13m1700_N0
Definition: PDGCodes.h:114
const int kPdgD33m1700_DeltaP
Definition: PDGCodes.h:124
bool genie::utils::res::IsDelta ( Resonance_t  res)

is it a Delta resonance?

Definition at line 398 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by genie::RESInteractionListGenerator::CreateInteractionList(), genie::GiBUURESFormFactor::FormFactors::F1V(), genie::GiBUURESFormFactor::FormFactors::F2V(), genie::GiBUURESFormFactor::FormFactors::FA(), genie::GiBUURESFormFactor::FormFactors::FP(), IsN(), genie::SppChannel::IsospinWeight(), genie::GiBUURESFormFactor::FormFactors::LoadTables(), SaveToRootFile(), genie::RSPPResonanceSelector::SelectResonance(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

399 {
400  switch(res) {
401 
402  case kP33_1232: return true; break;
403  case kS11_1535: return false; break;
404  case kD13_1520: return false; break;
405  case kS11_1650: return false; break;
406  case kD13_1700: return false; break;
407  case kD15_1675: return false; break;
408  case kS31_1620: return true; break;
409  case kD33_1700: return true; break;
410  case kP11_1440: return false; break;
411  case kP33_1600: return true; break;
412  case kP13_1720: return false; break;
413  case kF15_1680: return false; break;
414  case kP31_1910: return true; break;
415  case kP33_1920: return true; break;
416  case kF35_1905: return true; break;
417  case kF37_1950: return true; break;
418  case kP11_1710: return false; break;
419  case kF17_1970: return false; break;
420  default:
421  // should not be here - meaningless to return anything
422  gAbortingInErr = true;
423  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
424  exit(1);
425  }
426  return false;
427 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
bool genie::utils::res::IsN ( Resonance_t  res)
int genie::utils::res::Isospin ( Resonance_t  res)

Definition at line 591 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by genie::MKSPPPXSec2020::XSec().

592 {
593  switch(res) {
594  case kP33_1232: return 3; break;
595  case kS11_1535: return 1; break;
596  case kD13_1520: return 1; break;
597  case kS11_1650: return 1; break;
598  case kD13_1700: return 1; break;
599  case kD15_1675: return 1; break;
600  case kS31_1620: return 3; break;
601  case kD33_1700: return 3; break;
602  case kP11_1440: return 1; break;
603  case kP33_1600: return 3; break;
604  case kP13_1720: return 1; break;
605  case kF15_1680: return 1; break;
606  case kP31_1910: return 3; break;
607  case kP33_1920: return 3; break;
608  case kF35_1905: return 3; break;
609  case kF37_1950: return 3; break;
610  case kP11_1710: return 1; break;
611  case kF17_1970: return 1; break;
612  default:
613  // should not be here - meaningless to return anything
614  gAbortingInErr = true;
615  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
616  exit(1);
617  }
618  return 0;
619 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
double genie::utils::res::Mass ( Resonance_t  res)

resonance mass (GeV)

Definition at line 436 of file BaryonResUtils.cxx.

References genie::PDGLibrary::Find(), genie::gAbortingInErr, genie::units::GeV, genie::PDGLibrary::Instance(), genie::kNoResonance, LOG, PdgCode(), pFATAL, and genie::units::second.

Referenced by genie::RSPPHadronicSystemGenerator::AddResonanceDecayProducts(), genie::InitialState::AsString(), genie::utils::BindHitNucleon(), BWNorm(), genie::utils::ComputeFullDMELPXSec(), genie::utils::ComputeFullQELPXSec(), genie::RESKinematicsGenerator::ComputeMaxXSec(), genie::SPPEventGenerator::ComputeMaxXSec(), genie::utils::gsl::d2XSecRESFast_dWQ2_E::d2XSecRESFast_dWQ2_E(), genie::SmithMonizQELCCPXSec::d3sQES_dQ2dvdkF_SM(), genie::HAIntranuke::ElasHA(), genie::HAIntranuke2018::ElasHA(), genie::BaryonResonanceDecayer::EvolveDeltaDecayWidth(), genie::NucleonDecayPrimaryVtxGenerator::GenerateFermiMomentum(), genie::MECGenerator::GenerateFermiMomentum(), genie::AGKYLowW2019::GenerateHadronCodes(), genie::MECGenerator::GenerateNSVInitialHadrons(), genie::QELEventGeneratorSuSA::GenerateNucleon(), InitializeEvent(), genie::LwlynSmithQELCCPXSec::Integral(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::FermiMover::KickHitNucleon(), genie::BostedChristyEMPXSec::LoadConfig(), main(), genie::KPhaseSpace::Q2Lim_W_SPP(), genie::KPhaseSpace::Q2Lim_W_SPP_iso(), genie::SmithMonizUtils::SetInteraction(), genie::utils::intranuke::ThreeBodyKinematics(), genie::utils::intranuke2018::ThreeBodyKinematics(), genie::KPhaseSpace::Threshold(), genie::KPhaseSpace::Threshold_SPP_iso(), genie::KPhaseSpace::WLim_SPP_iso(), genie::EmpiricalMECPXSec2015::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::MKSPPPXSec2020::XSec().

437 {
438  if (res == kNoResonance)
439  return -1;
440 
441  // Hardcoded data are removed, now they are taken from PDG table via TDatabasePDG and cached
442  static std::map<Resonance_t, double> cache ;
443 
444  auto it = cache.find( res ) ;
445  if ( it != cache.end() )
446  return it -> second ;
447 
448  PDGLibrary * pdglib = PDGLibrary::Instance();
449  int pdg = genie::utils::res::PdgCode(res, 0); // the mass doesn't depend on resonance charge
450  TParticlePDG * res_pdg = pdglib->Find( pdg );
451  if (res_pdg != 0)
452  {
453  double mass = res_pdg->Mass() * units::GeV;
454  return cache[res] = mass;
455  }
456 
457  // should not be here - meaningless to return anything
458  gAbortingInErr = true;
459  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
460  exit(1);
461 }
#define pFATAL
Definition: Messenger.h:56
static constexpr double second
Definition: Units.h:37
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -&gt; PDG code
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double GeV
Definition: Units.h:28
Singleton class to load &amp; serve a TDatabasePDG.
Definition: PDGLibrary.h:35
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool gAbortingInErr
Definition: Messenger.cxx:34
int genie::utils::res::OrbitalAngularMom ( Resonance_t  res)

orbital angular momentum

Definition at line 531 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by BWNorm(), genie::BostedChristyEMPXSec::LoadConfig(), main(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::MKSPPPXSec2020::XSec().

532 {
533  switch(res) {
534  case kP33_1232: return 1; break;
535  case kS11_1535: return 0; break;
536  case kD13_1520: return 2; break;
537  case kS11_1650: return 0; break;
538  case kD13_1700: return 2; break;
539  case kD15_1675: return 2; break;
540  case kS31_1620: return 0; break;
541  case kD33_1700: return 2; break;
542  case kP11_1440: return 1; break;
543  case kP33_1600: return 1; break;
544  case kP13_1720: return 1; break;
545  case kF15_1680: return 3; break;
546  case kP31_1910: return 1; break;
547  case kP33_1920: return 1; break;
548  case kF35_1905: return 3; break;
549  case kF37_1950: return 3; break;
550  case kP11_1710: return 1; break;
551  case kF17_1970: return 3; break;
552  default:
553  // should not be here - meaningless to return anything
554  gAbortingInErr = true;
555  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
556  exit(1);
557  }
558  return 0;
559 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
int genie::utils::res::PdgCode ( Resonance_t  res,
int  Q 
)

(resonance id, charge) -> PDG code

Definition at line 181 of file BaryonResUtils.cxx.

References genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kPdgD13m1520_N0, genie::kPdgD13m1520_NP, genie::kPdgD13m1700_N0, genie::kPdgD13m1700_NP, genie::kPdgD15m1675_N0, genie::kPdgD15m1675_NP, genie::kPdgD33m1700_Delta0, genie::kPdgD33m1700_DeltaM, genie::kPdgD33m1700_DeltaP, genie::kPdgD33m1700_DeltaPP, genie::kPdgF15m1680_N0, genie::kPdgF15m1680_NP, genie::kPdgF17m1970_N0, genie::kPdgF17m1970_NP, genie::kPdgF35m1905_Delta0, genie::kPdgF35m1905_DeltaM, genie::kPdgF35m1905_DeltaP, genie::kPdgF35m1905_DeltaPP, genie::kPdgF37m1950_Delta0, genie::kPdgF37m1950_DeltaM, genie::kPdgF37m1950_DeltaP, genie::kPdgF37m1950_DeltaPP, genie::kPdgP11m1440_N0, genie::kPdgP11m1440_NP, genie::kPdgP11m1710_N0, genie::kPdgP11m1710_NP, genie::kPdgP13m1720_N0, genie::kPdgP13m1720_NP, genie::kPdgP31m1910_Delta0, genie::kPdgP31m1910_DeltaM, genie::kPdgP31m1910_DeltaP, genie::kPdgP31m1910_DeltaPP, genie::kPdgP33m1232_Delta0, genie::kPdgP33m1232_DeltaM, genie::kPdgP33m1232_DeltaP, genie::kPdgP33m1232_DeltaPP, genie::kPdgP33m1600_Delta0, genie::kPdgP33m1600_DeltaM, genie::kPdgP33m1600_DeltaP, genie::kPdgP33m1600_DeltaPP, genie::kPdgP33m1920_Delta0, genie::kPdgP33m1920_DeltaM, genie::kPdgP33m1920_DeltaP, genie::kPdgP33m1920_DeltaPP, genie::kPdgS11m1535_N0, genie::kPdgS11m1535_NP, genie::kPdgS11m1650_N0, genie::kPdgS11m1650_NP, genie::kPdgS31m1620_Delta0, genie::kPdgS31m1620_DeltaM, genie::kPdgS31m1620_DeltaP, genie::kPdgS31m1620_DeltaPP, genie::kS11_1535, genie::kS11_1650, and genie::kS31_1620.

Referenced by genie::RSPPResonanceSelector::AddResonance(), genie::SppChannel::BranchingRatio(), genie::NaturalIsotopes::ElementDataPdg(), genie::GMCJDriver::GenerateEvent1Try(), genie::GMCJDriver::GenerateFluxNeutrino(), genie::RESHadronicSystemGenerator::GetResonancePdgCode(), Mass(), and Width().

182 {
183 
184  switch(res) {
185 
186  case kP33_1232:
187  if(Q == -1) return kPdgP33m1232_DeltaM; /* Delta- */
188  if(Q == 0) return kPdgP33m1232_Delta0; /* Delta0 */
189  if(Q == 1) return kPdgP33m1232_DeltaP; /* Delta+ */
190  if(Q == 2) return kPdgP33m1232_DeltaPP; /* Delta++ */
191  break;
192 
193  case kS11_1535:
194  if(Q == 0) return kPdgS11m1535_N0; /* N0 */
195  if(Q == 1) return kPdgS11m1535_NP; /* N+ */
196  break;
197 
198  case kD13_1520:
199  if(Q == 0) return kPdgD13m1520_N0; /* N0 */
200  if(Q == 1) return kPdgD13m1520_NP; /* N+ */
201  break;
202 
203  case kS11_1650:
204  if(Q == 0) return kPdgS11m1650_N0; /* N0 */
205  if(Q == 1) return kPdgS11m1650_NP; /* N+ */
206  break;
207 
208  case kD13_1700:
209  if(Q == 0) return kPdgD13m1700_N0; /* N0 */
210  if(Q == 1) return kPdgD13m1700_NP; /* N+ */
211  break;
212 
213  case kD15_1675:
214  if(Q == 0) return kPdgD15m1675_N0; /* N0 */
215  if(Q == 1) return kPdgD15m1675_NP; /* N+ */
216  break;
217 
218  case kS31_1620:
219  if(Q == -1) return kPdgS31m1620_DeltaM; /* Delta- */
220  if(Q == 0) return kPdgS31m1620_Delta0; /* Delta0 */
221  if(Q == 1) return kPdgS31m1620_DeltaP; /* Delta+ */
222  if(Q == 2) return kPdgS31m1620_DeltaPP; /* Delta++ */
223  break;
224 
225  case kD33_1700:
226  if(Q == -1) return kPdgD33m1700_DeltaM; /* Delta- */
227  if(Q == 0) return kPdgD33m1700_Delta0; /* Delta0 */
228  if(Q == 1) return kPdgD33m1700_DeltaP; /* Delta+ */
229  if(Q == 2) return kPdgD33m1700_DeltaPP; /* Delta++ */
230  break;
231 
232  case kP11_1440:
233  if(Q == 0) return kPdgP11m1440_N0; /* N0 */
234  if(Q == 1) return kPdgP11m1440_NP; /* N+ */
235  break;
236 
237  case kP33_1600:
238  if(Q == -1) return kPdgP33m1600_DeltaM; /* Delta- */
239  if(Q == 0) return kPdgP33m1600_Delta0; /* Delta0 */
240  if(Q == 1) return kPdgP33m1600_DeltaP; /* Delta+ */
241  if(Q == 2) return kPdgP33m1600_DeltaPP; /* Delta++ */
242  break;
243 
244  case kP13_1720:
245  if(Q == 0) return kPdgP13m1720_N0; /* N0 */
246  if(Q == 1) return kPdgP13m1720_NP; /* N+ */
247  break;
248 
249  case kF15_1680:
250  if(Q == 0) return kPdgF15m1680_N0; /* N0 */
251  if(Q == 1) return kPdgF15m1680_NP; /* N+ */
252  break;
253 
254  case kP31_1910:
255  if(Q == -1) return kPdgP31m1910_DeltaM; /* Delta- */
256  if(Q == 0) return kPdgP31m1910_Delta0; /* Delta0 */
257  if(Q == 1) return kPdgP31m1910_DeltaP; /* Delta+ */
258  if(Q == 2) return kPdgP31m1910_DeltaPP; /* Delta++ */
259  break;
260 
261  case kP33_1920:
262  if(Q == -1) return kPdgP33m1920_DeltaM; /* Delta- */
263  if(Q == 0) return kPdgP33m1920_Delta0; /* Delta0 */
264  if(Q == 1) return kPdgP33m1920_DeltaP; /* Delta+ */
265  if(Q == 2) return kPdgP33m1920_DeltaPP; /* Delta++ */
266  break;
267 
268  case kF35_1905:
269  if(Q == -1) return kPdgF35m1905_DeltaM; /* Delta- */
270  if(Q == 0) return kPdgF35m1905_Delta0; /* Delta0 */
271  if(Q == 1) return kPdgF35m1905_DeltaP; /* Delta+ */
272  if(Q == 2) return kPdgF35m1905_DeltaPP; /* Delta++ */
273  break;
274 
275  case kF37_1950:
276  if(Q == -1) return kPdgF37m1950_DeltaM; /* Delta- */
277  if(Q == 0) return kPdgF37m1950_Delta0; /* Delta0 */
278  if(Q == 1) return kPdgF37m1950_DeltaP; /* Delta+ */
279  if(Q == 2) return kPdgF37m1950_DeltaPP; /* Delta++ */
280  break;
281 
282  case kP11_1710:
283  if(Q == 0) return kPdgP11m1710_N0; /* N0 */
284  if(Q == 1) return kPdgP11m1710_NP; /* N+ */
285  break;
286 
287  case kF17_1970:
288  if(Q == 0) return kPdgF17m1970_N0; /* N0 */
289  if(Q == 1) return kPdgF17m1970_NP; /* N+ */
290  break;
291 
292  default:
293  return 0;
294  }
295 
296  return 0;
297 }
const int kPdgP31m1910_DeltaP
Definition: PDGCodes.h:138
const int kPdgS31m1620_DeltaM
Definition: PDGCodes.h:118
const int kPdgP33m1232_DeltaPP
Definition: PDGCodes.h:107
const int kPdgF35m1905_DeltaM
Definition: PDGCodes.h:144
const int kPdgD15m1675_N0
Definition: PDGCodes.h:116
const int kPdgF35m1905_Delta0
Definition: PDGCodes.h:145
const int kPdgF15m1680_NP
Definition: PDGCodes.h:135
const int kPdgD33m1700_Delta0
Definition: PDGCodes.h:123
const int kPdgD13m1700_NP
Definition: PDGCodes.h:115
const int kPdgP33m1600_DeltaP
Definition: PDGCodes.h:130
const int kPdgS11m1650_N0
Definition: PDGCodes.h:112
const int kPdgF37m1950_DeltaM
Definition: PDGCodes.h:148
const int kPdgF37m1950_DeltaP
Definition: PDGCodes.h:150
const int kPdgP33m1600_Delta0
Definition: PDGCodes.h:129
const int kPdgS11m1535_N0
Definition: PDGCodes.h:108
const int kPdgP33m1232_DeltaP
Definition: PDGCodes.h:106
const int kPdgP33m1232_DeltaM
Definition: PDGCodes.h:104
const int kPdgP31m1910_DeltaM
Definition: PDGCodes.h:136
const int kPdgP33m1600_DeltaPP
Definition: PDGCodes.h:131
const int kPdgF37m1950_Delta0
Definition: PDGCodes.h:149
const int kPdgD33m1700_DeltaPP
Definition: PDGCodes.h:125
const int kPdgF35m1905_DeltaP
Definition: PDGCodes.h:146
const int kPdgD15m1675_NP
Definition: PDGCodes.h:117
const int kPdgF35m1905_DeltaPP
Definition: PDGCodes.h:147
const int kPdgS31m1620_DeltaPP
Definition: PDGCodes.h:121
const int kPdgP31m1910_DeltaPP
Definition: PDGCodes.h:139
const int kPdgP33m1920_DeltaPP
Definition: PDGCodes.h:143
const int kPdgP31m1910_Delta0
Definition: PDGCodes.h:137
const int kPdgP33m1920_DeltaP
Definition: PDGCodes.h:142
const int kPdgD33m1700_DeltaM
Definition: PDGCodes.h:122
const int kPdgP33m1920_DeltaM
Definition: PDGCodes.h:140
const int kPdgF37m1950_DeltaPP
Definition: PDGCodes.h:151
const int kPdgD13m1520_NP
Definition: PDGCodes.h:111
const int kPdgF15m1680_N0
Definition: PDGCodes.h:134
const int kPdgP11m1710_N0
Definition: PDGCodes.h:152
const int kPdgS11m1650_NP
Definition: PDGCodes.h:113
const int kPdgP33m1600_DeltaM
Definition: PDGCodes.h:128
const int kPdgP33m1232_Delta0
Definition: PDGCodes.h:105
const int kPdgP13m1720_N0
Definition: PDGCodes.h:132
const int kPdgP11m1440_N0
Definition: PDGCodes.h:126
const int kPdgP33m1920_Delta0
Definition: PDGCodes.h:141
const int kPdgD13m1520_N0
Definition: PDGCodes.h:110
const int kPdgP11m1440_NP
Definition: PDGCodes.h:127
const int kPdgS31m1620_Delta0
Definition: PDGCodes.h:119
const int kPdgP11m1710_NP
Definition: PDGCodes.h:153
const int kPdgF17m1970_N0
Definition: PDGCodes.h:154
const int kPdgF17m1970_NP
Definition: PDGCodes.h:155
const int kPdgS11m1535_NP
Definition: PDGCodes.h:109
const int kPdgS31m1620_DeltaP
Definition: PDGCodes.h:120
const int kPdgP13m1720_NP
Definition: PDGCodes.h:133
const int kPdgD13m1700_N0
Definition: PDGCodes.h:114
const int kPdgD33m1700_DeltaP
Definition: PDGCodes.h:124
int genie::utils::res::ResonanceIndex ( Resonance_t  res)

resonance idx, quark model / SU(6)

Definition at line 561 of file BaryonResUtils.cxx.

References genie::gAbortingInErr, genie::kD13_1520, genie::kD13_1700, genie::kD15_1675, genie::kD33_1700, genie::kF15_1680, genie::kF17_1970, genie::kF35_1905, genie::kF37_1950, genie::kP11_1440, genie::kP11_1710, genie::kP13_1720, genie::kP31_1910, genie::kP33_1232, genie::kP33_1600, genie::kP33_1920, genie::kS11_1535, genie::kS11_1650, genie::kS31_1620, LOG, and pFATAL.

Referenced by BWNorm(), genie::utils::gsl::d2XSecRESFast_dWQ2_E::d2XSecRESFast_dWQ2_E(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::MKSPPPXSec2020::XSec().

562 {
563  switch(res) {
564  case kP33_1232: return 0; break;
565  case kS11_1535: return 1; break;
566  case kD13_1520: return 1; break;
567  case kS11_1650: return 1; break;
568  case kD13_1700: return 1; break;
569  case kD15_1675: return 1; break;
570  case kS31_1620: return 1; break;
571  case kD33_1700: return 1; break;
572  case kP11_1440: return 2; break;
573  case kP33_1600: return 2; break;
574  case kP13_1720: return 2; break;
575  case kF15_1680: return 2; break;
576  case kP31_1910: return 2; break;
577  case kP33_1920: return 2; break;
578  case kF35_1905: return 2; break;
579  case kF37_1950: return 2; break;
580  case kP11_1710: return 2; break;
581  case kF17_1970: return 2; break;
582  default:
583  // should not be here - meaningless to return anything
584  gAbortingInErr = true;
585  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
586  exit(1);
587  }
588  return 0;
589 }
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
bool gAbortingInErr
Definition: Messenger.cxx:34
double genie::utils::res::Width ( Resonance_t  res)

resonance width (GeV)

Definition at line 463 of file BaryonResUtils.cxx.

References genie::PDGLibrary::Find(), genie::gAbortingInErr, genie::units::GeV, genie::PDGLibrary::Instance(), genie::kNoResonance, LOG, PdgCode(), pFATAL, and genie::units::second.

Referenced by BWNorm(), genie::SPPEventGenerator::ComputeMaxXSec(), genie::utils::gsl::d2XSecRESFast_dWQ2_E::d2XSecRESFast_dWQ2_E(), genie::BaryonResonanceDecayer::EvolveDeltaDecayWidth(), genie::BostedChristyEMPXSec::LoadConfig(), main(), genie::P33PaschosLalakulichPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::MKSPPPXSec2020::XSec().

463  {
464 
465  if (res == kNoResonance)
466  return -1;
467 
468  // Hardcoded data are removed, now they are taken from PDG table via TDatabasePDG and cached
469  static std::map<Resonance_t, double> cache ;
470 
471  auto it = cache.find( res ) ;
472  if ( it != cache.end() )
473  return it -> second ;
474 
475  PDGLibrary * pdglib = PDGLibrary::Instance();
476  int pdg = genie::utils::res::PdgCode(res, 0); // the width doesn't depend on resonance charge
477  TParticlePDG * res_pdg = pdglib->Find( pdg );
478  if (res_pdg != 0) {
479  double width = res_pdg->Width() * units::GeV;
480  return cache[res] = width;
481  }
482 
483  // should not be here - meaningless to return anything
484  gAbortingInErr = true;
485  LOG("BaryonResUtils", pFATAL) << "Unknown resonance " << res;
486  exit(1);
487 
488 }
#define pFATAL
Definition: Messenger.h:56
static constexpr double second
Definition: Units.h:37
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -&gt; PDG code
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double GeV
Definition: Units.h:28
Singleton class to load &amp; serve a TDatabasePDG.
Definition: PDGLibrary.h:35
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool gAbortingInErr
Definition: Messenger.cxx:34