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

Breit Wigner functions. More...

Functions

double BreitWignerLGamma (double W, int L, double mass, double width0, double norm)
 
double BreitWignerL (double W, int L, double mass, double width0, double norm)
 
double BreitWigner (double W, double mass, double width, double norm)
 

Detailed Description

Breit Wigner functions.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
November 22, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Function Documentation

double genie::utils::bwfunc::BreitWigner ( double  W,
double  mass,
double  width,
double  norm 
)

Definition at line 141 of file BWFunc.cxx.

References genie::constants::kPi.

143 {
144 //Inputs:
145 // - W: Invariant mass (GeV)
146 // - mass: Resonance mass (GeV)
147 // - width: Resonance width
148 // - norm: Breit Wigner norm
149 
150  //-- sanity checks
151  assert(mass > 0);
152  assert(width > 0);
153  assert(norm > 0);
154  assert(W > 0);
155 
156  //-- auxiliary parameters
157  double width_2 = TMath::Power( width, 2);
158  double W_m_2 = TMath::Power( W-mass, 2);
159 
160  //-- calculate the Breit Wigner function for the input W
161  double bw = (0.5/kPi) * (width/norm) / (W_m_2 + 0.25*width_2);
162  return bw;
163 }
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
double genie::utils::bwfunc::BreitWignerL ( double  W,
int  L,
double  mass,
double  width0,
double  norm 
)

Definition at line 99 of file BWFunc.cxx.

References genie::constants::kNucleonMass, genie::constants::kPi, genie::constants::kPi0Mass, and genie::utils::kinematics::W().

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

101 {
102 //Inputs:
103 // - W: Invariant mass (GeV)
104 // - L: Resonance orbital angular momentum
105 // - mass: Resonance mass (GeV)
106 // - width0: Resonance width
107 // - norm: Breit Wigner norm
108 
109  //-- sanity checks
110  assert(mass > 0);
111  assert(width0 > 0);
112  assert(norm > 0);
113  assert(W > 0);
114  assert(L >= 0);
115 
116  //-- auxiliary parameters
117  double mN = kNucleonMass;
118  double mPi = kPi0Mass;
119  double m_2 = TMath::Power(mass, 2);
120  double mN_2 = TMath::Power(mN, 2);
121  double mPi_2 = TMath::Power(mPi, 2);
122  double W_2 = TMath::Power(W, 2);
123 
124  //-- calculate the L-dependent resonance width
125  double qpW_2 = ( TMath::Power(W_2 - mN_2 - mPi_2, 2) - 4*mN_2*mPi_2 );
126  double qpM_2 = ( TMath::Power(m_2 - mN_2 - mPi_2, 2) - 4*mN_2*mPi_2 );
127  if(qpW_2 < 0) qpW_2 = 0;
128  if(qpM_2 < 0) qpM_2 = 0;
129  double qpW = TMath::Sqrt(qpW_2) / (2*W);
130  double qpM = TMath::Sqrt(qpM_2) / (2*mass);
131  double width = width0 * TMath::Power( qpW/qpM, 2*L+1 );
132 
133  //-- calculate the Breit Wigner function for the input W
134  double width_2 = TMath::Power( width, 2);
135  double W_m_2 = TMath::Power( W-mass, 2);
136 
137  double bw = (0.5/kPi) * (width/norm) / (W_m_2 + 0.25*width_2);
138  return bw;
139 }
static const double kNucleonMass
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
double genie::utils::bwfunc::BreitWignerLGamma ( double  W,
int  L,
double  mass,
double  width0,
double  norm 
)

Definition at line 22 of file BWFunc.cxx.

References genie::constants::kNucleonMass, genie::constants::kPi, genie::constants::kPi0Mass, genie::units::m, and genie::utils::kinematics::W().

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

24 {
25 //Inputs:
26 // - W: Invariant mass (GeV)
27 // - L: Resonance orbital angular momentum
28 // - mass: Resonance mass (GeV)
29 // - width0: Resonance width
30 // - norm: Breit Wigner norm
31 
32  //-- sanity checks
33  assert(mass > 0);
34  assert(width0 > 0);
35  assert(norm > 0);
36  assert(W > 0);
37  assert(L >= 0);
38 
39  //-- auxiliary parameters
40  double mN = kNucleonMass;
41  double mPi = kPi0Mass;
42  double m_2 = TMath::Power(mass, 2);
43  double mN_2 = TMath::Power(mN, 2);
44  double W_2 = TMath::Power(W, 2);
45 
46  double m=mass;
47  //m_aux1 m_aux2
48  double m_aux1= TMath::Power(mN+mPi, 2);
49  double m_aux2= TMath::Power(mN-mPi, 2);
50 
51  double BRPi0 = 0.994; //Npi Branching Ratio
52  double BRgamma0 = 0.006; //Ngamma Branching Ratio
53 
54  double widPi0 = width0*BRPi0;
55  double widgamma0= width0*BRgamma0;
56 
57  //-- calculate the L-dependent resonance width
58  double EgammaW= (W_2-mN_2)/(2*W);
59  double Egammam= (m_2-mN_2)/(2*m);
60 
61 
62  if(EgammaW<0) {
63 // cout<< "Two small W!!! W is lower than one Nucleon Mass!!!!"<<endl;
64  return 0;
65  }
66  //pPiW pion momentum
67  double pPiW = 0;
68  //
69  if(W_2>m_aux1) pPiW = TMath::Sqrt((W_2-m_aux1)*(W_2-m_aux2))/(2*W);
70 
71  double pPim = TMath::Sqrt((m_2-m_aux1)*(m_2-m_aux2))/(2*m);
72 
73  //double TPiW = pPiW*TMath::Power(pPiW*rDelta, 2*L)/(1+TMath::Power(pPiW*rDelta, 2));
74  //double TPim = pPim*TMath::Power(pPim*rDelta, 2*L)/(1+TMath::Power(pPim*rDelta, 2));
75 
76  // Form factors
77  //double fgammaW= 1/(TMath::Power(1+EgammaW*EgammaW/0.706, 2)*(1+EgammaW*EgammaW/3.519));
78  //double fgammam= 1/(TMath::Power(1+Egammam*Egammam/0.706, 2)*(1+Egammam*Egammam/3.519));
79  double fgammaW= 1/(TMath::Power(1+EgammaW*EgammaW/0.706, 2));
80  double fgammam= 1/(TMath::Power(1+Egammam*Egammam/0.706, 2));
81 
82 
83  double EgammaW_3=TMath::Power(EgammaW, 3);
84  double Egammam_3=TMath::Power(Egammam, 3);
85  double fgammaW_2=TMath::Power(fgammaW, 2);
86  double fgammam_2=TMath::Power(fgammam, 2);
87 
88  //double width = widPi0*(TPiW/TPim)+widgamma0*(EgammaW_3*fgammaW_2/(Egammam_3*fgammam_2));
89  double width = widPi0*TMath::Power((pPiW/pPim),3)+widgamma0*(EgammaW_3*fgammaW_2/(Egammam_3*fgammam_2));
90  //-- calculate the Breit Wigner function for the input W
91  double width_2 = TMath::Power( width, 2);
92  double W_m_2 = TMath::Power( W-mass, 2);
93 
94  double bw = (0.5/kPi) * (width/norm) / (W_m_2 + 0.25*width_2);
95 
96  return bw;
97 }
static const double kNucleonMass
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
static constexpr double m
Definition: Units.h:71