void AddMiddleArrowHead(TCurlyLine *cl); void feynman_LBL(void) { TCanvas *c1 = new TCanvas("c1", "", 600, 600); c1->Range(-1.0, -1.0, +1.0, +1.0); gStyle->SetLineWidth(6); #if 1 // Draw with time going from left to right TCurlyLine *gamma1 = new TCurlyLine(-0.7, +0.7, 0.0, 0.0); gamma1->SetWavy(); gamma1->SetWaveLength(0.08); gamma1->Draw(); TCurlyLine *gamma2 = new TCurlyLine(-0.7, -0.7, 0.0, 0.0); gamma2->SetWavy(); gamma2->SetWaveLength(0.08); gamma2->Draw(); AddMiddleArrowHead(gamma1); AddMiddleArrowHead(gamma2); TArrow *pip = new TArrow(0.0, 0.0, +0.7, -0.7, 0.05, "->-"); pip->Draw(); TArrow *pim = new TArrow(0.0, 0.0, +0.7, +0.7, 0.05, "->-"); pim->Draw(); TEllipse *exchange = new TEllipse(0.0, 0.0, 0.1, 0.1); exchange->SetFillColor(kCyan); // TLine *exchange = new TLine(0.0, -0.2, 0.0, +0.2); exchange->Draw(); TLatex t; t.SetTextAlign(22); t.SetTextSize(0.2); t.DrawLatex(-0.860, -0.85, "#gamma*"); t.DrawLatex(+0.830, -0.85, "#pi^{-}"); t.DrawLatex(-0.830, +0.85, "#gamma"); t.DrawLatex(+0.830, +0.85, "#pi^{+}"); #else // Draw with time going from bottom to top TCurlyLine *gamma1 = new TCurlyLine(-0.9, -0.9, -0.2, 0.0); gamma1->SetWavy(); gamma1->SetWaveLength(0.08); gamma1->Draw(); TCurlyLine *gamma2 = new TCurlyLine(+0.9, -0.9, +0.2, 0.0); gamma2->SetWavy(); gamma2->SetWaveLength(0.08); gamma2->Draw(); AddMiddleArrowHead(gamma1); AddMiddleArrowHead(gamma2); TArrow *pip = new TArrow(-0.2, 0.0, -0.9, +0.9, 0.05, "->-"); pip->Draw(); TArrow *pim = new TArrow(+0.2, 0.0, +0.9, +0.9, 0.05, "->-"); pim->Draw(); TLine *exchange = new TLine(-0.2, 0.0, +0.2, 0.0); exchange->Draw(); TLatex t; t.SetTextSize(0.2); t.DrawLatex(-0.95, -0.775, "#gamma"); t.DrawLatex(+0.753, -0.686, "#gamma*"); t.DrawLatex(-0.739, +0.695, "#pi^{+}"); t.DrawLatex(+0.609, +0.725, "#pi^{-}"); #endif c1->SaveAs("feynman_LBL.png"); c1->SaveAs("feynman_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(); }