From 4d26ece5bb1ecc3086b07dc9c0deb7a9e03c45fb Mon Sep 17 00:00:00 2001
From: Carsten Daniel Burgard <cburgard@cern.ch>
Date: Mon, 28 May 2018 19:39:43 +0200
Subject: [PATCH] allowing component selection in projection integrals

---
 roofit/roofitcore/src/RooAbsReal.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/roofit/roofitcore/src/RooAbsReal.cxx b/roofit/roofitcore/src/RooAbsReal.cxx
index 1687cc39968..f4a1b1f836f 100644
--- a/roofit/roofitcore/src/RooAbsReal.cxx
+++ b/roofit/roofitcore/src/RooAbsReal.cxx
@@ -968,6 +968,10 @@ const RooAbsReal *RooAbsReal::createPlotProjection(const RooArgSet &dependentVar
     return 0;
   }
 
+  if(projected->InheritsFrom(RooRealIntegral::Class())){
+    ((RooRealIntegral*)projected)->setAllowComponentSelection(true);
+  }
+
   projected->SetName(name.Data()) ;
   projected->SetTitle(title.Data()) ;
 
-- 
GitLab