feynman.C

Go to the documentation of this file.
00001 void feynman()
00002 {
00003    //Draw Feynman diagrams
00004    // To see the output of this macro, click begin_html <a href="gif/feynman.gif">here</a>. end_html
00005    //Author: Otto Schaile
00006    
00007    TCanvas *c1 = new TCanvas("c1", "A canvas", 10,10, 600, 300);
00008    c1->Range(0, 0, 140, 60);
00009    Int_t linsav = gStyle->GetLineWidth();
00010    gStyle->SetLineWidth(3);
00011    TLatex t;
00012    t.SetTextAlign(22);
00013    t.SetTextSize(0.1);
00014    TLine * l;
00015    l = new TLine(10, 10, 30, 30); l->Draw();
00016    l = new TLine(10, 50, 30, 30); l->Draw();
00017    TCurlyArc *ginit = new TCurlyArc(30, 30, 12.5*sqrt(2), 135, 225);
00018    ginit->SetWavy();
00019    ginit->Draw();
00020    t.DrawLatex(7,6,"e^{-}");
00021    t.DrawLatex(7,55,"e^{+}");
00022    t.DrawLatex(7,30,"#gamma");
00023 
00024    TCurlyLine *gamma = new TCurlyLine(30, 30, 55, 30);
00025    gamma->SetWavy();
00026    gamma->Draw();
00027    t.DrawLatex(42.5,37.7,"#gamma");
00028 
00029    TArc *a = new TArc(70, 30, 15);
00030    a->Draw();
00031    t.DrawLatex(55, 45,"#bar{q}");
00032    t.DrawLatex(85, 15,"q");
00033    TCurlyLine *gluon = new TCurlyLine(70, 45, 70, 15);
00034    gluon->Draw();
00035    t.DrawLatex(77.5,30,"g");
00036 
00037    TCurlyLine *z0 = new TCurlyLine(85, 30, 110, 30);
00038    z0->SetWavy();
00039    z0->Draw();
00040    t.DrawLatex(100, 37.5,"Z^{0}");
00041 
00042    l = new TLine(110, 30, 130, 10); l->Draw();
00043    l = new TLine(110, 30, 130, 50); l->Draw();
00044 
00045    TCurlyArc *gluon1 = new TCurlyArc(110, 30, 12.5*sqrt(2), 315, 45);
00046    gluon1->Draw();
00047 
00048    t.DrawLatex(135,6,"#bar{q}");
00049    t.DrawLatex(135,55,"q");
00050    t.DrawLatex(135,30,"g");
00051    c1->Update();
00052    gStyle->SetLineWidth(linsav);
00053 }

Generated on Tue Jul 5 15:44:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1