Hi, i have to plot the values of a branch of a TTree.
i used this script
int run()
{
gROOT.Reset();
TFile *myfile = TFile::Open("mu0_1GeVtheta0.root","UPDATE");//thank you pcanal!
TH1F* FreqPEtot=new TH1F(2600);
FreqPEtot->GetYaxis()->SetTitle("Freq");
dispersione->SetMarkerStyle(3);
FreqPEtot->SetTitle("Freq PE tot mu 0.1GeV (0,0,0) theta,phi =0");
dispersione->Draw("PETot>>FreqPEtot()","","p0");
//FreqPEtot->Write();
return 0;
}
Here dispersione is the name of the TTree and PETot is the branch i want to plot.
the plot is correct, but i’m not able to set the title of the axis nor the title of the histogram.
What am i missing?
Amir