47 const int kNResonances = 18;
58 const int color[kNResonances] = {1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19};
61 TGraph * grbw[kNResonances];
64 TNtuple resnt(
"resnt",
"baryon resonances",
"res:W:BW");
67 for(
int ires = 0; ires < kNResonances; ires++) {
79 LOG(
"test",
pINFO) <<
"- mass = " << MR <<
" GeV";
80 LOG(
"test",
pINFO) <<
"- width = " << WR <<
" GeV";
81 LOG(
"test",
pINFO) <<
"- BW norm = " << NR;
82 LOG(
"test",
pINFO) <<
"- L = " << LR;
86 for(
int iW = 0; iW<50; iW++) {
87 W[iW] = 0.01 + iW*(3.5/50.);
89 resnt.Fill((
float)resonance, W[iW], bw[iW]);
91 <<
" BreitWigner(W = " << W[iW] <<
" GeV) = " << bw[iW];
93 grbw[ires] =
new TGraph(50, W, bw);
98 TCanvas *
c =
new TCanvas(
"c",
"",20,20,500,500);
104 TH1F * hframe = (TH1F*) c->DrawFrame(1.0,0.5,3.5,6.0);
106 TLegend * legend =
new TLegend(0.6,0.2,0.8,0.8);
108 for(
int ires = 0; ires < kNResonances; ires++) {
109 grbw[ires]->SetLineWidth(2);
110 grbw[ires]->SetLineColor( color[ires] );
111 grbw[ires]->Draw(
"C");
115 legend->SetFillColor(0);
118 hframe->GetXaxis()->SetTitle(
"W (GeV)");
119 hframe->GetYaxis()->SetTitle(
"Breit Wigner Amplitude");
120 hframe->GetXaxis()->SetTitleOffset(1.3);
121 hframe->GetYaxis()->SetTitleOffset(1.3);
125 TFile
f(
"./genie-resonances.root",
"recreate");
130 for(
int ires = 0; ires < kNResonances; ires++) {
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)
double BWNorm(Resonance_t res, double N0ResMaxNWidths=6, double N2ResMaxNWidths=2, double GnResMaxNWidths=4)
breit-wigner normalization factor
enum genie::EResonance Resonance_t
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
int OrbitalAngularMom(Resonance_t res)
orbital angular momentum
std::size_t color(std::string const &procname)
const char * AsString(Resonance_t res)
resonance id -> string