ROOT logo
#ifndef ROOT_TMVA_QUICKMVAPROBESTIMATOR 
#define ROOT_TMVA_QUICKMVAPROBESTIMATOR 

#include <iostream>
#include <vector>
#include <algorithm>

#include "TMVA/MsgLogger.h"

namespace TMVA {

  class QuickMVAProbEstimator {
  public:
    
    struct EventInfo{
      Double_t eventValue;
      Double_t eventWeight; 
      Int_t    eventType;  //signal or background
    };
    static bool compare(EventInfo e1, EventInfo e2){return e1.eventValue < e2.eventValue;}
    
    QuickMVAProbEstimator(Int_t nMin=40, Int_t nMax=5000):fIsSorted(false),fNMin(nMin),fNMax(nMax){ fLogger = new MsgLogger("QuickMVAProbEstimator");}
    
    
    virtual ~QuickMVAProbEstimator(){delete fLogger;}
    void AddEvent(Double_t val, Double_t weight, Int_t type);
    
   
    Double_t GetMVAProbAt(Double_t value);
    
    
  private:
    std::vector<EventInfo> fEvtVector;
    Bool_t                 fIsSorted;
    UInt_t                 fNMin;
    UInt_t                 fNMax;
    
    mutable MsgLogger*    fLogger;
    MsgLogger& Log() const { return *fLogger; }
    
    ClassDef(QuickMVAProbEstimator,0) // Interface to different separation critiera used in training algorithms
      
      
  };
}


#endif
 QuickMVAProbEstimator.h:1
 QuickMVAProbEstimator.h:2
 QuickMVAProbEstimator.h:3
 QuickMVAProbEstimator.h:4
 QuickMVAProbEstimator.h:5
 QuickMVAProbEstimator.h:6
 QuickMVAProbEstimator.h:7
 QuickMVAProbEstimator.h:8
 QuickMVAProbEstimator.h:9
 QuickMVAProbEstimator.h:10
 QuickMVAProbEstimator.h:11
 QuickMVAProbEstimator.h:12
 QuickMVAProbEstimator.h:13
 QuickMVAProbEstimator.h:14
 QuickMVAProbEstimator.h:15
 QuickMVAProbEstimator.h:16
 QuickMVAProbEstimator.h:17
 QuickMVAProbEstimator.h:18
 QuickMVAProbEstimator.h:19
 QuickMVAProbEstimator.h:20
 QuickMVAProbEstimator.h:21
 QuickMVAProbEstimator.h:22
 QuickMVAProbEstimator.h:23
 QuickMVAProbEstimator.h:24
 QuickMVAProbEstimator.h:25
 QuickMVAProbEstimator.h:26
 QuickMVAProbEstimator.h:27
 QuickMVAProbEstimator.h:28
 QuickMVAProbEstimator.h:29
 QuickMVAProbEstimator.h:30
 QuickMVAProbEstimator.h:31
 QuickMVAProbEstimator.h:32
 QuickMVAProbEstimator.h:33
 QuickMVAProbEstimator.h:34
 QuickMVAProbEstimator.h:35
 QuickMVAProbEstimator.h:36
 QuickMVAProbEstimator.h:37
 QuickMVAProbEstimator.h:38
 QuickMVAProbEstimator.h:39
 QuickMVAProbEstimator.h:40
 QuickMVAProbEstimator.h:41
 QuickMVAProbEstimator.h:42
 QuickMVAProbEstimator.h:43
 QuickMVAProbEstimator.h:44
 QuickMVAProbEstimator.h:45
 QuickMVAProbEstimator.h:46
 QuickMVAProbEstimator.h:47
 QuickMVAProbEstimator.h:48