17 #include "TDirectory.h"
27 const char* xvariable,
const char* xvariableName,
const char* xunit,
28 const char* yvariable,
const char* yvariableName,
const char* yunit,
29 const char*
cut,
const char* cutName,
const char*
title,
30 int nbinsx,
double xlow,
double xup,
31 int nbinsy,
double ylow,
double yup,
43 cout<<
"Error opening file"<<endl;
56 char* strTitle =
new char[200];
57 char* strVarXUnit =
new char[200];
58 char* strVarYUnit =
new char[200];
59 char* strHist =
new char[200];
60 char* strOutput =
new char[200];
61 char* strHisto =
new char[200];
64 strcat(strcat(strcat(strcpy(strTitle,
title),
" ("),cutName),
")");
65 strcat(strcat(strcpy(strVarXUnit,xvariableName),
" "),xunit);
66 strcat(strcat(strcpy(strVarYUnit,yvariableName),
" "),yunit);
67 strcat(strcat(strcat(strcpy(strHist,yvariable),
":"),xvariable),
" >> histo");
68 strcat(strcat(strcat(strcat(strcpy(strOutput,
title),
"_"),cutName),
"."),
format);
69 strcat(strcat(strcpy(strHisto,
title),
"_"),cutName);
72 TH2F*
histo =
new TH2F(
"histo",strTitle,nbinsx,xlow,xup,nbinsy,ylow,yup);
74 histo->GetXaxis()->SetTitle(strVarXUnit);
75 histo->GetYaxis()->SetTitle(strVarYUnit);
79 TCanvas*
canvas =
new TCanvas(
"canvas",
title,700,600);
101 TFile *histTrkProp =
new TFile(
"histTrkProp.root",
"update");
103 hnew->Write(strHisto);
104 histTrkProp->Close();
118 cout<<
"deleting TH2TrkProp object"<<endl;
128 TStyle* style2D =
new TStyle(
"style2D",
"Style for 2D-Histograms");
131 style2D->SetPadBorderMode(0);
132 style2D->SetPadColor(0);
133 style2D->SetPadTopMargin(0.21);
134 style2D->SetPadBottomMargin(0.12);
135 style2D->SetPadLeftMargin(0.12);
136 style2D->SetPadRightMargin(0.16);
138 style2D->SetCanvasColor(0);
139 style2D->SetCanvasBorderMode(0);
141 style2D->SetFrameBorderMode(0);
143 style2D->SetOptStat(1001110);
144 style2D->SetStatBorderSize(3);
145 style2D->SetStatColor(0);
146 style2D->SetStatFont(62);
147 style2D->SetStatFontSize(0.033);
148 style2D->SetStatTextColor(1);
149 style2D->SetStatStyle(1001);
150 style2D->SetStatX(0.993);
151 style2D->SetStatY(0.995);
152 style2D->SetStatW(0.27);
154 style2D->SetMarkerColor(1);
155 style2D->SetMarkerStyle(6);
157 style2D->SetTitleX(0.010);
158 style2D->SetTitleY(0.93);
159 style2D->SetTitleW(0.7);
160 style2D->SetTitleBorderSize(3);
161 style2D->SetTitleFont(72,
"TITLE");
163 style2D->SetLabelFont(62,
"X");
164 style2D->SetLabelFont(62,
"Y");
165 style2D->SetTitleOffset(1.4,
"Y");
167 style2D->SetPalette(1,0);