void pionDecayExample() { // // Draw diagrams of the lab and CM frames for a pion decay example. // TCanvas *c1 = new TCanvas("c1", "A canvas", 10, 10, 1000, 500); c1->Range(0, 0, 100, 50); gPad->SetFillColor(10); Int_t linsav = gStyle->GetLineWidth(); gStyle->SetLineWidth(2); TLatex t; t.SetTextAlign(22); t.SetTextSize(0.06); TLine * l; // // The lab frame // t.DrawLatex(32,44,"Lab"); Option_t atype = "|>"; // define arrow types Float_t asize = 0.04; Double_t x1 = 10.0; Double_t y1 = 25.0; Double_t x2 = 35.0; Double_t x3 = x2+20.0; Double_t y0 = y1-15.0; Double_t y3 = y1+15.0; l = new TArrow(x1, y1, x2, y1); l->Draw(); // incoming pion l = new TArrow(x2, y1, x2, y0); l->Draw(); // outgoing neutrino l = new TArrow(x2, y1, x3, y3); l->Draw(); // outgoing muon t.SetTextAlign(12); Double_t xt = x1; Double_t yt = y1+3.0; t.DrawLatex(xt,yt,"#pi^{+}"); Double_t xt = x1-7.0; Double_t yt = y1-4.0; t.DrawLatex(xt,yt,"p_{#pi}=(#gamma m_{#pi}, #beta#gamma m_{#pi}, 0, 0)"); Double_t xt = x2+3.0; Double_t yt = (y1+y0)/2.0; t.DrawLatex(xt,yt,"#nu_{#mu}"); Double_t xt = x2; Double_t yt = y0-5.0; t.DrawLatex(xt,yt,"p_{#nu}=(p, 0, -p, 0)"); Double_t xt = (x2+x3)/2.0-5.0; Double_t yt = (y1+y3)/2.0; t.DrawLatex(xt,yt,"#mu^{+}"); t.SetTextAlign(32); Double_t xt = x3-5.0; Double_t yt = y3-1.0; t.DrawLatex(xt,yt,"p_{#mu}=(E_{#mu}, #beta#gamma m_{#pi}, p, 0)"); // // The CM diagram // t.SetTextAlign(22); Double_t x0 = 80; t.DrawLatex(x0,44,"Center of Momentum"); Double_t x1 = x0+15; Double_t x2 = x0-15; Double_t y0 = 25; Double_t y1 = y0+15; Double_t y2 = y0-15; l = new TArrow(x0, y0, x1, y1); l->Draw(); l = new TArrow(x0, y0, x2, y2); l->Draw(); t.SetTextAlign(12); Double_t xt = x0-4.0; Double_t yt = y0; t.DrawLatex(xt,yt,"#pi^{+}"); Double_t xt = (x0+x1)/2.0+2.0; Double_t yt = (y0+y1)/2.0; t.DrawLatex(xt,yt,"#mu^{+}"); t.SetTextAlign(32); Double_t xt = x1-4.0; Double_t yt = y1; t.DrawLatex(xt,yt,"p_{#mu}=(p, 0, -p, 0)"); Double_t xt = (x0+x2)/2.0-2.0; Double_t yt = (y0+y2)/2.0; t.DrawLatex(xt,yt,"#nu_{#mu}"); t.SetTextAlign(12); Double_t xt = x2+3.0; Double_t yt = y2; t.DrawLatex(xt,yt,"p_{#nu}=(p, 0, -p, 0)"); c1->Update(); gStyle->SetLineWidth(linsav); }