Draw question

From: Andrei Daniel (daniel@cv.jinr.dubna.su)
Date: Mon Jan 31 2000 - 10:06:42 MET


Hi Rooters,

I am a beginner with the ROOT system, so it may be a well-known question.
I tried to draw the small part of setup. When the cave rounded the detectors
is drawing the distance between detector looks correct relatively to the
detector size (Left canvas). But when the cave is not drawing or it was
totally
excluded the visible distance between detector looks wrong in comparison to
the detector size (Right canvas).
I am using Windows NT, SP6a and ROOT 2.23.11.

The next file (d2.C) has been used.
#include "TRoot.h"
void main()
{
   TBRIK *cave = new TBRIK("cave", "CAVE", "", 80., 80., 80.);

   TBRIK *det1 = new TBRIK("det1","Detector 1", "", 0.001, 5.,  5.);
   TBRIK *det2 = new TBRIK("det2","Detector 2", "", 0.01, 10., 10.);

   TNode *pcave = new TNode("pcave", "PCAVE", cave, 0., 0., 0., 0);
   pcave->cd();

   TNode *pdet10 = new TNode("pdet10", "Pdet10", det1,  30., 0., 0., 0);
   TNode *pdet11 = new TNode("pdet11", "Pdet11", det2,  60., 0., 0., 0);

   TNode *pdet20 = new TNode("pdet20", "Pdet20", det1, -30., 0., 0., 0);
   TNode *pdet21 = new TNode("pdet21", "Pdet21",  det2, -60., 0., 0., 0);

   TCanvas *c1 = new TCanvas("c1", "Detectors", 10, 10, 500, 500);

   pcave->SetVisibility(1);
   pcave->Draw();

   TCanvas *c2 = new TCanvas("c2","Details", 600, 10, 500, 500);
   c2->cd();
   pcave->SetVisibility(2);
   pcave->Draw();

}

  *******************************************
  *
*
  *        W E L C O M E  to  R O O T                            *
  *
*
  *   Version   2.23/11   14 January 2000                        *
  *
*
  *  You are welcome to visit our Web site                      *
  *          http://root.cern.ch
*
  *
*
  *******************************************

CINT/ROOT C/C++ Interpreter version 5.14.25, Nov 25 1999
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .L d2.C
root [1] main();


Andrei Daniel



----------------------------------------------------------------------------
------------------
Andrei Daniel, Flerov Laboratory of Nuclear Reactions, JINR
Tel: 7(09621)64-568          Fax: 7(09621)65-083
Postal Address: FLNR, JINR, Dubna 141980, Russia
e-mail: daniel@cv.jinr.ru
----------------------------------------------------------------------------
------------------



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET