ROOTPWA
pwasummary.C
Go to the documentation of this file.
1 
2 //
3 // Copyright 2009 Sebastian Neubert
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 void pwasummary(int color=kBlack, double norm=1){
22 
23  TString opt("AP");
24 
25 
26  TCanvas* c=(TCanvas*)gROOT->FindObject("PWA");
27  if(c==NULL){
28  c=new TCanvas("PWA","PWA Summary",10,10,1000,900);
29  c->Divide(2,3);
30  }
31  else opt="P same";
32 
33 gStyle->SetOptStat(0);
34 gStyle->SetMarkerSize(0.5);
35 gStyle->SetFillColor(0);
36 gStyle->SetPadColor(0);
37 gStyle->SetLineColor(kGray);
38 
39 
40 c->cd(1);
41 pwa->Draw("intens():_mass","","");
42 TGraph* g2=(TGraph*)gPad->FindObject("Graph");
43 g2->SetMarkerStyle(23);
44 g2->SetMarkerSize(0.5);g2->SetMarkerColor(color);
45 g2->SetTitle("Total Intensity");
46 g2->DrawClone(opt);
47 
48 c->cd(2);
49 pwa->Draw("intens(\"flat\"):_mass","","");
50 TGraph* g2=(TGraph*)gPad->FindObject("Graph");
51 g2->SetMarkerStyle(23);
52 g2->SetMarkerSize(0.5);g2->SetMarkerColor(color);
53 g2->SetTitle("flat");
54 g2->DrawClone(opt);
55 
56 
57 c->cd(3);
58 pwa->Draw("intens(\"0++0-\"):err(\"0++0-\"):_mass","","goff");
59 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
60  pwa->GetV3(), // mass
61  pwa->GetV1(), // intensity
62  0,pwa->GetV2());
63 g->SetMarkerStyle(23);
64 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
65 g->SetTitle("0++0-");
66  g->Draw(opt);
67 
68 
69 c->cd(4);
70  pwa->Draw("intens(\"0-+0+\"):err(\"0-+0+\"):_mass","","goff");
71  TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
72  pwa->GetV3(), // mass
73  pwa->GetV1(), // intensity
74  0,pwa->GetV2());
75 g->SetMarkerStyle(23);
76 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
77 g->SetTitle("0-+0+");
78 g->Draw(opt);
79 
80 
81 
82 
83 c->cd(5);
84 pwa->Draw("intens(\"1++0+\"):err(\"1++0+\"):_mass","","goff");
85 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
86  pwa->GetV3(), // mass
87  pwa->GetV1(), // intensity
88  0,pwa->GetV2());
89 g->SetMarkerStyle(23);
90 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
91 g->SetTitle("1++0+");
92 g->Draw(opt);
93 
94 
95 
96 c->cd(6);
97 pwa->Draw("intens(\"2-+0+\"):err(\"2-+0+\"):_mass","","goff");
98 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
99  pwa->GetV3(), // mass
100  pwa->GetV1(), // intensity
101  0,pwa->GetV2());
102 g->SetMarkerStyle(23);
103 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
104 g->SetTitle("2-+0+");
105 g->Draw(opt);
106 
107 
108  TCanvas* c2=(TCanvas*)gROOT->FindObject("PWA2");
109  if(c2==NULL){
110  c2=new TCanvas("PWA2","PWA Summary",15,15,1000,900);
111  c2->Divide(2,3);
112  opt="AP";
113  }
114  else opt="P same";
115 
116  c2->cd(1);
117  pwa->Draw("intens(\"2++0-\"):err(\"2++0-\"):_mass","","goff");
118  TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
119  pwa->GetV3(), // mass
120  pwa->GetV1(), // intensity
121  0,pwa->GetV2());
122  g->SetMarkerStyle(23);
123  g->SetMarkerSize(0.5);g->SetMarkerColor(color);
124  g->SetTitle("2++0-");
125  g->Draw(opt);
126 
127 c2->cd(2);
128  pwa->Draw("intens(\"2++1+\"):err(\"2++1+\"):_mass","","goff");
129  TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
130  pwa->GetV3(), // mass
131  pwa->GetV1(), // intensity
132  0,pwa->GetV2());
133  g->SetMarkerStyle(23);
134  g->SetMarkerSize(0.5);g->SetMarkerColor(color);
135  g->SetTitle("2++1+");
136  g->Draw(opt);
137 
138 
139 c2->cd(3);
140 pwa->Draw("intens(\"1-+0-\"):err(\"1-+0-\"):_mass","","goff");
141 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
142  pwa->GetV3(), // mass
143  pwa->GetV1(), // intensity
144  0,pwa->GetV2());
145 g->SetMarkerStyle(23);
146 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
147 g->SetTitle("1-+0-");
148 g->Draw(opt);
149 
150 c2->cd(4);
151 pwa->Draw("intens(\"1-+1+\"):err(\"1-+1+\"):_mass","","goff");
152 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
153  pwa->GetV3(), // mass
154  pwa->GetV1(), // intensity
155  0,pwa->GetV2());
156 g->SetMarkerStyle(23);
157 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
158 g->SetTitle("1-+1+");
159 g->Draw(opt);
160 
161 
162 c2->cd(5);
163 pwa->Draw("intens(\"3++0+\"):err(\"3++0+\"):_mass","","goff");
164 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
165  pwa->GetV3(), // mass
166  pwa->GetV1(), // intensity
167  0,pwa->GetV2());
168 g->SetMarkerStyle(23);
169 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
170 g->SetTitle("3++0+");
171 g->Draw(opt);
172 
173 
174 c2->cd(6);
175 pwa->Draw("intens(\"4++1+\"):err(\"4++1+\"):_mass","","goff");
176 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
177  pwa->GetV3(), // mass
178  pwa->GetV1(), // intensity
179  0,pwa->GetV2());
180 g->SetMarkerStyle(23);
181 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
182 g->SetTitle("4++1+");
183 g->Draw(opt);
184 
185 c2->Update();
186 
187 
188 TCanvas* c3=(TCanvas*)gROOT->FindObject("PWA3");
189  if(c3==NULL){
190  c3=new TCanvas("PWA3","PWA Summary",20,20,1000,900);
191  c3->Divide(2,3);
192  opt="AP";
193  }
194  else opt="P same";
195 
196 
197 
198 c3->cd(1);
199 pwa->Draw("intens(\"3-+1+\"):err(\"3-+1+\"):_mass","","goff");
200 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
201  pwa->GetV3(), // mass
202  pwa->GetV1(), // intensity
203  0,pwa->GetV2());
204 g->SetMarkerStyle(23);
205 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
206 g->SetTitle("3-+1+");
207 g->Draw(opt);
208 
209 c3->cd(2);
210 pwa->Draw("intens(\"3-+1-\"):err(\"3-+1-\"):_mass","","goff");
211 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
212  pwa->GetV3(), // mass
213  pwa->GetV1(), // intensity
214  0,pwa->GetV2());
215 g->SetMarkerStyle(23);
216 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
217 g->SetTitle("3-+1-");
218 g->Draw(opt);
219 
220 c3->cd(3);
221 pwa->Draw("intens(\"3-+0-\"):err(\"3-+0-\"):_mass","","goff");
222 TGraphErrors* g=new TGraphErrors(pwa->GetSelectedRows(),
223  pwa->GetV3(), // mass
224  pwa->GetV1(), // intensity
225  0,pwa->GetV2());
226 g->SetMarkerStyle(23);
227 g->SetMarkerSize(0.5);g->SetMarkerColor(color);
228 g->SetTitle("3-+0-");
229 g->Draw(opt);
230 
231 c3->Update();
232 
233 }