# TMVA GetSeparation function error

**URL:** <https://root-forum.cern.ch/t/tmva-getseparation-function-error/21712>\
**Category:** TMVA\
**Created:** [August 15, 2016, 10:10pm UTC](https://root-forum.cern.ch/t/tmva-getseparation-function-error/21712 "2016-08-15T22:10:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreya](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ecccb3/32.png) [@shreya](https://root-forum.cern.ch/u/shreya)\
**Post date:** [August 15, 2016, 10:10pm UTC](https://root-forum.cern.ch/t/tmva-getseparation-function-error/21712/1 "2016-08-15T22:10:48Z")

</div>

Hello,  
I am trying to find the separation between two histograms defined below -  
TH1F \*h1 = new TH1F(“h1”,“log\_likelihood\_ttbar”,100,-120,-40);  
TH1F \*h2 = new TH1F(“h2”,“log\_likelihood\_ttH”,100,-120,-40);

I have used the following code to get the separation -  
#include “TMVA/MethodBase.h”  
#include "TMVA/Tools.h"  
using namespace TMVA;

Double\_t integral = 0;  
integral= TMVA::MethodBase::GetSeparation(h1,h2);  
std::cout\<\<integral\<\<std::endl;

After running it shows me the error - Call to non-static member function without an object argument (here, it refers to GetSeparation(h1,h2) ). Any comments are appreciated !

Cheers!  
Shreya

---

<div class="post-metadata">

**Author:** ![ganis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ganis/32/12484_2.png) [@ganis](https://root-forum.cern.ch/u/ganis)\
**Post date:** [August 19, 2016, 9:36am UTC](https://root-forum.cern.ch/t/tmva-getseparation-function-error/21712/2 "2016-08-19T09:36:00Z")

</div>

Dear Shreya,

The error indicates that GetSeparation, not being a static method of TMethodBase, requires an object of TMethodBase or one of its derived classes - e.g. MethodLikelihood - to be invoked.

If you just want the separation of two histograms, you can invoke directly GetSeparation from TMVA::Tools :

```auto
integral = TMVA::gTools().GetSeparation(h1,h2);
```

Hope it helps.

G Ganis
