32int main(
int argc, 
char**argv)
 
   42    JParser<> zap(
"Auxiliary program to draw the detector in 3D.");
 
   49  catch(
const exception &error) {
 
   50    FATAL(error.what() << endl);
 
   64    FATAL(
"Empty detector " << detectorFile << endl);
 
   69  NOTICE(
"Detector volume: " << cylinder << endl);
 
   71  TApplication* tp = 
new TApplication(
"user", NULL, NULL);
 
   72  TCanvas*      cv = 
new TCanvas(
"a", detectorFile.c_str(), 1200, 1200);
 
   74  ((TRootCanvas *) cv->GetCanvasImp())->Connect(
"CloseWindow()", 
"TApplication", tp, 
"Terminate()");
 
   78  TGeoManager*  geom     = 
new TGeoManager (
"geometry", 
"");
 
   79  TGeoMaterial* material = 
new TGeoMaterial(
"vacuum", 0, 0, 0);
 
   80  TGeoMedium*   medium   = 
new TGeoMedium  (
"vacuum", 1, material);
 
   82  TGeoVolume*   shape    = geom->MakeSphere(
"Module", medium, 0.4, 0.5); 
 
   84  shape->SetLineColor(kBlue);
 
   88  for (JDetector::const_iterator i = 
detector.begin(); i != 
detector.end(); ++i) {
 
   89    top->AddNode(shape, N++, 
new TGeoTranslation(i->getX() - cylinder.
getX(), i->getY() - cylinder.
getY(), i->getZ() - cylinder.
getZmin()));
 
   92  geom->SetTopVolume(top);
 
   93  geom->CloseGeometry();
 
   98  cv->GetView()->ShowAxis();