mass_spectrum.C

Go to the documentation of this file.
00001 // This macro makes use of some basic graphics primitives such as line, arrow
00002 // and text. It as been written using the TCanvas ToolBar to produce a first
00003 // draft and was then modified for fine adjustments. Note also the use
00004 // of C funtions. They allow to simplify the macro reading and editing by 
00005 // avoiding code repetition or defining some graphics attributes in one single
00006 // place. This technique to generate drawings may appear not very user friendly
00007 // compare to all the "wysiwyg" graphics editors available. In some cases it can
00008 // be more powerful than a GUI interface because it allows to generate very 
00009 // precise drawing and using computation to generate them.
00010 //Author: Olivier Couet
00011 
00012 void mass_spectrum()
00013 {
00014    TCanvas *C = new TCanvas("C","C",800,500);
00015 
00016    hline (0.10,0.25);
00017    hline (0.10,0.80);
00018    hline (0.30,0.90);
00019    hline (0.30,0.35);
00020    hline (0.45,0.60);
00021    hline (0.58,0.68);
00022    hline (0.73,0.70);
00023    hline (0.89,0.75);
00024 
00025    arrow(0.32, 0.90, 0.32, 0.35, 1);
00026    arrow(0.34, 0.90, 0.34, 0.35, 1);
00027    arrow(0.36, 0.90, 0.36, 0.60, 1);
00028    arrow(0.38, 0.90, 0.38, 0.70, 1);
00029 
00030    arrow(0.30, 0.90, 0.18, 0.25, 1);
00031    arrow(0.30, 0.35, 0.19, 0.25, 1);
00032    arrow(0.40, 0.90, 0.47, 0.61, 1);
00033 
00034    arrow(0.15, 0.25, 0.15, 0.19, 1);
00035    arrow(0.15, 0.80, 0.15, 0.74, 1);
00036    
00037    arrow(0.50, 0.60, 0.50, 0.54, 1);
00038    arrow(0.60, 0.68, 0.60, 0.62, 1);
00039    arrow(0.94, 0.75, 0.94, 0.69, 1);
00040    
00041    arrow(0.32, 0.35, 0.32, 0.19, 1);
00042    arrow(0.36, 0.35, 0.36, 0.19, 1);
00043    arrow(0.38, 0.35, 0.38, 0.19, 1);
00044 
00045    arrow(0.40, 0.90, 0.60, 0.68, 1);
00046    arrow(0.40, 0.90, 0.90, 0.75, 1);
00047    arrow(0.45, 0.60, 0.35, 0.35, 1);
00048    arrow(0.30, 0.90, 0.18, 0.80, 2);
00049    arrow(0.67, 0.68, 0.36, 0.35, 1);
00050    arrow(0.78, 0.70, 0.37, 0.35, 2);
00051    arrow(0.91, 0.75, 0.39, 0.35, 1);
00052 
00053    TLatex l1;
00054    l1.SetTextSize(0.035);
00055    l1.SetTextAlign(22);
00056    l1.SetTextFont(132);
00057    l1.DrawLatex(0.15, 0.73, "hadrons");
00058    l1.DrawLatex(0.15, 0.18, "hadrons");
00059    l1.DrawLatex(0.32, 0.18, "hadrons");
00060    l1.DrawLatex(0.38, 0.59, "hadrons");
00061    l1.DrawLatex(0.50, 0.53, "hadrons");
00062    l1.DrawLatex(0.94, 0.68, "hadrons");
00063    l1.DrawLatex(0.58, 0.62, "hadrons");
00064    l1.DrawLatex(0.41, 0.18, "radiative");
00065 
00066    TLatex l2;
00067    l2.SetTextSize(0.038);
00068    l2.SetTextAlign(22);
00069    l2.SetTextFont(132);
00070    l2.DrawLatex(0.07, 0.08, "#font[12]{J^{PC}} =");
00071    l2.DrawLatex(0.15, 0.08, "0^{-+}");
00072    l2.DrawLatex(0.35, 0.08, "1^{--}");
00073    l2.DrawLatex(0.50, 0.08, "0^{++}");
00074    l2.DrawLatex(0.62, 0.08, "1^{++}");
00075    l2.DrawLatex(0.77, 0.08, "1^{+-}");
00076    l2.DrawLatex(0.93, 0.08, "2^{++}");
00077    l2.DrawLatex(0.15, 0.83, "#eta_{c}(2S)");
00078    l2.DrawLatex(0.15, 0.28, "#eta_{c}(1S)");
00079    l2.DrawLatex(0.35, 0.93, "#psi(2S)");
00080    l2.DrawLatex(0.45, 0.35, "#font[12]{J}/#psi(1S)");
00081    l2.DrawLatex(0.51, 0.63, "#chi_{c0}(1P)");
00082    l2.DrawLatex(0.63, 0.71, "#chi_{c1}(1P)");
00083    l2.DrawLatex(0.78, 0.73, "h_{c1}(1P)");
00084    l2.DrawLatex(0.94, 0.78, "#chi_{c2}(1P)");
00085 
00086    TLatex l3;
00087    l3.SetTextSize(0.037);
00088    l3.SetTextAlign(11);
00089    l3.SetTextFont(132);
00090    l3.DrawLatex(0.23, 0.86, "#font[152]{g}");
00091    l3.DrawLatex(0.23, 0.57, "#font[152]{g}");
00092    l3.DrawLatex(0.44, 0.77, "#font[152]{g}");
00093    l3.DrawLatex(0.40, 0.50, "#font[152]{g}");
00094    l3.DrawLatex(0.45, 0.46, "#font[152]{g}");
00095    l3.DrawLatex(0.71, 0.61, "#font[152]{g}");
00096    l3.DrawLatex(0.24, 0.31, "#font[152]{g}");
00097    l3.DrawLatex(0.38, 0.81, "#font[152]{g^{*}}");
00098    l3.DrawLatex(0.355, 0.16, "#font[152]{g^{*}}");
00099    l3.DrawLatex(0.295, 0.50, "#pi#pi");
00100    l3.DrawLatex(0.345, 0.53, "#eta,#pi^{0}");
00101    l3.DrawLatex(0.70, 0.65, "#pi^{0}");
00102 }
00103 
00104 void hline (Double_t x, Double_t y)
00105 {
00106    Double_t dx = 0.1;
00107    TLine *l = new TLine(x,y,x+dx,y);
00108    l->Draw();
00109    l->SetLineWidth(4);
00110 }
00111 
00112 void arrow (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Int_t ls)
00113 {
00114    arrow = new TArrow(x1,y1,x2,y2,0.025,"|>");
00115    arrow->SetFillColor(1);
00116    arrow->SetFillStyle(1001);
00117    arrow->SetLineStyle(ls);
00118    arrow->SetAngle(19);
00119    arrow->Draw();
00120 }

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