// @(#)root/roostats:$Id$
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef RooStats_SimpleInterval
#define RooStats_SimpleInterval

#ifndef ROO_ARG_SET
#include "RooArgSet.h"
#endif
#ifndef RooStats_ConfInterval
#include "RooStats/ConfInterval.h"
#endif

class RooRealVar; 

namespace RooStats {
 class SimpleInterval : public ConfInterval {

  public:
    // default constructors
    explicit SimpleInterval(const char* name = 0);

    SimpleInterval(const SimpleInterval& other, const char* name);

    SimpleInterval& operator=(const SimpleInterval& other) ;

    // constructor from name, the Parameter of interest and lower/upper bound values 
    SimpleInterval(const char* name, const RooRealVar & var, Double_t lower, Double_t upper, Double_t cl);

    // destructor
    virtual ~SimpleInterval();
       
    // check if parameter is in the interval
    virtual Bool_t IsInInterval(const RooArgSet&) const;

    // set the confidence level for the interval. Simple interval is defined at construction time so this function 
    // has no effect
    virtual void SetConfidenceLevel(Double_t ) {}

    // return the confidence interval 
    virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
 
    // return the interval lower limit 
    virtual Double_t LowerLimit() {return fLowerLimit;}
    // return the interval upper limit
    virtual Double_t UpperLimit() {return fUpperLimit;}
    
    // return a cloned list with the parameter of interest
    virtual RooArgSet* GetParameters() const;

    // check if parameters are correct (i.e. they are the POI of this interval)
    Bool_t CheckParameters(const RooArgSet&) const ;


    
  protected:

    ClassDef(SimpleInterval,1)  // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b]

    RooArgSet fParameters; // set containing the parameter of interest
    Double_t  fLowerLimit; // lower interval limit
    Double_t  fUpperLimit; // upper interval limit
    Double_t  fConfidenceLevel; // confidence level
      
  };
}

#endif
 SimpleInterval.h:1
 SimpleInterval.h:2
 SimpleInterval.h:3
 SimpleInterval.h:4
 SimpleInterval.h:5
 SimpleInterval.h:6
 SimpleInterval.h:7
 SimpleInterval.h:8
 SimpleInterval.h:9
 SimpleInterval.h:10
 SimpleInterval.h:11
 SimpleInterval.h:12
 SimpleInterval.h:13
 SimpleInterval.h:14
 SimpleInterval.h:15
 SimpleInterval.h:16
 SimpleInterval.h:17
 SimpleInterval.h:18
 SimpleInterval.h:19
 SimpleInterval.h:20
 SimpleInterval.h:21
 SimpleInterval.h:22
 SimpleInterval.h:23
 SimpleInterval.h:24
 SimpleInterval.h:25
 SimpleInterval.h:26
 SimpleInterval.h:27
 SimpleInterval.h:28
 SimpleInterval.h:29
 SimpleInterval.h:30
 SimpleInterval.h:31
 SimpleInterval.h:32
 SimpleInterval.h:33
 SimpleInterval.h:34
 SimpleInterval.h:35
 SimpleInterval.h:36
 SimpleInterval.h:37
 SimpleInterval.h:38
 SimpleInterval.h:39
 SimpleInterval.h:40
 SimpleInterval.h:41
 SimpleInterval.h:42
 SimpleInterval.h:43
 SimpleInterval.h:44
 SimpleInterval.h:45
 SimpleInterval.h:46
 SimpleInterval.h:47
 SimpleInterval.h:48
 SimpleInterval.h:49
 SimpleInterval.h:50
 SimpleInterval.h:51
 SimpleInterval.h:52
 SimpleInterval.h:53
 SimpleInterval.h:54
 SimpleInterval.h:55
 SimpleInterval.h:56
 SimpleInterval.h:57
 SimpleInterval.h:58
 SimpleInterval.h:59
 SimpleInterval.h:60
 SimpleInterval.h:61
 SimpleInterval.h:62
 SimpleInterval.h:63
 SimpleInterval.h:64
 SimpleInterval.h:65
 SimpleInterval.h:66
 SimpleInterval.h:67
 SimpleInterval.h:68
 SimpleInterval.h:69
 SimpleInterval.h:70
 SimpleInterval.h:71
 SimpleInterval.h:72
 SimpleInterval.h:73
 SimpleInterval.h:74
 SimpleInterval.h:75