TProfile *MillePedeTrees::CreateHistProf(const char *expX, const char *expY, const char *selection, const char *hDef, Option_t* opt) { const TString combExpr(Form("%s:%s", expY, expX)); TH1 *h = this->Draw(combExpr, selection, hDef, "goff prof"); TProfile *hResult = static_cast<TProfile*>(h->Clone(Form("%sClone", h->GetName()))); if (opt) hResult->SetOption(opt); return hResult; }