10 gStyle->SetOptStat(0);
12 TFile *fin =
new TFile(
"../../data/Sample_DISReco_ep.root",
"OPEN");
15 TTree *t_reco = (TTree*)fin->Get(
"event_cluster");
18 TCut cut_pid_e(
"em_evtgen_pid == 11");
19 TCut cut_pid_pion(
"abs(em_evtgen_pid) == 211");
22 TCanvas *ctemp =
new TCanvas();
27 TH1F* h_e_over_p_electron =
new TH1F(
"h_e_over_p_electron",
";E / p", 100, 0, 2);
28 TH1F* h_e_over_p_pion = (TH1F*)h_e_over_p_electron->Clone(
"h_e_over_p_pion");
30 h_e_over_p_electron->SetLineColor( kBlue );
31 h_e_over_p_pion->SetLineColor( kRed );
33 t_reco->Draw(
"em_cluster_e / em_track_ptotal >> h_e_over_p_electron", cut_pid_e && cut_eta );
34 t_reco->Draw(
"em_cluster_e / em_track_ptotal >> h_e_over_p_pion", cut_pid_pion && cut_eta );
36 TCanvas *c1 =
new TCanvas();
38 h_e_over_p_electron->Draw(
"");
39 h_e_over_p_pion->Draw(
"sames");
41 c1->Print(
"plots/electron_id_c1.eps");
42 c1->Print(
"plots/electron_id_c1.png");
48 TH1F* h_em_prob_electron =
new TH1F(
"h_em_prob_electron",
";electron shape probability", 100, 0, 1.0);
49 TH1F* h_em_prob_pion = (TH1F*)h_em_prob_electron->Clone(
"h_em_prob_pion");
51 h_em_prob_electron->SetLineColor( kBlue );
52 h_em_prob_pion->SetLineColor( kRed );
54 t_reco->Draw(
"em_cluster_prob >> h_em_prob_electron", cut_pid_e && cut_eta );
55 t_reco->Draw(
"em_cluster_prob >> h_em_prob_pion", cut_pid_pion && cut_eta );
57 TCanvas *
c2 =
new TCanvas();
59 h_em_prob_pion->Draw(
"");
60 h_em_prob_electron->Draw(
"sames");
62 c2->Print(
"plots/electron_id_c2.eps");
63 c2->Print(
"plots/electron_id_c2.png");
69 TH1F* h_em_eta_electron =
new TH1F(
"h_em_eta_electron",
";#eta", 101, -5.05, 5.05);
70 TH1F* h_em_eta_pion = (TH1F*)h_em_eta_electron->Clone(
"h_em_eta_pion");
72 h_em_eta_electron->SetLineColor( kBlue );
73 h_em_eta_pion->SetLineColor( kRed );
78 t_reco->Draw(
"em_cluster_eta >> h_em_eta_electron", cut_pid_e );
79 t_reco->Draw(
"em_cluster_eta >> h_em_eta_pion", cut_pid_pion );
81 TCanvas *c3 =
new TCanvas();
83 h_em_eta_pion->Draw(
"");
84 h_em_eta_electron->Draw(
"sames");
86 c3->Print(
"plots/electron_id_c3.eps");
87 c3->Print(
"plots/electron_id_c3.png");