Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
plotQA_AsmmEnergy.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file plotQA_AsmmEnergy.C
1 #include <string>
2 #include "TString.h"
3 #include "TFile.h"
4 #include "TH2F.h"
5 #include "TH1F.h"
6 #include "TCanvas.h"
7 
9 {
10  string inputfile = "/sphenix/user/xusun/TestBeam/ShowerCalibAna/Proto4ShowerInfoRAW_0422.root";
11  TFile *File_InPut = TFile::Open(inputfile.c_str());
12  TH2F *h_mAsymmEnergy_mixed = (TH2F*)File_InPut->Get("h_mAsymmEnergy_mixed");
13  TH2F *h_mAsymmEnergy_electron = (TH2F*)File_InPut->Get("h_mAsymmEnergy_electron");
14  TH2F *h_mAsymmEnergy_pion = (TH2F*)File_InPut->Get("h_mAsymmEnergy_pion");
15 
16  TCanvas *c_AsymmEnergy_mixed = new TCanvas("c_AsymmEnergy_mixed","c_AsymmEnergy_mixed",30,150,800,800);
17  c_AsymmEnergy_mixed->cd();
18  c_AsymmEnergy_mixed->cd()->SetLeftMargin(0.15);
19  c_AsymmEnergy_mixed->cd()->SetBottomMargin(0.15);
20  c_AsymmEnergy_mixed->cd()->SetTicks(1,1);
21  c_AsymmEnergy_mixed->cd()->SetGrid(0,0);
22 
23  h_mAsymmEnergy_mixed->SetStats(0);
24  h_mAsymmEnergy_mixed->SetTitle("Energy vs. Asymm");
25  h_mAsymmEnergy_mixed->GetYaxis()->SetTitle("Energy (GeV)");
26  h_mAsymmEnergy_mixed->GetYaxis()->CenterTitle();
27  h_mAsymmEnergy_mixed->GetYaxis()->SetNdivisions(505);
28  h_mAsymmEnergy_mixed->GetXaxis()->SetTitle("E_{Asymm}");
29  h_mAsymmEnergy_mixed->GetXaxis()->CenterTitle();
30  h_mAsymmEnergy_mixed->Draw("colz");
31 
32  c_AsymmEnergy_mixed->SaveAs("../figures/HCAL_ShowerCalib/c_AsymmEnergy_mixed_8GeV.eps");
33 }