File indexing completed on 2025-01-18 10:11:04
0001 #ifndef ROOT_TMVA_ROCCalc
0002 #define ROOT_TMVA_ROCCalc
0003
0004 #include "RtypesCore.h"
0005
0006 class TList;
0007 class TTree;
0008 class TString;
0009 class TH1;
0010 class TH1D;
0011 class TH2;
0012 class TH2F;
0013 class TSpline;
0014
0015 namespace TMVA {
0016
0017 class MsgLogger;
0018
0019
0020 class ROCCalc {
0021
0022 public:
0023 ROCCalc(TH1* mvaS, TH1* mvaB);
0024
0025 ~ROCCalc();
0026
0027
0028 TH1D* GetROC();
0029
0030 Double_t GetEffSForEffBof(Double_t effBref, Double_t &effSerr);
0031
0032 Double_t GetSignalReferenceCut(){return fSignalCut;}
0033
0034 Double_t GetROCIntegral();
0035
0036 TH1* GetSignificance( Int_t nStot, Int_t nBtot);
0037 TH1* GetPurity(Int_t nStot, Int_t nBtot);
0038
0039 void ApplySignalAndBackgroundStyle( TH1* sig, TH1* bkg, TH1* any = nullptr );
0040
0041 TH1* GetMvaSpdf(){return fmvaSpdf;}
0042 TH1* GetMvaBpdf(){return fmvaBpdf;}
0043
0044
0045 Bool_t GetStatus(){return fStatus;}
0046 void ResetStatus(){fStatus=kTRUE;}
0047
0048 private:
0049 Double_t Root(Double_t);
0050 Double_t GetEffForRoot( Double_t theCut );
0051 Int_t fMaxIter;
0052 Double_t fAbsTol;
0053
0054 Bool_t fStatus;
0055
0056 UInt_t fNbins;
0057 Bool_t fUseSplines;
0058
0059 TH1* fmvaS, *fmvaB;
0060 TH1* fmvaSpdf, *fmvaBpdf;
0061 Float_t fXmin, fXmax;
0062 Double_t fNevtS;
0063 Int_t fCutOrientation;
0064 TSpline* fSplS, *fSplB;
0065 TSpline* fSplmvaCumS, *fSplmvaCumB;
0066 TSpline* fSpleffBvsS;
0067 TH1* fmvaScumul, *fmvaBcumul;
0068 Int_t fnStot, fnBtot;
0069 TH1* fSignificance;
0070 TH1* fPurity;
0071 TH1D* effBvsS;
0072 TH1D* rejBvsS;
0073 TH1D* inveffBvsS;
0074
0075 Double_t fSignalCut;
0076
0077 mutable MsgLogger* fLogger;
0078 MsgLogger& Log() const { return *fLogger; }
0079
0080 };
0081 }
0082 #endif