27 const string filename(
"BeamPar_70507.root");
31 gROOT->SetStyle(
"Plain");
32 gStyle->SetPalette(1);
34 TFile* beampar =
new TFile(
"BeamPar_70507.root");
35 if (beampar->IsZombie()){
36 cout <<
" Error: could not open file! " << endl;
40 TH2* hEVsDX = (TH2*) gDirectory->Get(
"hEVsDX");
41 TH2* hEVsDY = (TH2*) gDirectory->Get(
"hEVsDY");
42 TH2* hEVsX = (TH2*) gDirectory->Get(
"hEVsX");
43 TH2* hEVsY = (TH2*) gDirectory->Get(
"hEVsY");
44 TH2* hdxdyB = (TH2*) gDirectory->Get(
"hdxdyB");
45 TH2* hxdxB = (TH2*) gDirectory->Get(
"hxdxB");
46 TH2* hxdyB = (TH2*) gDirectory->Get(
"hxdyB");
47 TH2* hydxB = (TH2*) gDirectory->Get(
"hydxB");
48 TH2* hydyB = (TH2*) gDirectory->Get(
"hydyB");
49 TH2* hxyB = (TH2*) gDirectory->Get(
"hxyB");
50 TTree* BpT = (TTree*) gDirectory->Get(
"BpT");
52 if (!hEVsDX || !hEVsDY || !hEVsX || !hEVsY || !hdxdyB ||
53 !hxdxB || !hxdyB || !hydxB || !hydyB || !hxyB || !BpT ){
54 cout <<
" Error: At least one histogram could not be retrieved " << endl;
57 TCanvas* canvas =
new TCanvas (
"canvas",
"loaded histograms", 800, 800);
78 canvas->Print(
"Loaded_histograms.pdf");
80 TFile* outputfile =
new TFile(
"energy_distributions.root",
"Recreate");