// //--------------------------------------------------------------------------- // March 31, 2014 // - Add publication dates. This version will (possibly) be shown at the JLab // nuclear theory seminar 4/2/2014 // //--------------------------------------------------------------------------- // May 2, 2013 // - Add the COMPASS preliminary result from (see slide 21): // http://wwwcompass.cern.ch/compass/publications/talks/t2013/friedrich_bormio2013.pdf // // - Change aspect ratio from 800x1000 to 1000x1000 // //--------------------------------------------------------------------------- // This was originally modified for Aron Bernstein to show at CD2012 (see // comments related to those changes below). It was then modified some more // at his request the paper he was writing for the CD2012 proceedings. // Those changes are: // // - legend on the y axis a bit larger // - remove the word predictions from theory predictions // - for the experimental points just make one label // e.g. for the Gasser and Pasquini labels remove their names and // just use ChPT and dispersion // - For the experimental points just give the lab and not the other label // - Changed aspect ratio of canvas to be slightly portrait // - tweaked spacings a bit for brackets and theory points // //--------------------------------------------------------------------------- // This is a modification of the pion_polarization_experiments.C file // made at the request of Aron Bernstein to show at the Chiral Dynamics // workshop in 2012. The changes are: // // - Remove ChPT horizontal lines // - Remove the line separating experiment and theory // This produces a plot summarizing the experimental and theoretical // landscsape of alpha_pi - beta_pi. // // For some reason, cint crashes on this so it needs to be compiled // using the external C++ compiler like this: // // .x pion_polarization_experiments.C+ // // Note that a similar summary plot can be found in a talk by // Jan Friedrich titled "Hadron Spectroscopy & Primakoff Reactions at COMPASS" // shown at the International Workshop on Hadron Structure and Spectroscopy // in Paris on April 5, 2012 on slide 40. //============================================================================= // // References: // // PLUTO @ DESY (from Morgan review article) // PLUTO Collab., C. Berger et al., Z. Phys C 26 (1984) 199 // // DM1 @ DCI (from Morgan review article) // DM1 Collab., A. Courau et al., Nucl. Phys. B 271 (1986) 1 // // DM2 @ DCI (from Morgan review article) // DM2 Collb., X. Ajaltouni et al., contrib. VIIth Intern. // Workshop on Photon-photon collisions (Pairs, April 1986) // cited by J.H. Field, DESY report 86-117 (September 1986) // // MARK II @ SLAC (from Babusci review article) // MARK-II Collab., J. Boyer et al., Phys Rev D 42 (1990) 1350 // // MAMI @ MAINZ // J. Ahrens et al, Eur. Phys. J. A 23, 113–127 (2005) // // PACHRA @ LEBEDEV (from Babusci review article) // T A Aibergenov et al, Czech J Phys 36 (1986) 948 // // SIGMA @ Serpukov (from Babusci review article) // Yu M. Antipov et al, Phys Lett B V121 (1983) 445 // Yu M. Antipov et al, Z Phys C 26 (1985) 495 // // COMPASS @ CERN // // // Review articles: // ---------------- // D. Morgan, M R Pennington Phys Lett. B V192 N1,2 (1987) 207-211 // // D. Babusci et al., Phys. Lett. B V277 (1992) 158-162 // #include #include using namespace std; #include #include #include #include #include #include #include #include class PiPol{ public: PiPol(string my_name, string my_subtitle, string my_pubdate, double my_alpha_minus_beta, double my_err_stat, double my_err_sys):name(my_name),subtitle(my_subtitle),pubdate(my_pubdate),alpha_minus_beta(my_alpha_minus_beta),err_stat(my_err_stat),err_sys(my_err_sys){} string name; string subtitle; string pubdate; double alpha_minus_beta; double err_stat; double err_sys; }; TGraphErrors* MakeTGraph(vector &vals, int offset, int color, int style); void DrawLabels(vector &vals, int offset); void DrawBracket(TH2D *axes, int first_bin, int Nbins, int color, string slabel, Float_t lab_size=0.03); void pion_polarization_experiments_Aron(void) { TColor::CreateColorWheel(); gStyle->SetLineWidth(2); vector experiments1; vector experiments2; vector experiments3; vector theory; // gamma gamma -> pi+ pi- experiments1.push_back(PiPol("PLUTO", "DESY", "1984", 2.0*19.1, 2.0*4.8, 2.0*5.7)); experiments1.push_back(PiPol("DM1", "DCI", "1986", 2.0*17.2, 2.0*4.6, 0.0)); experiments1.push_back(PiPol("DM2", "DCI", "1986", 2.0*26.3, 2.0*7.4, 0.0)); experiments1.push_back(PiPol("MARK II", "SLAC", "1990", 2.0*2.2, 2.0*1.6, 0.0)); // gamma p -> n pi+ gamma experiments2.push_back(PiPol("MAMI", "MAINZ", "2005", 11.6, 1.5, sqrt(3.0*3.0+0.5+0.5))); experiments2.push_back(PiPol("PACHRA", "LEBEDEV", "1986", 2.0*20.0, 2.0*12.0, 0.0)); // gamma A -> A pi+ gamma experiments3.push_back(PiPol("SIGMA", "Serpukov", "1983", 13.6, 2.8, 2.4)); experiments3.push_back(PiPol("COMPASS", "CERN", "2013", 1.9*2.0, 0.7*2.0, 0.8*2.0)); // theory theory.push_back(PiPol("Gasser", "ChPT", "", 5.7, 1.0, 0.0)); //theory.push_back(PiPol("Fil'kov", "DR", "", 13.6, 2.6, 1.9)); theory.push_back(PiPol("", "", "", -1.0, 0.0, 0.0)); // spacer theory.push_back(PiPol("", "", "", -1.0, 0.0, 0.0)); // spacer theory.push_back(PiPol("Pasquini", "dispersion", "", 5.7, 0.0, 0.0)); unsigned int Nvals = 0; TGraphErrors *gexperiements1 = MakeTGraph(experiments1, Nvals, kMagenta, 23); Nvals += experiments1.size()+1; TGraphErrors *gexperiements2 = MakeTGraph(experiments2, Nvals, kBlue, 20); Nvals += experiments2.size()+1; TGraphErrors *gexperiements3 = MakeTGraph(experiments3, Nvals, kRed, 22); Nvals += experiments3.size()+1; Nvals+=2; // for space between theory and experiment TGraphErrors *gtheory = MakeTGraph(theory, Nvals, kBlack, 21); Nvals += theory.size()+1; Nvals += 2; // spacer TH2D *axes = new TH2D("axes","", Nvals, 0.0, (double)Nvals+0.5, 100, 0.0, 60.0); axes->SetStats(0); axes->SetYTitle("#alpha_{#pi} - #beta_{#pi} (#times10^{-4} fm^{3})"); axes->GetYaxis()->SetTitleSize(0.05); axes->GetYaxis()->SetTitleOffset(0.84); TCanvas *c1 = new TCanvas("c1","", 1000, 1000); c1->SetTicks(); // Setting bin label to empty string prevents numeric values // from being drawn on X-axis axes->GetXaxis()->SetBinLabel(1,""); axes->Draw(); // Draw dashed horizontal line at Gasser's value TLine *lin = new TLine(-0.40, 5.7, (double)Nvals + 0.5, 5.7); lin->SetLineStyle(1); lin->SetLineWidth(2); lin->SetLineColor(kGray+2); //lin->Draw(); lin = new TLine(-0.40, 5.7+1.0, (double)Nvals + 0.5, 5.7+1.0); lin->SetLineStyle(2); lin->SetLineWidth(1); lin->SetLineColor(kGray+2); //lin->Draw(); lin = new TLine(-0.40, 5.7-1.0, (double)Nvals + 0.5, 5.7-1.0); lin->SetLineStyle(2); lin->SetLineWidth(1); lin->SetLineColor(kGray+2); //lin->Draw(); // Label ChPT prediction on left hand side TLatex *lab_ChPT = new TLatex(-0.5, 5.7, "ChPT"); lab_ChPT->SetTextSize(0.025); lab_ChPT->SetTextAlign(32); //lab_ChPT->Draw(); TArrow *arrow_ChPT_top = new TArrow(-0.25, 5.7+1.0+2.0, -0.25, 5.7+1.0+0.0, 0.012, "-|>"); //arrow_ChPT_top->Draw(); TArrow *arrow_ChPT_bot = new TArrow(-0.25, 5.7-1.0-2.0, -0.25, 5.7-1.0-0.0, 0.012, "-|>"); //arrow_ChPT_bot->Draw(); // Draw vertical line to separate experiment and theory double x_separator = (double)(Nvals-theory.size()) - 1.25; lin = new TLine(x_separator, 0.0, x_separator, axes->GetYaxis()->GetXmax()); lin->SetLineStyle(7); lin->SetLineWidth(3); lin->SetLineColor(kGray+1); //lin->Draw(); TLatex *lab_theory = new TLatex(x_separator+0.1, 51.0, "theory"); lab_theory->SetTextAngle(270.0); lab_theory->SetTextSize(0.03); lab_theory->SetTextAlign(21); //lab_theory->Draw(); TLatex *lab_experiment = new TLatex(x_separator-0.1, 51.0, "experiment"); lab_experiment->SetTextAngle(90.0); lab_experiment->SetTextSize(0.03); lab_experiment->SetTextAlign(21); //lab_experiment->Draw(); TArrow *arrow_theory = new TArrow(x_separator+0.40, 51.0, x_separator+0.75, 51.0, 0.012, "-|>"); arrow_theory->SetLineWidth(5); //arrow_theory->Draw(); TArrow *arrow_experiment = new TArrow(x_separator-0.40, 51.0, x_separator-0.75, 51.0, 0.012, "-|>"); arrow_experiment->SetLineWidth(5); //arrow_experiment->Draw(); // Draw data points w/ error bars gexperiements1->Draw("Psame"); gexperiements2->Draw("Psame"); gexperiements3->Draw("Psame"); gtheory->Draw("Psame"); // Draw labels next to data points and reactions on bottom Nvals = 0; DrawLabels(experiments1, Nvals); DrawBracket(axes, Nvals+1, experiments1.size(), kMagenta, "#gamma#gamma#rightarrow #pi^{+}#pi^{-}"); Nvals += experiments1.size() + 1; DrawLabels(experiments2, Nvals); DrawBracket(axes, Nvals+1, experiments2.size(), kBlue, "#gamma p#rightarrow n#pi^{+}#gamma"); Nvals += experiments2.size() + 1; DrawLabels(experiments3, Nvals); DrawBracket(axes, Nvals+1, experiments3.size()+2, kRed, "#pi A#rightarrow #pi' #gamma A"); Nvals += experiments3.size() + 1 +1; Nvals++; // spacer DrawLabels(theory, Nvals); DrawBracket(axes, Nvals+1, theory.size()+2, kBlack, "Theory", 0.04); Nvals += theory.size() + 1; // Save output to file c1->SaveAs("pion_polarization_experiments_Aron_2014_04_02.pdf"); c1->SaveAs("pion_polarization_experiments_Aron_2014_04_02.png"); } //------------------- // MakeTGraph //------------------- TGraphErrors* MakeTGraph(vector &vals, int offset, int color, int style) { double x[100]; double y[100]; double ey[100]; for(unsigned int i=0; iSetMarkerStyle(style); graph->SetMarkerColor(color); graph->SetLineColor(color); return graph; } //------------------- // DrawLabels //------------------- void DrawLabels(vector &vals, int offset) { for(unsigned int i=0; i0; TLatex *lab = new TLatex(x+0.02, y, primary.c_str()); lab->SetTextSize(0.03); lab->SetTextAlign(has_subtitle ? 11:12); lab->Draw(); if(has_subtitle){ string mysubtitle = string("(")+subtitle+")"; lab = new TLatex(x+0.02, y-0.1, mysubtitle.c_str()); lab->SetTextSize(0.020); //lab->SetTextSize(0.03); lab->SetTextAlign(13); //lab->SetTextAlign(12); lab->Draw(); } } } //------------------- // DrawBracket //------------------- void DrawBracket(TH2D *axes, int first_bin, int Nbins, int color, string slabel, Float_t lab_size) { double binwidth = axes->GetXaxis()->GetBinWidth(1); double x1 = axes->GetXaxis()->GetBinLowEdge(first_bin); double x2 = axes->GetXaxis()->GetBinLowEdge(first_bin+Nbins) + 0.25*binwidth; TLine *lin = new TLine(x1, -2.0, x2, -2.0); lin->SetLineWidth(3); lin->SetLineColor(color); lin->Draw(); lin = (TLine*)lin->Clone(); lin->SetX1(x1); lin->SetX2(x1); lin->SetY1(-2.0); lin->SetY2(-1.5); lin->Draw(); lin = (TLine*)lin->Clone(); lin->SetX1(x2); lin->SetX2(x2); lin->SetY1(-2.0); lin->SetY2(-1.5); lin->Draw(); TLatex *lab = new TLatex((x1+x2)/2.0, -2.5, slabel.c_str()); lab->SetTextAlign(23); lab->SetTextSize(lab_size); lab->Draw(); }