400 if (!
gROOT->GetListOfGeometries()->FindObject(
this))
401 gROOT->GetListOfGeometries()->Add(
this);
402 if (!
gROOT->GetListOfBrowsables()->FindObject(
this))
403 gROOT->GetListOfBrowsables()->Add(
this);
420 Fatal(
"Init",
"New geometry created while the old one locked !!!");
509 if (
gROOT->GetListOfFiles()) {
510 gROOT->GetListOfGeometries()->Remove(
this);
511 gROOT->GetListOfBrowsables()->Remove(
this);
645 Warning(
"AddProperty",
"Property \"%s\" already exists with value %g",
property, (pos.first)->second);
744 Error(
"AddVolume",
"invalid volume");
793 std::thread::id threadId = std::this_thread::get_id();
794 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
800 fNavigators.insert(NavigatorsMap_t::value_type(threadId, array));
821 std::thread::id threadId = std::this_thread::get_id();
822 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
836 std::thread::id threadId = std::this_thread::get_id();
837 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
849 std::thread::id threadId = std::this_thread::get_id();
850 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
852 Error(
"SetCurrentNavigator",
"No navigator defined for this thread\n");
853 std::cout <<
" thread id: " << threadId << std::endl;
859 Error(
"SetCurrentNavigator",
"Navigator %d not existing for this thread\n",
index);
860 std::cout <<
" thread id: " << threadId << std::endl;
914 Error(
"Remove navigator",
"Navigator %p not found", nav);
925 Error(
"SetMaxThreads",
"Cannot set maximum number of threads before closing the geometry");
930 std::thread::id threadId = std::this_thread::get_id();
931 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
935 fNavigators.insert(NavigatorsMap_t::value_type(threadId, array));
999 TTHREAD_TLS(
Int_t) tid = -1;
1005 std::thread::id threadId = std::this_thread::get_id();
1043 "SetVisibility(TObject*,Bool_t)");
1126 if (!vorig || !vnew)
1135 Error(
"ReplaceVolume",
"Replacement volume %s has no medium and it is not an assembly", vnew->
GetName());
1138 if (mnew && checkmed) {
1140 Warning(
"ReplaceVolume",
"Replacement volume %s has different medium than original volume %s", vnew->
GetName(),
1153 for (i = 0; i < nvol; i++) {
1157 if (vol == vorig || vol == vnew)
1160 for (j = 0; j < nd; j++) {
1171 Info(
"ReplaceVolume",
"%s replaced with assembly and declared NON-OVERLAPPING!", node->
GetName());
1183 Info(
"ReplaceVolume",
"%s inside substitute assembly %s declared NON-OVERLAPPING!", node->
GetName(),
1192 "Volumes should not be replaced with assemblies if they are positioned in containers having a different "
1193 "medium ID.\n %i occurrences for assembly replacing volume %s",
1205 Warning(
"TransformVolumeToAssembly",
"Volume %s not found", vname);
1213 while (
index < indmax) {
1222 Warning(
"TransformVolumeToAssembly",
"Volume %s already assembly", toTransform->
GetName());
1224 Warning(
"TransformVolumeToAssembly",
"Volume %s has no daughters, cannot transform",
1227 Warning(
"TransformVolumeToAssembly",
"Volume %s divided, cannot transform", toTransform->
GetName());
1231 if (
index >= indmax)
1234 if (!strcmp(toTransform->
GetName(), vname))
1332 return TGeoBuilder::Instance(
this)->
Medium(
name, numed, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
1426 while ((shape = (
TGeoShape *)next2())) {
1481 Warning(
"CloseGeometry",
"geometry already closed");
1485 Error(
"CloseGeometry",
"you MUST call SetTopVolume() first !");
1488 if (!
gROOT->GetListOfGeometries()->FindObject(
this))
1489 gROOT->GetListOfGeometries()->Add(
this);
1490 if (!
gROOT->GetListOfBrowsables()->FindObject(
this))
1491 gROOT->GetListOfBrowsables()->Add(
this);
1502 Int_t nnavigators = 0;
1506 Info(
"CloseGeometry",
"Geometry loaded from file...");
1512 Error(
"CloseGeometry",
"Master volume not streamed");
1517 Info(
"CloseGeometry",
"Voxelization retrieved from file");
1527 for (
Int_t i = 0; i < nnavigators; i++) {
1539 for (i = 0; i < ngvol; i++)
1541 for (i = 0; i < nvol; i++)
1555 Info(
"CloseGeometry",
"----------------modeler ready----------------");
1566 Info(
"CloseGeometry",
"Counting nodes...");
1584 Info(
"CloseGeometry",
"Building cache...");
1586 for (
Int_t i = 0; i < nnavigators; i++) {
1596 Info(
"CloseGeometry",
"----------------modeler ready----------------");
1726 Info(
"ConvertReflections",
"Converting reflections in: %s - %s ...",
GetName(),
GetTitle());
1732 while ((node = next())) {
1750 Info(
"ConvertReflections",
"Done");
1760 Error(
"CountLevels",
"Top node not defined.");
1768 Info(
"CountLevels",
"Fixing volume reference counts");
1772 Int_t maxvertices = 1;
1773 while ((node = next())) {
1776 for (
Int_t ibit = 10; ibit < 14; ibit++) {
1787 if (xtru->
GetNvert() > maxvertices)
1838 if (tmin < 0 || tmin >= tmax || nframes < 1)
1857 Double_t start[6] = {0, 0, 0, 0, 0, 0};
1858 Double_t end[6] = {0, 0, 0, 0, 0, 0};
1859 Double_t dd[6] = {0, 0, 0, 0, 0, 0};
1860 Double_t dlat = 0, dlong = 0, dpsi = 0;
1863 for (i = 0; i < 3; i++) {
1864 start[i + 3] = 20 + 1.3 * start[i + 3];
1865 end[i + 3] = 20 + 0.9 * end[i + 3];
1867 for (i = 0; i < 6; i++) {
1868 dd[i] = (end[i] - start[i]) / 10.;
1872 dlong = (-206 - dlong) /
Double_t(nframes);
1873 dlat = (126 - dlat) /
Double_t(nframes);
1874 dpsi = (75 - dpsi) /
Double_t(nframes);
1878 for (i = 0; i < nframes; i++) {
1884 for (j = 0; j < 6; j++)
1966 static char defaultname[5] = {
"XXX"};
1990 Warning(
"SetPdgName",
"No more than 256 different pdg codes allowed");
2011 Error(
"AddGDMLMatrix",
"Matrix %s already added to manager", mat->
GetName());
2030 Error(
"AddOpticalSurface",
"Surface %s already added to manager", optsurf->
GetName());
2049 Error(
"AddSkinSurface",
"Surface %s already added to manager", surf->
GetName());
2068 Error(
"AddBorderSurface",
"Surface %s already added to manager", surf->
GetName());
2099 bombx = bomby = bombz = bombr = 1.3;
2203 if (track->
GetId() ==
id)
2217 if (track->
GetId() ==
id)
2231 if (track->
GetId() ==
id)
2259 const Int_t nmax = 110;
2261 for (
Int_t i = 0; i < nmax; i++)
2267 col[4] = col[5] =
kGreen - 10;
2268 col[6] = col[7] =
kBlue - 7;
2270 col[10] = col[11] =
kRed - 10;
2271 col[12] =
kGray + 1;
2272 col[13] =
kBlue - 10;
2276 col[24] = col[25] = col[26] =
kBlue - 8;
2310 if (strstr(
name,
"*"))
2348 Warning(
"SetVolumeAttribute",
"volume: %s does not exist",
name);
2382 Info(
"SetMaxVisNodes",
"Automatic visible depth for %d visible nodes", maxnodes);
2463 Info(
"SetVisLevel",
"Automatic visible depth disabled");
2485 Error(
"OptimizeVoxels",
"Geometry must be closed first");
2491 fname =
"tgeovox.C";
2492 out.open(fname, std::ios::out);
2494 Error(
"OptimizeVoxels",
"cannot open file");
2501 out << sname.
Data() <<
"()" << std::endl;
2502 out <<
"{" << std::endl;
2503 out <<
"//=== Macro generated by ROOT version " <<
gROOT->GetVersion() <<
" : " << t.
AsString() << std::endl;
2504 out <<
"//=== Voxel optimization for " <<
GetTitle() <<
" geometry" << std::endl;
2505 out <<
"//===== <run this macro JUST BEFORE closing the geometry>" << std::endl;
2506 out <<
" TGeoVolume *vol = 0;" << std::endl;
2507 out <<
" // parse all voxelized volumes" << std::endl;
2514 out <<
" vol = gGeoManager->GetVolume(\"" << vol->
GetName() <<
"\");" << std::endl;
2517 out <<
" vol->SetCylVoxels();" << std::endl;
2519 out <<
" vol->SetCylVoxels(kFALSE);" << std::endl;
2522 out <<
"}" << std::endl;
2546 for (i = 0; i <
len; i++) {
2547 if (startstr(i) ==
' ')
2549 e0 += startstr(i, 1);
2561 while (iloop == 1) {
2567 for (i = 0; i <
len; i++) {
2580 if ((e0(i) ==
'+') || (e0(i) ==
'-') || (e0(i) ==
'*')) {
2582 if (level < levmin) {
2588 if ((e0(i) ==
':') && (level == 0)) {
2598 if (iloop == 1 && (e0(0) ==
'(') && (e0(
len - 1) ==
')')) {
2600 e0 = e0(1,
len - 2);
2605 if (((lastop == 0) && (lastdp > 0)) || ((lastpp > 0) && (lastdp > lastpp) && (indop < lastpp))) {
2606 expr3 = e0(lastdp + 1,
len - lastdp);
2616 for (i = 0; i <
len; i++) {
2626 if (level <= levmin) {
2648 expr1 = e0(0, indop);
2649 expr2 = e0(indop + 1,
len - indop);
2659 Error(
"SaveAttributes",
"geometry must be closed first\n");
2665 fname =
"tgeoatt.C";
2666 out.open(fname, std::ios::out);
2668 Error(
"SaveAttributes",
"cannot open file");
2675 out << sname.
Data() <<
"()" << std::endl;
2676 out <<
"{" << std::endl;
2677 out <<
"//=== Macro generated by ROOT version " <<
gROOT->GetVersion() <<
" : " << t.
AsString() << std::endl;
2678 out <<
"//=== Attributes for " <<
GetTitle() <<
" geometry" << std::endl;
2679 out <<
"//===== <run this macro AFTER loading the geometry in memory>" << std::endl;
2681 out <<
" TGeoVolume *top = gGeoManager->GetVolume(\"" <<
fTopVolume->
GetName() <<
"\");" << std::endl;
2682 out <<
" TGeoVolume *vol = 0;" << std::endl;
2683 out <<
" TGeoNode *node = 0;" << std::endl;
2684 out <<
" // clear all volume attributes and get painter" << std::endl;
2685 out <<
" gGeoManager->ClearAttributes();" << std::endl;
2686 out <<
" gGeoManager->GetGeomPainter();" << std::endl;
2687 out <<
" // set visualization modes and bomb factors" << std::endl;
2688 out <<
" gGeoManager->SetVisOption(" <<
GetVisOption() <<
");" << std::endl;
2689 out <<
" gGeoManager->SetVisLevel(" <<
GetVisLevel() <<
");" << std::endl;
2690 out <<
" gGeoManager->SetExplodedView(" <<
GetBombMode() <<
");" << std::endl;
2691 Double_t bombx, bomby, bombz, bombr;
2693 out <<
" gGeoManager->SetBombFactors(" << bombx <<
"," << bomby <<
"," << bombz <<
"," << bombr <<
");"
2695 out <<
" // iterate volumes container and set new attributes" << std::endl;
2704 out <<
" // draw top volume with new settings" << std::endl;
2705 out <<
" top->Draw();" << std::endl;
2706 out <<
" gPad->x3d();" << std::endl;
2707 out <<
"}" << std::endl;
2907 Info(
"GetByteCount",
"Total size of logical tree : %i bytes", count);
2917 const char *kind =
"root";
2918 if (
gROOT->IsWebDisplay() && !
gROOT->IsWebDisplayBatch())
2920 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualGeoPainter", kind)) {
2921 if (
h->LoadPlugin() == -1) {
2922 Error(
"GetGeomPainter",
"could not load plugin for %s geo_painter", kind);
2927 Error(
"GetGeomPainter",
"could not create %s geo_painter", kind);
2931 Error(
"GetGeomPainter",
"not found plugin %s for geo_painter", kind);
2943 sname = sname.
Strip();
2959 for (i = 0; i < ngvol; i++)
2961 for (i = 0; i < nvol; i++)
2965 sname = sname.
Strip();
3000 if (other->
IsEq(mat))
3012 sname = sname.
Strip();
3023 sname = sname.
Strip();
3036 if (med->
GetId() == numed)
3062 sname = sname.
Strip();
3132 Info(
"Voxelize",
"Voxelizing...");
3249 return TGeoBuilder::Instance(
this)->
MakeCtub(
name, medium, rmin, rmax, dz, phi1, phi2, lx, ly, lz, tx, ty, tz);
3312 return TGeoBuilder::Instance(
this)->
MakeTrap(
name, medium, dz, theta, phi,
h1, bl1, tl1, alpha1, h2, bl2, tl2,
3323 return TGeoBuilder::Instance(
this)->
MakeGtra(
name, medium, dz, theta, phi, twist,
h1, bl1, tl1, alpha1, h2, bl2, tl2,
3350 Error(
"SetAlignableEntry",
"An alignable object with name %s already existing. NOT ADDED !", unique_name);
3360 Error(
"SetAlignableEntry",
"A PN entry: has already uid=%i", uid);
3444 keys[
index + 1] = uid;
3445 values[
index + 1] = ientry;
3475 Error(
"MakeAlignablePN",
"No alignable object named %s found !",
name);
3487 Error(
"MakeAlignablePN",
"No alignable object specified !");
3490 const char *path = entry->
GetTitle();
3492 Error(
"MakeAlignablePN",
"Alignable object %s poins to invalid path: %s", entry->
GetName(), path);
3509 Error(
"MakePhysicalNode",
"path: %s not valid", path);
3569 if ((ibomb >= 0) && (ibomb < 4))
3580 if ((phimin == 0) && (phimax == 360)) {
3669 while ((browser = (
TBrowser *)next()))
3690 Int_t nnavigators = 0;
3695 for (
Int_t i = 0; i < nnavigators; i++) {
3814 Error(
"CheckGeometryFull",
"The option string must contain a letter. See method documentation.");
3832 Info(
"CheckGeometry",
"Fixing runtime shapes...");
3840 has_runtime =
kTRUE;
3851 Info(
"CheckGeometry",
"...Nothing to fix");
3858 Warning(
"CheckGeometry",
"Volume \"%s\" has no medium: assigned dummy medium and material", vol->
GetName());
3870 Error(
"CheckOverlaps",
"Top node not set");
3904 Info(
"Weight",
"Computing analytically weight of %s", volume->
GetName());
3907 Info(
"Weight",
"Computed weight: %f [kg]\n", weight);
3911 Info(
"Weight",
"Estimating weight of %s with %g %% precision",
fTopVolume->
GetName(), 100. * precision);
3912 printf(
" event weight err\n");
3913 printf(
"========================================\n");
3990 gROOT->ProcessLineFast(cmd);
3996 if (!
f ||
f->IsZombie()) {
3997 Error(
"Export",
"Cannot open file");
4008 Info(
"Export",
"Exporting %s %s as root file. Optimizations streamed.",
GetName(),
GetTitle());
4012 Info(
"Export",
"Exporting %s %s as root file. Optimizations not streamed.",
GetName(),
GetTitle());
4097 ::Warning(
"TGeoManager::Import",
"TGeoMananager in lock mode. NOT IMPORTING new geometry");
4103 ::Info(
"TGeoManager::Import",
"Reading geometry from file: %s",
filename);
4111 new TGeoManager(
"GDMLImport",
"Geometry imported from GDML");
4115 if (world ==
nullptr) {
4134 if (!
f ||
f->IsZombie()) {
4135 ::Error(
"TGeoManager::Import",
"Cannot open file");
4141 TIter next(
f->GetListOfKeys());
4143 while ((key = (
TKey *)next())) {
4178 for (i = 0; i < nelem; i++) {
4185 if (elem != elem_table) {
4199 if (elem != elem_table) {
4218 while ((obj = next())) {
4244 if (tmin == 0 && tmax == 999)
4289 Error(
"SetUseParallelWorldNav",
"No parallel world geometry defined. Use CreateParallelWorld.");
4297 Error(
"SetUseParallelWorldNav",
"The geometry must be closed first");
4323 ::Fatal(
"TGeoManager",
"The system of units may only be changed once, \n"
4324 "BEFORE any elements and materials are created! \n"
4325 "Alternatively unlock the default units at own risk.");
4326 }
else if (new_value ==
kG4Units) {
4327 ::Info(
"TGeoManager",
"Changing system of units to Geant4 units (mm, ns, MeV).");
4329 ::Info(
"TGeoManager",
"Changing system of units to ROOT units (cm, s, GeV).");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
TGeoManager * gGeoManager
static Bool_t gGeometryLocked
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
R__EXTERN TStyle * gStyle
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Using a TBrowser one can browse all ROOT objects.
void RecursiveRemove(TObject *obj) override
Recursively remove obj from browser.
static const char * GetFloatFormat()
return current printf format for float members, default "%e"
static void SetFloatFormat(const char *fmt="%e")
set printf format for float/double members, default "%e" to change format only for doubles,...
static const char * GetDoubleFormat()
return current printf format for double members, default "%.14e"
static void SetDoubleFormat(const char *fmt="%.14e")
set printf format for double members, default "%.14e" use it after SetFloatFormat,...
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
TDirectory::TContext keeps track and restore the current directory.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
A ROOT file is composed of a header, followed by consecutive data records (TKey instances) with a wel...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
This class is used in the process of reading and writing the GDML "matrix" tag.
Bool_t IsVisTouched() const
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
void SetVisBranch()
Set branch type visibility.
void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, Bool_t isOnly, Float_t *upar, Int_t npar=0)
Create a node called <name_nr> pointing to the volume called <name> as daughter of the volume called ...
TGeoVolume * MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
Make in one step a volume pointing to a polygone shape with given medium.
TGeoVolume * MakeGtra(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a twisted trapezoid shape with given medium.
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
TGeoVolume * MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz)
Make in one step a volume pointing to a polycone shape with given medium.
TGeoVolume * MakeTrap(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a trapezoid shape with given medium.
Int_t AddShape(TGeoShape *shape)
Add a shape to the list. Returns index of the shape in list.
TGeoVolume * MakeTorus(const char *name, TGeoMedium *medium, Double_t r, Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360)
Make in one step a volume pointing to a torus shape with given medium.
static TGeoBuilder * Instance(TGeoManager *geom)
Return pointer to singleton.
TGeoVolume * MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=nullptr)
Make an TGeoArb8 volume.
TGeoMaterial * Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen=0, Double_t intlen=0)
Create material with given A, Z and density, having an unique id.
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi)
Make in one step a volume pointing to a parallelepiped shape with given medium.
Int_t AddTransformation(TGeoMatrix *matrix)
Add a matrix to the list. Returns index of the matrix in list.
TGeoVolume * MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin=0, Double_t themax=180, Double_t phimin=0, Double_t phimax=360)
Make in one step a volume pointing to a sphere shape with given medium.
TGeoMedium * Medium(const char *name, Int_t numed, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin)
Create tracking medium.
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
void Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3)
Create rotation matrix named 'mat<index>'.
TGeoVolume * Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Create a new volume by dividing an existing one (GEANT3 like)
TGeoVolume * MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
Make in one step a volume pointing to a TGeoTrd1 shape with given medium.
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
Make an assembly of volumes.
TGeoVolume * MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a cone segment shape with given medium.
Int_t AddMaterial(TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
TGeoVolume * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Make in one step a volume pointing to a TGeoTrd2 shape with given medium.
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
TGeoMaterial * Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid)
Create mixture OR COMPOUND IMAT as composed by THE BASIC nelem materials defined by arrays A,...
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Make in one step a volume pointing to a cone shape with given medium.
void RegisterMatrix(TGeoMatrix *matrix)
Register a matrix to the list of matrices.
TGeoVolume * MakeCtub(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz)
Make in one step a volume pointing to a tube segment shape with given medium.
Class describing rotation + translation.
Composite shapes are Boolean combinations of two or more shape components.
TGeoElement * GetElement(Int_t z)
Base class for chemical elements.
void SetDefined(Bool_t flag=kTRUE)
void SetUsed(Bool_t flag=kTRUE)
Matrix class used for computing global transformations Should NOT be used for node definition.
An identity transformation.
The manager class for any TGeo geometry.
static void UnlockGeometry()
Unlock current geometry.
Double_t fPhimax
lowest range for phi cut
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Make in one step a volume pointing to a cone shape with given medium.
void AnimateTracks(Double_t tmin=0, Double_t tmax=5E-8, Int_t nframes=200, Option_t *option="/*")
Draw animation of tracks.
void AddSkinSurface(TGeoSkinSurface *surf)
Add skin surface;.
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
TGeoVolume * MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz)
Make in one step a volume pointing to a polycone shape with given medium.
Int_t fRaytraceMode
Flag for multi-threading.
Double_t fVisDensity
particles to be drawn
TGeoNavigator * AddNavigator()
Add a navigator in the list of navigators.
TVirtualGeoTrack * GetTrackOfId(Int_t id) const
Get track with a given ID.
TGeoMaterial * FindDuplicateMaterial(const TGeoMaterial *mat) const
Find if a given material duplicates an existing one.
TGeoVolume * Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Create a new volume by dividing an existing one (GEANT3 like)
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew)
Replaces all occurrences of VORIG with VNEW in the geometry tree.
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
Int_t GetCurrentNodeId() const
Get the unique ID of the current node.
TGeoPNEntry * GetAlignableEntry(const char *name) const
Retrieves an existing alignable object.
TGeoVolume * fMasterVolume
top physical node
TVirtualGeoTrack * FindTrackWithId(Int_t id) const
Search the track hierarchy to find the track with the given id.
void TestOverlaps(const char *path="")
Geometry overlap checker based on sampling.
static EDefaultUnits GetDefaultUnits()
void RemoveMaterial(Int_t index)
Remove material at given index.
void Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3)
Create rotation matrix named 'mat<index>'.
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
THashList * fHashPNE
hash list of group volumes providing fast search
static Int_t fgVerboseLevel
Lock preventing a second geometry to be loaded.
void Init()
Initialize manager class.
Bool_t InitArrayPNE() const
Initialize PNE array for fast access via index and unique-id.
TObjArray * fPhysicalNodes
virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option)
computes the total size in bytes of the branch starting with node.
TObjArray * fUniqueVolumes
static UInt_t fgExportPrecision
Maximum number of Xtru vertices.
void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, Bool_t isOnly, Float_t *upar, Int_t npar=0)
Create a node called <name_nr> pointing to the volume called <name> as daughter of the volume called ...
TGeoVolume * fPaintVolume
TGeoSkinSurface * GetSkinSurface(const char *name) const
Get skin surface with a given name;.
void UpdateElements()
Update element flags when geometry is loaded from a file.
TGeoManager()
Default constructor.
ConstPropMap_t fProperties
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
void CdUp()
Go one level up in geometry.
void DoBackupState()
Backup the current state without affecting the cache stack.
void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)
Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNe...
TGeoPNEntry * GetAlignableEntryByUID(Int_t uid) const
Retrieves an existing alignable object having a preset UID.
void AddGDMLMatrix(TGDMLMatrix *mat)
Add GDML matrix;.
static void SetExportPrecision(UInt_t prec)
void AddBorderSurface(TGeoBorderSurface *surf)
Add border surface;.
void SetClippingShape(TGeoShape *clip)
Set a user-defined shape as clipping for ray tracing.
TGeoVolume * fCurrentVolume
current navigator
void ClearOverlaps()
Clear the list of overlaps.
TGeoVolume * MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a cone segment shape with given medium.
THashList * fHashGVolumes
hash list of volumes providing fast search
static std::mutex fgMutex
Bool_t IsInPhiRange() const
True if current node is in phi range.
virtual Bool_t cd(const char *path="")
Browse the tree of nodes starting from fTopNode according to pathname.
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=nullptr)
Returns the deepest node containing fPoint, which must be set a priori.
TGeoMaterial * Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen=0, Double_t intlen=0)
Create material with given A, Z and density, having an unique id.
void LocalToMaster(const Double_t *local, Double_t *master) const
static Bool_t fgLockNavigators
Number of registered threads.
void SaveAttributes(const char *filename="tgeoatt.C")
Save current attributes in a macro.
void RestoreMasterVolume()
Restore the master volume of the geometry.
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=nullptr)
Make an TGeoArb8 volume.
virtual Int_t Export(const char *filename, const char *name="", Option_t *option="vg")
Export this geometry to a file.
TGeoNode * FindNextDaughterBoundary(Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix=kFALSE)
Computes as fStep the distance to next daughter of the current volume.
Int_t GetUID(const char *volname) const
Retrieve unique id for a volume name. Return -1 if name not found.
TGeoShape * fClippingShape
TGeoNavigator * GetCurrentNavigator() const
Returns current navigator for the calling thread.
TObjArray * fMatrices
current painter
static Int_t GetNumThreads()
Returns number of threads that were set to use geometry.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
void ClearNavigators()
Clear all navigators.
Int_t AddTransformation(const TGeoMatrix *matrix)
Add a matrix to the list. Returns index of the matrix in list.
TObjArray * fOpticalSurfaces
TVirtualGeoTrack * GetParentTrackOfId(Int_t id) const
Get parent track with a given ID.
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
static Int_t GetMaxLevels()
Return maximum number of levels used in the geometry.
Double_t fTmin
highest range for phi cut
static Bool_t IsLocked()
Check lock state.
TGeoVolume * fTopVolume
current volume
TGeoVolume * fUserPaintVolume
volume currently painted
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
void GetBranchOnlys(Int_t *isonly) const
Fill node copy numbers of current branch into an array.
TGeoNode * GetCurrentNode() const
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
Add a track to the list of tracks.
void SetVisOption(Int_t option=0)
set drawing mode :
void SetPdgName(Int_t pdg, const char *name)
Set a name for a particle having a given pdg.
TObjArray * fBorderSurfaces
Int_t GetNAlignable(Bool_t with_uid=kFALSE) const
Retrieves number of PN entries with or without UID.
void RefreshPhysicalNodes(Bool_t lock=kTRUE)
Refresh physical nodes to reflect the actual geometry paths after alignment was applied.
static Bool_t fgLock
mutex for navigator booking in MT mode
TGeoVolume * MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi)
Make in one step a volume pointing to a parallelepiped shape with given medium.
void TopToMaster(const Double_t *top, Double_t *master) const
Convert coordinates from top volume frame to master.
void AddOpticalSurface(TGeoOpticalSurface *optsurf)
Add optical surface;.
static void SetDefaultUnits(EDefaultUnits new_value)
Bool_t fLoopVolumes
flag that geometry is closed
Int_t AddMaterial(const TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
void ClearAttributes()
Reset all attributes to default ones.
static Int_t fgMaxDaughters
Maximum level in geometry.
Bool_t fUsePWNav
Raytrace mode: 0=normal, 1=pass through, 2=transparent.
void SetRTmode(Int_t mode)
Change raytracing mode.
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the current navigator.