31int main(
int argc,
char**argv)
41 JParser<> zap(
"Auxiliary program to draw the detector in 3D.");
48 catch(
const exception &error) {
49 FATAL(error.what() << endl);
63 FATAL(
"Empty detector " << detectorFile << endl);
68 NOTICE(
"Detector volume: " << cylinder << endl);
70 TApplication* tp =
new TApplication(
"user", NULL, NULL);
71 TCanvas* cv =
new TCanvas(
"a", detectorFile.c_str(), 1200, 1200);
75 TGeoManager* geom =
new TGeoManager (
"geometry",
"");
76 TGeoMaterial* material =
new TGeoMaterial(
"vacuum", 0, 0, 0);
77 TGeoMedium* medium =
new TGeoMedium (
"vacuum", 1, material);
79 TGeoVolume* shape = geom->MakeSphere(
"Module", medium, 0.4, 0.5);
81 shape->SetLineColor(kBlue);
85 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
86 top->AddNode(shape, N++,
new TGeoTranslation(i->getX() - cylinder.
getX(), i->getY() - cylinder.
getY(), i->getZ() - cylinder.
getZmin()));
89 geom->SetTopVolume(top);
90 geom->CloseGeometry();
95 cv->GetView()->ShowAxis();