Commit 42e0b95a authored by Vratislav Chudoba's avatar Vratislav Chudoba

First picture for IZV RAS practically finished

parent 3d649d46
# Default histogram binnings for TTree::Draw().
#Rint.Logon: ./rootlogonThesis.C
#Rint.Logon: ./rootlogon6panels.C
#Rint.Logon: ./rootlogonPresentation.C
Rint.Logon: ./rootlogonIZV.C
#Rint.Logon: ./rootlogonThesis4panels.C
#Rint.Logon: ./rootlogonPAC.C
#Gui.DefaultFont: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-5
Canvas.ShowToolBar: true
Canvas.ShowEditor: true
Hist.Binning.1D.x: 100
#Hist.Binning.2D.x: 40
Hist.Binning.2D.x: 100
#Hist.Binning.2D.y: 40
Hist.Binning.2D.y: 100
Hist.Binning.2D.Prof: 100
\ No newline at end of file
#if !defined(__CLING__)
#include "TFile.h"
#include "TCanvas.h"
#include "TH1F.h"
#endif
void figSpectraIZV()
{
// 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();
TH1F *hExp[4];
TH1F *hSim[4];
TH1F *hCurr = 0;
TString heName;
TString hsName;
hCurr = (TH1F*)fr->Get("heSpectrum4560");
hExp[0] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum6075");
hExp[1] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum7590");
hExp[2] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum90120");
hExp[3] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum4560");
hSim[0] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum6075");
hSim[1] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum7590");
hSim[2] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum90120");
hSim[3] = new TH1F(*hCurr);
TCanvas *c1 = new TCanvas();
c1->ToggleEditor();
// c1->SetWindowSize(800, 1200);
// c1->SetWindowSize(800, 800);
c1->SetWindowSize(1333, 787);
c1->Divide(2, 2, .001, .001);
for (Int_t i = 0; i < 4; i++) {
c1->cd(i+1);
hExp[i]->SetTitle("");
hSim[i]->SetTitle("");
hSim[i]->SetXTitle("#it{E}, MeV");
hSim[i]->Smooth();
hExp[i]->SetLineWidth(2);
hSim[i]->SetLineColor(kGray+1);
hSim[i]->Draw("");
hExp[i]->Draw("E same");
if (i==0) hSim[i]->GetYaxis()->SetRangeUser(0,13000);
}
// c1->SaveAs("figures/spectra.eps");
}
/*
* load_libs.cxx
*
* Created on: 12.7.2012
* Author: vratik
*/
void load_libs()
{
// if ( gSystem->Load("libTree") ) {
// Error("load_libs.cxx", "libTree.so was not loaded");
// return;
// }
if ( gSystem->Load("../../libAculData.so") ) {
Error("load_libs.cxx", "libAculData.so was not loaded");
return;
}
if ( gSystem->Load("../../libTELoss.so") ) {
Error("load_libs.cxx", "libTELoss.so was not loaded");
return;
}
if ( gSystem->Load("../../libDetectors.so") ) {
Error("load_libs.cxx", "libDetectors.so was not loaded");
return;
}
// if ( gSystem->Load("~/work/Eclipse/makefilesBe/libThreads.so") ) {
// Error("load_libs.cxx", "libThreads.so was not loaded");
// return;
// }
if ( gSystem->Load("../../libBe.so") ) {
Error("load_libs.cxx", "libBe.so was not loaded");
return;
}
// if ( gSystem->Load("~/work/Eclipse/makefilesBe/libThreads.so") ) {
// Error("load_libs.cxx", "libThreads.so was not loaded");
// return;
// }
Info("load_libs.cxx", "Libraries loaded");
}
#if !defined(__CLING__)
#include "TROOT.h"
#include "TStyle.h"
#endif
void rootlogonIZV()
{
Info("rootlogonIZV.C", "This settings are used to make a nice pictures for IZV RAS");
gROOT->ProcessLine(".x load_libs.cxx");
//gStyle choice
// gROOT->SetStyle("Default");
// gROOT->SetStyle("Classic");
gROOT->SetStyle("Plain");
// gROOT->SetStyle("Bold");
// gROOT->SetStyle("Video");
// return;
// gStyle->SetOptStat("n");
// gStyle->SetOptStat("ne");
gStyle->SetOptStat("");
//canvas size and position
// gStyle->SetCanvasDefX(85);
// gStyle->SetCanvasDefY(224);
// gStyle->SetCanvasDefW(649);
// gStyle->SetCanvasDefH(727);
//marker attributes
gStyle->SetMarkerStyle(20);
gStyle->SetMarkerSize(0.1);
gStyle->SetMarkerColor(1);
// gStyle->SetLabelOffset(0.55, "X");
gStyle->SetLabelSize(0.06, "X");
// gStyle->SetLabelSize(0.07, "X");
gStyle->SetTitleSize(0.07, "X");
// gStyle->SetTitleSize(0.11, "X");
gStyle->SetTitleOffset(0.89, "X");
// gStyle->SetTitleOffset(0.55, "X");
// gStyle->SetTitleXSize(0.11);
gStyle->SetLabelSize(0.06, "Y");
// gStyle->SetLabelSize(0.07, "Y");
gStyle->SetTitleSize(0.11, "Y");
gStyle->SetTitleOffset(0.61, "Y");
gStyle->SetTitleYSize(0.11);
//line attributes
gStyle->SetHistLineWidth(1);
// gStyle->SetHistLineWidth(2);
// gStyle->SetHistLineWidth(3);
gStyle->SetTitleBorderSize(0);
gStyle->SetFrameLineWidth(0);
gStyle->SetTitleFont(132, "X");
gStyle->SetTitleFont(132, "Y");
gStyle->SetLabelFont(132, "X");
gStyle->SetLabelFont(132, "Y");
gStyle->SetPadTopMargin(0.04);
gStyle->SetPadBottomMargin(0.13);
gStyle->SetPadLeftMargin(0.13);
gStyle->SetPadRightMargin(0.03);
// gStyle->SetTitleOffset(1.3, "Y");
// gStyle->SetLabelSize(0.05, "X");
// gStyle->SetLabelSize(0.05, "Y");
// gStyle->SetTitleSize(0.06, "X");
// gStyle->SetTitleSize(0.06, "Y");
//
gROOT->ForceStyle();
return;
//parameters used for pictures in EXON paper
// gStyle->SetStatBorderSize(0);
// gStyle->SetTitleBorderSize(0);
// gStyle->SetTitleAlign(12);
// gStyle->SetTitleX(0.83);
// gStyle->SetTitleY(0.85);
gStyle->SetTitleX(0.83); //for Fig2
gStyle->SetTitleY(0.9); //for Fig2
gStyle->SetTitleFontSize(0.08);
// gStyle->SetTitleFillColor(0);
// gStyle->SetLineWidth(1);
// gStyle->SetHistLineWidth(1);
gStyle->SetHistLineWidth(3);
gStyle->SetPadTopMargin(0.05);
gStyle->SetPadBottomMargin(0.13);
gStyle->SetPadLeftMargin(0.14);
gStyle->SetPadRightMargin(0.05);
gStyle->SetTitleOffset(1.3, "Y");
gStyle->SetLabelSize(0.05, "X");
gStyle->SetLabelSize(0.05, "Y");
gStyle->SetTitleSize(0.06, "X");
gStyle->SetTitleSize(0.06, "Y");
// gStyle->SetAxisColor(1);
gStyle->SetLabelColor(1, "X");
gStyle->SetLabelColor(1, "Y");
}
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