#include "TGraphAsymmErrors.h" TGraphAsymmErrors* getGraphRatio(TGraphAsymmErrors* grD, TGraphAsymmErrors* grN) { Double_t* grDY = grD->GetY(); Double_t* grNY = grN->GetY(); Double_t* grNEYl = grN->GetEYlow(); Double_t* grNEYh = grN->GetEYhigh(); Double_t ratY[100]; Double_t ratEYl[100]; Double_t ratEYh[100]; for (int k=0; kGetN(); ++k) { ratY[k] =0.; ratEYl[k] =0.; ratEYh[k] =0.; if (grDY[k]!=0.) { ratY[k] = grNY[k]/grDY[k]; ratEYl[k] = grNEYl[k]/grDY[k]; ratEYh[k] = grNEYh[k]/grDY[k]; } } TGraphAsymmErrors* grR = new TGraphAsymmErrors(grD->GetN(), grD->GetX(), ratY, grD->GetEXlow(), grD->GetEXhigh(), ratEYl, ratEYh); grR->SetLineStyle(grN->GetLineStyle()); grR->SetLineColor(grN->GetLineColor()); grR->SetLineWidth(grN->GetLineWidth()); // grR->SetLineAttribute(grN->GetLineAttribute()); grR->SetMarkerSize(grN->GetMarkerSize()); grR->SetMarkerStyle(grN->GetMarkerStyle()); grR->SetMarkerColor(grN->GetMarkerColor()); // grR->SetMarkerWidth(grN->GetMarkerWidth()); // grR->SetMarkerAttribute(grN->GetMarkerAttribute()); grR->SetFillStyle(grN->GetFillStyle()); grR->SetFillColor(grN->GetFillColor()); // grR->SetFillWidth(grN->GetFillWidth()); // grR->SetFillAttribute(grN->GetFillAttribute()); return grR; }