class RooStats::NeymanConstruction: public RooStats::IntervalCalculator

```
```

NeymanConstruction is a concrete implementation of the NeymanConstruction interface that, as the name suggests, performs a NeymanConstruction. It produces a RooStats::PointSetInterval, which is a concrete implementation of the ConfInterval interface.

The Neyman Construction is not a uniquely defined statistical technique, it requires that one specify an ordering rule or ordering principle, which is usually incoded by choosing a specific test statistic and limits of integration (corresponding to upper/lower/central limits). As a result, this class must be configured with the corresponding information before it can produce an interval. Common configurations, such as the Feldman-Cousins approach, can be enforced by other light weight classes.

The Neyman Construction considers every point in the parameter space independently, no assumptions are made that the interval is connected or of a particular shape. As a result, the PointSetInterval class is used to represent the result. The user indicate which points in the parameter space to perform the constrution by providing a PointSetInterval instance with the desired points.

This class is fairly light weight, because the choice of parameter points to be considered is factorized and so is the creation of the sampling distribution of the test statistic (which is done by a concrete class implementing the DistributionCreator interface). As a result, this class basically just drives the construction by:

• using a DistributionCreator to create the SamplingDistribution of a user-defined test statistic for each parameter point of interest,
• defining the acceptance region in the data by finding the thresholds on the test statistic such that the integral of the sampling distribution is of the appropriate size and consistent with the limits of integration (eg. upper/lower/central limits),
• and finally updating the PointSetInterval based on whether the value of the test statistic evaluated on the data are in the acceptance region.
• ```

```

Function Members (Methods)

public:
 virtual ~NeymanConstruction() static TClass* Class() static TClass* RooStats::IntervalCalculator::Class() virtual Double_t ConfidenceLevel() const virtual Double_t RooStats::IntervalCalculator::ConfidenceLevel() const void CreateConfBelt(bool flag = true) virtual TList* GenSamplingDistribution(const char* asciiFilePat = 0) const RooStats::ConfidenceBelt* GetConfidenceBelt() virtual RooStats::ConfInterval* GetInterval() const virtual RooStats::ConfInterval* RooStats::IntervalCalculator::GetInterval() const virtual RooStats::ConfInterval* GetInterval(const char* asciiFilePat) const virtual RooStats::ConfInterval* GetIntervalUsingList() const virtual TClass* IsA() const virtual TClass* RooStats::IntervalCalculator::IsA() const RooStats::NeymanConstruction NeymanConstruction() RooStats::NeymanConstruction NeymanConstruction(const RooStats::NeymanConstruction&) RooStats::IntervalCalculator& RooStats::IntervalCalculator::operator=(const RooStats::IntervalCalculator&) virtual RooStats::ConfInterval* Run(TList* SamplingList) const void SaveBeltToFile(bool flag = true) virtual void SetConfidenceLevel(Double_t cl) virtual void RooStats::IntervalCalculator::SetConfidenceLevel(Double_t cl) virtual void SetData(RooAbsData& data) virtual void SetData(const char* name) virtual void RooStats::IntervalCalculator::SetData(RooAbsData&) virtual void RooStats::IntervalCalculator::SetData(const char* name) void SetLeftSideTailFraction(Double_t leftSideFraction = 0.) virtual void SetNuisanceParameters(RooArgSet& set) virtual void RooStats::IntervalCalculator::SetNuisanceParameters(RooArgSet&) void SetParameterPointsToTest(RooAbsData& pointsToTest) virtual void SetParameters(RooArgSet& set) virtual void RooStats::IntervalCalculator::SetParameters(RooArgSet&) virtual void SetPdf(RooAbsPdf& pdf) virtual void SetPdf(const char* name) virtual void RooStats::IntervalCalculator::SetPdf(RooAbsPdf&) virtual void RooStats::IntervalCalculator::SetPdf(const char* name) virtual void SetTestSize(Double_t size) virtual void RooStats::IntervalCalculator::SetTestSize(Double_t size) void SetTestStatSampler(RooStats::TestStatSampler& distCreator) virtual void SetWorkspace(RooWorkspace& ws) virtual void RooStats::IntervalCalculator::SetWorkspace(RooWorkspace& ws) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void RooStats::IntervalCalculator::ShowMembers(TMemberInspector& insp, char* parent) virtual Double_t Size() const virtual Double_t RooStats::IntervalCalculator::Size() const virtual void Streamer(TBuffer& b) virtual void RooStats::IntervalCalculator::Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void RooStats::IntervalCalculator::StreamerNVirtual(TBuffer& b) void UseAdaptiveSampling(bool flag = true)

Data Members

private:
 bool fAdaptiveSampling controls use of adaptive sampling algorithm RooStats::ConfidenceBelt* fConfBelt bool fCreateBelt controls use if ConfidenceBelt should be saved to a TFile const char* fDataName name of data set in workspace Double_t fLeftSideFraction RooArgSet* fNuisParams RooArgSet specifying nuisance parameters for interval Bool_t fOwnsWorkspace flag if this object owns its workspace RooArgSet* fPOI RooArgSet specifying parameters of interest for interval const char* fPdfName name of common PDF in workspace RooAbsData* fPointsToTest bool fSaveBeltToFile controls use if ConfidenceBelt should be saved to a TFile Double_t fSize size of the test (eg. specified rate of Type I error) RooStats::TestStatSampler* fTestStatSampler RooWorkspace* fWS a workspace that owns all the components to be used by the calculator

Function documentation

``` default constructor
```

``` default constructor
if(fOwnsWorkspace && fWS) delete fWS;
if(fConfBelt) delete fConfBelt;
```
ConfInterval* GetInterval() const
``` Main interface to get a RooStats::ConfInterval.
It constructs a RooStats::SetInterval.
```
TList* GenSamplingDistribution(const char* asciiFilePat = 0) const
```This method generates the sampling distribution for each point of the study. If a file path
is provided, the distribution is saved in a root file. Returns the list of the distributions
for each point.
```
ConfInterval* GetIntervalUsingList() const
``` Main interface to get a RooStats::ConfInterval.
It constructs a RooStats::PointSetInterval.
```
ConfInterval* GetInterval(const char* asciiFilePat) const
```This method returns a confidence interval exactly like GetInterval(), but
instead of generating the sampling disribution (long computation) it takes
the distribution from the file provided
```
ConfInterval* Run(TList* SamplingList) const
```Main method to perform the interval calculation
```
void SetTestStatSampler(RooStats::TestStatSampler& distCreator)
``` in addition to interface we also need:
Set the TestStatSampler (eg. ToyMC or FFT, includes choice of TestStatistic)
```
`{fTestStatSampler = &distCreator;}`
void SetLeftSideTailFraction(Double_t leftSideFraction = 0.)
`{fLeftSideFraction = leftSideFraction;}`
void SetParameterPointsToTest(RooAbsData& pointsToTest)
``` User-defined set of points to test
```
Double_t Size() const
``` This class can make regularly spaced scans based on range stored in RooRealVars.
Choose number of steps for a rastor scan (common for each dimension)
void SetNumSteps(Int_t);
This class can make regularly spaced scans based on range stored in RooRealVars.
Choose number of steps for a rastor scan (specific for each dimension)
void SetNumSteps(map<RooAbsArg, Int_t>)
Get the size of the test (eg. rate of Type I error)
```
`{return fSize;}`
Double_t ConfidenceLevel() const
``` set a workspace that owns all the necessary components for the analysis
```
`{return 1.-fSize;}`
void SetWorkspace(RooWorkspace& ws)
`{fWS = &ws;}`
void SetData(RooAbsData& data)
``` Set the DataSet, add to the the workspace if not already there
```
SetData(data.GetName())
void SetPdf(RooAbsPdf& pdf)
``` Set the Pdf, add to the the workspace if not already there
```
SetPdf(pdf.GetName())
void SetParameters(RooArgSet& set)
``` specify the parameters of interest in the interval
```
`{fPOI = &set;}`
void SetNuisanceParameters(RooArgSet& set)
``` set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
```
`{fNuisParams = &set;}`
void SetTestSize(Double_t size)
``` set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
```
`{fSize = size;}`
void SetConfidenceLevel(Double_t cl)
`{fSize = 1.-cl;}`
ConfidenceBelt* GetConfidenceBelt()
`{return fConfBelt;}`
`{fAdaptiveSampling=flag;}`
`{fCreateBelt = flag;}`