35 if (nRange > fEvtVector.size()) {
36 nRange = fEvtVector.size()/3.;
37 Log() <<
kWARNING <<
" !! you have only " << fEvtVector.size() <<
" of events.. . I choose "
38 << nRange <<
" for the quick and dirty kNN MVAProb estimate" <<
Endl;
48 while ( (iLeft+iRight) < nRange){
49 if ( fEvtVector.end() > it+iRight+1){
51 if ( ((it+iRight))->eventType == 0) nSignal+=((it+iRight))->eventWeight;
52 else nBackgr+=((it+iRight))->eventWeight;
54 if ( fEvtVector.begin() <= it-iLeft-1){
56 if ( ((it-iLeft))->eventType == 0) nSignal+=((it-iLeft))->eventWeight;
57 else nBackgr+=((it-iLeft))->eventWeight;
61 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