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
{
TH2F *hist =
new TH2F(
"hist",
"Histogram with cut", 40, -10., 10., 40, -10., 10.);
for (int i = 0; i < 100000; i++)
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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...
- Date
- January 2023
- Author
- Sergey Linev
Definition in file hist018_TH2_cutg.C.