3 andi::setCustomStyle();
5 TString HistoTitle =
";#gamma energy [MeV]; Full-energy-peak-efficiency [%]";
6 const int nGeometries = 3;
7 const int nPoints = 38;
8 TString PicName =
"FEPcomparison_NewGeometries";
9 TString PicName2 =
"FEPRatios_NewGeometries";
10 Double_t x[nGeometries][nPoints],
y[nGeometries][nPoints],yE[nGeometries][nPoints];
11 Int_t TargetNumbers[nGeometries] = {36,41,42};
12 Int_t
counter[nGeometries] = {0,0};
13 Color_t ColorArrray[nGeometries] = {kBlack, kRed,kBlue};
14 TString TargetMaterialStrings[nGeometries] = {
"old Geometry (16)",
"DEGAS straight (20)",
"DEGAS Ball (18)"};
15 TString ComparisonStrings[nGeometries] = {
"straight/old",
"ball/old",
"straight/ball"};
17 TGraphErrors *graphTr4020[nGeometries];
18 ifstream Inputfile(
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/Fitted/FittedDataNewGeometry.txt");
20 Int_t Geometry, Sektar,
nEvents;
21 Double_t Energy, FullEnergyPeakEff, FullEnergyPeakEffError, FWHM, FWHMError,FullEnergyPeakEffSEP, FullEnergyPeakEffSEPError,FullEnergyPeakEffSEPDEP, FullEnergyPeakEffSEPDEPError;
24 bool useNoTargetComparison = 1;
25 while(Inputfile >> Geometry >> Sektar >> Energy >> nEvents >> FullEnergyPeakEff >> FullEnergyPeakEffError >>FWHM >> FWHMError>> FullEnergyPeakEffSEP >> FullEnergyPeakEffSEPError>>FullEnergyPeakEffSEPDEP >> FullEnergyPeakEffSEPDEPError )
27 for (
int i = 0;
i < nGeometries;
i++)
29 if (Geometry == TargetNumbers[
i])
31 x[
i][counter[
i]] = Energy;
32 y[
i][counter[
i]] = FullEnergyPeakEff;
33 yE[
i] [counter[
i]]= FullEnergyPeakEffError;
34 cout <<counter[
i] <<
" "<< Sektar <<
" " << x[
i][counter[
i] ] <<
" " <<y[
i][counter[
i] ] <<
" " <<yE[
i][counter[
i] ]<<endl;
42 TCanvas *
c1 =
new TCanvas(
"c1",
"c1",800,600);
45 TLegend*
leg =
new TLegend(0.7,0.7,0.9,0.9);
47 for (
int i = 0;
i< nGeometries;
i++)
49 graphTr4020[
i] =
new TGraphErrors(nPoints,x[
i],y[i],0,yE[i]);
50 graphTr4020[
i]->SetMarkerColor(i+1);
51 graphTr4020[
i]->SetMarkerSize(1);
52 graphTr4020[
i]->SetMarkerStyle(20);
53 graphTr4020[
i]->SetLineStyle(2);
54 graphTr4020[
i]->SetLineColor(i+1);
55 graphTr4020[
i]->SetTitle(HistoTitle);
56 graphTr4020[
i]->GetXaxis()->SetTitleOffset(graphTr4020[i]->
GetXaxis()->GetTitleOffset()*1.2);
57 graphTr4020[
i]->GetYaxis()->SetTitleOffset(graphTr4020[i]->
GetYaxis()->GetTitleOffset()*0.8);
58 graphTr4020[
i]->GetYaxis()->SetRangeUser(0,12);
60 leg->AddEntry(graphTr4020[i],TargetMaterialStrings[i],
"p");
67 for (
int i = 1;
i< nGeometries-1;
i++)
69 graphTr4020[
i]->Sort();
71 graphTr4020[0]->Draw(
"ALP");
73 graphTr4020[
i]->Draw(
"ALP");
77 TString PicRootDir = gSystem->Getenv(
"PICTUREDIR");
78 cout << PicRootDir.Data() << endl;
79 andi::saveCanvas_allFileNames(c1,TString::Format(
"%s/XiAtoms/Gamma/%s",PicRootDir.Data(),PicName.Data()));
83 Double_t CompArray[nGeometries][nPoints];
85 for (
int j = 0; j < nPoints; j++)
87 CompArray[0][j]= y[1][j]/y[0][j]*100;
88 CompArray[1][j]= y[2][j]/y[0][j]*100;
89 CompArray[2][j]= y[1][j]/y[2][j]*100;
90 cout << CompArray[1][j] << endl;
92 TGraph *graphComp[nGeometries];
94 TCanvas *
c2 =
new TCanvas(
"c2",
"c2",800,600);
97 TLegend* leg2 =
new TLegend(0.7,0.7,0.9,0.9);
98 for (
int i = 0;
i< nGeometries;
i++)
100 graphComp[
i] =
new TGraph(nPoints,x[
i],CompArray[i]);
101 graphComp[
i]->SetMarkerColor(i+2);
102 graphComp[
i]->SetMarkerSize(1);
103 graphComp[
i]->SetMarkerStyle(20);
104 graphComp[
i]->SetLineStyle(2);
105 graphComp[
i]->SetLineColor(i+1);
107 leg2->AddEntry(graphComp[i],ComparisonStrings[i],
"p");
109 TString CompTitle =
"Comparison of full-energy-peak-efficiency;#gamma energy [MeV]; Ratio of fep [%]";
110 graphComp[0]->SetTitle(CompTitle);
111 graphComp[0]->GetXaxis()->SetTitleOffset(graphComp[0]->
GetXaxis()->GetTitleOffset()*1.2);
112 graphComp[0]->GetYaxis()->SetTitleOffset(graphComp[0]->
GetYaxis()->GetTitleOffset()*0.8);
113 graphComp[0]->GetYaxis()->SetRangeUser(100,130);
115 for (
int i = 0;
i< nGeometries;
i++)
117 graphComp[
i]->Sort();
119 graphComp[0]->Draw(
"ALP");
125 andi::saveCanvas_allFileNames(c2,TString::Format(
"%s/XiAtoms/Gamma/%s",PicRootDir.Data(),PicName2.Data()));
hz_h GetYaxis() -> SetTitle("Counts")
hz_h GetXaxis() -> SetTitle("Z position")
int Pic_FEP_DEGASComparison()