3 const int nPoints = 20;
5 Double_t x3[nPoints],y3[nPoints],yE3[nPoints];
6 Double_t x2[nPoints],y2[nPoints],yE2[nPoints];
8 ifstream Inputfile(
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/Fitted/FittedDataLowEnergy.txt");
10 Int_t Geometry, Sektar,
nEvents;
11 Double_t Energy, FullEnergyPeakEff, FullEnergyPeakEffError, FWHM, FWHMError,FullEnergyPeakEffSEP, FullEnergyPeakEffSEPError,FullEnergyPeakEffSEPDEP, FullEnergyPeakEffSEPDEPError;
18 bool useNoTargetComparison = 1;
19 while(Inputfile >> Geometry >> Sektar >> Energy >> nEvents >> FullEnergyPeakEff >> FullEnergyPeakEffError >>FWHM >> FWHMError>> FullEnergyPeakEffSEP >> FullEnergyPeakEffSEPError>>FullEnergyPeakEffSEPDEP >> FullEnergyPeakEffSEPDEPError )
25 yE[
counter] = FullEnergyPeakEffError;
29 if (Sektar == iSekTarFile)
33 yE3[
counter3] = FullEnergyPeakEffError;
38 if (Sektar == iSekTarFile2)
42 yE2[
counter2] = FullEnergyPeakEffError;
49 TCanvas *
c1 =
new TCanvas(
"c1",
"c1",800,600);
52 TGraph *graph =
new TGraph(10,x,y);
53 TGraphErrors *graphTr4020 =
new TGraphErrors(nPoints,x,y,0,yE);
54 TGraphErrors *graphTr4020SekTar3 =
new TGraphErrors(nPoints,x3,y3,0,yE3);
55 TGraphErrors *graphTr4020SekTar2 =
new TGraphErrors(nPoints,x2,y2,0,yE2);
59 case 4: HistoTitle =
"Simulation of full-energy-peak-efficiency, iron target";
62 case 6: HistoTitle =
"Simulation of full-energy-peak-efficiency";
64 default: HistoTitle =
"Simulation of full-energy-peak-efficiency";
66 graphTr4020->SetTitle(HistoTitle.Data());
67 graphTr4020->GetHistogram()->SetXTitle(
"#gamma energy [MeV]");
68 graphTr4020->GetHistogram()->GetXaxis()->CenterTitle();
69 graphTr4020->GetHistogram()->GetXaxis()->SetTitleSize(0.06);
70 graphTr4020->GetHistogram()->GetXaxis()->SetTitleOffset(0.75);
71 graphTr4020->GetHistogram()->GetXaxis()->SetLabelSize(0.045);
72 graphTr4020->GetHistogram()->SetYTitle(
"Full-energy-peak-efficiency [%]");
73 graphTr4020->GetHistogram()->GetYaxis()->CenterTitle();
74 graphTr4020->GetHistogram()->GetYaxis()->SetTitleSize(0.06);
75 graphTr4020->GetHistogram()->GetYaxis()->SetTitleOffset(0.6);
76 graphTr4020->GetHistogram()->GetYaxis()->SetLabelSize(0.045);
77 graphTr4020->GetHistogram()->SetMinimum(0);
79 Size_t dMarkerSize = 2;
80 graphTr4020->SetMarkerColor(1);
81 graphTr4020->SetMarkerSize(dMarkerSize/2);
82 graphTr4020->SetMarkerStyle(20);
83 graphTr4020->SetLineColor(1);
84 graphTr4020->SetLineStyle(2);
86 graphTr4020SekTar3->SetTitle(HistoTitle.Data());
87 graphTr4020SekTar3->GetHistogram()->SetXTitle(
"#gamma energy [MeV]");
88 graphTr4020SekTar3->GetHistogram()->GetXaxis()->CenterTitle();
89 graphTr4020SekTar3->GetHistogram()->GetXaxis()->SetTitleSize(0.06);
90 graphTr4020SekTar3->GetHistogram()->GetXaxis()->SetTitleOffset(0.75);
91 graphTr4020SekTar3->GetHistogram()->GetXaxis()->SetLabelSize(0.045);
92 graphTr4020SekTar3->GetHistogram()->SetYTitle(
"Full-energy-peak-efficiency [%]");
93 graphTr4020SekTar3->GetHistogram()->GetYaxis()->CenterTitle();
94 graphTr4020SekTar3->GetHistogram()->GetYaxis()->SetTitleSize(0.06);
95 graphTr4020SekTar3->GetHistogram()->GetYaxis()->SetTitleOffset(0.6);
96 graphTr4020SekTar3->GetHistogram()->GetYaxis()->SetLabelSize(0.045);
97 graphTr4020SekTar3->GetHistogram()->SetMinimum(0);
100 graphTr4020SekTar3->SetMarkerColor(2);
101 graphTr4020SekTar3->SetMarkerSize(dMarkerSize/2);
102 graphTr4020SekTar3->SetMarkerStyle(20);
103 graphTr4020SekTar3->SetLineColor(2);
104 graphTr4020SekTar3->SetLineStyle(2);
106 graphTr4020SekTar2->SetTitle(HistoTitle.Data());
107 graphTr4020SekTar2->GetHistogram()->SetXTitle(
"#gamma energy [MeV]");
108 graphTr4020SekTar2->GetHistogram()->GetXaxis()->CenterTitle();
109 graphTr4020SekTar2->GetHistogram()->GetXaxis()->SetTitleSize(0.06);
110 graphTr4020SekTar2->GetHistogram()->GetXaxis()->SetTitleOffset(0.75);
111 graphTr4020SekTar2->GetHistogram()->GetXaxis()->SetLabelSize(0.045);
112 graphTr4020SekTar2->GetHistogram()->SetYTitle(
"Full-energy-peak-efficiency [%]");
113 graphTr4020SekTar2->GetHistogram()->GetYaxis()->CenterTitle();
114 graphTr4020SekTar2->GetHistogram()->GetYaxis()->SetTitleSize(0.06);
115 graphTr4020SekTar2->GetHistogram()->GetYaxis()->SetTitleOffset(0.6);
116 graphTr4020SekTar2->GetHistogram()->GetYaxis()->SetLabelSize(0.045);
117 graphTr4020SekTar2->GetHistogram()->SetMinimum(0);
120 graphTr4020SekTar2->SetMarkerColor(3);
121 graphTr4020SekTar2->SetMarkerSize(dMarkerSize/2);
122 graphTr4020SekTar2->SetMarkerStyle(20);
123 graphTr4020SekTar2->SetLineColor(3);
124 graphTr4020SekTar2->SetLineStyle(2);
126 if (useNoTargetComparison)
128 TLegend*
leg =
new TLegend(0.7,0.7,0.9,0.9);
129 leg->AddEntry(graphTr4020,
"iron target",
"p");
131 leg->AddEntry(graphTr4020SekTar3,
"iron target, with silicons",
"p");
132 leg->AddEntry(graphTr4020SekTar2,
"tantalum target",
"p");
133 graphTr4020->Draw(
"APL");
134 graphTr4020SekTar3->Draw(
"PL");
135 graphTr4020SekTar2->Draw(
"PL");
139 graphTr4020SekTar3->Draw(
"APL");
142 if (useNoTargetComparison)
146 Loss[
i]=100-y3[
i]/y[
i]*100;
147 cout <<
i <<
" " << Loss[
i] << endl;
150 TCanvas *
c2 =
new TCanvas(
"c2",
"c2",800,600);
153 TGraph *graphLoss =
new TGraph(10,x,Loss);
154 graphLoss->SetMarkerColor(1);
155 graphLoss->SetMarkerSize(dMarkerSize/2);
156 graphLoss->SetMarkerStyle(20);
157 graphLoss->SetLineColor(1);
158 graphLoss->SetLineStyle(2);
159 graphLoss->SetTitle(
"Efficiency loss due to the silicon detectors");
160 graphLoss->GetHistogram()->SetXTitle(
"#gamma energy [keV]");
161 graphLoss->GetHistogram()->GetXaxis()->CenterTitle();
162 graphLoss->GetHistogram()->GetXaxis()->SetTitleSize(0.06);
163 graphLoss->GetHistogram()->GetXaxis()->SetTitleOffset(0.75);
164 graphLoss->GetHistogram()->GetXaxis()->SetLabelSize(0.045);
165 graphLoss->GetHistogram()->SetYTitle(
"Efficiency loss [%]");
166 graphLoss->GetHistogram()->GetYaxis()->CenterTitle();
167 graphLoss->GetHistogram()->GetYaxis()->SetTitleSize(0.06);
168 graphLoss->GetHistogram()->GetYaxis()->SetTitleOffset(0.6);
169 graphLoss->GetHistogram()->GetYaxis()->SetLabelSize(0.045);
170 graphLoss->GetHistogram()->SetMinimum(0);
171 graphLoss->Draw(
"APL");
173 TString PicFEPString =
"~/pictures/FEP-Eff_Geo";
174 PicFEPString += iSekTarFile;
175 PicFEPString +=
"_LE.png";
176 c1->SaveAs(PicFEPString.Data());
177 if (useNoTargetComparison)
179 TString PicFEPCompString =
"~/pictures/Target-NoTarget-Comparion_Geo";
180 PicFEPCompString += iSekTarFile;
181 PicFEPCompString +=
"_LE.png";
183 c2->SaveAs(PicFEPCompString.Data());