This example demonstrates how to display a 2D histogram and use TCutG object to select bins for drawing.
Moving TCutG object one can change displayed region of histogram
void h2_cut()
{
TH2F *hist =
new TH2F(
"hist",
"Histogram with cut", 40, -10., 10., 40, -10., 10.);
for (int i = 0; i < 100000; i++)
}
R__EXTERN TRandom * gRandom
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)
Int_t Fill(Double_t) override
Invalid Fill method.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
- Author
- Sergey Linev
Definition in file h2_cut.C.