Drawing TGraphErr

Move the line:
TGraphErrors *gEff = new TGraphErrors(nbins_mpipi, XX,YY,ERR);
to a place right before the line:
gEff->SetMarkerColor(jtmin_t+1);