40 if (nRange > fEvtVector.size()) {
41 nRange = fEvtVector.size()/3.;
42 Log() << kWARNING <<
" !! you have only " << fEvtVector.size() <<
" of events.. . I choose "
43 << nRange <<
" for the quick and dirty kNN MVAProb estimate" <<
Endl;
53 while ( (iLeft+iRight) < nRange){
54 if ( fEvtVector.end() > it+iRight+1){
56 if ( ((it+iRight))->eventType == 0) nSignal+=((it+iRight))->eventWeight;
57 else nBackgr+=((it+iRight))->eventWeight;
59 if ( fEvtVector.begin() <= it-iLeft-1){
61 if ( ((it-iLeft))->eventType == 0) nSignal+=((it-iLeft))->eventWeight;
62 else nBackgr+=((it-iLeft))->eventWeight;
66 Double_t mvaProb = (nSignal+nBackgr) ? nSignal/(nSignal+nBackgr) : -1 ;
static bool compare(EventInfo e1, EventInfo e2)
Double_t GetMVAProbAt(Double_t value)
void AddEvent(Double_t val, Double_t weight, Int_t type)
std::vector< EventInfo > fEvtVector
MsgLogger & Endl(MsgLogger &ml)
Short_t Max(Short_t a, Short_t b)
Short_t Min(Short_t a, Short_t b)