Commit 3a99821c authored by Vratislav Chudoba's avatar Vratislav Chudoba

All figures for interval 75-90 work

parent 38909048
......@@ -363,7 +363,8 @@ void BeAnalysis::Spectra() {
canvasTitle.Form("energy spectra fitting;\t(%d,%d) degrees", kMinAngle, kMaxAngle);
cSpectra->SetTitle(canvasTitle.Data());
cSpectra->Divide(2, 3);
// cSpectra->Divide(2, 3);
CanvasDivision(cSpectra);
che->SetLineColor(kGreen);
......@@ -394,11 +395,11 @@ void BeAnalysis::Spectra() {
heSpectra[j]->Draw("E");
heSpectra[j]->SetLineColor(1);
heSpectra[j]->SetTitle("");
heSpectra[j]->SetXTitle("E_{T} [MeV]");
heSpectra[j]->GetXaxis()->SetTitleOffset(0.95);
heSpectra[j]->SetXTitle("E_{T} (MeV)");
// heSpectra[j]->GetXaxis()->SetTitleOffset(0.95);
heSpectra[j]->GetXaxis()->CenterTitle();
heSpectra[j]->SetYTitle("counts");
heSpectra[j]->GetYaxis()->SetTitleOffset(0.7);
// heSpectra[j]->GetYaxis()->SetTitleOffset(0.7);
heSpectra[j]->GetYaxis()->CenterTitle();
hsSpectra[j]->SetLineColor(kGray+1);
hsSpectra[j]->SetFillColor(kGray+1);
......@@ -450,13 +451,15 @@ void BeAnalysis::EpsilonT() {
canvasTitle.Form("epsilon in %s T-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
canEpsilonT[i]->SetTitle(canvasTitle.Data());
canEpsilonT[i]->Divide(2, 3);
// canEpsilonT[i]->Divide(2, 3, 0., 0.);
CanvasDivision(canEpsilonT[i]);
// cProtons.Print();
// cQ.Print();
// crBeE[i].Print();
// crAngles.Print();
// TFile fw("histos.root", "RECREATE");
che->SetLineColor(kBlack);
for (Int_t j = 0; j < 6; j++) { //different files
......@@ -526,19 +529,15 @@ void BeAnalysis::EpsilonT() {
heeT[i][j]->Integral(0,heeT[i][j]->GetNbinsX())/hseT[i][j]->Integral(0,hseT[i][j]->GetNbinsX()) );
}
// hseT[i][j]->Write();
}//for j
if (kVerbose) cout << endl;
// fw.Close();
SaveFigures(canEpsilonT[i], "epsilonT", i);
/*if (savePictures) {
canvasName.Form("%sfig%depsilonT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cout << canvasName.Data() << endl;
canEpsilonT[i]->SaveAs(canvasName.Data());
canEpsilonT[i]->cd();
canEpsilonT[i]->Close();
}//if save pictures*/
// }//if
}//for i
}
......@@ -564,7 +563,8 @@ void BeAnalysis::CosThetaTk() {
canvasTitle.Form("cos thetak in %s T-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
cThetaT[i]->SetTitle(canvasTitle.Data());
cThetaT[i]->Divide(2, 3);
// cThetaT[i]->Divide(2, 3);
CanvasDivision(cThetaT[i]);
che->SetLineColor(kBlack);
for (Int_t j = 0; j < 6; j++) { //different files
......@@ -582,6 +582,17 @@ void BeAnalysis::CosThetaTk() {
hecoskT[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hscoskT[i][j]->Draw();
hscoskT[i][j]->SetTitle("");
hscoskT[i][j]->SetXTitle("\\cos \\theta_k");
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
hscoskT[i][j]->GetXaxis()->CenterTitle();
hscoskT[i][j]->SetYTitle("counts");
// hseT[i][j]->GetYaxis()->SetTitleOffset(0.7);
hscoskT[i][j]->GetYaxis()->CenterTitle();
// hscoskT[i][j]->GetYaxis()->SetRangeUser(0, coskTRange[i][j]);
hecoskT[i][j]->Draw("E same");
if (kAutoRange) {
......@@ -606,11 +617,11 @@ void BeAnalysis::CosThetaTk() {
hicoskT[i][j]->Scale(scale);
//draw an axis on the right side
TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
axis->SetLineColor(kRed);
axis->SetLabelColor(kRed);
axis->Draw();
// TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
// gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
// axis->SetLineColor(kRed);
// axis->SetLabelColor(kRed);
// axis->Draw();
cThetaT[i]->Update();
......@@ -625,13 +636,6 @@ void BeAnalysis::CosThetaTk() {
SaveFigures(cThetaT[i], "cosThetakT", i);
/*if (savePictures) {
canvasName.Form("%sfig%dcosThetakT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaT[i]->SaveAs(canvasName.Data());
cThetaT[i]->cd();
cThetaT[i]->Close();
}*/
// }//if
}//for i
}
......@@ -657,10 +661,12 @@ void BeAnalysis::EpsilonY() {
canvasTitle.Form("epsilon in %s Y-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
canEpsilonY[i]->SetTitle(canvasTitle.Data());
canEpsilonY[i]->Divide(2, 3);
// canEpsilonY[i]->Divide(2, 3);
CanvasDivision(canEpsilonY[i]);
che->SetLineColor(kBlack);
for (Int_t j = 0; j < 6; j++) { //different files
if (!kChains[j]) continue;
canEpsilonY[i]->cd(j+1);
chs[j]->SetLineColor(kGray+1);
chs[j]->SetFillColor(kGray+1);
......@@ -674,6 +680,15 @@ void BeAnalysis::EpsilonY() {
heeY[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hseY[i][j]->Draw();
hseY[i][j]->SetTitle("");
hseY[i][j]->SetXTitle("\\varepsilon");
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
hseY[i][j]->GetXaxis()->CenterTitle();
hseY[i][j]->SetYTitle("counts");
// hseT[i][j]->GetYaxis()->SetTitleOffset(0.7);
hseY[i][j]->GetYaxis()->CenterTitle();
heeY[i][j]->Draw("E same");
if (kAutoRange) {
Float_t leftMaxMC = kRangeProportion*heeY[i][j]->GetMaximum();
......@@ -696,11 +711,11 @@ void BeAnalysis::EpsilonY() {
hieY[i][j]->Scale(scale);
//draw an axis on the right side
TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
axis->SetLineColor(kRed);
axis->SetLabelColor(kRed);
axis->Draw();
// TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
// gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
// axis->SetLineColor(kRed);
// axis->SetLabelColor(kRed);
// axis->Draw();
canEpsilonY[i]->Update();
......@@ -715,14 +730,6 @@ void BeAnalysis::EpsilonY() {
SaveFigures(canEpsilonY[i], "EpsilonY", i);
/*if (savePictures) {
canvasName.Form("%sfig%dEpsilonY:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cout << canvasName.Data() << endl;
canEpsilonY[i]->SaveAs(canvasName.Data());
canEpsilonY[i]->cd();
canEpsilonY[i]->Close();
}//if save pictures*/
// }//if
}//for i
......@@ -742,17 +749,19 @@ void BeAnalysis::CosThetaYk() {
TH1F *hecoskY[noIntervals][6];
TH1F *hicoskY[noIntervals][6];
if (cosThetaY[i]) continue;
if (!cosThetaY[i]) continue;
// {
cThetaY[i] = new TCanvas();
canvasTitle.Form("cos thetak in %s Y-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
cThetaY[i]->SetTitle(canvasTitle.Data());
cThetaY[i]->Divide(2, 3);
// cThetaY[i]->Divide(2, 3);
CanvasDivision(cThetaY[i]);
che->SetLineColor(kBlack);
for (Int_t j = 0; j < 6; j++) { //different files
if (!kChains[j]) continue;
cThetaY[i]->cd(j+1);
chs[j]->SetLineColor(kGray+1);
chs[j]->SetFillColor(kGray+1);
......@@ -766,6 +775,14 @@ void BeAnalysis::CosThetaYk() {
hecoskY[i][j] = (TH1F*)gPad->FindObject(heName.Data());
hscoskY[i][j]->Draw();
hscoskY[i][j]->SetTitle("");
hscoskY[i][j]->SetXTitle("\\cos \\theta_k");
// hseT[i][j]->GetXaxis()->SetTitleOffset(0.95);
// hseT[i][j]->GetXaxis()->SetTitleSize(0.11);
hscoskY[i][j]->GetXaxis()->CenterTitle();
hscoskY[i][j]->SetYTitle("counts");
// hseT[i][j]->GetYaxis()->SetTitleOffset(0.7);
hscoskY[i][j]->GetYaxis()->CenterTitle();
hecoskY[i][j]->Draw("E same");
if (kAutoRange) {
Float_t leftMaxMC = kRangeProportion*hecoskY[i][j]->GetMaximum();
......@@ -789,11 +806,11 @@ void BeAnalysis::CosThetaYk() {
hicoskY[i][j]->Scale(scale);
//draw an axis on the right side
TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
axis->SetLineColor(kRed);
axis->SetLabelColor(kRed);
axis->Draw();
// TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
// gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
// axis->SetLineColor(kRed);
// axis->SetLabelColor(kRed);
// axis->Draw();
cThetaY[i]->Update();
......@@ -809,14 +826,6 @@ void BeAnalysis::CosThetaYk() {
SaveFigures(cThetaY[i], "cosThetakY", i);
/*if (savePictures) {
canvasName.Form("%sfig%dcosThetakY:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaY[i]->SaveAs(canvasName.Data());
cThetaY[i]->cd();
cThetaY[i]->Close();
}*/
// }//if
}//for i
}
......@@ -841,7 +850,8 @@ void BeAnalysis::ThetaAT() {
canvasTitle.Form("cos theta alpha in %s T-system;\t(%d,%d) degrees", (const char*)cBeE[i], kMinAngle, kMaxAngle);
cThetaAT[i]->SetTitle(canvasTitle.Data());
cThetaAT[i]->Divide(2, 3);
// cThetaAT[i]->Divide(2, 3);
CanvasDivision(cThetaAT[i]);
che->SetLineColor(kBlack);
for (Int_t j = 0; j < 6; j++) { //different files
......@@ -860,12 +870,12 @@ void BeAnalysis::ThetaAT() {
hsthetaAT[i][j]->Draw();
hsthetaAT[i][j]->SetTitle("");
hsthetaAT[i][j]->SetXTitle("\\theta_{\\alpha} [rad]");
hsthetaAT[i][j]->GetXaxis()->SetTitleOffset(0.95);
hsthetaAT[i][j]->SetXTitle("\\theta_{\\alpha} (rad)");
// hsthetaAT[i][j]->GetXaxis()->SetTitleOffset(0.95);
hsthetaAT[i][j]->GetXaxis()->CenterTitle();
hsthetaAT[i][j]->SetYTitle("counts");
// hsthetaAT[i][j]->GetYaxis()->SetTitleOffset(1.09);
hsthetaAT[i][j]->GetYaxis()->SetTitleOffset(0.7);
// hsthetaAT[i][j]->GetYaxis()->SetTitleOffset(0.7);
hsthetaAT[i][j]->GetYaxis()->CenterTitle();
hethetaAT[i][j]->Draw("E same");
......@@ -891,11 +901,11 @@ void BeAnalysis::ThetaAT() {
//draw an axis on the right side
TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
axis->SetLineColor(kRed);
axis->SetLabelColor(kRed);
axis->Draw();
// TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),
// gPad->GetUxmax(), gPad->GetUymax(),0,rightmax,510,"+L");
// axis->SetLineColor(kRed);
// axis->SetLabelColor(kRed);
// axis->Draw();
cThetaAT[i]->Update();
......@@ -909,12 +919,7 @@ void BeAnalysis::ThetaAT() {
}//for j
SaveFigures(cThetaAT[i], "thetaAT", i);
/*if (savePictures) {
canvasName.Form("%sfig%dthetaAT:%s%s", ppath.Data(), i, configuration.Data(), pictFormat.Data());
cThetaAT[i]->SaveAs(canvasName.Data());
cThetaAT[i]->cd();
cThetaAT[i]->Close();
}*/
}//for i
}
......@@ -1189,9 +1194,15 @@ void BeAnalysis::SaveFigures(TCanvas *canvas, TString variable, Int_t interval)
if (!kSaveFigures) return;
canvasName.Form("%sfig%d%s:%d%d%s", figurePath.Data(), interval, variable.Data(), kMinAngle, kMaxAngle, figureFormat.Data());
cout << canvasName << endl;
// return;
canvas->SaveAs(canvasName.Data());
canvas->cd();
canvas->Close();
}
void BeAnalysis::CanvasDivision(TCanvas* c) {
c->Divide(2, 3, 0., 0.);
}
......@@ -60,6 +60,7 @@ public:
void SimEventsECuts(Long64_t noSimEvents[5][6] = 0);
void EpsilonTRange();
void SetSpectra(Bool_t kSpectra = 1) {spectra = kSpectra;};
void SetEpsilonTintervals(Bool_t intervals[6] = 0);
void SetCosThetaTkIntervals(Bool_t intervals[6] = 0);
void SetEpsilonYintervals(Bool_t intervals[6] = 0);
......@@ -217,6 +218,7 @@ private:
private:
void SaveFigures(TCanvas *canvas, TString variable, Int_t interval);
void CanvasDivision(TCanvas *c);
};
......
......@@ -11,15 +11,19 @@ void ES1_7590()
ana.SetCMAngularRange(75, 90);
ana.SetChainsToDraw(1, 1, 1, 1, 0, 0);
// ana.SetChainsToDraw();
// TString configuration = "v5_7590";
// ana.SetFigures("figures/", ".eps");
// ana.SetChainsToDraw(0, 0, 0, 0, 1, 1);
ana.SetChainsToDraw();
Bool_t epsilonT[6] = {0,0,1,0,0};
Bool_t cosThetaT[6] = {0,1,0,0,0};
Bool_t cosThetaT[6] = {0,0,1,0,0};
Bool_t epsilonY[6] = {0,0,0,1,0};
Bool_t cosThetaY[6] = {0,1,0,0,0};
Bool_t epsilonY[6] = {0,0,1,0,0};
Bool_t cosThetaY[6] = {0,0,1,0,0};
Bool_t thetaAT[6] = {0,0,0,0,0};
Bool_t thetaAT[6] = {0,0,1,0,0};
ana.SetExpChain("../../../be/rootdata/correlations/v5_exp/Be.", 0, 40);
......@@ -30,7 +34,7 @@ void ES1_7590()
const Long64_t sMaxEvents = 3000000;
Long64_t sEvents[6] = {2050000, 2050000, 2050000, 2050000, 1900000, 1950000};
cout << sEvents << endl;
// cout << sEvents << endl;
ana.SetNoSimEvents(sEvents);
Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0};
......@@ -56,6 +60,7 @@ void ES1_7590()
ana.OpenSimChains();
ana.SetSpectra();
ana.Spectra();
......@@ -104,20 +109,32 @@ void ES1_7590()
ana.SetEpsilonTintervals(epsilonT);
// ana.SetEpsilonTintervals();
ana.EpsilonT();
// ana.EpsilonT();
sw.Print();
sw.Continue();
// ana.SetCosThetaTkIntervals(cosThetaT);
ana.SetCosThetaTkIntervals(cosThetaT);
// ana.CosThetaTk();
//
// ana.SetEpsilonYintervals(epsilonY);
sw.Print();
sw.Continue();
ana.SetEpsilonYintervals(epsilonY);
// ana.EpsilonY();
//
// ana.SetCosThetaYkIntervals(cosThetaY);
sw.Print();
sw.Continue();
ana.SetCosThetaYkIntervals(cosThetaY);
// ana.CosThetaYk();
sw.Print();
sw.Continue();
ana.SetThetaATintervals(thetaAT);
// ana.SetThetaATintervals();
ana.ThetaAT();
//// ana.SetThetaATintervals();
// ana.ThetaAT();
sw.Print();
sw.Continue();
......@@ -126,33 +143,18 @@ void ES1_7590()
return;
const Bool_t savePictures = 0;
TString ppath = "pictures/correlations/v5_7590/";
TString configuration = "v5_7590";
// TString pictFormat = ".ps";
// gStyle->SetHistLineWidth(1);
TString pictFormat = ".eps";
// TString pictFormat = ".gif";
// TString pictFormat = ".jpg";
///////////////////////////////////////////////////////////
const Bool_t kVerbose = 1;
const Float_t kRangeProportionIn = 2.0;
//spectra
// const Double_t sRange[6] = {2000, 2000, 2000, 2000, 2000, 2000};
// if (spectra) {
// gROOT->ProcessLine(".x corr_templates/sfAngInt_spectra_v5.cxx");
// }
// "T" system
const Double_t eTRange[5][6] = {280, 280, 280, 280, 280, 280,
350, 350, 350, 350, 350, 350,
350, 350, 350, 350, 350, 350,
630, 630, 630, 630, 630, 630,
700, 700, 700, 700, 700, 700};
gROOT->ProcessLine(".x corr_templates/sfAngInt_epsilonT.cxx");
}
......
......@@ -9,6 +9,7 @@ void rootlogon6panels()
//gStyle choice
// gROOT->SetStyle("Default");
// gROOT->SetStyle("Classic");
gROOT->SetStyle("Plain");
// gROOT->SetStyle("Bold");
// gROOT->SetStyle("Video");
......@@ -31,12 +32,14 @@ void rootlogon6panels()
// gStyle->SetLabelOffset(0.55, "X");
gStyle->SetLabelSize(0.06, "X");
// gStyle->SetLabelSize(0.06, "X");
gStyle->SetLabelSize(0.07, "X");
gStyle->SetTitleSize(0.11, "X");
gStyle->SetTitleOffset(0.55, "X");
gStyle->SetTitleXSize(0.11);
gStyle->SetLabelSize(0.06, "Y");
// gStyle->SetLabelSize(0.06, "Y");
gStyle->SetLabelSize(0.07, "Y");
gStyle->SetTitleSize(0.11, "Y");
gStyle->SetTitleOffset(0.61, "Y");
gStyle->SetTitleYSize(0.11);
......
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