TCanvas *c15 = new TCanvas("c15","Higgs 4 point",200,10,600,400);
c15->Divide(2,2);
TMultiGraph *mg151 = new TMultiGraph();
TMultiGraph *mg152 = new TMultiGraph();
TMultiGraph *mg153 = new TMultiGraph();
TMultiGraph *mg154 = new TMultiGraph();
TMultiGraph *mg155 = new TMultiGraph();
TLegend *legend151 = new TLegend(.75,.80,.95,.95);
TLegend *legend152 = new TLegend(.75,.80,.95,.95);
TLegend *legend153 = new TLegend(.75,.80,.95,.95);
TLegend *legend154 = new TLegend(.75,.80,.95,.95);
TLegend *legend155 = new TLegend(.75,.80,.95,.95);
double x[n];
double y1[n];
double ey1[n];
double y2[n];
double ey2[n];
double y3[n];
double ey3[n];
double y4[n];
double ey4[n];
double y5[n];
double ey5[n];
double totalarray[5*n];
double totalarrayer[5*n];
int clr,styl;
clr=markercolor1[fl+1];
styl=markerstyle1[fl];
string hfl1;
ifstream file1;
hfl1=klink+kFile[fl]+slash+flhg4pfull;
file1.open(hfl1.c_str());
if(file1.is_open())
{
for(int i=0;i<(5*n);i++)
{
file1 >> totalarray[i];
}
}
else if(!file1)
{
cout << "something is wrong with file " << endl;
}
file1.close();
string hfl2;
ifstream file2;
hfl2=klink+kFile[fl]+slash+flhg4pfuller;
file2.open(hfl2.c_str());
if(file2.is_open())
{
for(int i=0;i<(5*n);i++)
{
file2 >> totalarrayer[i];
}
}
else if(!file2)
{
cout << "something is wrong with file " << endl;
}
file2.close();
for(int i=0;i<n;i++)
{
x[i]=static_cast<double>(i);
}
for(int i=0;i<(5*n);i++)
{
if(i<n)
{
y1[i]=totalarray[i];
ey1[i]=totalarrayer[i];
}
else if(n<=i&&i<(2*n))
{
y2[i]=totalarray[i];
ey2[i]=totalarrayer[i];
}
else if((2*n)<=i&&i<(3*n))
{
y3[i]=totalarray[i];
ey3[i]=totalarrayer[i];
}
else if((3*n)<=i&&i<(4*n))
{
y4[i]=totalarray[i];
ey4[i]=totalarrayer[i];
}
else if((4*n)<=i&&i<(5*n))
{
y5[i]=totalarray[i];
ey5[i]=totalarrayer[i];
}
}
//**** TGraph1d with error bars ****
TGraphErrors *gr1 = new TGraphErrors(n,x,y1,0,ey1);
TGraphErrors *gr2 = new TGraphErrors(n,x,y2,0,ey2);
TGraphErrors *gr3 = new TGraphErrors(n,x,y3,0,ey3);
TGraphErrors *gr4 = new TGraphErrors(n,x,y4,0,ey4);
TGraphErrors *gr5 = new TGraphErrors(n,x,y5,0,ey5);
stringstream ss;
ss << mh << coma << ms << coma << cpl1 << coma << cpl2 << coma << cpl3 << coma << cpl4 << coma << ncf;
string str1 = ss.str();
c15->cd(1);
gr1->SetTitle("Higgs 4 point for smearing 0(non smear)");
gr1->GetXaxis()->SetTitle("t-axis");
gr1->GetYaxis()->SetTitle("higgs4pointsmear");
gr1->SetMarkerColor(clr);
gr1->SetMarkerStyle(styl);
gr1->SetMarkerSize(1.1);
mg151->Add(gr1);
legend151->AddEntry(gr1,str1.c_str(),"p");
mg151->Draw("AP");
legend151->Draw();
c15->cd(2);
gr2->SetTitle("Higgs 4 pointfor smearing 1");
gr2->GetXaxis()->SetTitle("t-axis");
gr2->GetYaxis()->SetTitle("higgs4pointsmear");
gr2->SetMarkerColor(clr);
gr2->SetMarkerStyle(styl);
gr2->SetMarkerSize(1.1);
mg152->Add(gr2);
legend152->AddEntry(gr2,str1.c_str(),"p");
mg152->Draw("AP");
legend152->Draw();
c15->cd(3);
gr3->SetTitle("Higgs 4 point for smearing 2");
gr3->GetXaxis()->SetTitle("t-axis");
gr3->GetYaxis()->SetTitle("higgs4pointsmear");
gr3->SetMarkerColor(clr);
gr3->SetMarkerStyle(styl);
gr3->SetMarkerSize(1.1);
mg153->Add(gr3);
legend153->AddEntry(gr3,str1.c_str(),"p");
mg153->Draw("AP");
legend153->Draw();
c15->cd(4);
gr4->SetTitle("Higgs 4 point for smearing 3");
gr4->GetXaxis()->SetTitle("t-axis");
gr4->GetYaxis()->SetTitle("higgs4pointsmear");
gr4->SetMarkerColor(clr);
gr4->SetMarkerStyle(styl);
gr4->SetMarkerSize(1.1);
mg154->Add(gr4);
legend154->AddEntry(gr4,str1.c_str(),"p");
mg154->Draw("AP");
legend154->Draw();
c15->cd(5);
gr5->SetTitle("Higgs 4 point for smearing 4");
gr5->GetXaxis()->SetTitle("t-axis");
gr5->GetYaxis()->SetTitle("higgs4pointsmear");
gr5->SetMarkerColor(clr);
gr5->SetMarkerStyle(styl);
gr5->SetMarkerSize(1.1);
mg155->Add(gr5);
legend155->AddEntry(gr5,str1.c_str(),"p");
mg155->Draw("AP");
legend155->Draw();
}