33 printf(
"In the viewer window:\n"
34 " - de-select \"Reset on update\"\n"
35 " - in the \"Clipping\" tab, select \"Plane\"\n"
36 " - rotate the image as uou wish and zoom using the mouse wheel\n"
37 " - click on the different default color schemes in control bar menu\n"
38 " - the \"gray\" function demonstrates overriding the Z-based fallback colors\n"
39 " - the \"override\" function demonstrates color override from a scheme by using a hook\n"
40 " - the \"transparency\" function demonstrates transparency override\n");
84 float g = std::min(1.f, Z / 100.f);
108 if (
m->GetDensity() < 0.1)
114 std::transform(
n.
begin(),
n.
end(),
n.
begin(), [](
unsigned char c) { return (char)std::tolower(c); });
116 if (
n.find(
"cable") != std::string::npos ||
n.find(
"cables") != std::string::npos)
120 if (
n.find(
"tungsten") != std::string::npos ||
n.find(
"_w") != std::string::npos)
144 if (std::string(
m->
GetName()).find(
"ITS_GEN") != std::string::npos)
168 bar->
AddButton(
"How to run ",
"help()",
"Instructions for running this macro");
170 "A natural color scheme with name-based/Z-binned lookup for material classification");
171 bar->
AddButton(
"Flashy ",
"flashy()",
"Flashy, high-contrast, presentation-friendly colors");
172 bar->
AddButton(
"High contrast ",
"high_contrast()",
"Darker, saturated colors suited for light backgrounds");
173 bar->
AddButton(
"Gray fallback ",
"gray()",
"Demonstrates overriding the Z-based fallback colors");
174 bar->
AddButton(
"Color override ",
"color_override()",
"Demonstrates color override from a scheme by using a hook");
175 bar->
AddButton(
"Transparency ON/OFF ",
"transparent()",
176 "Demonstrates transparency override from a scheme by using a hook");
178 gROOT->SaveContext();
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
EGeoColorSet
Enumeration of predefined geometry color schemes.
@ kNatural
Natural, material-inspired colors (default)
@ kFlashy
Bright, high-contrast colors for presentations.
@ kHighContrast
Dark, saturated colors for light backgrounds.
R__EXTERN TGeoManager * gGeoManager
const_iterator begin() const
const_iterator end() const
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
void Show()
Show control bar.
void AddButton(TControlBarButton *button)
Add button.
Strategy object for assigning colors and transparency to geometry volumes.
static const TGeoMaterial * GetMaterial(const TGeoVolume *vol)
Retrieve the material associated with a geometry volume.
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
void DefaultColors(const TGeoColorScheme *cs=nullptr)
Set default volume colors according to A of material.
Base class describing materials.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void Draw(Option_t *option="") override
draw top volume according to option
virtual const char * GetName() const
Returns name of object.