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   21/07/2008
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef RooStats_SPlot
0013 #define RooStats_SPlot
0014 
0015 class RooAbsReal;
0016 class RooAbsPdf;
0017 class RooFitResult;
0018 class RooRealVar;
0019 class RooSimultaneous;
0020 
0021 
0022 #include "RooMsgService.h"
0023 
0024 #include "RooFitResult.h"
0025 #include "RooRealVar.h"
0026 #include "RooHist.h"
0027 #include "RooPlot.h"
0028 #include "RooDataSet.h"
0029 
0030 namespace RooStats{
0031 
0032   class SPlot: public TNamed {
0033 
0034   public:
0035 
0036     ~SPlot() override;
0037     SPlot();
0038     SPlot(const SPlot &other);
0039     SPlot(const char* name, const char* title);
0040     SPlot(const char* name, const char* title, const RooDataSet &data);
0041     SPlot(const char* name, const char* title,RooDataSet& data, RooAbsPdf* pdf,
0042      const RooArgList &yieldsList,const RooArgSet &projDeps=RooArgSet(),
0043      bool useWeights=true, bool copyDataSet = false, const char* newName = "",
0044      const RooCmdArg& fitToarg5={},
0045      const RooCmdArg& fitToarg6={},
0046      const RooCmdArg& fitToarg7={},
0047      const RooCmdArg& fitToarg8={});
0048 
0049     RooDataSet* SetSData(RooDataSet* data);
0050 
0051     RooDataSet* GetSDataSet() const;
0052 
0053     RooArgList GetSWeightVars() const;
0054 
0055     Int_t GetNumSWeightVars() const;
0056 
0057     void AddSWeight(RooAbsPdf* pdf, const RooArgList &yieldsTmp,
0058           const RooArgSet &projDeps=RooArgSet(), bool includeWeights=true,
0059           const RooCmdArg& fitToarg5={},
0060           const RooCmdArg& fitToarg6={},
0061           const RooCmdArg& fitToarg7={},
0062           const RooCmdArg& fitToarg8={});
0063 
0064     double GetSumOfEventSWeight(Int_t numEvent) const;
0065 
0066     double GetYieldFromSWeight(const char* sVariable) const;
0067 
0068     double GetSWeight(Int_t numEvent, const char* sVariable) const;
0069 
0070 
0071 
0072   protected:
0073 
0074      enum {
0075         kOwnData = BIT(20)
0076      };
0077 
0078     RooArgList fSWeightVars;
0079 
0080     //  RooListProxy fSWeightVars;
0081 
0082     RooDataSet *fSData = nullptr;
0083 
0084     ClassDefOverride(SPlot,1)   // Class used for making sPlots
0085 
0086 
0087       };
0088 
0089 }
0090 #endif