File indexing completed on 2025-08-05 08:10:54
0001
0002
0003 #include "TFile.h"
0004 #include "TCanvas.h"
0005 #include "TH1.h"
0006 #include "TH2.h"
0007 #include "TGraphErrors.h"
0008 #include "TAxis.h"
0009 #include "TF1.h"
0010 #include "TLatex.h"
0011 #include "TLegend.h"
0012
0013 const int NUM_PT_BINS = 4;
0014 const float BIN_CENTERS[ NUM_PT_BINS ] = { 5.39, 6.69, 8.77, 11.9 };
0015 const float ASYMMETRY[ NUM_PT_BINS ] =
0016 { 0, 0, 0, 0 };
0017 const float STAT_ERR[ NUM_PT_BINS ] =
0018 { 0.0010, 0.0013, 0.0025, 0.0035 };
0019
0020
0021
0022 const int NUM_QGQ_PT_BINS = 12;
0023 const float PT[ NUM_QGQ_PT_BINS ]=
0024 { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
0025 const float QGQ[ NUM_QGQ_PT_BINS ] =
0026 { -0.000500, -0.000434, -0.000339, -0.000213, -0.000054, 0.000137, 0.000357,
0027 0.000603, 0.000874, 0.001166, 0.001477, 0.001804 };
0028 const float QGQ_ERR[ NUM_QGQ_PT_BINS ] =
0029 { 0.000077, 0.000070, 0.000072, 0.000079, 0.000091, 0.000113, 0.000146,
0030 0.000191, 0.000250, 0.000321, 0.000405, 0.000501 };
0031
0032 void plot_sPHENIX_A_N_dp()
0033 {
0034 TH1 *frame = new TH2F( "frame", " ", 1, 4.69, 12.6, 1, -0.018, 0.015 );
0035 frame->SetTitle( "; p_{T} [GeV/c]; A_{N}" );
0036 frame->SetStats( false );
0037 TAxis *xAxis = frame->GetXaxis();
0038 xAxis->SetTitleSize( 0.05 );
0039 xAxis->SetLabelSize( 0.055 );
0040 xAxis->SetTitleOffset( 1.2 );
0041 TAxis *yAxis = frame->GetYaxis();
0042 yAxis->SetTitleSize( 0.07 );
0043 yAxis->SetLabelSize( 0.055 );
0044 yAxis->CenterTitle( true );
0045 yAxis->SetTitleOffset( 0.8 );
0046 yAxis->SetNdivisions( 504 );
0047
0048 TGraphErrors *projectedMeasurement =
0049 new TGraphErrors( NUM_PT_BINS, BIN_CENTERS, ASYMMETRY, 0, STAT_ERR );
0050 projectedMeasurement->SetMarkerStyle( kFullCircle );
0051
0052 TF1 *zeroLine = new TF1( "zeroLine", "0", 0, 20 );
0053 zeroLine->SetLineColor( kBlack );
0054 zeroLine->SetLineStyle( 2 );
0055
0056 TFile *trigluonFile = TFile::Open( "gggContribution.root" );
0057
0058 TGraphErrors* ggg1 = (TGraphErrors*)trigluonFile->Get( "model1" );
0059 ggg1->SetFillStyle( 3005 );
0060 ggg1->SetFillColor( kRed );
0061 ggg1->SetLineColor( kWhite );
0062 TGraphErrors* ggg2 = (TGraphErrors*)trigluonFile->Get( "model2" );
0063 ggg2->SetFillStyle( 3004 );
0064 ggg2->SetFillColor( kBlue );
0065 ggg2->SetLineColor( kWhite );
0066
0067 TGraphErrors *qgq = new TGraphErrors( NUM_QGQ_PT_BINS, PT, QGQ,
0068 0, QGQ_ERR );
0069 qgq->SetFillColor( kGreen + 3 );
0070 qgq->SetFillStyle( 3003 );
0071 qgq->SetLineColor( kGreen + 1 );
0072 qgq->SetLineWidth( 2 );
0073
0074 TCanvas *c1 = new TCanvas( "c11", "with QGQ", 200, 200, 800, 500 );
0075 gPad->SetBottomMargin( 0.15 );
0076 gPad->SetLeftMargin( 0.15 );
0077 frame->Draw( "" );
0078 ggg1->Draw( "3" );
0079 ggg2->Draw( "3" );
0080 qgq->Draw( "C3" );
0081 projectedMeasurement->Draw( "P" );
0082 zeroLine->Draw( "same" );
0083
0084 TLatex text1;
0085 text1.SetTextSize( 0.05 );
0086
0087 text1.DrawLatex( 5, 0.012, "p^{#uparrow} + p #rightarrow #gamma + X" );
0088 text1.DrawLatex( 5.25, 0.0095, "#sqrt{s} = 200 GeV" );
0089 text1.DrawLatex( 10, 0.012, "sPHENIX:" );
0090 text1.DrawLatex( 10, 0.0095, "L=100/pb P=0.57" );
0091
0092 TLegend *leg = new TLegend( 0.18, 0.18, 0.5, 0.41 );
0093 leg->AddEntry( qgq, "qgq Contribution (calc. by D.Pitonyak)" );
0094 leg->AddEntry( ggg1, "Trigluon Contribution Model 1 (calc. by S.Yoshida)" );
0095 leg->AddEntry( ggg2, "Trigluon Contribution Model 2 (calc. by S.Yoshida)" );
0096 leg->SetBorderSize( 0 );
0097 leg->SetTextSize( 0.04 );
0098 leg->Draw();
0099
0100 c1->SaveAs( "AN_dp_sPHENIX.pdf" );
0101 }