29 namespace GLTutorials {
35 void generate_random(
Int_t i)
44 r5 = (2 * dr *
r.
Rndm(i)) - dr;
45 r6 = (2 * dr *
r.
Rndm(i)) - dr;
46 r8 = (2 * dr *
r.
Rndm(i)) - dr;
52 void parallelcoordtrans()
57 using namespace ROOT::GLTutorials;
59 Double_t s1x = 0., s1y = 0., s1z = 0.;
60 Double_t s2x = 0., s2y = 0., s2z = 0.;
61 Double_t s3x = 0., s3y = 0., s3z = 0.;
64 TCanvas *
c1 =
new TCanvas(
"parallel coors",
"parallel coords", 0, 0, 900, 1000);
66 TNtuple *
const nt =
new TNtuple(
"nt",
"Demo ntuple",
"x:y:z:u:v:w:a:b:c");
68 for (
Int_t i = 0; i < 1500; ++i) {
74 nt->Fill(
r1,
r2,
r3, r4, r5, r6, r7, r8, r9);
77 nt->Fill(s1x, s1y, s1z, s2x, s2y, s2z, r7, r8, r9);
80 nt->Fill(
r1,
r2,
r3, r4, r5, r6, r7, s3y, r9);
83 nt->Fill(s2x - 1, s2y - 1, s2z, s1x + .5, s1y + .5, s1z + .5, r7, r8, r9);
86 nt->Fill(
r1,
r2,
r3, r4, r5, r6, r7, r8, r9);
89 nt->Fill(s1x + 1, s1y + 1, s1z + 1, s3x - 2, s3y - 2, s3z - 2, r7, r8, r9);
92 nt->Fill(
r1,
r2,
r3, r4, r5, r6, s3x, r8, s3z);
99 nt->
Draw(
"x:y:z:u:v:w:a:b:c",
"",
"para");
101 assert(para1 != 0 &&
"parallelcoordtrans, 'ParaCoord' is null");
103 para1->SetLineColor(25);
105 pcv->SetHistogramHeight(0.);
108 pcv->SetHistogramHeight(0.);
111 pcv->SetHistogramHeight(0.);
114 pcv->SetHistogramHeight(0.);
117 pcv->SetHistogramHeight(0.);
120 pcv->SetHistogramHeight(0.);
123 pcv->SetHistogramHeight(0.);
126 pcv->SetHistogramHeight(0.);
129 pcv->SetHistogramHeight(0.);
135 assert(col26 != 0 &&
"parallelcoordtrans, color with index 26 not found");
137 col26->SetAlpha(0.01);
140 nt->
Draw(
"x:y:z:u:v:w:a:b:c",
"",
"para");
142 assert(para2 != 0 &&
"parallelcoordtrans, 'ParaCoord' is null");
144 para2->SetLineColor(26);
147 pcv->SetHistogramHeight(0.);
150 pcv->SetHistogramHeight(0.);
153 pcv->SetHistogramHeight(0.);
156 pcv->SetHistogramHeight(0.);
159 pcv->SetHistogramHeight(0.);
162 pcv->SetHistogramHeight(0.);
165 pcv->SetHistogramHeight(0.);
168 pcv->SetHistogramHeight(0.);
171 pcv->SetHistogramHeight(0.);
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual void Draw(Option_t *option="")=0
Default Draw method for all objects.
R__EXTERN TStyle * gStyle
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
This is the base class for the ROOT Random number generators.
unsigned int r3[N_CITIES]
void SetCanvasPreferGL(Bool_t prefer=kTRUE)
A simple TTree restricted to a list of float variables only.
unsigned int r1[N_CITIES]
virtual Double_t Rndm()
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
The color creation and management class.
virtual void Sphere(Double_t &x, Double_t &y, Double_t &z, Double_t r)
Generates random vectors, uniformly distributed over the surface of a sphere of given radius...
Parallel Coordinates class.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
unsigned int r2[N_CITIES]