Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:46

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke, Nils Ruthmann
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 
0012 #ifndef UPPER_LIMIT_MCS_MODULE
0013 #define UPPER_LIMIT_MCS_MODULE
0014 
0015 #include "RooAbsMCStudyModule.h"
0016 #include <string>
0017 
0018 class RooArgSet;
0019 class RooDataSet;
0020 class RooRealVar;
0021 class RooAbsPdf;
0022 
0023 namespace RooStats {
0024 
0025    class ProfileLikelihoodCalculator;
0026 
0027 class UpperLimitMCSModule : public RooAbsMCStudyModule {
0028 public:
0029 
0030 
0031    UpperLimitMCSModule(const RooArgSet* poi, double CL=0.95) ;
0032    UpperLimitMCSModule(const UpperLimitMCSModule& other) ;
0033    ~UpperLimitMCSModule() override ;
0034 
0035    bool initializeInstance() override ;
0036 
0037    bool initializeRun(Int_t /*numSamples*/) override ;
0038    RooDataSet* finalizeRun() override ;
0039 
0040    //bool processAfterFit(Int_t /*sampleNum*/)  ;
0041    bool processBetweenGenAndFit(Int_t /*sampleNum*/) override ;
0042 
0043 private:
0044 
0045    std::string _parName ;  ///< Name of Nsignal parameter
0046    RooStats::ProfileLikelihoodCalculator* _plc;
0047    RooRealVar* _ul ;
0048 
0049    const RooArgSet* _poi;  ///< parameters of interest
0050    RooDataSet* _data ;     ///< Summary dataset to store results
0051    double _cl;
0052    RooAbsPdf* _model;
0053 
0054    ClassDefOverride(UpperLimitMCSModule,0) // MCStudy module to calculate upper limit of a given poi
0055 };
0056 
0057 }
0058 
0059 #endif
0060