Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooStats/TestStatistic.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
0003 /*************************************************************************
0004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOSTATS_TestStatistic
0012 #define ROOSTATS_TestStatistic
0013 
0014 
0015 
0016 
0017 #include "Rtypes.h"
0018 
0019 class RooArgSet;
0020 class RooAbsData;
0021 
0022 namespace RooStats {
0023 
0024 /** \class RooStats::TestStatistic
0025     \ingroup Roostats
0026 
0027    TestStatistic is an interface class to provide a facility for construction test statistics
0028    distributions to the NeymanConstruction class. All the actual samplers inherit from this class.
0029 */
0030 
0031 class TestStatistic {
0032 
0033 public:
0034    //TestStatistic();
0035    virtual ~TestStatistic() {
0036    }
0037 
0038    /// Main interface to evaluate the test statistic on a dataset given the
0039    /// values for the Null Parameters Of Interest.
0040    virtual double Evaluate(RooAbsData& data, RooArgSet& nullPOI) = 0;
0041 
0042    virtual const TString GetVarName() const = 0;
0043 
0044    /// Defines the sign convention of the test statistic. Overwrite function if necessary.
0045    virtual  bool PValueIsRightTail(void) const { return true; }
0046 
0047    /// return detailed output: for fits this can be pulls, processing time, ... The returned pointer will not loose validity until another call to Evaluate.
0048    virtual const RooArgSet* GetDetailedOutput() const { return nullptr; }
0049 
0050    /// interface to set conditional observables. If a test statistics needs them it will re-implement this function
0051    virtual void SetConditionalObservables(const RooArgSet& ) {}
0052 
0053    /// interface to set global observables. If a test statistics needs them it will re-implement this function
0054    virtual void SetGlobalObservables(const RooArgSet& ) {}
0055 
0056 
0057 protected:
0058    ClassDef(TestStatistic,1) // Interface for a TestStatistic
0059 };
0060 
0061 } // end namespace RooStats
0062 
0063 
0064 #endif