1313
1414#include < TNamed.h>
1515
16+ #include < RooStats/HistFactory/Detail/HistFactoryImpl.h>
17+
1618#include < fstream>
1719#include < iostream>
1820#include < map>
@@ -27,17 +29,6 @@ class RooWorkspace;
2729
2830namespace RooStats ::HistFactory {
2931
30- namespace Constraint {
31-
32- enum Type {
33- Gaussian,
34- Poisson
35- };
36- std::string Name (Type type);
37- Type GetType (const std::string &Name);
38-
39- } // namespace Constraint
40-
4132/* * \class OverallSys
4233 * \ingroup HistFactory
4334 * Configuration for a constrained overall systematic to scale sample normalisations.
@@ -257,12 +248,24 @@ class ShapeFactor : public HistogramUncertaintyBase {
257248 }
258249 const std::string &GetHistoPath () const { return fHistoPathHigh ; }
259250
251+ double GetVal () const { return fValue ; }
252+
253+ double GetMin () const { return fMinVal ; }
254+ double GetMax () const { return fMaxVal ; }
255+
256+ void SetVal (double value) { fValue = value; }
257+
258+ void SetMin (double minVal) { fMinVal = minVal; }
259+ void SetMax (double maxVal) { fMaxVal = maxVal; }
260+
260261protected:
261262 bool fConstant = false ;
262-
263- // A histogram representing
264- // the initial shape
265263 bool fHasInitialShape = false ;
264+ double fValue = 1.0 ;
265+ // GHL: Again, we are putting hard ranges on the gammas by default.
266+ // We should change this to range from 0 to /inf.
267+ double fMinVal = Detail::MagicConstants::defaultGammaMin;
268+ double fMaxVal = Detail::MagicConstants::defaultShapeFactorGammaMax;
266269};
267270
268271/* * \class StatError
@@ -484,6 +487,7 @@ class Sample {
484487 void AddHistoFactor (const HistoFactor &Factor);
485488
486489 void AddShapeFactor (std::string Name);
490+ void AddShapeFactor (std::string Name, double initialVal, double minVal, double maxVal);
487491 void AddShapeFactor (const ShapeFactor &Factor);
488492
489493 void AddShapeSys (std::string Name, Constraint::Type ConstraintType, std::string HistoName, std::string HistoFile,
0 commit comments