1 #include "commonmacro/common.h"
2 #include "commonmacro/histutil.h"
3 #include "common/Name.cc"
6 "links/P01hi.minbias.2000.hist/hianalysis_1000.hist.root",
7 const char* psDir=
"ps",
9 const char* outDir=
"./",
10 const char* more =
"west",
13 cout <<
"--------------------------" << endl;
14 cout <<
"in name=" << inName << endl
15 <<
"ps dir=" << psDir << endl
16 <<
"cut=" << cut << endl;
17 cout <<
"--------------------------" << endl;
22 inRoot =
new TFile(inName);
24 cout <<
"cannot find the infile" << endl;
28 TH1* h1[2]; TH1* ha[2]; TH1* hRatio;
31 TCanvas c1(
"c1",
"c1",400,500);
32 float minpt=2,maxpt=6;
35 const int nBin=2;
const int nBase=1;
const int nCharge=3;
36 char* baseName[] = {
"gSpecCorrected",
"gSpecCorrected" };
37 char* baseTitle[] = {
"raw",
"corrected"};
38 char* charge[] = { 0,
"Plus",
"Minus"};
39 int markerStyle[] = {4,8,2};
40 float min=1e-5,max=10.;
42 gStyle->SetOptStat(0);
43 gStyle->SetTitleBorderSize(0);
44 for(
int iBin=0; iBin<nBin; iBin++){
45 for(
int iCharge=0; iCharge<nCharge; iCharge++){
47 sprintf(title,
"bin %d %s (cut %d)",
48 iBin,charge[iCharge],cut);
51 c1.Clear();c1.cd(1); gPad->SetTickx(); gPad->SetTicky();
52 gPad->SetGridx(); gPad->SetGridy();
55 for(
int iBase=0; iBase<nBase; iBase++){
56 setName(name,baseName[iBase],iBin,charge[iCharge]);
57 g=(TGraphAsymmErrors*)inRoot->Get(name);
58 g->SetMinimum(min); g->SetMaximum(max);
63 sprintf(title,
"%s",g->GetTitle());
64 Print(&c1,psDir,sTitle.Data());