6 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
8 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
11 PndEventReader evr(fname);
15 TH1F *
mom=
new TH1F(
"mom",
"P(particle)",400,0.0,5.0);
21 if (nevts==0) nevts=evr.GetEntries();
27 while (evr.GetEvent() && i++<nevts)
29 evr.FillList(all,
"Charged");
30 for (j=0;j<all.GetLength();++j)
32 mom->Fill(all[j].
P());
38 c1->cd(); mom->Draw();
45 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
void ana_example(TString fname="pid_tpccombi.root", int nevts=0)