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];
g->SetTitle(
"TGraphTime demo 2;X;Y");
for (i=0;i<np;i++) {
speed[i] =
r.Uniform(0.5,1);
if (rc > 0.3) color[i] =
kBlue;
}
for (i=0;i<np;i++) {
m->SetMarkerColor(color[i]);
m->SetMarkerSize(1.5 -
s/(speed[i]*nsteps));
}
g->Add(
new TPaveLabel(.70,.92,.98,.99,
Form(
"shower at %5.3f nsec",3.*
s/nsteps),
"brNDC"),
s);
}
}
char * Form(const char *fmt,...)
TGraphTime is used to draw a set of objects evolving with nsteps in time between tmin and tmax.
A Pave (see TPave) with a text centered in the Pave.
Random number generator class based on M.
static constexpr double s
- Author
- Rene Brun
Definition in file gtime2.C.