swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Tip revision: 7af9cdc262b7a0cf2679a0df6c639c93656958c0 authored by Axel Naumann on 06 November 2023, 16:45:30 UTC
[foundation] Update version file to 6.30.01: dev phase for upcoming patch release.
[foundation] Update version file to 6.30.01: dev phase for upcoming patch release.
Tip revision: 7af9cdc
geom_cms.C
/// \file
/// \ingroup tutorial_eve
/// Shows CMS geometry.
///
/// \image html eve_geom_cms.png
/// \macro_code
///
/// \author Matevz Tadel
void geom_cms()
{
TEveManager::Create();
TFile::SetCacheFileDir(".");
gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/cms.root");
gGeoManager->DefaultColors();
auto top = gGeoManager->GetTopVolume()->FindNode("CMSE_1")->GetVolume();
TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("TRAK_1"));
trk->SetVisLevel(6);
gEve->AddGlobalElement(trk);
auto calo = new TEveGeoTopNode(gGeoManager, top->FindNode("CALO_1"));
calo->SetVisLevel(3);
gEve->AddGlobalElement(calo);
auto 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
auto v = gEve->GetDefaultGLViewer();
v->GetClipSet()->SetClipType(TGLClip::EType(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();
}