21 void plotwave_comp(TString tag, TString qtag,
double scale=1,
const char* select=0,
const char* title=0,
bool save=
false){
25 TString com=
"intens(";
33 pwa->SetBranchAddress(
"fitbin",&bin);
55 pwa->Draw(com.Data(),sel.Data(),
"goff");
56 int np=pwa->GetSelectedRows();
57 double* xerr=
new double[np];
58 for(
int i=0;
i<np;++
i){
59 pwa->GetV1()[
i]*=scale;
60 pwa->GetV2()[
i]*=scale;
61 pwa->GetV3()[
i]*=0.001;
65 TGraphErrors* g=
new TGraphErrors(np,
77 for(
int i=0;
i<np;++
i){
78 if(maxi<g->GetY()[
i])maxi=g->GetY()[
i];
84 g->SetMarkerSize(0.8);
85 if(title!=0)g->SetTitle(title);
86 g->SetMaximum(maxi*1.1);
87 g->SetMinimum(-maxi*0.1);
88 TGraphErrors* clone=(TGraphErrors*)g->DrawClone(
"AP");
89 clone->GetYaxis()->SetRangeUser(-maxi*0.1,maxi*1.1);
90 clone->SetLineColor(kRed);
91 clone->SetMarkerColor(kRed);
92 clone->GetXaxis()->SetTitle(
"Mass / GeV");
94 clone->GetYaxis()->SetTitle(
"Intensity");
95 clone->GetYaxis()->SetTitleOffset(1.3);
97 TString pathname =
"/lustre/e18/user/sneubert/Q3PiData/";
98 TString filename1=
"hfit_t_0p1_1p0_zemach_42waves_tdep_30a_2.root";
100 TFile file1(pathname+filename1);
103 TH1F* hist1 = (TH1F*)file1.Get(qtag);
105 hist1->DrawCopy(
"same");
107 else { cout <<
"Reference Histo not found!" << endl; }
109 double xmax=clone->GetXaxis()->GetXmax();
110 TLegend* leg=
new TLegend(0.65,0.75,0.85,0.85);
111 leg->AddEntry(hist1,
"Weitzel/Ryabch",
"LE");
112 leg->AddEntry(clone,
"pwaroot (scaled)",
"LE");
117 TString outfile(tag);
119 gPad->SaveAs(outfile);