ROOT
master
Reference Guide
Loading...
Searching...
No Matches
geoTopNode.C File Reference
Tutorials
»
Visualisation tutorials
»
Event display for ROOT 7 tutorials
Detailed Description
#include <
ROOT/REveGeoTopNode.hxx
>
#include <
ROOT/REveManager.hxx
>
void
setDetColors
()
{
gGeoManager
->
DefaultColors
();
// gGeoManager->GetVolume("TRAK")->InvisibleAll();
gGeoManager
->
GetVolume
(
"HVP2"
)->
SetTransparency
(20);
gGeoManager
->
GetVolume
(
"HVEQ"
)->
SetTransparency
(20);
gGeoManager
->
GetVolume
(
"YE4"
)->
SetTransparency
(10);
gGeoManager
->
GetVolume
(
"YE3"
)->
SetTransparency
(20);
gGeoManager
->
GetVolume
(
"RB2"
)->
SetTransparency
(99);
gGeoManager
->
GetVolume
(
"RB3"
)->
SetTransparency
(99);
gGeoManager
->
GetVolume
(
"COCF"
)->
SetTransparency
(99);
gGeoManager
->
GetVolume
(
"HEC1"
)->
SetLineColor
(7);
gGeoManager
->
GetVolume
(
"EAP1"
)->
SetLineColor
(7);
gGeoManager
->
GetVolume
(
"EAP2"
)->
SetLineColor
(7);
gGeoManager
->
GetVolume
(
"EAP3"
)->
SetLineColor
(7);
gGeoManager
->
GetVolume
(
"EAP4"
)->
SetLineColor
(7);
gGeoManager
->
GetVolume
(
"HTC1"
)->
SetLineColor
(2);
}
TGeoNode
*
getNodeFromPath
(
TGeoNode
*top, std::string path)
{
TGeoNode
*node = top;
std::istringstream
f
(path);
std::string s;
while
(
getline
(
f
, s,
'/'
))
node = node->
GetVolume
()->
FindNode
(s.c_str());
return
node;
}
void
geoTopNode
()
{
using namespace
ROOT::Experimental
;
auto
eveMng
= REveManager::Create();
eveMng
->AllowMultipleRemoteConnections(
false
,
false
);
TFile::SetCacheFileDir
(
"."
);
// tracker barrel
auto
data
=
new
REveGeoTopNodeData
(
"https://root.cern/files/cms.root"
);
setDetColors
();
data
->InitPath(
"/CMSE_1/TRAK_1/SVTX_1"
);
data
->RefDescription().SetVisLevel(2);
eveMng
->GetWorld()->AddElement(
data
);
// 3D GL representation
auto
geoViz
=
new
REveGeoTopNodeViz
();
geoViz
->SetGeoData(
data
);
data
->AddNiece(
geoViz
);
eveMng
->GetEventScene()->AddElement(
geoViz
);
geoViz
->SetPickable(
true
);
eveMng
->Show();
}
REveGeoTopNode.hxx
REveManager.hxx
f
#define f(i)
Definition
RSha256.hxx:104
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:359
data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Definition
TGWin32VirtualXProxy.cxx:104
gGeoManager
R__EXTERN TGeoManager * gGeoManager
Definition
TGeoManager.h:620
ROOT::Detail::TRangeCast
Definition
TCollection.h:312
ROOT::Experimental::REveGeoTopNodeData
Definition
REveGeoTopNode.hxx:98
ROOT::Experimental::REveGeoTopNodeViz
Definition
REveGeoTopNode.hxx:129
TFile::SetCacheFileDir
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
Definition
TFile.cxx:4338
TGeoManager::GetVolume
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
Definition
TGeoManager.cxx:3041
TGeoManager::DefaultColors
void DefaultColors(const TGeoColorScheme *cs=nullptr)
Set default volume colors according to A of material.
Definition
TGeoManager.cxx:2345
TGeoNode
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition
TGeoNode.h:39
TGeoNode::GetVolume
TGeoVolume * GetVolume() const
Definition
TGeoNode.h:100
TGeoVolume::SetTransparency
void SetTransparency(Char_t transparency=0)
Definition
TGeoVolume.h:378
TGeoVolume::SetLineColor
void SetLineColor(Color_t lcolor) override
Set the line color.
Definition
TGeoVolume.cxx:2285
TGeoVolume::FindNode
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes
Definition
TGeoVolume.cxx:1837
ROOT::Experimental
Namespace for ROOT features in testing.
Definition
TROOT.h:100
Author
Alja Mrak-Tadel
Definition in file
geoTopNode.C
.
tutorials
visualisation
eve7
geoTopNode.C
ROOTmaster - Reference Guide Generated on Wed Aug 12 2026 15:05:15 (GVA Time) using Doxygen 1.10.0