5 void prd2009QpT(
bool x=
false,TString y=
"/star/data01/pwg/stevens4/wAnalysis/xSecPaper/sl11b/data/",
float canvasScale=1.0){
7 TString cCore=
"Wprd_QPT";
12 TString dataFinalRoot=iPathData+
"run9setABCD.wana.hist.root";
14 fd=
new TFile(dataFinalRoot); assert(fd->IsOpen());
16 gStyle->SetFillStyle(0);
17 gStyle->SetPalette(1,0);
18 gStyle->SetOptStat(0);
19 gStyle->SetOptDate(0);
20 const Char_t *title =
"High-energy electron charge separation with TPC";
21 c=
new TCanvas(cCore,title,500*canvasScale,300*canvasScale);
22 c->SetTopMargin(0.05); c->SetBottomMargin(0.15);
23 c->SetRightMargin(0.04); c->SetLeftMargin(0.08);
24 gPad->SetGridy(
false); gPad->SetGridx(
false);
25 if(!colorPlot) c->SetGrayscale();
30 TH1F* qPt_1D = (TH1F*)h->ProjectionY(
"name",26,100)->Clone();
31 qPt_1D->Rebin(); qPt_1D->SetLineWidth(2);
32 qPt_1D->SetTitle(
"; Lepton charge sign #times 1/p_{T} (c/GeV); Counts");
33 qPt_1D->SetMinimum(0.001);
34 qPt_1D->GetXaxis()->CenterTitle();
35 qPt_1D->GetXaxis()->SetTitleOffset(1.1);
36 qPt_1D->GetXaxis()->SetTitleSize(0.06);
37 qPt_1D->GetXaxis()->SetLabelSize(0.05);
38 qPt_1D->GetYaxis()->CenterTitle();
39 qPt_1D->GetYaxis()->SetTitleOffset(0.65);
40 qPt_1D->GetYaxis()->SetTitleSize(0.06);
41 qPt_1D->GetYaxis()->SetLabelSize(0.05);
45 TH1F* minusHatch = (TH1F*)qPt_1D->Clone();
46 TH1F* plusHatch = (TH1F*)qPt_1D->Clone();
47 minusHatch->GetXaxis()->SetRangeUser(-0.1,-0.001);
48 minusHatch->SetFillStyle(3554); minusHatch->SetFillColor(kBlue);
49 minusHatch->Draw(
"same");
50 plusHatch->GetXaxis()->SetRangeUser(0.001,0.1);
51 plusHatch->SetFillStyle(3545); plusHatch->SetFillColor(kGreen);
52 plusHatch->Draw(
"same");
55 TLegend *leg =
new TLegend(0.15,0.68,0.35,0.83);
56 leg->SetEntrySeparation(0.01);
59 leg->SetTextSize(0.05);
61 string extra=
"";
if(canvasScale>1.0) extra=
" ";
62 leg->AddEntry(qPt_1D,Form(
"#splitline{ STAR 2009 Data}{ E_{T}^{e}>25 GeV and |%s#eta_{e}|<1}",extra),
"");
66 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/qPTcolor.eps");
67 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/qPTcolor.png");
70 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/qPTBW.eps");
71 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/qPTBW.png");