Example of TGraphTime showing how the class could be used to visualize a set of particles with their time stamp in a MonteCarlo program.
if (np > 5000) np = 5000;
Double_t cosphi[5000], sinphi[5000], speed[5000];
Double_t xmin = 0, xmax = 10, ymin = -10, ymax = 10;
for (i=0;i<np;i++) {
if (rc > 0.3) color[i] =
kBlue;
}
for (s=0;s<nsteps;s++) {
for (i=0;i<np;i++) {
if (xx < xmin) continue;
}
g->
Add(
new TPaveLabel(.70,.92,.98,.99,
Form(
"shower at %5.3f nsec",3.*s/nsteps),
"brNDC"),s);
}
}
- Author
- Rene Brun
Definition in file gtime2.C.