// Draw a diagram of the scattering angles in the g p -> pi+pi- reaction // similar to the one from Stefan Strauch's document void scattering_angles(void) { TCanvas *c1 = new TCanvas("c1", "", 1000, 500); c1->Range(-1.0, -1.0, +1.0, +1.0); gStyle->SetLineWidth(3); // Proton scattering plane double pplane_x[] = {-1.0, -0.5, 1.0, 0.5, -1.0}; double pplane_y[] = {-1.0, 0.45, 0.45, -1.0, -1.0}; TPolyLine *pplane = new TPolyLine(5, pplane_x, pplane_y); pplane->SetFillColor(kGray); pplane->SetFillStyle(3002); // Pion scattering plane upper double piplane_x[] = {0.0, -0.10, 0.25, 0.35, 0.0}; double piplane_y[] = {-0.275, 0.325, 1.0, 0.40, -0.275}; TPolyLine *piplane_up = new TPolyLine(4, piplane_x, piplane_y); piplane_up->SetFillColor(kYellow); piplane_up->SetFillStyle(3002); // Pion scattering plane lower for(int i=0; i<5; i++){ piplane_x[i] += 0.1; piplane_y[i] -= 0.6; } TPolyLine *piplane_dn = new TPolyLine(5, piplane_x, piplane_y); piplane_dn->SetFillColor(kYellow); piplane_dn->SetFillStyle(3001); piplane_dn->SetLineStyle(2); // Incident photon TCurlyLine *gamma1 = new TCurlyLine(-0.6, -0.275, -0.02, -0.275); gamma1->SetWavy(); gamma1->SetWaveLength(0.06); gamma1->SetAmplitude(0.02); gamma1->Draw(); TArrow *gamma1_arrow = new TArrow(-0.05, -0.275, -0.02, -0.275, 0.03, "->"); // Incident photon polarization (at photon) TArrow *gamma1_polarization = new TArrow(-0.6, -0.275, -0.6, 0.1, 0.02, "-|>"); gamma1_polarization->SetLineColor(kGray+2); gamma1_polarization->SetFillColor(kGray+2); gamma1_polarization->SetLineStyle(2); // Incident photon polarization (at pipi scattering plane) TArrow *gamma1_polarization_pipi = new TArrow(0.35, 0.40, 0.35, 0.82, 0.02, "-|>"); gamma1_polarization_pipi->SetLineColor(kGray+2); gamma1_polarization_pipi->SetFillColor(kGray+2); gamma1_polarization_pipi->SetLineStyle(2); // Drop shadow for "Z" direction to show phi_pipi angle TArrow *Z_drop_shadow_arrow = new TArrow(-0.6, -0.275, -0.5, 0.0875, 0.02, "-|>"); Z_drop_shadow_arrow->SetFillColor(kGray+2); Z_drop_shadow_arrow->SetLineColor(kGray+2); Z_drop_shadow_arrow->SetLineStyle(9); // pi+ TArrow *pip_arrow = new TArrow(0.0, -0.275, 0.20, 0.75, 0.03, "->"); pip_arrow->SetLineColor(kRed); // pi- TArrow *pim_arrow = new TArrow(0.0, -0.275, 0.40, -0.200, 0.03, "->"); pim_arrow->SetLineColor(kBlue); // Incident proton TArrow *iproton_arrow = new TArrow(0.6, -0.275, 0.01, -0.275, 0.03, "->"); iproton_arrow->SetLineWidth(5); iproton_arrow->SetLineColor(kRed+2); // Final state proton TArrow *fproton_arrow = new TArrow(0.0, -0.275, -0.275, -0.80, 0.03, "->"); fproton_arrow->SetLineWidth(5); fproton_arrow->SetLineColor(kRed+2); // "Z" direction (pi+pi- total momentum) TArrow *Z_arrow = new TArrow(0.0, -0.275, 0.290, 0.280, 0.02, "-|>"); Z_arrow->SetLineWidth(4); // "X" direction (in proton scattering plane, perpendicular to FS proton) TArrow *X_arrow = new TArrow(0.0, -0.275, -0.277, 0.085, 0.02, "-|>"); X_arrow->SetLineStyle(9); X_arrow->SetLineWidth(4); // theta arc TEllipse *theta_arc = new TEllipse(0.0, -0.275, 0.2, 0.5, 38.0, 63.0); theta_arc->SetNoEdges(); theta_arc->SetLineWidth(2); theta_arc->SetFillStyle(0); // theta_cm arc TEllipse *theta_cm_arc = new TEllipse(0.0, -0.275, 0.30, 0.70, 0.0, 38.0); theta_cm_arc->SetNoEdges(); theta_cm_arc->SetLineWidth(2); theta_cm_arc->SetFillStyle(0); // phi_cm arc TEllipse *phi_arc = new TEllipse(0.0, -0.275, 0.20, 0.55, 114.0, 155.0); phi_arc->SetNoEdges(); phi_arc->SetLineWidth(2); phi_arc->SetFillStyle(0); // phi_pipi arc TEllipse *phi_pipi_arc = new TEllipse(-0.6, -0.275, 0.035, 0.2, 35.0, 90.0); phi_pipi_arc->SetNoEdges(); phi_pipi_arc->SetLineWidth(2); phi_pipi_arc->SetFillStyle(0); // psi_pipi arc TEllipse *psi_pipi_arc = new TEllipse(0.35, 0.40, 0.15, 0.2, 90.0, 103.0); psi_pipi_arc->SetNoEdges(); psi_pipi_arc->SetLineWidth(2); psi_pipi_arc->SetFillStyle(0); // Latex labels TLatex t; t.SetTextSize(0.11); t.SetTextAlign(22); // Draw all items in appropriate order piplane_dn->Draw(); piplane_dn->Draw("f"); pim_arrow->Draw(); t.SetTextColor(kBlue); t.DrawLatex(0.367, -0.089, "#pi^{-}"); pplane->Draw(); pplane->Draw("f"); piplane_up->Draw(); piplane_up->Draw("f"); gamma1_arrow->Draw(); gamma1_polarization->Draw(); gamma1_polarization_pipi->Draw(); Z_drop_shadow_arrow->Draw(); pip_arrow->Draw(); iproton_arrow->Draw(); fproton_arrow->Draw(); Z_arrow->Draw(); X_arrow->Draw(); theta_arc->Draw(); theta_cm_arc->Draw(); phi_arc->Draw(); phi_pipi_arc->Draw(); psi_pipi_arc->Draw(); t.SetTextColor(kBlack); t.DrawLatex(-0.65, -0.275, "#vec{#gamma}"); t.SetTextColor(kRed+2); t.DrawLatex(0.65, -0.275, "#it{Z}"); t.DrawLatex(-0.35, -0.85, "#it{Z'}"); t.SetTextColor(kRed); t.DrawLatex(0.221, 0.826, "#pi^{+}"); t.SetTextSize(0.07); t.SetTextColor(kBlack); t.DrawLatex(0.237, -0.097, "#it{#theta_{cm}}"); t.DrawLatex(0.110, 0.055, "#it{#theta}"); t.DrawLatex(-0.124, 0.064, "#it{#phi}"); t.DrawLatex(0.297, 0.369, "#it{Z}"); t.DrawLatex(-0.305, 0.144, "#it{X}"); t.SetTextSize(0.07); t.DrawLatex(0.378, 0.673, "#it{#psi}"); t.SetTextSize(0.03); t.DrawLatex(0.398, 0.636, "#it{#pi#pi}"); t.SetTextSize(0.07); t.DrawLatex(-0.578, 0.008, "#it{#phi}"); t.SetTextSize(0.03); t.DrawLatex(-0.556, -0.042, "#it{#pi#pi}"); t.SetTextColor(kGray+2); t.SetTextSize(0.06); t.DrawLatex(-0.572, 0.165, "#vec{#voidn}"); t.DrawLatex(0.351, 0.907, "#vec{#voidn}"); c1->SaveAs("scattering_angles.png"); c1->SaveAs("scattering_angles.pdf"); } void AddMiddleArrowHead(TCurlyLine *cl) { double xmid = (cl->GetStartX() + cl->GetEndX())/2.0; double ymid = (cl->GetStartY() + cl->GetEndY())/2.0; double dX = (cl->GetEndX() - cl->GetStartX())/1000.0; double dY = (cl->GetEndY() - cl->GetStartY())/1000.0; xmid += 10.0*dX; ymid += 10.0*dY; TArrow *arrow = new TArrow(xmid, ymid, xmid+dX, ymid+dY, 0.05, "->-"); arrow->Draw(); }