I’ve been trying to use the TMath::IsInside(Float_t px, Float_t py, Int_t np, Float_t* x, Float_t* y) function but its always returning false for me. Here is a link that references the definition of the function: TMath
I wrote my code in this file: thresholdPlots.cpp (10.0 KB) , where the TMath::IsInside() function is used on line 93.
Use this .root file to reproduce the results: https://drive.google.com/file/d/13fKs346wHK-iGr2lmsbG9NjC5wgZQiCG/view?usp=sharing (had to use a link since the file was too big to upload)
You need to change the content in the chain->Add() method in line 64 to the path where you have stored the .root file.
To run the code I just used the interpreter and ran
root -l thresholdPlots.cpp
I’m using ROOT 5.34 on Ubuntu 18.04 LTS
ROOT Version: 5.34
Platform: Ubuntu 18.04 LTS
Compiler: root interpreter CINT