17 #include "TDirectory.h"
26 const char* xvariable,
const char* xvariableName,
const char* xunit,
27 const char*
cut,
const char* cutName,
const char*
title,
int nbinsx,
28 double xlow,
double xup,
bool logy,
bool fitGauss
39 cout<<
"Error opening file"<<endl;
51 char* strTitle =
new char[200];
52 char* strVarXUnit =
new char[200];
53 char* strHist =
new char[200];
54 char* strOutput =
new char[200];
55 char* strHisto =
new char[200];
58 strcat(strcat(strcat(strcpy(strTitle,
title),
" ("),cutName),
")");
59 strcat(strcat(strcpy(strVarXUnit,xvariableName),
" "),xunit);
60 strcat(strcpy(strHist,xvariable),
" >> histo");
61 strcat(strcat(strcat(strcat(strcpy(strOutput,
title),
"_"),cutName),
"."),
format);
62 strcat(strcat(strcpy(strHisto,
title),
"_"),cutName);
67 histo->GetXaxis()->SetTitle(strVarXUnit);
68 histo->GetYaxis()->SetTitle(
"Entries");
72 TCanvas*
canvas =
new TCanvas(
"canvas",
title,700,600);
95 TFile *histTrkProp =
new TFile(
"histTrkProp.root",
"update");
97 hnew->Write(strHisto);
112 cout<<
"deleting TH1TrkProp object"<<endl;
121 TStyle* style1D =
new TStyle(
"style1D",
"Style for 1D-Histograms");
124 style1D->SetPadBorderMode(0);
125 style1D->SetPadColor(0);
126 style1D->SetPadTopMargin(0.21);
127 style1D->SetPadBottomMargin(0.12);
128 style1D->SetPadLeftMargin(0.12);
129 style1D->SetPadRightMargin(0.07);
131 style1D->SetCanvasColor(0);
132 style1D->SetCanvasBorderMode(0);
134 style1D->SetFrameBorderMode(0);
136 style1D->SetOptStat(1111110);
137 style1D->SetStatBorderSize(3);
138 style1D->SetStatColor(0);
139 style1D->SetStatFont(62);
140 style1D->SetStatFontSize(0.033);
141 style1D->SetStatTextColor(1);
142 style1D->SetStatStyle(1001);
143 style1D->SetStatX(0.993);
144 style1D->SetStatY(0.995);
145 style1D->SetStatW(0.27);
147 style1D->SetMarkerColor(1);
148 style1D->SetMarkerStyle(20);
149 style1D->SetMarkerSize(0.8);
151 style1D->SetTitleX(0.010);
152 style1D->SetTitleY(0.93);
153 style1D->SetTitleW(0.7);
154 style1D->SetTitleBorderSize(3);
155 style1D->SetTitleFont(72,
"TITLE");
157 style1D->SetLabelFont(62,
"X");
158 style1D->SetLabelFont(62,
"Y");
159 style1D->SetTitleOffset(1.3,
"Y");
162 style1D->SetStatFontSize(0.03);
163 style1D->SetStatW(0.2);
164 style1D->SetTitleW(0.6);
165 style1D->SetOptFit(1111);