00001 #include <iostream>
00002
00003 void PlotHists(const char* infile, const char* outfile)
00004 {
00005 TFile* ifile = new TFile(infile,"READ");
00006
00007 TH2* dEtaVsdPhi = dEtaVsdPhi;
00008
00009 TFile* ofile = new TFile(outfile,"RECREATE");
00010 TH1* dEta = dEtaVsdPhi->ProjectionY("dEta");
00011 dEta->SetLineWidth(2);
00012 dEta->SetXTitle("#Delta#eta");
00013 dEta->SetTitle("#Delta#eta, pt>2 GeV, Trigger Pt>3 GeV");
00014 TH1* dPhi = dEtaVsdPhi->ProjectionX("dPhi");
00015 dPhi->SetLineWidth(2);
00016 dPhi->SetXTitle("#Delta#phi");
00017 dPhi->SetTitle("#Delta#phi, pt>2 GeV, Trigger Pt>3 GeV");
00018
00019 dEtaVsdPhi->SetTitle("#Delta#phi vs. #DeltaEta, pt>2 GeV, Trigger Pt>3 GeV");
00020 dEtaVsdPhi->SetXTitle("#Delta#eta");
00021 dEtaVsdPhi->SetYTitle("#Delta#phi");
00022 dEtaVsdPhi->SetLineWidth(2);
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 dEtaVsdPhi->Write();
00038 ofile->Write();
00039 ofile->Close();
00040 }