swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Tip revision: be74382292a29ef72a13d39a6eef7316572e63d3 authored by Fons Rademakers on 24 November 2011, 15:43:23 UTC
tag patch release v5-28-00h.
tag patch release v5-28-00h.
Tip revision: be74382
geom_cms.C
// @(#)root/eve:$Id$
// Author: Matevz Tadel
// Shows CMS geometry.
void geom_cms()
{
TEveManager::Create();
TFile::SetCacheFileDir(".");
gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/cms.root");
gGeoManager->DefaultColors();
TGeoVolume* top = gGeoManager->GetTopVolume()->FindNode("CMSE_1")->GetVolume();
TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("TRAK_1"));
trk->SetVisLevel(6);
gEve->AddGlobalElement(trk);
TEveGeoTopNode* calo = new TEveGeoTopNode(gGeoManager, top->FindNode("CALO_1"));
calo->SetVisLevel(3);
gEve->AddGlobalElement(calo);
TEveGeoTopNode* muon = new TEveGeoTopNode(gGeoManager, top->FindNode("MUON_1"));
muon->SetVisLevel(4);
gEve->AddGlobalElement(muon);
gEve->FullRedraw3D(kTRUE);
// EClipType not exported to CINT (see TGLUtil.h):
// 0 - no clip, 1 - clip plane, 2 - clip box
TGLViewer *v = gEve->GetDefaultGLViewer();
v->GetClipSet()->SetClipType(1);
v->ColorSet().Background().SetColor(kMagenta+4);
v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
v->RefreshPadEditor(v);
v->CurrentCamera().RotateRad(-1.2, 0.5);
v->DoDraw();
}