2 TGraphErrors * grL[mxGr];
5 char *obsL[nObs]={
"A_n",
"A_s",
"A_d"};
12 TGraphErrors *gr =
new TGraphErrors;
13 gr->SetName(
"insyAsy");
14 gr->SetTitle(
"Instrumental Asymmetries");
16 gr->SetMarkerSize(0.8);
17 gr->SetMarkerStyle(21);
21 TString wrkDir=
"final/";
22 TString fname=wrkDir+
"defaultB-H/asyVer1.hist.root";
23 TFile *inpH=
new TFile(fname);
24 assert(inpH->IsOpen());
27 char *selL[nSel]={
"a0*All",
"b0*All",
"a2*All",
"b2*All",
"c1*All"};
29 for (isel=0;isel<nSel;isel++) {
30 TGraphErrors *gr =(TGraphErrors *) inpH->Get(selL[isel]);
36 gr->Fit(
"pol0",
"",
"",x1,3000);
37 TF1 *ff=gr->GetFunction(
"pol0");
39 float val=ff->GetParameter(0);
40 float err=ff->GetParError(0);
41 printf(
"pol0= %f +/- %f\n",val,err);
44 gr1->SetPoint(n,x,val);
45 gr1->SetPointError(n,0,err);
55 TString fname=wrkDir+
"instAsy.hist.root";
56 TFile *outH=
new TFile(fname,
"RECREATE");
57 assert(outH->IsOpen());
58 printf(
"save outH -->%s\n", fname.Data());
71 for (isel=0;isel<nSel;isel++) {
72 TString fname=wrkDir+selL[isel]+
"endVer1.hist.root";
74 TFile *inpH=
new TFile(fname);
75 assert(inpH->IsOpen());
78 for (io=0;io<nObs;io++) {
80 sprintf(name,
"%s*EtaBF",obsL[io]);
81 TGraphErrors *gr =(TGraphErrors *) inpH->Get(name);
84 sprintf(name,
"avr%s*EtaBF",obsL[io]);
85 TF1 *ff=gr->GetFunction(name);
87 float val=ff->GetParameter(0);
88 float err=ff->GetParError(0);
89 printf(
"pol0= %f +/- %f\n",val,err);
90 TGraphErrors * grOut=grL[io];
93 grOut->SetPoint(n,x,val);
94 grOut->SetPointError(n,0,err);
101 c=
new TCanvas(
"aa",
"aa" ,800,800);
103 TLine *ln0=
new TLine(0,0.,12,0.);
106 for (it=0;it<mxGr;it++) {
107 TGraphErrors * gr=grL[it];
109 printf(
"\nit=%d name='%s', N=%d\n",it,gr->GetName(),n);
116 TAxis *ax=gr->GetXaxis();
117 ax->SetTitle(
"choice of event selection");
119 ln0->SetLineStyle(3);
123 TString fname=wrkDir+
"compCuts.hist.root";
124 TFile *outH=
new TFile(fname,
"RECREATE");
125 assert(outH->IsOpen());
126 printf(
"save outH -->%s\n", fname.Data());
128 for (it=0;it<mxGr;it++) {
140 char *obsT[nObs]={
"An",
"A#Sigma",
"A#Delta"};
144 for (io=0;io<nObs;io++) {
146 sprintf(name,
"%s",obsL[io]);
148 TGraphErrors *gr =
new TGraphErrors;
150 gr->SetTitle(obsT[io]);
152 gr->SetMarkerSize(0.8);
153 gr->SetMarkerStyle(21);