Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q
will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug
from the ROOT prompt to pre-populate a topic.
ROOT Version: 6.30.04
Platform: Not Provided
Compiler: Not Provided
Hi,
I have a root file from which i have created a rdataframe. I wanted to have jet transverse momentum histograms plot. So for this, i defined a new column and assigned it required values. But while running the file, it is giving errors.
Following is some snapshot of my root file.
Also i have the following code.
void file()
{
using namespace ROOT;
ROOT::RDataFrame df(“events”, “events_029930132.root”);
auto rdf = df.Define(“pt”, “sqrt((Jet.momentum.x)(Jet.momentum.x) + (Jet.momentum.y)(Jet.momentum.y))”);
auto h1 = rdf.Histo1D(“Jet.energy”);
auto h2 = rdf.Histo1D(“Jet.mass”);
auto h3 = rdf.Histo1D(“pt”);
h1->GetXaxis()->SetTitle(“Jet energy”);
h2->GetXaxis()->SetTitle(“Jet mass”);
h3->GetXaxis()->SetTitle(“Jet transverse momentum”);
h1->Draw();
h2->Draw();
h3->Draw();
}
The output is giving me a blank canvas.
How this can be resolved?