5 RootInputFiles[0] =
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/OmegaResults/mu-2.0_Q0.0__Psf1.root";
6 RootInputFiles[1] =
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/OmegaResults/mu-2.0_Q-2.0__Psf1.root";
7 RootInputFiles[2] =
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/OmegaResults/mu-2.0_Q-4.0__Psf1.root";
8 TF1 *fTemporary[nFiles];
11 TString PicRootDir = gSystem->Getenv(
"PICTUREDIR");
12 andi::setCustomStyle();
13 TString HistoTitleMean =
"Mean;#Omega Quadrupole moment [10^{-2}fm^{2}e]; Mean [MeV]";
14 TString HistoTitleVariance =
"Variance;#Omega Quadrupole moment [10^{-2}fm^{2}e]; Variance [MeV^{2}]";
15 TString HistoTitleSkewness =
"Skewness;#Omega Quadrupole moment [10^{-2}fm^{2}e]; Skewness [MeV^{3}]";
16 TString HistoTitleKurtosis =
"Kurtosis;#Omega Quadrupole moment [10^{-2}fm^{2}e]; Kurtosis [MeV^{4}]";
17 TString HistoTitleMaxX =
"Position of Maximum;#Omega Quadrupole moment [10^{-2}fm^{2}e]; Position of Maximum [MeV]";
19 const int nPsfPlot = 1;
20 const int nPoints = 22;
21 TString PicName =
"FEPcomparison_IronLead_Omega";
24 aVariance[nPsf][nPoints],
25 aSkewness[nPsf][nPoints],
26 aKurtosis[nPsf][nPoints],
28 Int_t TargetNumbers[nPsf] = {13,43};
30 Color_t ColorArrray[nPsf] = {kBlack, kRed};
31 Color_t ColorArrrayFunction[nFiles] = {kBlack, kRed, kGreen};
32 TString TargetMaterialStrings[nPsf] = {
"Psf 1",
"Psf 1.5"};
34 TGraphErrors *graphMean[nPsf];
35 TGraphErrors *graphVariance[nPsf];
36 TGraphErrors *graphSkewness[nPsf];
37 TGraphErrors *graphKurtosis[nPsf];
38 TGraphErrors *graphMaxX[nPsf];
39 ifstream Inputfile(
"/data/work/kpha1/steinen/Gamma/Ana/CombinedData/OmegaResults/OmegaResults.txt");
42 Double_t MeanPos,StandardDev, Skewness,Kurtosis,MaxX;
46 Inputfile.getline(buffer,100);
47 while(Inputfile >> mu >> Q >> Psf >>
48 MeanPos >> StandardDev >> Skewness>>Kurtosis >>MaxX)
54 aQ[0][counter[0]] = Q;
55 aMean[0][counter[0]] = MeanPos;
56 aVariance[0][counter[0]] = StandardDev*StandardDev;
57 aSkewness[0][counter[0]] = Skewness;
58 aKurtosis[0][counter[0]] = Kurtosis;
59 aMaxX[0][counter[0]] = MaxX;
60 cout << mu << Q << Psf << MeanPos << StandardDev << Skewness << Kurtosis << MaxX<< endl;
65 aQ[1][counter[1]] = Q;
66 aMean[1][counter[1]] = MeanPos;
67 aVariance[1][counter[1]] = StandardDev;
68 aSkewness[1][counter[1]] = Skewness;
69 aKurtosis[1][counter[1]] = Kurtosis;
70 aMaxX[1][counter[1]] = MaxX;
72 cout <<
"bla" << mu << Q << Psf << MeanPos << StandardDev << Skewness << Kurtosis<< MaxX<< endl;
81 for (
int i = 0;
i<5;
i++)
83 sprintf(buffer,
"c%i",
i);
84 c1[
i] =
new TCanvas(buffer,buffer,1200,800);
89 TLegend*
leg =
new TLegend(0.7,0.7,0.9,0.9);
91 for (
int i = 0;
i< nPsf;
i++)
93 graphMean[
i] =
new TGraphErrors(counter[
i],aQ[i],aMean[i],0,0);
95 graphMean[
i]->SetMarkerColor(i+1);
96 graphMean[
i]->SetMarkerSize(1);
97 graphMean[
i]->SetMarkerStyle(20);
98 graphMean[
i]->SetLineStyle(2);
99 graphMean[
i]->SetLineColor(i+1);
102 graphVariance[
i] =
new TGraphErrors(counter[i],aQ[i],aVariance[i],0,0);
103 graphVariance[
i]->Sort();
104 graphVariance[
i]->SetMarkerColor(i+1);
105 graphVariance[
i]->SetMarkerSize(1);
106 graphVariance[
i]->SetMarkerStyle(20);
107 graphVariance[
i]->SetLineStyle(2);
108 graphVariance[
i]->SetLineColor(i+1);
110 graphSkewness[
i] =
new TGraphErrors(counter[i],aQ[i],aSkewness[i],0,0);
111 graphSkewness[
i]->Sort();
112 graphSkewness[
i]->SetMarkerColor(i+1);
113 graphSkewness[
i]->SetMarkerSize(1);
114 graphSkewness[
i]->SetMarkerStyle(20);
115 graphSkewness[
i]->SetLineStyle(2);
116 graphSkewness[
i]->SetLineColor(i+1);
118 graphKurtosis[
i] =
new TGraphErrors(counter[i],aQ[i],aKurtosis[i],0,0);
119 graphKurtosis[
i]->Sort();
120 graphKurtosis[
i]->SetMarkerColor(i+1);
121 graphKurtosis[
i]->SetMarkerSize(1);
122 graphKurtosis[
i]->SetMarkerStyle(20);
123 graphKurtosis[
i]->SetLineStyle(2);
124 graphKurtosis[
i]->SetLineColor(i+1);
126 graphMaxX[
i] =
new TGraphErrors(counter[i],aQ[i],aMaxX[i],0,0);
127 graphMaxX[
i]->Sort();
128 graphMaxX[
i]->SetMarkerColor(i+1);
129 graphMaxX[
i]->SetMarkerSize(1);
130 graphMaxX[
i]->SetMarkerStyle(20);
131 graphMaxX[
i]->SetLineStyle(2);
132 graphMaxX[
i]->SetLineColor(i+1);
135 for (
int i = 0;
i< nPsfPlot;
i++)
137 leg->AddEntry(graphMean[
i],TargetMaterialStrings[i],
"p");
141 graphMean[0]->SetTitle(HistoTitleMean);
142 graphMean[0]->GetXaxis()->SetTitleOffset(graphMean[0]->
GetXaxis()->GetTitleOffset()*1.2);
143 graphMean[0]->GetYaxis()->SetTitleOffset(graphMean[0]->
GetYaxis()->GetTitleOffset()*0.8);
144 graphMean[0]->GetYaxis()->SetRangeUser(0.52,0.5202);
146 graphVariance[0]->SetTitle(HistoTitleVariance);
147 graphVariance[0]->GetXaxis()->SetTitleOffset(graphVariance[0]->
GetXaxis()->GetTitleOffset()*1.2);
148 graphVariance[0]->GetYaxis()->SetTitleOffset(graphVariance[0]->
GetYaxis()->GetTitleOffset()*0.8);
151 graphSkewness[0]->SetTitle(HistoTitleSkewness);
152 graphSkewness[0]->GetXaxis()->SetTitleOffset(graphSkewness[0]->
GetXaxis()->GetTitleOffset()*1.2);
153 graphSkewness[0]->GetYaxis()->SetTitleOffset(graphSkewness[0]->
GetYaxis()->GetTitleOffset()*0.8);
156 graphKurtosis[0]->SetTitle(HistoTitleKurtosis);
157 graphKurtosis[0]->GetXaxis()->SetTitleOffset(graphKurtosis[0]->
GetXaxis()->GetTitleOffset()*1.2);
158 graphKurtosis[0]->GetYaxis()->SetTitleOffset(graphKurtosis[0]->
GetYaxis()->GetTitleOffset()*0.8);
161 graphMaxX[0]->SetTitle(HistoTitleMaxX);
162 graphMaxX[0]->GetXaxis()->SetTitleOffset(graphMaxX[0]->
GetXaxis()->GetTitleOffset()*1.2);
163 graphMaxX[0]->GetYaxis()->SetTitleOffset(graphMaxX[0]->
GetYaxis()->GetTitleOffset()*0.8);
168 graphMean[0]->Draw(
"ALP");
169 for (
int i = 1;
i< nPsfPlot;
i++)
171 graphMean[
i]->Draw(
"LP");
175 graphVariance[0]->Draw(
"ALP");
176 for (
int i = 1;
i< nPsfPlot;
i++)
178 graphVariance[
i]->Draw(
"LP");
182 graphSkewness[0]->Draw(
"ALP");
183 for (
int i = 1;
i< nPsfPlot;
i++)
185 graphSkewness[
i]->Draw(
"LP");
189 graphKurtosis[0]->Draw(
"ALP");
190 for (
int i = 1;
i< nPsfPlot;
i++)
192 graphKurtosis[
i]->Draw(
"LP");
197 graphMaxX[0]->Draw(
"ALP");
198 for (
int i = 1;
i< nPsfPlot;
i++)
200 graphMaxX[
i]->Draw(
"LP");
207 TFile *RootInfile[nFiles];
208 for (
int i = 0;
i<nFiles;
i++)
210 RootInfile[
i]=
new TFile(RootInputFiles[
i].Data());
211 RootInfile[
i]->GetObject(
"fGausFitCombined;1",fTemporary[
i]);
213 fTemporary[
i]->SetLineColor(ColorArrrayFunction[i]);
214 RootInfile[
i]->Close();
216 TCanvas *cComparison =
new TCanvas(
"cComparison",
"direct Comparison",1200,800);
217 cComparison->SetGrid();
218 cComparison->SetTicks();
219 cComparison->SetLeftMargin(0.12);
220 cComparison->SetBottomMargin(0.10);
221 TLegend* leg2 =
new TLegend(0.7,0.7,0.9,0.9);
222 leg2->AddEntry(fTemporary[0],
"Q = 0.00 fm^{2}e",
"l");
223 leg2->AddEntry(fTemporary[1],
"Q = -0.02 fm^{2}e",
"l");
224 leg2->AddEntry(fTemporary[2],
"Q = -0.04 fm^{2}e",
"l");
225 fTemporary[0]->SetTitle(
"");
226 fTemporary[0]->GetXaxis()->SetTitle(
"Energy [MeV]");
227 fTemporary[0]->GetXaxis()->SetTitleOffset(1.05);
228 fTemporary[0]->GetYaxis()->SetTitle(
"Counts [a.u.]");
229 fTemporary[0]->GetYaxis()->SetTitleOffset(1.3);
230 fTemporary[0]->Draw();
231 for (
int i = 1;
i<nFiles;
i++)
233 fTemporary[
i]->Draw(
"same");
237 andi::saveCanvas_allFileNames(c1[0],TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"Mean"));
238 andi::saveCanvas_allFileNames(c1[1],TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"Variance"));
239 andi::saveCanvas_allFileNames(c1[2],TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"Skewness"));
240 andi::saveCanvas_allFileNames(c1[3],TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"Kurtosis"));
241 andi::saveCanvas_allFileNames(c1[4],TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"MaxX"));
242 andi::saveCanvas_allFileNames(cComparison,TString::Format(
"%s/OmegaQuadrupole/%s",PicRootDir.Data(),
"ShapeComparison"));
hz_h GetYaxis() -> SetTitle("Counts")
hz_h GetXaxis() -> SetTitle("Z position")
int Pic_OmegaQuadrupoleComparison()