Commit d140c06e authored by Vratislav Chudoba's avatar Vratislav Chudoba

Scripts for PRC pictures modified

parent 72022c76
......@@ -25,6 +25,8 @@ BeWork::BeWork()
Info("BeWork::BeWork", "Creating TELoss objects ...");
CreateTELosses();
Info("BeWork", "End of second constructor\n\n");
}
BeWork::BeWork(const char* configfile)
......@@ -42,7 +44,7 @@ BeWork::BeWork(const char* configfile)
CreateTELosses();
// fCalibFile = "/data2/be/parameterfiles";
Info("BeWork", "End of second constructor\n\n");
Info("BeWork", "End of constructor\n\n");
}
BeWork::BeWork(BeWork &bework) {
......
There is no need to install libraries. Working with ROOT 5.32.36 .
1) set path in makefile according to your operating system
2) type in terminal:
make all
make htmldoc
make install
# make install
3) add the install folder to LD_LIBRARY_PATH
......@@ -68,6 +68,8 @@ void figCorrGS()
hSim[i]->Draw("");
hExp[i]->Draw("E same");
hInput[i]->Draw("same");
hExp[i]->Chi2Test(hSim[i], "P");
}
// c1->SaveAs("figures/GSepsilonT.eps");
......@@ -118,6 +120,8 @@ void figCorrGS()
hCorrSim[i]->Draw("");
hCorrExp[i]->Draw("E same");
hCorrInput[i]->Draw("same");
hCorrExp[i]->Chi2Test(hCorrSim[i], "P");
}
// c2->SaveAs("figures/GSotherCorrs.eps");
......
void figCorrLeftES()
//canvas c1: Fig. 12 in first submitted version
//canvas c2: Fig. 13 in first submitted version
//canvas c3: Fig. 14 in first submitted version
//canvas c4: Fig. 15 in first submitted version
using std::cout;
using std::endl;
void figCorrLeftES(Bool_t saveFigs = 0)
{
TFile *fr = new TFile("figures/PRCepsilonT.root", "READ");
......@@ -44,6 +52,7 @@ void figCorrLeftES()
c1->SetWindowSize(800, 800);
c1->Divide(2, 2, .001, .001);
cout << "Fig. 12" << endl;
for (Int_t i = 0; i < 4; i++) {
c1->cd(i+1);
......@@ -63,11 +72,10 @@ void figCorrLeftES()
hSim[i]->Draw("");
hExp[i]->Draw("E same");
hInput[i]->Draw("same");
}
c1->SaveAs("figures/ESepsilonTleft.eps");
// return;
hExp[i]->Chi2Test(hSim[i], "P");
}
c1->Update();
TCanvas *c2 = new TCanvas();
c2->ToggleEditor();
......@@ -82,6 +90,8 @@ void figCorrLeftES()
TString hName;
cout << "Fig. 13" << endl;
for (Int_t i = 0; i < 6; i++) {
c2->cd(i+1);
......@@ -108,15 +118,16 @@ void figCorrLeftES()
hCorrSim[i]->Draw("");
hCorrExp[i]->Draw("E same");
hCorrInput[i]->Draw("same");
}
c2->SaveAs("figures/ESepsilonT7590left.eps");
hCorrExp[i]->Chi2Test(hCorrSim[i], "P");
}
c2->Update();
// return;
TCanvas *c3 = new TCanvas();
c3->ToggleEditor();
c3->SetWindowSize(800, 1227);
// c3->SetWindowSize(800, 1227);
c3->SetWindowSize(800, 1200);
c3->Divide(2, 3, .001, .001);
TFile *fr2 = new TFile("figures/PRCthetaA.root");
......@@ -124,8 +135,11 @@ void figCorrLeftES()
TH1F *hAlphaExp[6];
TH1F *hAlphaSim[6];
TH1F *hAlphaInput[6];
TH1F *hAlphaInputCorr[6];
TString hName;
// TString hName;
cout << "Fig. 14" << endl;
for (Int_t i = 0; i < 6; i++) {
c3->cd(i+1);
......@@ -142,6 +156,14 @@ void figCorrLeftES()
hCurr = (TH1F*)fr2->Get(hName.Data());
hAlphaInput[i] = new TH1F(*hCurr);
hAlphaInputCorr[i] = new TH1F(*hAlphaInput[i]);
Double_t binContent = 0;
for (Int_t binN = 1; binN <= 15; binN++) {
binContent = hAlphaInputCorr[i]->GetBinContent(binN);
hAlphaInputCorr[i]->SetBinContent(binN, binContent + hAlphaInputCorr[i]->GetBinContent(31-binN));
hAlphaInputCorr[i]->SetBinContent(31-binN, hAlphaInputCorr[i]->GetBinContent(binN));
}
hAlphaInput[i]->SetLineWidth(2);
hAlphaSim[i]->SetTitle("");
hAlphaSim[i]->GetXaxis()->SetNdivisions(506);
......@@ -154,12 +176,23 @@ void figCorrLeftES()
hAlphaSim[i]->GetYaxis()->SetTitle("");
hAlphaSim[i]->Draw("");
hAlphaSim[i]->GetXaxis()->SetTitle("#it{#theta}_{#alpha} (rad)");
hAlphaExp[i]->Draw("E same");
hAlphaInput[i]->Draw("same");
// hAlphaInput[i]->Draw("same");
hAlphaInputCorr[i]->SetLineColor(kRed);
hAlphaInputCorr[i]->SetLineWidth(2);
hAlphaInputCorr[i]->Scale(0.5);
hAlphaInputCorr[i]->Smooth();
hAlphaInputCorr[i]->Draw("same");
// cout << "Chi2: " << hAlphaSim[i]->Chi2Test()endl;
hAlphaExp[i]->Chi2Test(hAlphaSim[i], "P");
// hAlphaSim[i]->Chi2Test(hAlphaInputCorr[i], "P");
}
c3->Update();
c3->SaveAs("figures/ESThetaAleft7590.eps");
TCanvas *c4 = new TCanvas();
......@@ -172,8 +205,10 @@ void figCorrLeftES()
TH1F *hAlphaExp90120[6];
TH1F *hAlphaSim90120[6];
TH1F *hAlphaInput90120[6];
TH1F *hAlphaInput90120Corr[6];
TString hName;
cout << "Fig. 15" << endl;
for (Int_t i = 0; i < 6; i++) {
c4->cd(i+1);
......@@ -190,6 +225,14 @@ void figCorrLeftES()
hCurr = (TH1F*)fr2->Get(hName.Data());
hAlphaInput90120[i] = new TH1F(*hCurr);
hAlphaInput90120Corr[i] = new TH1F(*hAlphaInput90120[i]);
Double_t binContent = 0;
for (Int_t binN = 1; binN <= 15; binN++) {
binContent = hAlphaInput90120Corr[i]->GetBinContent(binN);
hAlphaInput90120Corr[i]->SetBinContent(binN, binContent + hAlphaInput90120Corr[i]->GetBinContent(31-binN));
hAlphaInput90120Corr[i]->SetBinContent(31-binN, hAlphaInput90120Corr[i]->GetBinContent(binN));
}
hAlphaInput90120[i]->SetLineWidth(2);
hAlphaSim90120[i]->SetTitle("");
hAlphaSim90120[i]->GetXaxis()->SetNdivisions(506);
......@@ -202,11 +245,26 @@ void figCorrLeftES()
hAlphaSim90120[i]->GetYaxis()->SetTitle("");
hAlphaSim90120[i]->Draw("");
hAlphaSim90120[i]->GetXaxis()->SetTitle("#it{#theta}_{#alpha} (rad)");
hAlphaExp90120[i]->Draw("E same");
hAlphaInput90120[i]->Draw("same");
}
// hAlphaInput90120[i]->Draw("same");
hAlphaInput90120Corr[i]->SetLineColor(kRed);
hAlphaInput90120Corr[i]->SetLineWidth(2);
hAlphaInput90120Corr[i]->Scale(0.5);
hAlphaInput90120Corr[i]->Smooth();
hAlphaInput90120Corr[i]->Draw("same");
hAlphaExp90120[i]->Chi2Test(hAlphaSim90120[i], "P");
}
c4->Update();
c1->Update();
if (saveFigs) {
// c1->SaveAs("figures/ESepsilonTleft.eps");
// c2->SaveAs("figures/ESepsilonT7590left.eps");
c3->SaveAs("figures/ESThetaAleft7590.eps");
c4->SaveAs("figures/ESThetaAleft90120.eps");
}
}
//canvas c1: Fig. 9 in first submitted version
//canvas c2: Fig. 10 in first submitted version
//canvas c3: Fig. 11 in first submitted version
//#include "TFile.h"
//#include "TCanvas.h"
//#include "TH1F.h"
void figCorrRightGS()
using std::cout;
using std::endl;
void figCorrRightGS(const Bool_t saveFigs = 0)
{
TFile *fr1 = new TFile("figures/PRCepsilonT.root", "READ");
......@@ -49,6 +56,7 @@ void figCorrRightGS()
c1->SetWindowSize(800, 800);
c1->Divide(2, 2, .001, .001);
cout << "Fig. 9" << endl;
for (Int_t i = 0; i < 4; i++) {
c1->cd(i+1);
......@@ -68,23 +76,23 @@ void figCorrRightGS()
hSim[i]->Draw("");
hExp[i]->Draw("E same");
hInput[i]->Draw("same");
hExp[i]->Chi2Test(hSim[i], "P");
}
c1->SaveAs("figures/GSepsilonTright.eps");
c1->Update();
TCanvas *c2 = new TCanvas();
c2->ToggleEditor();
c2->SetWindowSize(800, 1227);
c2->Divide(2, 3, .001, .001);
// TFile *fr3 = new TFile("figures/PRCepsilonY.root");
TH1F *hCorrExp[6];
TH1F *hCorrSim[6];
TH1F *hCorrInput[6];
TString hName;
cout << "Fig. 10" << endl;
for (Int_t i = 0; i < 6; i++) {
c2->cd(i+1);
......@@ -111,9 +119,10 @@ void figCorrRightGS()
hCorrSim[i]->Draw("");
hCorrExp[i]->Draw("E same");
hCorrInput[i]->Draw("same");
}
c2->SaveAs("figures/GSepsilonTright7590.eps");
hCorrExp[i]->Chi2Test(hCorrSim[i], "P");
}
c2->Update();
TCanvas *c3 = new TCanvas();
c3->ToggleEditor();
......@@ -125,8 +134,9 @@ void figCorrRightGS()
TH1F *hAlphaExp[6];
TH1F *hAlphaSim[6];
TH1F *hAlphaInput[6];
TH1F *hAlphaInputCorr[6];
TString hName;
cout << "Fig. 11" << endl;
for (Int_t i = 0; i < 6; i++) {
c3->cd(i+1);
......@@ -143,6 +153,14 @@ void figCorrRightGS()
hCurr = (TH1F*)fr2->Get(hName.Data());
hAlphaInput[i] = new TH1F(*hCurr);
hAlphaInputCorr[i] = new TH1F(*hAlphaInput[i]);
Double_t binContent = 0;
for (Int_t binN = 1; binN <= 15; binN++) {
binContent = hAlphaInputCorr[i]->GetBinContent(binN);
hAlphaInputCorr[i]->SetBinContent(binN, binContent + hAlphaInputCorr[i]->GetBinContent(31-binN));
hAlphaInputCorr[i]->SetBinContent(31-binN, hAlphaInputCorr[i]->GetBinContent(binN));
}
hAlphaInput[i]->SetLineWidth(2);
hAlphaSim[i]->SetTitle("");
hAlphaSim[i]->GetXaxis()->SetNdivisions(506);
......@@ -155,11 +173,23 @@ void figCorrRightGS()
hAlphaSim[i]->GetYaxis()->SetTitle("");
hAlphaSim[i]->Draw("");
hAlphaSim[i]->GetXaxis()->SetTitle("#it{#theta}_{#alpha} (rad)");
hAlphaExp[i]->Draw("E same");
hAlphaInput[i]->Draw("same");
}
// hAlphaInput[i]->Draw("same");
hAlphaInputCorr[i]->SetLineColor(kRed);
hAlphaInputCorr[i]->SetLineWidth(2);
hAlphaInputCorr[i]->Scale(0.5);
hAlphaInputCorr[i]->Smooth();
hAlphaInputCorr[i]->Draw("same");
hAlphaExp[i]->Chi2Test(hAlphaSim[i], "P");
c3->SaveAs("figures/GSThetaAright7590.eps");
}
c3->Update();
if (saveFigs) {
c1->SaveAs("figures/GSepsilonTright.eps");
c2->SaveAs("figures/GSepsilonTright7590.eps");
c3->SaveAs("figures/GSThetaAright7590.eps");
}
}
......@@ -5,7 +5,9 @@
void figSpectra()
{
TFile *fr = new TFile("figures/spectra.root", "READ");
// TFile *fr = new TFile("figures/spectra.root", "READ");
// TFile *fr = new TFile("figures/spectra100new.root", "READ");
TFile *fr = new TFile("figures/spectra50new.root", "READ");
// fr->ls();
......@@ -77,6 +79,6 @@ void figSpectra()
diff[i]->GetYaxis()->SetRangeUser(-100, 3500);
}
c2->SaveAs("figures/spectraDiff.eps");
// c2->SaveAs("figures/spectraDiff.eps");
}
......@@ -22,8 +22,8 @@ void rootlogon6panels()
gStyle->SetCanvasDefX(85);
gStyle->SetCanvasDefY(224);
gStyle->SetCanvasDefW(649);
gStyle->SetCanvasDefH(727);
// gStyle->SetCanvasDefW(649);
// gStyle->SetCanvasDefH(727);
//marker attributes
gStyle->SetMarkerStyle(20);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment