391 if (!
gROOT->GetListOfGeometries()->FindObject(
this))
gROOT->GetListOfGeometries()->Add(
this);
392 if (!
gROOT->GetListOfBrowsables()->FindObject(
this))
gROOT->GetListOfBrowsables()->Add(
this);
407 if (
fgLock)
Fatal(
"Init",
"New geometry created while the old one locked !!!");
557 for(
Int_t i=0; i<1024; i++)
586 for(
Int_t i=0; i<1024; i++)
652 if (gGeoManager !=
this) gGeoManager =
this;
655 if (
gROOT->GetListOfFiles()) {
656 gROOT->GetListOfGeometries()->Remove(
this);
657 gROOT->GetListOfBrowsables()->Remove(
this);
780 Error(
"AddVolume",
"invalid volume");
826 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
831 fNavigators.insert(NavigatorsMap_t::value_type(threadId, array));
849 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
863 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
875 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
877 Error(
"SetCurrentNavigator",
"No navigator defined for this thread\n");
878 std::cout <<
" thread id: " << threadId << std::endl;
884 Error(
"SetCurrentNavigator",
"Navigator %d not existing for this thread\n", index);
885 std::cout <<
" thread id: " << threadId << std::endl;
907 for (NavigatorsMap_t::iterator it =
fNavigators.begin();
933 Error(
"Remove navigator",
"Navigator %p not found", nav);
943 Error(
"SetMaxThreads",
"Cannot set maximum number of threads before closing the geometry");
949 NavigatorsMap_t::const_iterator it =
fNavigators.find(threadId);
953 fNavigators.insert(NavigatorsMap_t::value_type(threadId, array));
1011 TTHREAD_TLS(
Int_t) tid = -1;
1013 if (ttid > -1)
return ttid;
1017 if (it !=
fgThreadId->end())
return it->second;
1043 "TGeoManager",
this,
"SetVisibility(TObject*,Bool_t)");
1122 if (!vorig || !vnew)
return nref;
1125 if (morig) checkmed =
kTRUE;
1129 Error(
"ReplaceVolume",
"Replacement volume %s has no medium and it is not an assembly",
1133 if (mnew && checkmed) {
1135 Warning(
"ReplaceVolume",
"Replacement volume %s has different medium than original volume %s",
1148 for (i=0; i<nvol; i++) {
1151 if (vol==vorig || vol==vnew)
continue;
1153 for (j=0; j<nd; j++) {
1158 if (mnew && mnew->
GetId()!=morig->
GetId()) ierr++;
1163 Info(
"ReplaceVolume",
"%s replaced with assembly and declared NON-OVERLAPPING!",node->
GetName());
1174 Info(
"ReplaceVolume",
"%s inside substitute assembly %s declared NON-OVERLAPPING!",node->
GetName(),vnew->
GetName());
1180 if (ierr)
Warning(
"ReplaceVolume",
"Volumes should not be replaced with assemblies if they are positioned in containers having a different medium ID.\n %i occurrences for assembly replacing volume %s",
1192 Warning(
"TransformVolumeToAssembly",
"Volume %s not found", vname);
1200 while (index<indmax) {
1209 Warning(
"TransformVolumeToAssembly",
"Volume %s already assembly", toTransform->
GetName());
1211 Warning(
"TransformVolumeToAssembly",
"Volume %s has no daughters, cannot transform", toTransform->
GetName());
1213 Warning(
"TransformVolumeToAssembly",
"Volume %s divided, cannot transform", toTransform->
GetName());
1217 if (index >= indmax)
return count;
1219 if (!strcmp(toTransform->
GetName(),vname)) replace =
kTRUE;
1319 return TGeoBuilder::Instance(
this)->
Medium(
name, numed, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
1467 Warning(
"CloseGeometry",
"geometry already closed");
1471 Error(
"CloseGeometry",
"you MUST call SetTopVolume() first !");
1474 if (!
gROOT->GetListOfGeometries()->FindObject(
this))
gROOT->GetListOfGeometries()->Add(
this);
1475 if (!
gROOT->GetListOfBrowsables()->FindObject(
this))
gROOT->GetListOfBrowsables()->Add(
this);
1486 Int_t nnavigators = 0;
1494 Error(
"CloseGeometry",
"Master volume not streamed");
1505 for (
Int_t i=0; i<nnavigators; i++) {
1526 if (
fgVerboseLevel>0)
Info(
"CloseGeometry",
"----------------modeler ready----------------");
1544 for (
Int_t i=0; i<nnavigators; i++) {
1552 Info(
"CloseGeometry",
"----------------modeler ready----------------");
1683 while ((node=next())) {
1710 Error(
"CountLevels",
"Top node not defined.");
1716 if (
fgVerboseLevel>1 && fixrefs)
Info(
"CountLevels",
"Fixing volume reference counts");
1720 Int_t maxvertices = 1;
1721 while ((node=next())) {
1724 for (
Int_t ibit=10; ibit<14; ibit++) {
1782 if (tmin<0 || tmin>=tmax || nframes<1)
return;
1784 box[0] = box[1] = box[2] = 0;
1785 box[3] = box[4] = box[5] = 100;
1803 for (i=0; i<3; i++) {
1804 start[i+3] = 20 + 1.3*start[i+3];
1805 end[i+3] = 20 + 0.9*end[i+3];
1807 for (i=0; i<6; i++) {
1808 dd[i] = (end[i]-start[i])/10.;
1810 memcpy(box, start, 6*
sizeof(
Double_t));
1812 dlong = (-206-dlong)/
Double_t(nframes);
1813 dlat = (126-dlat)/
Double_t(nframes);
1814 dpsi = (75-dpsi)/
Double_t(nframes);
1818 for (i=0; i<nframes; i++) {
1822 for (j=0; j<6; j++) box[j]+=dd[j];
1848 if (track) track->
Draw(option);
1901 static char defaultname[5] = {
"XXX" };
1902 if (!
fPdgNames || !pdg)
return defaultname;
1921 Warning(
"SetPdgName",
"No more than 256 different pdg codes allowed");
1954 bombx = bomby = bombz = bombr = 1.3;
2036 if (trk)
return trk;
2042 if (trk)
return trk;
2055 if (track->
GetId() ==
id)
return track;
2068 if (track->
GetId()==
id)
return track;
2081 if (track->
GetId() ==
id)
return i;
2108 const Int_t nmax = 110;
2115 col[ 4] = col[ 5] =
kGreen-10;
2116 col[ 6] = col[ 7] =
kBlue-7;
2118 col[10] = col[11] =
kRed-10;
2124 col[24] = col[25] = col[26] =
kBlue-8;
2162 if (strcmp(volume->
GetName(),
name) && !all)
continue;
2172 if (strcmp(volume->
GetName(),
name) && !all)
continue;
2181 Warning(
"SetVolumeAttribute",
"volume: %s does not exist",
name);
2212 Info(
"SetMaxVisNodes",
"Automatic visible depth for %d visible nodes", maxnodes);
2282 Info(
"SetVisLevel",
"Automatic visible depth disabled");
2303 Error(
"OptimizeVoxels",
"Geometry must be closed first");
2308 if (fname.
IsNull()) fname =
"tgeovox.C";
2309 out.open(fname, std::ios::out);
2311 Error(
"OptimizeVoxels",
"cannot open file");
2318 out << sname.
Data()<<
"()"<<std::endl;
2319 out <<
"{" << std::endl;
2320 out <<
"//=== Macro generated by ROOT version "<<
gROOT->GetVersion()<<
" : "<<t.
AsString()<<std::endl;
2321 out <<
"//=== Voxel optimization for " <<
GetTitle() <<
" geometry"<<std::endl;
2322 out <<
"//===== <run this macro JUST BEFORE closing the geometry>"<<std::endl;
2323 out <<
" TGeoVolume *vol = 0;"<<std::endl;
2324 out <<
" // parse all voxelized volumes"<<std::endl;
2330 out<<
" vol = gGeoManager->GetVolume(\""<<vol->
GetName()<<
"\");"<<std::endl;
2333 out<<
" vol->SetCylVoxels();"<<std::endl;
2335 out<<
" vol->SetCylVoxels(kFALSE);"<<std::endl;
2338 out <<
"}" << std::endl;
2362 for (i=0; i< len; i++) {
2363 if (startstr(i)==
' ')
continue;
2364 e0 += startstr(i, 1);
2382 for (i=0; i<len; i++) {
2384 if (!level) iloop++;
2390 if (level==0) lastpp=i;
2393 if ((e0(i)==
'+') || (e0(i)==
'-') || (e0(i)==
'*')) {
2401 if ((e0(i)==
':') && (level==0)) {
2407 if (gGeoManager) gGeoManager->
Error(
"Parse",
"parentheses does not match");
2410 if (iloop==1 && (e0(0)==
'(') && (e0(len-1)==
')')) {
2415 if (foundmat)
break;
2416 if (((lastop==0) && (lastdp>0)) || ((lastpp>0) && (lastdp>lastpp) && (indop<lastpp))) {
2417 expr3 = e0(lastdp+1, len-lastdp);
2426 for (i=0; i<len; i++) {
2436 if (level<=levmin) {
2458 expr1 = e0(0, indop);
2459 expr2 = e0(indop+1, len-indop);
2470 Error(
"SaveAttributes",
"geometry must be closed first\n");
2475 if (fname.
IsNull()) fname =
"tgeoatt.C";
2476 out.open(fname, std::ios::out);
2478 Error(
"SaveAttributes",
"cannot open file");
2485 out << sname.
Data()<<
"()"<<std::endl;
2486 out <<
"{" << std::endl;
2487 out <<
"//=== Macro generated by ROOT version "<<
gROOT->GetVersion()<<
" : "<<t.
AsString()<<std::endl;
2488 out <<
"//=== Attributes for " <<
GetTitle() <<
" geometry"<<std::endl;
2489 out <<
"//===== <run this macro AFTER loading the geometry in memory>"<<std::endl;
2491 out <<
" TGeoVolume *top = gGeoManager->GetVolume(\""<<
fTopVolume->
GetName()<<
"\");"<<std::endl;
2492 out <<
" TGeoVolume *vol = 0;"<<std::endl;
2493 out <<
" TGeoNode *node = 0;"<<std::endl;
2494 out <<
" // clear all volume attributes and get painter"<<std::endl;
2495 out <<
" gGeoManager->ClearAttributes();"<<std::endl;
2496 out <<
" gGeoManager->GetGeomPainter();"<<std::endl;
2497 out <<
" // set visualization modes and bomb factors"<<std::endl;
2498 out <<
" gGeoManager->SetVisOption("<<
GetVisOption()<<
");"<<std::endl;
2499 out <<
" gGeoManager->SetVisLevel("<<
GetVisLevel()<<
");"<<std::endl;
2500 out <<
" gGeoManager->SetExplodedView("<<
GetBombMode()<<
");"<<std::endl;
2501 Double_t bombx, bomby, bombz, bombr;
2503 out <<
" gGeoManager->SetBombFactors("<<bombx<<
","<<bomby<<
","<<bombz<<
","<<bombr<<
");"<<std::endl;
2504 out <<
" // iterate volumes container and set new attributes"<<std::endl;
2513 out <<
" // draw top volume with new settings"<<std::endl;
2514 out <<
" top->Draw();"<<std::endl;
2515 out <<
" gPad->x3d();"<<std::endl;
2516 out <<
"}" << std::endl;
2650 if (phi<0) phi+=360.;
2707 if (
fgVerboseLevel>0)
Info(
"GetByteCount",
"Total size of logical tree : %i bytes", count);
2718 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualGeoPainter"))) {
2723 Error(
"GetGeomPainter",
"could not create painter");
2737 sname = sname.
Strip();
2757 sname = sname.
Strip();
2772 if (!vol)
return -1;
2782 if (index <= 0)
return 0;
2784 for (
Int_t i=0; i<index; i++) {
2786 if (other == mat)
continue;
2787 if (other->
IsEq(mat))
return other;
2798 sname = sname.
Strip();
2809 sname = sname.
Strip();
2822 if (med->
GetId()==numed)
return med;
2846 sname = sname.
Strip();
3031 return TGeoBuilder::Instance(
this)->
MakeCtub(name, medium, rmin, rmax, dz, phi1, phi2, lx, ly, lz, tx, ty, tz);
3100 return TGeoBuilder::Instance(
this)->
MakeTrap(
name, medium, dz, theta, phi,
h1, bl1, tl1, alpha1, h2, bl2, tl2, alpha2);
3111 return TGeoBuilder::Instance(
this)->
MakeGtra(
name, medium, dz, theta, phi, twist,
h1, bl1, tl1, alpha1, h2, bl2, tl2, alpha2);
3135 Error(
"SetAlignableEntry",
"An alignable object with name %s already existing. NOT ADDED !", unique_name);
3144 if (!added)
Error(
"SetAlignableEntry",
"A PN entry: has already uid=%i", uid);
3174 if (index<0 ||
fKeyPNEId[index]!=uid)
return NULL;
3221 keys[index+1] = uid;
3222 values[index+1] = ientry;
3235 for (i=
fNPNEId-1; i>index; i--) {
3252 Error(
"MakeAlignablePN",
"No alignable object named %s found !", name);
3264 Error(
"MakeAlignablePN",
"No alignable object specified !");
3267 const char *path = entry->
GetTitle();
3269 Error(
"MakeAlignablePN",
"Alignable object %s poins to invalid path: %s",
3287 Error(
"MakePhysicalNode",
"path: %s not valid", path);
3351 if ((phimin==0) && (phimax==360)) {
3448 fTopNode->SetNumber(1);
3449 fTopNode->SetTitle(
"Top logical node");
3455 Int_t nnavigators = 0;
3459 for (
Int_t i=0; i<nnavigators; i++) {
3577 Error(
"CheckGeometryFull",
"The option string must contain a letter. See method documentation.");
3602 has_runtime =
kTRUE;
3615 Warning(
"CheckGeometry",
"Volume \"%s\" has no medium: assigned dummy medium and material", vol->
GetName());
3627 Error(
"CheckOverlaps",
"Top node not set");
3664 Info(
"Weight",
"Estimating weight of %s with %g %% precision",
fTopVolume->
GetName(), 100.*precision);
3665 printf(
" event weight err\n");
3666 printf(
"========================================\n");
3685 void TGeoManager::Streamer(
TBuffer &R__b)
3739 cmd =
TString::Format(
"TGDMLWrite::StartGDMLWriting(gGeoManager,\"%s\",\"%s\")", filename, option);
3740 gROOT->ProcessLineFast(cmd);
3747 Error(
"Export",
"Cannot open file");
3831 ::Warning(
"TGeoManager::Import",
"TGeoMananager in lock mode. NOT IMPORTING new geometry");
3834 if (!filename)
return 0;
3840 if (strstr(filename,
".gdml")) {
3842 new TGeoManager(
"GDMLImport",
"Geometry imported from GDML");
3847 ::Error(
"TGeoManager::Import",
"Cannot open file");
3860 if (strstr(filename,
"http")) f =
TFile::Open(filename,
"CACHEREAD");
3863 ::Error(
"TGeoManager::Import",
"Cannot open file");
3871 while ((key = (
TKey*)next())) {
3872 if (strcmp(key->GetClassName(),
"TGeoManager") != 0)
continue;
3879 if (!gGeoManager)
return 0;
3880 if (!
gROOT->GetListOfGeometries()->FindObject(gGeoManager))
gROOT->GetListOfGeometries()->Add(gGeoManager);
3881 if (!
gROOT->GetListOfBrowsables()->FindObject(gGeoManager))
gROOT->GetListOfBrowsables()->Add(gGeoManager);
3901 for (i=0; i<nelem; i++) {
3903 if (!elem)
continue;
3905 if (!elem_table)
continue;
3906 if (elem != elem_table) {
3915 if (!elem)
continue;
3917 if (!elem_table)
continue;
3918 if (elem != elem_table) {
3937 while ((obj = next())) {
4005 Error(
"SetUseParallelWorldNav",
"No parallel world geometry defined. Use CreateParallelWorld.");
4013 Error(
"SetUseParallelWorldNav",
"The geometry must be closed first");
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
void SetPhysicalNode(TGeoPhysicalNode *node)
Setter for the corresponding physical node.
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="")
Classify a given point. See TGeoChecker::CheckPoint().
void ClearThreadData() const
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Int_t GetVisLevel() const =0
void GetBranchNames(Int_t *names) const
Fill volume names of current branch into an array.
Int_t AddShape(TGeoShape *shape)
Add a shape to the list. Returns index of the shape in list.
TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil=1E-5, const char *g3path="")
shoot npoints randomly in a box of 1E-5 around current point.
A node containing local transformation.
void CheckGeometryFull(Int_t ntracks=1000000, Double_t vx=0., Double_t vy=0., Double_t vz=0., Option_t *option="ob")
Geometry checking.
TGeoNode * CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode)
Cross next boundary and locate within current node The current point must be on the boundary of fCurr...
void ModifiedPad() const
Send "Modified" signal to painter.
double dist(Rotation3D const &r1, Rotation3D const &r2)
void PrintOverlaps() const
Prints the current list of overlaps.
Bool_t GotoSafeLevel()
Go upwards the tree until a non-overlapping node.
virtual Int_t CountVisibleNodes()=0
TGeoPhysicalNode * MakePhysicalNode(const char *path=0)
Makes a physical node corresponding to a path.
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
Initialize current point and current direction vector (normalized) in MARS.
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.
virtual void GetViewAngles(Double_t &, Double_t &, Double_t &)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
void AddLast(TObject *obj)
Add object at the end of the list.
Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const
Get time cut for drawing tracks.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void CheckGeometry(Option_t *option="")
Perform last checks on the geometry.
Int_t GetCurrentNodeId() const
Get the unique ID of the current node.
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
Test for shape navigation methods.
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.
The manager class for any TGeo geometry.
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
Make an assembly of volumes.
virtual void CreateThreadData(Int_t nthreads)
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.
Bool_t fActivity
flag for GL reflections
virtual void EditGeometry(Option_t *option="")=0
void ClearAttributes()
Reset all attributes to default ones.
void Voxelize(Option_t *option)
build the voxels for this volume
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.
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 SetFinder(TGeoPatternFinder *finder)
virtual void ModifiedPad(Bool_t update=kFALSE) const =0
void SetAllIndex()
Assigns uid's for all materials,media and matrices.
Bool_t fMatrixTransform
flag that the list of physical nodes has to be drawn
virtual void Sort(Int_t upto=kMaxInt)
If objects in array are sortable (i.e.
virtual Double_t * GetViewBox()=0
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
Initialize current point and current direction vector (normalized) in MARS.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
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.
virtual Double_t GetDensity() const
Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const
Check if a new point with given coordinates is the same as the last located one.
void BombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'bombed' translation vector according current exploded view mode.
Bool_t IsOverlapping() const
virtual TVirtualGeoTrack * AddTrack(Int_t id, Int_t pdgcode, TObject *particle)=0
Geometrical transformation package.
Double_t Safety(Bool_t inside=kFALSE)
Compute safe distance from the current point.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew)
Replaces all occurrences of VORIG with VNEW in the geometry tree.
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 * 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.
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=0)
Returns the deepest node containing fPoint, which must be set a priori.
static TGeoMedium * DummyMedium()
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
void Test(Int_t npoints=1000000, Option_t *option="")
Check time of finding "Where am I" for n points.
void CdUp()
Go one level up in geometry.
TString & ReplaceAll(const TString &s1, const TString &s2)
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check all geometry for illegal overlaps within a limit OVLP.
void SetRTmode(Int_t mode)
Change raytracing mode.
R__EXTERN TStyle * gStyle
std::map< std::thread::id, Int_t > ThreadsMap_t
virtual void Test(Int_t npoints, Option_t *option)=0
TGeoMaterial * GetMaterial() const
TVirtualGeoTrack * GetTrack(Int_t index)
void Init()
Initialize manager class.
Int_t GetTrackIndex(Int_t id) const
Get index for track id, -1 if not found.
static Int_t fgMaxDaughters
Maximum level in geometry.
void GetBranchOnlys(Int_t *isonly) const
Fill node copy numbers of current branch into an array.
An identity transformation.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
Int_t GetSafeLevel() const
Go upwards the tree until a non-overlapping node.
virtual void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)=0
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual Double_t Weight(Double_t precision, Option_t *option="v")=0
void SetVisBranch()
Set branch type visibility.
Buffer base class used for serializing objects.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Bool_t fMatrixReflection
flag for using GL matrix
virtual TGeoElement * GetElement(Int_t i=0) const
Retrieve the pointer to the element corresponding to component I.
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
TVirtualGeoTrack * fCurrentTrack
void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Int_t fNNodes
upper time limit for tracks drawing
static Int_t GetVerboseLevel()
Set verbosity level (static function).
static void SetVerboseLevel(Int_t vl)
Return current verbosity level (static function).
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.
virtual TObject * Remove(TObject *obj)
Remove object from array.
Int_t AddRegion(TGeoRegion *region)
Add a new region of volumes.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
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.
virtual void PrintOverlaps() const =0
Int_t LoadPlugin()
Load the plugin library for this handler.
void ResetUserData()
Sets all pointers TGeoVolume::fField to NULL.
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
void ViewLeaves(Bool_t flag=kTRUE)
Set visualization option (leaves only OR all volumes)
void InspectState() const
Inspects path and all flags for the current state.
Matrix class used for computing global transformations Should NOT be used for node definition...
Base class describing materials.
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill node copy numbers of current branch into an array.
static void ClearThreadsMap()
Clear the current map of threads.
void GetBranchNames(Int_t *names) const
Fill volume names of current branch into an array.
void ToLower()
Change string to lower-case.
TObjArray * fUniqueVolumes
TGeoNodeCache * GetCache() const
TGeoNode * fTopNode
top level volume in geometry
Bool_t fIsNodeSelectable
switch ON/OFF volume activity (default OFF - all volumes active))
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
void OptimizeVoxels(const char *filename="tgeovox.C")
Optimize voxelization type for all volumes. Save best choice in a macro.
static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3)
Parse a string boolean expression and do a syntax check.
TVirtualGeoTrack * MakeTrack(Int_t id, Int_t pdgcode, TObject *particle)
Makes a primary track but do not attach it to the list of tracks.
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.
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 * 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.
virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py)=0
TGeoShape * fClippingShape
virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Option_t *option="")=0
TObject * At(Int_t idx) const
TObject * FindObject(const char *name) const
Find object using its name.
void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3)
Set factors that will "bomb" all translations in cartesian and cylindrical coordinates.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void AnimateTracks(Double_t tmin=0, Double_t tmax=5E-8, Int_t nframes=200, Option_t *option="/*")
Draw animation of tracks.
void Refresh()
Refresh this physical node.
virtual void DefaultAngles()=0
TGeoVoxelFinder * GetVoxels() const
Getter for optimization structure.
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
Bool_t InitArrayPNE() const
Initialize PNE array for fast access via index and unique-id.
static void SetNavigatorsLock(Bool_t flag)
Set the lock for navigators.
Int_t GetRefCount() const
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.
const char * GetPdgName(Int_t pdg) const
Get name for given pdg code;.
Int_t GetSafeLevel() const
Go upwards the tree until a non-overlapping node.
TGeoVolume * GetMotherVolume() const
void GetBranchOnlys(Int_t *isonly) const
Fill node copy numbers of current branch into an array.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Int_t GetByteCount() const
get the total size in bytes for this volume
void SetVisibility(TObject *obj, Bool_t vis)
Set visibility for a volume.
Bool_t IsSameLocation(Double_t x, Double_t y, Double_t z, Bool_t change=kFALSE)
Checks if point (x,y,z) is still in the current node.
TGeoHMatrix * GetHMatrix()
Return stored current matrix (global matrix of the next touched node).
void SetVisDensity(Double_t dens=0.01)
Set density threshold.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
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.
static Int_t GetNumThreads()
Returns number of threads that were set to use geometry.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Int_t CountNodes(Int_t nlevels=1000, Int_t option=0)
Count total number of subnodes starting from this volume, nlevels down.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void SetClippingShape(TGeoShape *shape)=0
void InspectState() const
Inspects path and all flags for the current state.
Bool_t fIsGeomCleaning
flag set when reading geometry
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
TObjArray * fMatrices
current painter
void ResetState()
Reset current state flags.
Int_t GetNdaughters() const
TGeoMaterial * GetMaterial(const char *matname) const
Search for a named material. All trailing blanks stripped.
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
TGeoParallelWorld * fParallelWorld
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.
virtual Int_t Export(const char *filename, const char *name="", Option_t *option="vg")
Export this geometry to a file.
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.
Sequenceable collection abstract base class.
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.
void UpdateElements()
Update element flags when geometry is loaded from a file.
TGeoPNEntry * SetAlignableEntry(const char *unique_name, const char *path, Int_t uid=-1)
Creates an alignable object with unique name corresponding to a path and adds it to the list of align...
static Bool_t fgLock
mutex for navigator booking in MT mode
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void SetVolumeAttribute(const char *name, const char *att, Int_t val)
Set volume attributes in G3 style.
void RandomRays(Int_t nrays=1000, Double_t startx=0, Double_t starty=0, Double_t startz=0, const char *target_vol=0, Bool_t check_norm=kFALSE)
Randomly shoot nrays and plot intersections with surfaces for current top node.
virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)=0
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
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.
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=0)
Add a track to the list of tracks.
The TNamed class is the base class for all named ROOT classes.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void SetNsegments(Int_t nseg=20)=0
void CdDown(Int_t index)
Make a daughter of current node current.
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
void CleanGarbage()
Clean temporary volumes and shapes from garbage collection.
THashList * fHashGVolumes
hash list of volumes providing fast search
void ClearShape(const TGeoShape *shape)
Remove a shape from the list of shapes.
Double_t fTmax
lower time limit for tracks drawing
static Bool_t IsLocked()
Check lock state.
THashList * fHashPNE
hash list of group volumes providing fast search
void Browse(TBrowser *b)
Describe how to browse this object.
void SortOverlaps()
Sort overlaps by decreasing overlap distance. Extrusions comes first.
const char * GetPath() const
Get path to the current node in the form /node0/node1/...
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=0)
Make an TGeoArb8 volume.
virtual void SetExplodedView(Int_t iopt=0)=0
virtual void BombTranslation(const Double_t *tr, Double_t *bombtr)=0
Base class for chemical elements.
void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const
Retrieve cartesian and radial bomb factors.
TGeoVolume * MakeReflectedVolume(const char *newname="") const
Make a copy of this volume which is reflected with respect to XY plane.
TGeoNavigator * fCurrentNavigator
Lock existing navigators.
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
TGeoVolume * GetCurrentVolume() const
TGeoNavigator * GetCurrentNavigator() const
TGeoMedium * GetMedium() const
static Int_t GetMaxDaughters()
Return maximum number of daughters of a volume used in the geometry.
void TopToMaster(const Double_t *top, Double_t *master) const
Convert coordinates from top volume frame to master.
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...
Int_t AddVolume(TGeoVolume *volume)
Add a volume to the list. Returns index of the volume in list.
virtual Bool_t IsVisible() const
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the navigator.
TGeoVolume * fTopVolume
current volume
Int_t GetVirtualLevel()
Find level of virtuality of current overlapping node (number of levels up having the same tracking me...
void LocalToMaster(const Double_t *local, Double_t *master) const
TVirtualGeoTrack * GetParentTrackOfId(Int_t id) const
Get parent track with a given ID.
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.
virtual TGeoMatrix * GetMatrix() const =0
static Int_t fgNumThreads
Thread id's map.
Bool_t InsertPNEId(Int_t uid, Int_t ientry)
Insert a PN entry in the sorted array of indexes.
ThreadsMap_t::const_iterator ThreadsMapIt_t
virtual TVirtualGeoTrack * FindTrackWithId(Int_t id) const
Recursively search through this track for a daughter particle (at any depth) with the specified id...
virtual void CheckBoundaryReference(Int_t icheck=-1)=0
Int_t GetVisOption() const
Returns current depth to which geometry is drawn.
Base class for user-defined tracks attached to a geometry.
Double_t ATan2(Double_t, Double_t)
void SetClippingShape(TGeoShape *clip)
Set a user-defined shape as clipping for ray tracing.
TGeoMaterial * FindDuplicateMaterial(const TGeoMaterial *mat) const
Find if a given material duplicates an existing one.
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=0)
Make an TGeoArb8 volume.
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3)=0
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.
void RestoreMasterVolume()
Restore the master volume of the geometry.
Bool_t fPhiCut
flag to notify that the manager is being destructed
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
NavigatorsMap_t fNavigators
TGeoNavigatorArray * GetListOfNavigators() const
Get list of navigators for the calling thread.
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.
virtual void DrawCurrentPoint(Int_t color)=0
void ResetState()
Reset current state flags.
Int_t GetNAlignable(Bool_t with_uid=kFALSE) const
Retrieves number of PN entries with or without UID.
Int_t TransformVolumeToAssembly(const char *vname)
Transform all volumes named VNAME to assemblies. The volumes must be virtual.
TGeoNode * GetCurrentNode() const
Bool_t IsAnimatingTracks() const
static Int_t fgVerboseLevel
Lock preventing a second geometry to be loaded.
The knowledge of the path to the objects that need to be misaligned is essential since there is no ot...
static TGeoVolumeAssembly * MakeAssemblyFromVolume(TGeoVolume *vol)
Make a clone of volume VOL but which is an assembly.
R__ALWAYS_INLINE Bool_t IsZombie() const
void RefreshPhysicalNodes(Bool_t lock=kTRUE)
Refresh physical nodes to reflect the actual geometry paths after alignment was applied.
virtual void ClearThreadData() const
virtual Double_t GetZ() const
void SortNodes()
sort nodes by decreasing volume of the bounding box.
Bool_t fLoopVolumes
flag that geometry is closed
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
TGeoPhysicalNode * MakeAlignablePN(const char *name)
Make a physical node from the path pointed by an alignable object with a given name.
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=0)
Returns the deepest node containing fPoint, which must be set a priori.
void CdTop()
Make top level node the current node.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
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.
Class handling Boolean composition of shapes.
virtual TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path)=0
virtual void SetTopVisible(Bool_t vis=kTRUE)=0
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill node copy numbers of current branch into an array.
void SelectTrackingMedia()
Define different tracking media.
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
Compute distance to next boundary within STEPMAX.
Int_t GetUID(const char *volname) const
Retrieve unique id for a volume name. Return -1 if name not found.
Int_t AddOverlap(const TNamed *ovlp)
Add an illegal overlap/extrusion to the list.
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
Make an assembly of volumes.
Double_t fTmin
highest range for phi cut
void RemoveNavigator(const TGeoNavigator *nav)
Clear a single navigator.
TObjArray * fPhysicalNodes
Using a TBrowser one can browse all ROOT objects.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
TGeoPNEntry * GetAlignableEntryByUID(Int_t uid) const
Retrieves an existing alignable object having a preset UID.
Int_t CountNodes(const TGeoVolume *vol=0, Int_t nlevels=10000, Int_t option=0)
Count the total number of nodes starting from a volume, nlevels down.
Int_t * fNodeIdArray
table of elements
Int_t fNLevel
array of node id's
void SetNeedRebuild(Bool_t flag=kTRUE)
void Clear(Option_t *option="")
Remove all objects from the list.
Int_t GetNsegments() const
Get number of segments approximating circles.
virtual void AfterStreamer()
Bool_t cd(const char *path="")
Browse the tree of nodes starting from top node according to pathname.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Double_t Safety(Bool_t inside=kFALSE)
Compute safe distance from the current point.
void LocalToMaster(const Double_t *local, Double_t *master) const
Base abstract class for all shapes.
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check overlaps bigger than OVLP hierarchically, starting with this node.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
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>'.
Int_t AddMaterial(TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
void SetMotherVolume(TGeoVolume *mother)
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.
static void LockGeometry()
Lock current geometry so that no other geometry can be imported.
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.
Class describing rotation + translation.
TGeoNode * Step(Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
Make a rectilinear step of length fStep from current point (fPoint) on current direction (fDirection)...
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
void SaveAttributes(std::ostream &out)
save attributes for this node
void SetField(TObject *field)
Int_t GetVirtualLevel()
Find level of virtuality of current overlapping node (number of levels up having the same tracking me...
virtual void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=NULL)=0
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 ...
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
Compute distance to next boundary within STEPMAX.
void DefaultColors()
Set default volume colors according to A of material.
TVirtualGeoTrack * GetMother() const
TGeoNavigator * AddNavigator()
Add a navigator in the list of navigators.
Long_t ExecPlugin(int nargs, const T &... params)
Bool_t IsInPhiRange() const
True if current node is in phi range.
TGeoManager()
Default constructor.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
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.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual Bool_t IsComposite() const
Double_t * FindNormal(Bool_t forward=kTRUE)
Computes normal vector to the next surface that will be or was already crossed when propagating on a ...
virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const =0
static Int_t fgMaxLevel
Verbosity level for Info messages (no IO).
void SetTransparency(Char_t transparency=0)
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
virtual Int_t GetNelements() const
TVirtualGeoTrack * GetTrackOfId(Int_t id) const
Get track with a given ID.
Double_t fPhimax
lowest range for phi cut
Regions are groups of volumes having a common set of user tracking cuts.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
void SetPdgName(Int_t pdg, const char *name)
Set a name for a particle having a given pdg.
void SetMatrix(const TGeoMatrix *matrix)
Matrix setter.
Bool_t IsMultiThread() const
void RefreshPhysicalNodes()
Refresh the node pointers and re-voxelize.
Int_t GetEntriesFast() const
void UnmarkSaved()
Reset SavePrimitive bits.
virtual void EstimateCameraMove(Double_t, Double_t, Double_t *, Double_t *)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void DrawCurrentPoint(Int_t color=2)
Draw current point in the same view.
void CdDown(Int_t index)
Make a daughter of current node current.
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
virtual void SetCheckedNode(TGeoNode *node)=0
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the current navigator.
TObjArray * fTracks
list of runtime volumes
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.
Double_t fVisDensity
particles to be drawn
virtual Int_t GetByteCount(Option_t *option=0)
Get total size of geometry in bytes.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
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.
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
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.
virtual Int_t GetByteCount() const
Get total size in bytes of this.
void DrawTracks(Option_t *option="")
Draw tracks over the geometry, according to option.
void SetCheckedNode(TGeoNode *node)
Assign a given node to be checked for overlaps. Any other overlaps will be ignored.
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.
Bool_t fStreamVoxels
flag volume lists loop
TVirtualGeoTrack * FindTrackWithId(Int_t id) const
Search the track hierarchy to find the track with the given id.
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)
void SetUseParallelWorldNav(Bool_t flag)
Activate/deactivate usage of parallel world navigation.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
void DrawPath(const char *path, Option_t *option="")
Draw current path.
virtual ~TGeoManager()
Destructor.
void RandomPoints(const TGeoVolume *vol, Int_t npoints=10000, Option_t *option="")
Draw random points in the bounding box of a volume.
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.
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Returns deepest node containing current point.
TObjArray * fGVolumes
list of runtime shapes
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.
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
virtual TGeoElement * GetElement(Int_t i=0) const
Get a pointer to the element this material is made of.
void SetOverlapping(Bool_t flag=kTRUE)
TGeoVolume * fCurrentVolume
current navigator
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.
Int_t fRaytraceMode
Flag for multi-threading.
void DefaultAngles()
Set default angles for a given view.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Bool_t cd(const char *path="")
Browse the tree of nodes starting from fTopNode according to pathname.
void TestOverlaps(const char *path="")
Geometry overlap checker based on sampling.
Double_t Weight(Double_t precision=0.01, Option_t *option="va")
Estimate weight of volume VOL with a precision SIGMA(W)/W better than PRECISION.
static std::mutex fgMutex
Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const
Check if a new point with given coordinates is the same as the last located one.
An extrusion with fixed outline shape in x-y and a sequence of z extents (segments).
static Int_t GetMaxLevels()
Return maximum number of levels used in the geometry.
virtual void SetVisOption(Int_t option=0)=0
TObject * UncheckedAt(Int_t i) const
void SetUsed(Bool_t flag=kTRUE)
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
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.
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
void DoBackupState()
Backup the current state without affecting the cache stack.
virtual Bool_t IsMixture() const
void CdUp()
Go one level up in geometry.
void RemoveMaterial(Int_t index)
Remove material at given index.
TGeoNavigator * SetCurrentNavigator(Int_t inav)
Bool_t GotoSafeLevel()
Go upwards the tree until a non-overlapping node.
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
void RegisterMatrix(TGeoMatrix *matrix)
Register a matrix to the list of matrices.
TGeoNode * FindNextBoundary(Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
Find distance to next boundary and store it in fStep.
void SaveAs(const char *filename, Option_t *option="") const
Save geometry having this as top volume as a C++ macro.
TVirtualGeoPainter * fPainter
flag that nodes are the selected objects in pad rather than volumes
void Voxelize(Option_t *option=0)
Voxelize all non-divided volumes.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Bool_t TestShapeBit(UInt_t f) const
virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option)
computes the total size in bytes of the branch starting with node.
Int_t IndexOf(const TObject *obj) const
virtual void DrawPath(const char *path, Option_t *option="")=0
void CdTop()
Make top level node the current node.
void RegisterMatrix(const TGeoMatrix *matrix)
Register a matrix to the list of matrices.
Int_t AddTransformation(TGeoMatrix *matrix)
Add a matrix to the list. Returns index of the matrix in list.
static RooMathCoreReg dummy
void SetPhiRange(Double_t phimin=0., Double_t phimax=360.)
Set cut phi range.
Bool_t CloseGeometry()
The main geometry must be closed.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetNmeshPoints(Int_t npoints)=0
virtual Int_t GetByteCount() const
static Bool_t fgLockNavigators
Number of registered threads.
TObjArray * GetListOfPhysicalNodes()
const char * AsString() const
Return the date & time as a string (ctime() format).
TGeoManager * gGeoManager
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.
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
void SetDefined(Bool_t flag=kTRUE)
Bool_t fUsePWNav
Raytrace mode: 0=normal, 1=pass through, 2=transparent.
Bool_t SetCurrentNavigator(Int_t index)
Switch to another existing navigator for the calling thread.
void SetTminTmax(Double_t tmin=0, Double_t tmax=999)
Set time cut interval for drawing tracks.
Finder class handling voxels.
virtual void ComputeBBox()=0
Int_t AddShape(const TGeoShape *shape)
Add a shape to the list. Returns index of the shape in list.
Bool_t IsReflection() const
Media are used to store properties related to tracking and which are useful only when using geometry ...
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 ResetAll()
Reset the navigator.
static ThreadsMap_t * fgThreadId
Map between thread id's and navigator arrays.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void SetVolume(TGeoVolume *volume)
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.
static void CreateDummyMedium()
Create a dummy medium.
virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)=0
void ConvertReflections()
Convert all reflections in geometry to normal rotations + reflected shapes.
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.
TGeoHMatrix * GetHMatrix()
Return stored current matrix (global matrix of the next touched node).
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
TGeoNode * FindNextBoundary(Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
Find distance to next boundary and store it in fStep.
constexpr Double_t RadToDeg()
Class providing navigation API for TGeo geometries.
void CdNext()
Do a cd to the node found next by FindNextBoundary.
void MasterToTop(const Double_t *master, Double_t *top) const
Convert coordinates from master volume frame to top.
TGeoPNEntry * GetAlignableEntry(const char *name) const
Retrieves an existing alignable object.
Int_t GetMaterialIndex(const char *matname) const
Return index of named material.
void CountLevels()
Count maximum number of nodes per volume, maximum depth and maximum number of xtru vertices...
Int_t GetBombMode() const
Abstract class for geometry painters.
void ClearOverlaps()
Clear the list of overlaps.
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
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 ...
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
void SetMaxThreads(Int_t nthreads)
Set maximum number of threads for navigation.
void CheckShapes()
check for wrong parameters in shapes
void SetExplodedView(Int_t iopt=0)
Set type of exploding view (see TGeoPainter::SetExplodedView())
virtual void Edit(Option_t *option="")
Append a pad for this geometry.
virtual Bool_t IsRaytracing() const =0
R__EXTERN TGeoIdentity * gGeoIdentity
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
TGeoNavigator * GetCurrentNavigator() const
Returns current navigator for the calling thread.
TGeoElementTable * fElementTable
clipping shape for raytracing
Bool_t IsVisTouched() const
void SaveAttributes(const char *filename="tgeoatt.C")
Save current attributes in a macro.
TGeoManager & operator=(const TGeoManager &)
assignment operator
static Int_t ThreadId()
Translates the current thread id to an ordinal number.
Int_t fSizePNEId
array of physical node entries
static TGeoBuilder * Instance(TGeoManager *geom)
Return pointer to singleton.
virtual void Add(TObject *obj)
TGeoVolume * fUserPaintVolume
volume currently painted
TGeoVolume * FindVolumeFast(const char *name, Bool_t multi=kFALSE)
Fast search for a named volume. All trailing blanks stripped.
Bool_t IsSameLocation() const
void BuildIdArray()
Builds node id array.
virtual TList * GetListOfKeys() const
Double_t * FindNormal(Bool_t forward=kTRUE)
Computes normal vector to the next surface that will be or was already crossed when propagating on a ...
void CdNext()
Do a cd to the node found next by FindNextBoundary.
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.
void BuildDefaultMaterials()
Now just a shortcut for GetElementTable.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual Int_t GetByteCount() const
Int_t GetNdaughters() const
virtual void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol, Bool_t check_norm)=0
void SetAnimateTracks(Bool_t flag=kTRUE)
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>'.
Int_t AddMaterial(const TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Returns deepest node containing current point.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Double_t WeightA() const
Analytical computation of the weight.
Bool_t fMultiThread
Max number of threads.
TString fParticleName
path to current node
Int_t AddTransformation(const TGeoMatrix *matrix)
Add a matrix to the list. Returns index of the matrix in list.
virtual Bool_t IsVolumeMulti() const
void SetVisibility(Bool_t vis=kTRUE)
Set visibility of the node (obsolete).
static Int_t GetMaxXtruVert()
Return maximum number of vertices for an xtru shape used.
TGeoVolume * fPaintVolume
TGeoElement * GetElement(Int_t z)
virtual void UnbombTranslation(const Double_t *tr, Double_t *bombtr)=0
TGeoParallelWorld * CreateParallelWorld(const char *name)
Create a parallel world for prioritised navigation.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void SetMedium(TGeoMedium *medium)
void ClearNavigators()
Clear all navigators.
void FindOverlaps() const
loop all nodes marked as overlaps and find overlapping brothers
void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'unbombed' translation vector according current exploded view mode.
Int_t GetCurrentNodeId() const
TGeoShape * GetShape() const
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
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.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
void DoBackupState()
Backup the current state without affecting the cache stack.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
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...
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
TGeoVolume * fMasterVolume
top physical node
void SetNumber(Int_t number)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Base class for a flat parallel geometry.
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 TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
virtual void TestOverlaps(const char *path)=0
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="")=0
void SetVisOption(Int_t option=0)
set drawing mode :
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
Bool_t OptimizeVoxels()
Perform an extensive sampling to find which type of voxelization is most efficient.
TGeoVolume * GetVolume() const
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.
static void UnlockGeometry()
Unlock current geometry.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
void CreateThreadData() const
Create thread private data for all geometry objects.
const char * GetPath() const
Get path to the current node in the form /node0/node1/...
void BuildInfoBranch()
Builds info branch. Navigation is possible only after this step.
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.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute mouse actions on this manager.
void MasterToLocal(const Double_t *master, Double_t *local) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
virtual const char * GetTitle() const
Returns title of object.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual Bool_t IsEq(const TGeoMaterial *other) const
return true if the other material has the same physical properties
void ClearPhysicalNodes(Bool_t mustdelete=kFALSE)
Clear the current list of physical nodes, so that we can start over with a new list.
void SetNmeshPoints(Int_t npoints=1000)
Set the number of points to be generated on the shape outline when checking for overlaps.
virtual void RecursiveRemove(TObject *obj)
Recursively remove obj from browser.
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
Bool_t IsRunTimeShape() const
TGeoNode * Step(Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
Make a rectiliniar step of length fStep from current point (fPoint) on current direction (fDirection)...
static Int_t fgMaxXtruVert
Maximum number of daughters.
const char * Data() const
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
void CheckBoundaryReference(Int_t icheck=-1)
Check the boundary errors reference file created by CheckBoundaryErrors method.
TGeoNode * CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode)
Cross next boundary and locate within current node The current point must be on the boundary of fCurr...