2 TGraphErrors * grL[mxGr];
5 char *obsL[nObs]={
"A_n",
"A_s",
"A_d"};
12 TString wrkDir=
"final/";
14 char *selL[nSel]={
"defaultB-H/",
"default-H/",
"maxEta1.4-H/",
"highPol-H/",
"nPrim5_20-H/",
"zVert50-H/",
"pT1_3-H/",
"posCharge-H/",
"shiftPatt-H/",
"swapPatt-H/",
"randPatt-H/" };
19 for (isel=0;isel<nSel;isel++) {
20 TString fname=wrkDir+selL[isel]+
"endVer1.hist.root";
22 TFile *inpH=
new TFile(fname);
23 assert(inpH->IsOpen());
26 for (io=0;io<nObs;io++) {
28 sprintf(name,
"%s*EtaBF",obsL[io]);
29 TGraphErrors *gr =(TGraphErrors *) inpH->Get(name);
32 sprintf(name,
"avr%s*EtaBF",obsL[io]);
33 TF1 *ff=gr->GetFunction(name);
35 float val=ff->GetParameter(0);
36 float err=ff->GetParError(0);
37 printf(
"pol0= %f +/- %f\n",val,err);
38 TGraphErrors * grOut=grL[io];
41 grOut->SetPoint(n,x,val);
42 grOut->SetPointError(n,0,err);
49 c=
new TCanvas(
"aa",
"aa" ,800,800);
51 TLine *ln0=
new TLine(0,0.,12,0.);
54 for (it=0;it<mxGr;it++) {
55 TGraphErrors * gr=grL[it];
57 printf(
"\nit=%d name='%s', N=%d\n",it,gr->GetName(),n);
64 TAxis *ax=gr->GetXaxis();
65 ax->SetTitle(
"choice of event selection");
71 TString fname=wrkDir+
"compCuts.hist.root";
72 TFile *outH=
new TFile(fname,
"RECREATE");
73 assert(outH->IsOpen());
74 printf(
"save outH -->%s\n", fname.Data());
76 for (it=0;it<mxGr;it++) {
88 char *obsT[nObs]={
"An",
"A#Sigma",
"A#Delta"};
92 for (io=0;io<nObs;io++) {
94 sprintf(name,
"%s",obsL[io]);
96 TGraphErrors *gr =
new TGraphErrors;
98 gr->SetTitle(obsT[io]);
100 gr->SetMarkerSize(0.8);
101 gr->SetMarkerStyle(21);