TSpider example.
void tree140_spider()
{
auto c1 =
new TCanvas(
"c1",
"TSpider example", 200, 10, 700, 700);
if (!
f ||
f->IsZombie()) {
printf("Please run <ROOT location>/tutorials/hsimple.C before.");
return;
}
auto ntuple =
f->Get<
TNtuple>(
"ntuple");
TString varexp =
"px:py:pz:random:sin(px):log(px/py):log(pz)";
TString selection =
"px>0 && py>0 && pz>0";
auto spider =
new TSpider(ntuple, varexp.Data(), selection.
Data(), options.
Data());
spider->Draw();
c1->Selected(
c1, spider, 1);
}
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
A simple TTree restricted to a list of float variables only.
const char * Data() const
- Author
- Bastien Dallapiazza
Definition in file tree140_spider.C.