FairRoot/PandaRoot
Pic_Compare_FEP-Eff.C
Go to the documentation of this file.
1 //#include <iostream>
2 //#include <fstream>
3 
4 //#include "TStyle.h"
5 //#include "TROOT.h"
6 //#include "TApplication.h"
7 //#include "TCanvas.h"
8 //#Include "TGraph.h"
9 //#include "TLegend.h"
10 #include <map>
11 
12 
13 Double_t* MapsToArrays(std::map<Double_t, Double_t> Map,const int ArraySize, bool isFirst = 0, Double_t *x = 0, Double_t *Dx = 0)
14 {
15  std::map<Double_t,Double_t>::iterator it;
16  Double_t *Array = new Double_t[ArraySize];
17  int i = 0;
18  for (it=Map.begin(); it!=Map.end(); ++it)
19  {
20  //std::cout << it->first << " => " << it->second << '\n';
21  if (isFirst)
22  {
23  x[i]=it->first;//*1000;
24  Dx[i]=0*1000;
25  }
26  Array[i]= it->second;
27  i++;
28  }
29  return Array;
30 }
31 
32 int Pic_Compare_FEP_Eff(bool Plot20 = true, bool Plot10SekTar = false, bool Plot10 = false)
33 {
34 
35  bool useExpectedRange = 0;
36 
37 
38  std::map<Double_t, Double_t> Triple4010sekTar; //<Energy, FEP-Eff>
39  std::map<Double_t, Double_t> Triple4010sekTarError; //<Energy, FEP-EffError>
40  std::map<Double_t, Double_t> Triple4010;
41  std::map<Double_t, Double_t> Triple4010Error;
42  std::map<Double_t, Double_t> Triple4020sekTar;
43  std::map<Double_t, Double_t> Triple4020sekTarError;
44  std::map<Double_t, Double_t> Triple4020sekTarSEP;
45  std::map<Double_t, Double_t> Triple4020sekTarSEPError;
46  std::map<Double_t, Double_t> Triple4020sekTarSEPDEP;
47  std::map<Double_t, Double_t> Triple4020sekTarSEPDEPError;
48  std::map<Double_t, Double_t> Triple4020sekTar1;
49  std::map<Double_t, Double_t> Triple4020sekTar1Error;
50  std::map<Double_t, Double_t> Triple4020sekTar1SEP;
51  std::map<Double_t, Double_t> Triple4020sekTar1SEPError;
52  std::map<Double_t, Double_t> Triple4020sekTar1SEPDEP;
53  std::map<Double_t, Double_t> Triple4020sekTar1SEPDEPError;
54  std::map<Double_t, Double_t> Triple4020;
55  std::map<Double_t, Double_t> Triple4020Error;
56  std::map<Double_t, Double_t> Triple4020SEP;
57  std::map<Double_t, Double_t> Triple4020SEPError;
58  std::map<Double_t, Double_t> Triple4020SEPDEP;
59  std::map<Double_t, Double_t> Triple4020SEPDEPError;
60  std::map<Double_t, Double_t> Triple4020sekTarFWHM;
61  std::map<Double_t, Double_t> Triple4020sekTarFWHMError;
62  std::map<Double_t, Double_t> Triple4020sekTar1FWHM;
63  std::map<Double_t, Double_t> Triple4020sekTar1FWHMError;
64  std::map<Double_t, Double_t> Triple4020FWHM;
65  std::map<Double_t, Double_t> Triple4020FWHMError;
66  std::map<Double_t,Double_t>::iterator it;
67  TStyle *style = gROOT -> GetStyle("Default");
68  style->SetFillColor(10);
69  style->SetFrameFillColor(10);
70  style->SetCanvasColor(10);
71  style->SetPadColor(10);
72  style->SetTitleFillColor(10);
73  style->cd();
74  //gStyle->SetFrameFillColor(10);
75 
76 
77  //ifstream Inputfile("/data/work/kpha1/steinen/Gamma/Ana/CollectFEPF.txt");
78  ifstream Inputfile("/data/work/kpha1/steinen/Gamma/Ana/CombinedData/Fitted/FittedData.txt");
79 
80  Int_t Geometry, Sektar, nEvents;
81  Double_t Energy, FullEnergyPeakEff, FullEnergyPeakEffError, FWHM, FWHMError,FullEnergyPeakEffSEP, FullEnergyPeakEffSEPError,FullEnergyPeakEffSEPDEP, FullEnergyPeakEffSEPDEPError;
82  char InputName[100];
83  while(Inputfile >> Geometry >> Sektar >> Energy >> nEvents >> FullEnergyPeakEff >> FullEnergyPeakEffError >>FWHM >> FWHMError>> FullEnergyPeakEffSEP >> FullEnergyPeakEffSEPError>>FullEnergyPeakEffSEPDEP >> FullEnergyPeakEffSEPDEPError )
84  {
85  //cout <<"\t"<< Geometry <<"\t"<< Sektar <<"\t"<< Energy <<"\t"<< nEvents <<"\t"<< FullEnergyPeakEff <<"\t"<< FullEnergyPeakEffError <<"\t"<<FWHM <<"\t"<< FWHMError<<"\t"<< FullEnergyPeakEffSEP <<"\t"<< FullEnergyPeakEffSEPError<<"\t"<<FullEnergyPeakEffSEPDEP <<"\t"<< FullEnergyPeakEffSEPDEPError <<"\t"<<endl;
86 
87  FWHM = FWHM*1000;
88  FWHMError = FWHMError*1000;
89  if (nEvents == 10000000)
90  {
91  if (Geometry == 35)
92  {
93  if(Sektar)
94  {
95  Triple4010sekTar.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEff) );
96  Triple4010sekTarError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffError) );
97  }
98  else
99  {
100  Triple4010.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEff) );
101  Triple4010Error.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffError) );
102  }
103  }
104  if (Geometry == 36)
105  {
106  if(Sektar==3)
107  {
108  Triple4020sekTar.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEff) );
109  Triple4020sekTarError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffError) );
110  Triple4020sekTarSEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEP) );
111  Triple4020sekTarSEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPError) );
112  Triple4020sekTarSEPDEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEP) );
113  Triple4020sekTarSEPDEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEPError) );
114  Triple4020sekTarFWHM.insert( std::pair<Double_t,Double_t>(Energy,FWHM) );
115  Triple4020sekTarFWHMError.insert( std::pair<Double_t,Double_t>(Energy,FWHMError) );
116 
117  }
118  if(Sektar==1)
119  {
120  Triple4020sekTar1.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEff) );
121  Triple4020sekTar1Error.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffError) );
122  Triple4020sekTar1SEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEP) );
123  Triple4020sekTar1SEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPError) );
124  Triple4020sekTar1SEPDEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEP) );
125  Triple4020sekTar1SEPDEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEPError) );
126  Triple4020sekTar1FWHM.insert( std::pair<Double_t,Double_t>(Energy,FWHM) );
127  Triple4020sekTar1FWHMError.insert( std::pair<Double_t,Double_t>(Energy,FWHMError) );
128 
129  }
130  if (Sektar == 0)
131  {
132  Triple4020.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEff) );
133  Triple4020Error.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffError) );
134  Triple4020SEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEP) );
135  Triple4020SEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPError) );
136  Triple4020SEPDEP.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEP) );
137  Triple4020SEPDEPError.insert( std::pair<Double_t,Double_t>(Energy,FullEnergyPeakEffSEPDEPError) );
138  Triple4020FWHM.insert( std::pair<Double_t,Double_t>(Energy,FWHM) );
139  Triple4020FWHMError.insert( std::pair<Double_t,Double_t>(Energy,FWHMError) );
140  }
141  }
142  }
143  }
144  Inputfile.close();
145 
146  const int n = Triple4020sekTar.size();
147  double x[n];
148  double Dx[n];
149  Double_t *yTriple4020sekTar = MapsToArrays(Triple4020sekTar,n,1,x,Dx);
150  Double_t * yTriple4020sekTarError= MapsToArrays(Triple4020sekTarError,n);
151  Double_t * yTriple4020sekTarSEP= MapsToArrays(Triple4020sekTarSEP,n);
152  Double_t * yTriple4020sekTarSEPError= MapsToArrays(Triple4020sekTarSEPError,n);
153  Double_t * yTriple4020sekTarSEPDEP= MapsToArrays(Triple4020sekTarSEPDEP,n);
154  Double_t * yTriple4020sekTarSEPDEPError= MapsToArrays(Triple4020sekTarSEPDEPError,n);
155  Double_t *yTriple4020sekTar1 = MapsToArrays(Triple4020sekTar1,n);
156  Double_t * yTriple4020sekTar1Error= MapsToArrays(Triple4020sekTar1Error,n);
157  Double_t * yTriple4020sekTar1SEP= MapsToArrays(Triple4020sekTar1SEP,n);
158  Double_t * yTriple4020sekTar1SEPError= MapsToArrays(Triple4020sekTar1SEPError,n);
159  Double_t * yTriple4020sekTar1SEPDEP= MapsToArrays(Triple4020sekTar1SEPDEP,n);
160  Double_t * yTriple4020sekTar1SEPDEPError= MapsToArrays(Triple4020sekTar1SEPDEPError,n);
161  Double_t * yTriple4020= MapsToArrays(Triple4020,n);
162  Double_t * yTriple4020Error= MapsToArrays(Triple4020Error,n);
163  Double_t * yTriple4010sekTar= MapsToArrays(Triple4010sekTar,n);
164  Double_t * yTriple4010sekTarError= MapsToArrays(Triple4010sekTarError,n);
165  Double_t * yTriple4010= MapsToArrays(Triple4010,n);
166  Double_t * yTriple4010Error= MapsToArrays(Triple4010Error,n);
167  Double_t * yTriple4020sekTarFWHM= MapsToArrays(Triple4020sekTarFWHM,n);
168  Double_t * yTriple4020sekTarFWHMError= MapsToArrays(Triple4020sekTarFWHMError,n);
169  Double_t * yTriple4020FWHM= MapsToArrays(Triple4020FWHM,n);
170  Double_t * yTriple4020FWHMError= MapsToArrays(Triple4020FWHMError,n);
171 
172  Double_t yEffLoss4020[n];
173 
174  cout << "Arrays filled!"<<endl;
175  //drawing
176  //efficiency
177  TCanvas *c1 = new TCanvas("c1","A Simple Graph with error bars",200,10,900,700);
178  TPad *pad1 = new TPad("pad1","",0,0,1,1);
179  TPad *pad2 = new TPad("pad2","",0,0,1,1);
180  pad2->SetFillStyle(4000); //will be transparent
181  pad1->Draw();
182  pad1->cd();
183 
184  TGraphErrors *graphTr4020sekTar = new TGraphErrors(n,x,yTriple4020sekTar,0,yTriple4020sekTarError);
185  TGraphErrors *graphTr4020sekTarSEP = new TGraphErrors(n,x,yTriple4020sekTarSEP,0,yTriple4020sekTarSEPError);
186  TGraphErrors *graphTr4020sekTarSEPDEP = new TGraphErrors(n,x,yTriple4020sekTarSEPDEP,0,yTriple4020sekTarSEPDEPError);
187  TGraphErrors *graphTr4020 = new TGraphErrors(n,x,yTriple4020,0, yTriple4020Error);
188  TGraphErrors *graphTr4010sekTar = new TGraphErrors(n,x,yTriple4010sekTar,0, yTriple4010sekTarError);
189  TGraphErrors *graphTr4010 = new TGraphErrors(n,x,yTriple4010,0,yTriple4010Error);
190  TGraphErrors *graphTr4020sekTar1 = new TGraphErrors(n,x,yTriple4020sekTar1,0,yTriple4020sekTar1Error);
191 
192 
193  for (Int_t i = 0; i<n; i++)
194  yEffLoss4020[i]= (yTriple4020[i]-yTriple4020sekTar[i])/ yTriple4020[i]*100;
195  TGraph *graphEffLoss4020 = new TGraphErrors(n,x,yEffLoss4020);
196 
197  Double_t TitleLabelSize = 0.05;
198  graphTr4020sekTar->SetTitle("");//"Simulation of full-energy-peak-efficiency");
199  graphTr4020sekTar->GetHistogram()->SetXTitle("Energy [MeV]");
200  //graphTr4020sekTar->GetHistogram()->GetXaxis()->CenterTitle();
201  graphTr4020sekTar->GetHistogram()->GetXaxis()->SetTitleSize(TitleLabelSize);
202  graphTr4020sekTar->GetHistogram()->GetXaxis()->SetTitleOffset(0.9);
203  graphTr4020sekTar->GetHistogram()->GetXaxis()->SetLabelSize(TitleLabelSize);
204  graphTr4020sekTar->GetHistogram()->SetYTitle("Efficiency [%]");
205  //graphTr4020sekTar->GetHistogram()->GetYaxis()->CenterTitle();
206  graphTr4020sekTar->GetHistogram()->GetYaxis()->SetTitleSize(TitleLabelSize);
207  graphTr4020sekTar->GetHistogram()->GetYaxis()->SetTitleOffset(0.9);
208  graphTr4020sekTar->GetHistogram()->GetYaxis()->SetLabelSize(TitleLabelSize);
209  //graphTr4020sekTar->GetHistogram()->GetYaxis()->SetRangeUser(0,9);
210 
211  Size_t dMarkerSize = 4;
212  graphTr4020sekTar->SetMarkerColor(1);
213  graphTr4020sekTar->SetMarkerSize(dMarkerSize/2);
214  graphTr4020sekTar->SetMarkerStyle(20);
215  graphTr4020sekTar->SetLineColor(1);
216  graphTr4020sekTar->SetLineStyle(2);
217 
218  graphTr4020->SetMarkerColor(kRed);
219  graphTr4020->SetMarkerSize(dMarkerSize/2);
220  graphTr4020->SetMarkerStyle(20);
221  graphTr4020->SetLineColor(kRed);
222  graphTr4020sekTar->SetLineStyle(2);
223 
224  graphTr4010sekTar->SetMarkerColor(kGreen);
225  graphTr4010sekTar->SetMarkerSize(dMarkerSize/2);
226  graphTr4010sekTar->SetMarkerStyle(20);
227  graphTr4010sekTar->SetLineColor(kGreen);
228  graphTr4020sekTar->SetLineStyle(2);
229 
230  graphTr4010->SetMarkerColor(kBlue);
231  graphTr4010->SetMarkerSize(dMarkerSize/2);
232  graphTr4010->SetMarkerStyle(20);
233  graphTr4010->SetLineColor(kBlue);
234  graphTr4020sekTar->SetLineStyle(2);
235 
236  pad1->Modified();
237 
238  c1->cd();
239 
240  graphEffLoss4020->SetMarkerColor(kGreen+3);
241  graphEffLoss4020->SetMarkerSize((dMarkerSize+1)/2);
242  graphEffLoss4020->SetMarkerStyle(22);
243  graphEffLoss4020->SetLineColor(kGreen+3);
244  graphEffLoss4020->SetLineStyle(2);
245 
246  graphTr4020sekTar->GetYaxis()->SetRangeUser(0,9);
247  graphEffLoss4020->GetYaxis()->SetRangeUser(0,20);
248  graphEffLoss4020->GetHistogram()->SetMaximum(0);
249  graphEffLoss4020->GetHistogram()->SetMaximum(11);
250  //compute the pad range with suitable margins
251  graphTr4020sekTar->GetHistogram()->SetMinimum(0);
252  graphTr4020sekTar->GetHistogram()->SetMaximum(11);
253 
254  Double_t ymin = 0;//graphTr4020sekTar->GetYaxis()->GetXmin();
255  Double_t ymax = graphEffLoss4020->GetYaxis()->GetXmax()*2;
256  Double_t dy = (ymax-ymin)/0.8; //10 per cent margins top and bottom
257  Double_t xmin = graphTr4020sekTar ->GetXaxis()->GetXmin();
258  Double_t xmax = graphTr4020sekTar->GetXaxis()->GetXmax();
259  Double_t dx = (xmax-xmin)/0.8; //10 per cent margins left and right
260  pad2->Range(xmin-0.1*dx,ymin-0.1*dy,xmax+0.1*dx,ymax+0.1*dy);
261 
262 
263 
264 
265  graphTr4020sekTar->Draw("APL");
266  //graphTr4020->Draw("PL");
267  //graphTr4010sekTar->Draw("PL");
268  //graphTr4010->Draw("PL");
269 
270 
271  TColor *HIMBlue = new TColor(1780,0,92./256,158./256);
272  TBox *Box = new TBox(1,0,8,10);
273  Box->SetFillColor(1780);
274  Box->SetFillStyle(3004);
275  //Box->SetLineColor(11);
276  if (useExpectedRange) Box->Draw();
277 
278  TLatex *Text = new TLatex(0.00115*1000,0.7,"expected range of #gamma in experiment");
279  Text->SetTextColor(1780);
280  if (useExpectedRange)Text->Draw();
281 
282  graphTr4020sekTar->Draw("PL");
283  TLegend *leg = new TLegend(0.5,0.9,0.85,0.65);
284  leg->SetFillColor(kWhite);
285  leg -> AddEntry(graphTr4020sekTar,"#splitline{with target and}{tracking system}","p");
286  if (Plot20)
287  {
288  graphTr4020->Draw("PL");
289  leg -> AddEntry(graphTr4020,"#splitline{without target and}{tracking system}","p");
290  }
291  if (Plot10SekTar)
292  {
293  leg -> AddEntry(graphTr4010sekTar,"#splitline{with target and}{tracking system}, offset 10","p");
294  graphTr4010sekTar->Draw("PL");
295  }
296  if (Plot10)
297  {
298  leg -> AddEntry(graphTr4010,"#splitline{without target and}{tracking system}, offset 10","p");
299  graphTr4010->Draw("PL");
300  }
301  pad2->Draw();
302  pad2->cd();
303  graphEffLoss4020->Draw("PL");
304  pad2->Update();
305  TGaxis *axis = new TGaxis(xmax,ymin,xmax,ymax,ymin,ymax,510,"+L");
306  axis->SetTitle("Rel. loss of #gamma due to material [%]");
307  axis->SetTitleSize(0.06);
308  axis->SetTitleOffset(0.6);
309  axis->SetLabelSize(0.045);
310  axis->CenterTitle();
311  axis->SetVertical();
312  axis->SetLabelColor(kGreen+3);
313  axis->Draw();
314  TArrow *ArrowLoss = new TArrow(8.5*1000,3,10.75*1000.75,3,0.02,"|>");
315  ArrowLoss->SetLineColor(kGreen+3);
316  ArrowLoss->SetLineWidth(2);
317  ArrowLoss->SetFillColor(kGreen+3);
318  ArrowLoss->SetAngle(30);
319  ArrowLoss->Draw();
320  TArrow *ArrowFEPF = new TArrow(.25*1000,6.5,2.5*1000,6.5,0.02,"<|");
321  ArrowFEPF->SetLineColor(kRed);
322  ArrowFEPF->SetLineWidth(2);
323  ArrowFEPF->SetFillColor(kRed);
324  ArrowFEPF->SetAngle(30);
325  ArrowFEPF->Draw();
326  leg->Draw();
327 c1->Update();
328 
329 c1->SaveAs("~/pictures/Compare_FEP-Eff.png");
330 
331 TCanvas *c2 = new TCanvas("c2","A Simple Graph with error bars",200,10,900,700);
332 
333 
334  TGraphErrors *graphTr4020sekTarFWHM = new TGraphErrors(n,x,yTriple4020sekTarFWHM,0, yTriple4020sekTarFWHMError);
335  TGraphErrors *graphTr4020FWHM = new TGraphErrors(n,x,yTriple4020FWHM, 0, yTriple4020FWHMError);
336 
337  graphTr4020sekTarFWHM->SetTitle("Simulation of resolution");
338  graphTr4020sekTarFWHM->GetHistogram()->SetXTitle("#gamma energy [MeV]");
339  graphTr4020sekTarFWHM->GetHistogram()->GetXaxis()->CenterTitle();
340  graphTr4020sekTarFWHM->GetHistogram()->GetXaxis()->SetTitleSize(0.045);
341  graphTr4020sekTarFWHM->GetHistogram()->GetXaxis()->SetTitleOffset(0.75);
342  graphTr4020sekTarFWHM->GetHistogram()->GetXaxis()->SetLabelSize(0.045);
343  graphTr4020sekTarFWHM->GetHistogram()->SetYTitle("FWHM [keV]");
344  graphTr4020sekTarFWHM->GetHistogram()->GetYaxis()->CenterTitle();
345  graphTr4020sekTarFWHM->GetHistogram()->GetYaxis()->SetTitleSize(0.045);
346  graphTr4020sekTarFWHM->GetHistogram()->GetYaxis()->SetTitleOffset(0.6);
347  graphTr4020sekTarFWHM->GetHistogram()->GetYaxis()->SetLabelSize(0.045);
348 
349  Size_t dMarkerSize = 2;
350  graphTr4020sekTarFWHM->SetMarkerColor(1);
351  graphTr4020sekTarFWHM->SetMarkerSize(dMarkerSize/2);
352  graphTr4020sekTarFWHM->SetMarkerStyle(20);
353  graphTr4020sekTarFWHM->SetLineColor(1);
354  graphTr4020sekTarFWHM->SetLineStyle(2);
355 
356  graphTr4020FWHM->SetMarkerColor(kRed);
357  graphTr4020FWHM->SetMarkerSize(dMarkerSize/2);
358  graphTr4020FWHM->SetMarkerStyle(20);
359  graphTr4020FWHM->SetLineColor(kRed);
360  graphTr4020sekTarFWHM->SetLineStyle(2);
361 
362  graphTr4020sekTarFWHM->Draw("APL");
363 
364  TLegend *leg2 = new TLegend(0.15,0.9,0.5,0.65);
365  leg2->SetFillColor(kWhite);
366  leg2 -> AddEntry(graphTr4020sekTarFWHM,"#splitline{with target and}{tracking system}","p");
367  if (Plot20)
368  {
369  graphTr4020FWHM->Draw("PL");
370  leg2 -> AddEntry(graphTr4020FWHM,"#splitline{without target and}{tracking system}","p");
371  }
372  leg2->Draw();
373  c2->SaveAs("~/pictures/Compare_FWHM.png");
374  andi::setCustomStyle();
375  // fep with added single and double escape peaks
376  TCanvas *c3 = new TCanvas("c3","A Simple Graph with error bars",200,10,900,700);
377  c3->SetGrid(1,1);
378  c3->SetTicks();
379  graphTr4020sekTarSEP->SetMarkerColor(2);
380  graphTr4020sekTarSEP->SetMarkerSize(dMarkerSize/2);
381  graphTr4020sekTarSEP->SetMarkerStyle(20);
382  graphTr4020sekTarSEP->SetLineColor(1);
383  graphTr4020sekTarSEP->SetLineStyle(2);
384  graphTr4020sekTarSEPDEP->SetMarkerColor(4);
385  graphTr4020sekTarSEPDEP->SetMarkerSize(dMarkerSize/2);
386  graphTr4020sekTarSEPDEP->SetMarkerStyle(20);
387  graphTr4020sekTarSEPDEP->SetLineColor(1);
388  graphTr4020sekTarSEPDEP->SetLineStyle(2);
389  //andi::setCustomStyle();
390  graphTr4020sekTar->GetYaxis()->SetRangeUser(0,9);
391  graphTr4020sekTar->Draw("ALP");
392  //graphTr4020sekTarSEP->Draw("PL");
393  //graphTr4020sekTarSEPDEP->Draw("PL");
394  TLegend *leg3 = new TLegend(0.55,0.9,0.9,0.65);
395  leg3->SetFillColor(kWhite);
396  leg3 -> AddEntry(graphTr4020sekTar,"full energy","p");
397  leg3 -> AddEntry(graphTr4020sekTarSEP,"+ single escape","p");
398  leg3 -> AddEntry(graphTr4020sekTarSEPDEP,"+ double escape","p");
399 
400  //leg3->Draw();
401  c3->SaveAs("~/pictures/Compare_FWHMSEPDEP.png");
402 
403  // fep tar1 vs tar3
404  TCanvas *c4 = new TCanvas("c4","A Simple Graph with error bars",200,10,900,700);
405  c4->SetGrid(1,1);
406  graphTr4020sekTar1->SetMarkerColor(2);
407  graphTr4020sekTar1->SetMarkerSize(dMarkerSize/2);
408  graphTr4020sekTar1->SetMarkerStyle(20);
409  graphTr4020sekTar1->SetLineColor(1);
410  graphTr4020sekTar1->SetLineStyle(2);
411 
412 
413  graphTr4020sekTar->Draw("ALP");
414  graphTr4020sekTar1->Draw("PL");
415  TLegend *leg4 = new TLegend(0.65,0.9,0.9,0.65);
416  leg4->SetFillColor(kWhite);
417  leg4 -> AddEntry(graphTr4020sekTar1,"old geometry","p");
418  leg4 -> AddEntry(graphTr4020sekTar,"improved geometry","p");
419 
420 
421  leg4->Draw();
422  c4->SaveAs("~/pictures/Compare_geo1geo3.png");
423  return 0;
424 }
double dy
c4
Definition: plot_dirc.C:71
Int_t i
Definition: run_full.C:25
Double_t xmax
int n
c2
Definition: plot_dirc.C:39
int Pic_Compare_FEP_Eff(bool Plot20=true, bool Plot10SekTar=false, bool Plot10=false)
Double_t * MapsToArrays(std::map< Double_t, Double_t > Map, const int ArraySize, bool isFirst=0, Double_t *x=0, Double_t *Dx=0)
Double_t
copies AddEntry(hz_h,"All copies (G3)","l")
Int_t nEvents
Definition: hit_dirc.C:11
void style()
axis
Definition: PndRadMapPlane.h:9
c1
Definition: plot_dirc.C:35
c3
Definition: plot_dirc.C:50
double dx
Double_t x
Double_t xmin