7 #ifndef ROOT_TMVA_MsgLogger
36 if (nRange > fEvtVector.size()) {
37 nRange = fEvtVector.size()/3.;
38 Log() <<
kWARNING <<
" !! you have only " << fEvtVector.size() <<
" of events.. . I choose "
39 << nRange <<
" for the quick and dirty kNN MVAProb estimate" <<
Endl;
49 while ( (iLeft+iRight) < nRange){
50 if ( fEvtVector.end() > it+iRight+1){
52 if ( ((it+iRight))->eventType == 0) nSignal+=((it+iRight))->eventWeight;
53 else nBackgr+=((it+iRight))->eventWeight;
55 if ( fEvtVector.begin() <= it-iLeft-1){
57 if ( ((it-iLeft))->eventType == 0) nSignal+=((it-iLeft))->eventWeight;
58 else nBackgr+=((it-iLeft))->eventWeight;
62 Double_t mvaProb = (nSignal+nBackgr) ? nSignal/(nSignal+nBackgr) : -1 ;
MsgLogger & Endl(MsgLogger &ml)
Short_t Min(Short_t a, Short_t b)
void AddEvent(Double_t val, Double_t weight, Int_t type)
static bool compare(EventInfo e1, EventInfo e2)
Double_t GetMVAProbAt(Double_t value)
Short_t Max(Short_t a, Short_t b)
std::vector< EventInfo > fEvtVector