Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:10

0001 // @(#)root/tmva $Id$
0002 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Class  : SdivSqrtSplusB                                                        *
0008  *                                             *
0009  *                                                                                *
0010  * Description: Implementation of the SdivSqrtSplusB as separation criterion      *
0011  *              S/sqrt(S + B)                                                     *
0012  *                                                                                *
0013  * Authors (alphabetical):                                                        *
0014  *      Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland              *
0015  *      Helge Voss      <Helge.Voss@cern.ch>     - MPI-K Heidelberg, Germany      *
0016  *      Kai Voss        <Kai.Voss@cern.ch>       - U. of Victoria, Canada         *
0017  *                                                                                *
0018  * Copyright (c) 2005:                                                            *
0019  *      CERN, Switzerland                                                         *
0020  *      U. of Victoria, Canada                                                    *
0021  *      Heidelberg U., Germany                                                    *
0022  *                                                                                *
0023  * Redistribution and use in source and binary forms, with or without             *
0024  * modification, are permitted according to the terms listed in LICENSE           *
0025  * (see tmva/doc/LICENSE)                                          *
0026  **********************************************************************************/
0027 
0028 #ifndef ROOT_TMVA_SdivSqrtSplusB
0029 #define ROOT_TMVA_SdivSqrtSplusB
0030 
0031 //////////////////////////////////////////////////////////////////////////
0032 //                                                                      //
0033 // SdivSqrtSplusB                                                       //
0034 //                                                                      //
0035 // Implementation of the SdivSqrtSplusB as separation criterion         //
0036 //   Index = S/sqrt(S+B)  (statistical significance)                    //
0037 //                                                                      //
0038 //////////////////////////////////////////////////////////////////////////
0039 
0040 #include "TMVA/SeparationBase.h"
0041 
0042 namespace TMVA {
0043 
0044    class SdivSqrtSplusB : public SeparationBase {
0045 
0046    public:
0047 
0048       //constructor for the "statistical significance" index
0049    SdivSqrtSplusB(): SeparationBase()  { fName = "StatSig"; }
0050 
0051       // copy constructor
0052    SdivSqrtSplusB( const SdivSqrtSplusB& g): SeparationBase(g) {}
0053 
0054       //destructor
0055       virtual ~SdivSqrtSplusB() {}
0056 
0057       // Return the gain in separation of the original sample is split in two sub-samples
0058       // (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right)
0059       virtual Double_t GetSeparationGain( const Double_t nSelS, const Double_t nSelB,
0060                                           const Double_t nTotS, const Double_t nTotB );
0061       // return the Index (S/sqrt(S+B))
0062       virtual Double_t  GetSeparationIndex( const Double_t s, const Double_t b );
0063 
0064    protected:
0065 
0066       ClassDef(SdivSqrtSplusB,0); // Implementation of the SdivSqrtSplusB as separation criterion
0067    };
0068 
0069 } // namespace TMVA
0070 
0071 #endif
0072