BaryonResUtils.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4  \namespace genie::utils::res
5 
6  \brief Baryon Resonance utilities.
7 
8  \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11  \created November 25, 2004
12 
13  \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16  */
17 //____________________________________________________________________________
18 
19 #ifndef _BARYON_RESONANCE_UTILS_H_
20 #define _BARYON_RESONANCE_UTILS_H_
21 
22 #include <string>
23 #include <map>
24 
26 
27 using std::string;
28 
29 namespace genie {
30 
31  namespace utils {
32  namespace res {
33 
34  const char* AsString (Resonance_t res); ///< resonance id -> string
35  Resonance_t FromString (const char * res); ///< string -> resonance id
36 
37  int PdgCode (Resonance_t res, int Q); ///< (resonance id, charge) -> PDG code
38  Resonance_t FromPdgCode (int pdgc); ///< PDG code -> resonance id
39 
40  bool IsBaryonResonance (int pdgc); ///< is input a baryon resonance?
41  bool IsDelta (Resonance_t res); ///< is it a Delta resonance?
42  bool IsN (Resonance_t res); ///< is it an N resonance?
43  double Mass (Resonance_t res); ///< resonance mass (GeV)
44  double Width (Resonance_t res); ///< resonance width (GeV)
45  double BWNorm (Resonance_t res,
46  double N0ResMaxNWidths=6,
47  double N2ResMaxNWidths=2,
48  double GnResMaxNWidths=4); ///< breit-wigner normalization factor
49  int OrbitalAngularMom (Resonance_t res); ///< orbital angular momentum
50  int ResonanceIndex (Resonance_t res); ///< resonance idx, quark model / SU(6)
51  struct CacheBWNorm {
53  {
54  cache[kP33_1232] = 0.0;
55  cache[kS11_1535] = 0.0;
56  cache[kD13_1520] = 0.0;
57  cache[kS11_1650] = 0.0;
58  cache[kD13_1700] = 0.0;
59  cache[kD15_1675] = 0.0;
60  cache[kS31_1620] = 0.0;
61  cache[kD33_1700] = 0.0;
62  cache[kP11_1440] = 0.0;
63  cache[kP33_1600] = 0.0;
64  cache[kP13_1720] = 0.0;
65  cache[kF15_1680] = 0.0;
66  cache[kP31_1910] = 0.0;
67  cache[kP33_1920] = 0.0;
68  cache[kF35_1905] = 0.0;
69  cache[kF37_1950] = 0.0;
70  cache[kP11_1710] = 0.0;
71  cache[kF17_1970] = 0.0;
72  }
73  std::map <genie::EResonance, double> cache;
74  }; ///< cached breit-wigner normalization factor
75 
76  } // res namespace
77  } // utils namespace
78 } // genie namespace
79 
80 #endif // _BARYON_RESONANCE_UTILS_H_
bool IsDelta(Resonance_t res)
is it a Delta resonance?
Resonance_t FromString(const char *res)
string -> resonance id
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
cached breit-wigner normalization factor
double Mass(Resonance_t res)
resonance mass (GeV)
double Width(Resonance_t res)
resonance width (GeV)
double BWNorm(Resonance_t res, double N0ResMaxNWidths=6, double N2ResMaxNWidths=2, double GnResMaxNWidths=4)
breit-wigner normalization factor
enum genie::EResonance Resonance_t
bool IsN(Resonance_t res)
is it an N resonance?
int PdgCode(Resonance_t res, int Q)
(resonance id, charge) -> PDG code
int OrbitalAngularMom(Resonance_t res)
orbital angular momentum
Resonance_t FromPdgCode(int pdgc)
PDG code -> resonance id.
const char * AsString(Resonance_t res)
resonance id -> string
bool IsBaryonResonance(int pdgc)
is input a baryon resonance?
std::map< genie::EResonance, double > cache
int ResonanceIndex(Resonance_t res)
resonance idx, quark model / SU(6)
enum BeamMode string