Cutting histogram using TLine

Hi all,
I want to draw a line on the histogram as a cut and exclude the upper part. I want to only consider the part below the line. I tried like this

double xmin = -0.63;
double xmax = 0.97;
double ymin = 1.22;
double ymax = 1.50;
TLine *cut = new TLine(xmin,ymin,xmax,ymax);
if (cut->IsInside(log10§, dedx)) continue;

But I get an error saying
" ‘TLine’ was not declared in this scope
TLine *cut = new TLine(xmin,ymin,xmax,ymax); " and I can not cut and get the histogram.
Your help will be appriciated. TIA

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

How do you run the code ? If you compile it , you might need to add
#include "TLine.h"


Yes. Thank you . I missed that.
Now how do I exclude the part above the line ?

Can’t you call the fill after the continue call?

TLine is purely graphics it cannot be used “to exclude the values above it” . One way is to proceed as @RENATO_QUAGLIANI suggested: simply do not fill the histogram if x > some_value