Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makePlot_reco_xQ2.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file makePlot_reco_xQ2.C
1 /* em_cluster_caloid values:
2  1 = CEMC
3  4 = EEMC
4  5 = FEMC
5 */
6 
7 #include "plot_commons.h"
8 
9 int
11 {
12  gStyle->SetOptStat(0);
13 
14  TFile *fin = new TFile("../../data/Sample_DISReco_ep.root", "OPEN");
15  //TFile *fin = new TFile("../../data/DISReco_Pythia6_DIS_20x250_1k.root", "OPEN");
16 
17  TTree *t_reco = (TTree*)fin->Get("event_cluster");
18 
19  /* Q2: Create histogram */
20  TH2F* hQ2_reco_truth = make_TH2D_xylog( 60, 0, 3, 60, 0, 3 );
21  hQ2_reco_truth->SetName("hQ2_reco_truth");
22  hQ2_reco_truth->GetXaxis()->SetTitle("Q^{2}_{truth} (GeV^{2})");
23  hQ2_reco_truth->GetYaxis()->SetTitle("Q^{2}_{reco} (GeV^{2})");
24 
25  /* Q2: Fill histogram */
26  TCanvas *c1 = new TCanvas();
27  c1->SetLogx(1);
28  c1->SetLogy(1);
29  c1->SetLogz(1);
30  t_reco->Draw("em_reco_q2_e:evtgen_Q2 >> hQ2_reco_truth","em_evtgen_pid==11", "colz");
31  c1->Print("plots/reco_xQ2_1.eps");
32 
33  /* x: Create histogram */
34  TH2F* hx_reco_truth = make_TH2D_xylog( 40, -4, 0, 40, -4, 0 );
35  hx_reco_truth->SetName("hx_reco_truth");
36  hx_reco_truth->GetXaxis()->SetTitle("x_{truth}");
37  hx_reco_truth->GetYaxis()->SetTitle("x_{reco}");
38 
39  /* x: Fill histogram */
40  TCanvas *c2 = new TCanvas();
41  c2->SetLogx(1);
42  c2->SetLogy(1);
43  c2->SetLogz(1);
44  t_reco->Draw("em_reco_q2_e:evtgen_x >> hx_reco_truth","em_evtgen_pid==11", "colz");
45  c2->Print("plots/reco_xQ2_2.eps");
46 
47  /* W: Create histogram */
48  TH2F* hW_reco_truth = new TH2F("hW_reco_truth","W_{truth};W_{reco}",50,0,100,50,0,100);
49  hW_reco_truth->SetName("hW_reco_truth");
50  hW_reco_truth->GetXaxis()->SetTitle("W_{truth}");
51  hW_reco_truth->GetYaxis()->SetTitle("W_{reco}");
52 
53  /* W: Fill histogram */
54  TCanvas *c3 = new TCanvas();
55  //c3->SetLogx(1);
56  //c3->SetLogy(1);
57  c3->SetLogz(1);
58  t_reco->Draw("em_reco_w_e:evtgen_W >> hW_reco_truth","em_evtgen_pid==11", "colz");
59  c3->Print("plots/reco_xQ2_3.eps");
60 
61  /* y: Create histogram */
62  TH2F* hy_reco_truth = new TH2F("hy_reco_truth","y_{truth};y_{reco}",100,0,1,100,0,1);
63  hy_reco_truth->SetName("hy_reco_truth");
64  hy_reco_truth->GetXaxis()->SetTitle("y_{truth}");
65  hy_reco_truth->GetYaxis()->SetTitle("y_{reco}");
66 
67  /* y: Fill histogram */
68  TCanvas *c4 = new TCanvas();
69  //c4->SetLogx(1);
70  //c4->SetLogy(1);
71  c3->SetLogz(1);
72  t_reco->Draw("em_reco_y_e:evtgen_y >> hy_reco_truth","em_evtgen_pid==11", "colz");
73  c4->Print("plots/reco_xQ2_4.eps");
74 
75  return 1;
76 }