9 const TString
infile =
"data/pythia.ep.100.test.root"
12 gStyle->SetOptStat(kFALSE);
16 TFile *f_pyth =
new TFile(
infile,
"OPEN");
17 TTree*
T = (TTree*)f_pyth->Get(
"tree");
25 TCut electron_cut =
"p.fKF == 11";
27 TCut proton_cut =
"p.fKF == 2212";
28 TCut neutron_cut =
"p.fKF == 2112";
29 TCut Kaon_cut =
"abs(p.fKF) == 321 || p.fKF == 311";
30 TCut Pion_charged_cut =
"abs(p.fKF) == 211";
32 TCut photon_cut =
"p.fKF == 22";
34 TCut mother_cut =
"p.fParent == 0";
35 TCut status_cut =
"p.fKS < 10";
37 TCut eta_cut_n3n2 =
"TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) > -3 && TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) < -2";
38 TCut eta_cut_n2n1 =
"TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) > -2 && TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) < -1";
39 TCut eta_cut_n1z0 =
"TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) > -1 && TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2)) < -0";
48 TH2F *h_peta_e =
new TH2F(
"h_peta_e",
"", 100, -4, 3, 100, 0, 50 );
50 TCanvas *c_peta_e =
new TCanvas(
"c_peta_e" );
53 T->Draw(
"sqrt((p.fPx)**2 + (p.fPy)**2 + (p.fPz)**2 ):TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2))>>h_peta_e", electron_cut && mother_cut &&
"Q2 > 1",
"colz");
55 h_peta_e->GetXaxis()->SetTitle(
"Pseudorapidity #eta");
56 h_peta_e->GetYaxis()->SetTitle(
"Electron Momentum p_{e-} [GeV]");
64 TH2F *h_p_eta_h =
new TH2F(
"h_p_eta_h",
"", 60,-6,6, 200,0,225);
66 TCanvas *c_p_eta_h =
new TCanvas(
"c_p_eta_h" );
68 T->Draw(
"sqrt((p.fPx)**2 + (p.fPy)**2 + (p.fPz)**2 ):TMath::ASinH(p.fPz/sqrt((p.fPx)**2 + (p.fPy)**2))>>h_p_eta_h",hadron_cut &&
"Q2 > 1 && 0.01 < y < 0.80",
"colz");
70 h_p_eta_h->GetXaxis()->SetTitle(
"Pseudorapidity #eta");
71 h_p_eta_h->GetYaxis()->SetTitle(
"Hadron Momentum p_{Hadron} [GeV]");
82 TH1F* hp_e_n3n2 =
new TH1F(
"hp_e_n3n2",
"dN/dp vs. p", 60, 0, 30);
83 TH1F* hp_p_n3n2 =
new TH1F(
"hp_p_n3n2",
"dN/dp vs. p", 60, 0, 30);
84 TH1F* hp_y_n3n2 =
new TH1F(
"hp_y_n3n2",
"dN/dp vs. p", 60, 0, 30);
86 TCanvas *cp_e_n3n2 =
new TCanvas(
"cp_e_n3n2");
87 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_e_n3n2", electron_cut && eta_cut_n3n2 &&
"Q2 > 0.01",
"goff");
88 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_p_n3n2", Pion_charged_cut && eta_cut_n3n2 &&
"Q2 > 0.01",
"goff");
89 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_y_n3n2", photon_cut && eta_cut_n3n2 && status_cut &&
"Q2 > 0.01",
"goff");
92 TH1F* htmp_n3n2 = hp_e_n3n2->Clone();
93 htmp_n3n2->SetTitle(
"");
94 htmp_n3n2->GetXaxis()->SetTitle(
"p [GeV]");
95 htmp_n3n2->GetYaxis()->SetTitle(
"dN/dp");
96 htmp_n3n2->SetMaximum( 0.99e7);
99 hp_e_n3n2->SetLineColor(2);
100 hp_e_n3n2->Draw(
"same");
101 hp_p_n3n2->SetLineColor(1);
102 hp_p_n3n2->Draw(
"same");
103 hp_y_n3n2->SetLineColor(4);
104 hp_y_n3n2->Draw(
"same");
105 cp_e_n3n2->SetLogy();
107 TLegend* leg_n3n2 =
new TLegend(0.53,0.67,0.73,0.90);
108 hp_e_n3n2->SetTitle(
"DIS electron");
109 hp_p_n3n2->SetTitle(
"#pi#pm");
110 hp_y_n3n2->SetTitle(
"Photons");
111 leg_n3n2->AddEntry(hp_e_n3n2,
"",
"L");
112 leg_n3n2->AddEntry(hp_p_n3n2,
"",
"L");
113 leg_n3n2->AddEntry(hp_y_n3n2,
"",
"L");
114 leg_n3n2->SetTextSize(0.04);
130 TH1F* hp_e_n2n1 =
new TH1F(
"hp_e_n2n1",
"dN/dp vs. p", 60, 0, 30);
131 TH1F* hp_p_n2n1 =
new TH1F(
"hp_p_n2n1",
"dN/dp vs. p", 60, 0, 30);
132 TH1F* hp_y_n2n1 =
new TH1F(
"hp_y_n2n1",
"dN/dp vs. p", 60, 0, 30);
134 TCanvas *cp_e_n2n1 =
new TCanvas(
"cp_e_n2n1");
135 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_e_n2n1", electron_cut && eta_cut_n2n1 &&
"Q2 > 0.01",
"goff");
136 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_p_n2n1", Pion_charged_cut && eta_cut_n2n1 &&
"Q2 > 0.01",
"goff");
137 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_y_n2n1", photon_cut && eta_cut_n2n1 && status_cut &&
"Q2 > 0.01",
"goff");
139 TH1F* htmp_n2n1 = hp_e_n2n1->Clone();
140 htmp_n2n1->SetTitle(
"");
141 htmp_n2n1->GetXaxis()->SetTitle(
"p [GeV]");
142 htmp_n2n1->GetYaxis()->SetTitle(
"dN/dp");
143 htmp_n2n1->SetMaximum( 0.99e7);
146 hp_e_n2n1->SetLineColor(2);
147 hp_e_n2n1->Draw(
"same");
148 hp_p_n2n1->SetLineColor(1);
149 hp_p_n2n1->Draw(
"same");
150 hp_y_n2n1->SetLineColor(4);
151 hp_y_n2n1->Draw(
"same");
152 cp_e_n2n1->SetLogy();
154 TLegend* leg_n2n1 =
new TLegend(0.53,0.67,0.73,0.90);
155 hp_e_n2n1->SetTitle(
"DIS electron");
156 hp_p_n2n1->SetTitle(
"#pi#pm");
157 hp_y_n2n1->SetTitle(
"Photons");
158 leg_n2n1->AddEntry(hp_e_n2n1,
"",
"L");
159 leg_n2n1->AddEntry(hp_p_n2n1,
"",
"L");
160 leg_n2n1->AddEntry(hp_y_n2n1,
"",
"L");
161 leg_n2n1->SetTextSize(0.04);
169 TH1F* hp_e_n1z0 =
new TH1F(
"hp_e_n1z0",
"dN/dp vs. p", 60, 0, 30);
170 TH1F* hp_p_n1z0 =
new TH1F(
"hp_p_n1z0",
"dN/dp vs. p", 60, 0, 30);
171 TH1F* hp_y_n1z0 =
new TH1F(
"hp_y_n1z0",
"dN/dp vs. p", 60, 0, 30);
173 TCanvas *cp_e_n1z0 =
new TCanvas(
"cp_e_n1z0");
174 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_e_n1z0", electron_cut && eta_cut_n1z0 &&
"Q2 > 0.01",
"goff");
175 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_p_n1z0", Pion_charged_cut && eta_cut_n1z0 &&
"Q2 > 0.01",
"goff");
176 T->Draw(
"sqrt(p.fPx**2 + p.fPy**2 + p.fPz**2)>>hp_y_n1z0", photon_cut && eta_cut_n1z0 && status_cut &&
"Q2 > 0.01",
"goff");
178 TH1F* htmp_n1z0 = hp_e_n1z0->Clone();
179 htmp_n1z0->SetTitle(
"");
180 htmp_n1z0->GetXaxis()->SetTitle(
"p [GeV]");
181 htmp_n1z0->GetYaxis()->SetTitle(
"dN/dp");
182 htmp_n1z0->SetMaximum( 0.99e7 );
185 hp_e_n1z0->SetLineColor(2);
186 hp_e_n1z0->Draw(
"same");
187 hp_p_n1z0->SetLineColor(1);
188 hp_p_n1z0->Draw(
"same");
189 hp_y_n1z0->SetLineColor(4);
190 hp_y_n1z0->Draw(
"same");
191 cp_e_n1z0->SetLogy();
193 TLegend* leg_n1z0 =
new TLegend(0.53,0.67,0.73,0.90);
194 hp_e_n1z0->SetTitle(
"DIS electron");
195 hp_p_n1z0->SetTitle(
"#pi#pm");
196 hp_y_n1z0->SetTitle(
"Photons");
197 leg_n1z0->AddEntry(hp_e_n1z0,
"",
"L");
198 leg_n1z0->AddEntry(hp_p_n1z0,
"",
"L");
199 leg_n1z0->AddEntry(hp_y_n1z0,
"",
"L");
200 leg_n1z0->SetTextSize(0.04);