void reaction_LBL(void) { TCanvas *c1 = new TCanvas("c1"); c1->Range(-1.0, -1.0, +1.0, +1.0); gStyle->SetLineWidth(6); TCurlyLine *gamma1 = new TCurlyLine(-0.8, -0.0, -0.2, 0.0); gamma1->SetWavy(); gamma1->SetWaveLength(0.08); AddEndArrowHead(gamma1); gamma1->Draw(); TEllipse *proton = new TEllipse(-0.1, 0.0, 0.03, 0.03*7.0/5.0); proton->SetFillColor(kBlack); proton->Draw(); TArrow *pip = new TArrow(-0.1, 0.0, 0.75, 0.75, 0.05, "->"); pip->Draw(); TArrow *pim = new TArrow(-0.1, 0.0, 0.75, +0.0, 0.05, "->"); pim->Draw(); TArrow *neutron = new TArrow(-0.1, 0.0, +0.75, -0.75, 0.05, "->"); neutron->Draw(); TLatex t; t.SetTextSize(0.2); t.DrawLatex(-0.95, -0.093, "#gamma"); t.DrawLatex(0.761, -0.932, "#it{Z'}"); t.DrawLatex(0.767, -0.089, "#pi^{-}"); t.DrawLatex(0.767, 0.703, "#pi^{+}"); t.DrawLatex(-0.207, -0.369, "#it{Z}"); c1->SaveAs("reaction_LBL.png"); c1->SaveAs("reaction_LBL.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(); } void AddEndArrowHead(TCurlyLine *cl) { double xend = cl->GetEndX(); double yend = cl->GetEndY(); double dX = (cl->GetEndX() - cl->GetStartX())/1000.0; double dY = (cl->GetEndY() - cl->GetStartY())/1000.0; TArrow *arrow = new TArrow(xend-dX, yend-dY, xend, yend, 0.05, "->-"); arrow->Draw(); }