33 fGeoCacheMaxLevels = 100;
34 fGeoCacheStackSize = 10;
35 fGeoInfoStackSize = 100;
52 for (
Int_t i=0; i<100; i++) fIdBranch[i] = 0;
126 Info(
"BuildIDArray",
"--- node ID tracking enabled, size=%lu Bytes\n",
ULong_t((2*nnodes+1)*
sizeof(
Int_t)));
163 Error(
"CdNode",
"Navigation based on physical node unique id disabled.\n To enable, use: gGeoManager->GetCache()->BuildIdArray()");
167 if (nodeid == arr[
fIndex])
return;
170 if (nodeid == arr[fIndex])
return;
175 Int_t nabove, nbelow, middle;
176 while (nodeid!=currentID && nd) {
179 while (nabove-nbelow > 1) {
180 middle = (nabove+nbelow)>>1;
181 currentID = arr[arr[fIndex+middle]];
182 if (nodeid == currentID) {
186 if (nodeid < currentID) nabove = middle;
187 else nbelow = middle;
201 if (!newnode)
return kFALSE;
225 if (!newnode)
return kFALSE;
285 memcpy(&names[i], name,
sizeof(
Int_t));
308 isonly[i] = (ismany)?0:1;
324 fGeoInfoStackSize *= 2;
380 if (level<=0)
return 0;
463 memset(fPoint, 0, 3*
sizeof(
Int_t));
475 fCapacity = capacity;
480 memset(fPoint, 0, 3*
sizeof(
Int_t));
485 for (
Int_t i=0; i<capacity; i++) {
496 fCapacity(gcs.fCapacity),
500 fOverlapping(gcs.fOverlapping)
574 for (
Int_t i=0; i<nelem; i++) {
575 current = mat_branch[i+
fStart];
576 if (current == last)
continue;
600 for (
Int_t i=0; i<nelem; i++) {
601 current = mat_branch[i+
fStart];
602 if (current == last)
continue;
Statefull info for the current geometry level.
Int_t GetCurrentNodeId() const
Returns a fixed ID for current physical node.
virtual const char * GetName() const
Returns name of object.
virtual ~TGeoNodeCache()
Destructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TGeoCacheState()
Default ctor.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Bool_t IsOverlapping() const
TObjArray * fStack
current matrix
Geometrical transformation package.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
TGeoStateInfo * GetInfo()
Get next state info pointer.
void CdUp()
Go one level up in geometry.
TGeoNodeCache * GetCache() const
Int_t GetNodeId() const
Get unique node id.
void * GetMatrices() const
virtual void MasterToLocalBomb(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Matrix class used for computing global transformations Should NOT be used for node definition...
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
TGeoStateInfo * GetMakePWInfo(Int_t nd)
Get the PW info, if none create one.
TObject * At(Int_t idx) const
void LocalToMasterBomb(const Double_t *local, Double_t *master) const
Local point converted to master frame defined by current matrix and rescaled with bomb factor...
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill copy numbers of current branch nodes.
TGeoStateInfo ** fInfoBranch
const Int_t * GetIdBranch() const
void FillIdBranch(const Int_t *br, Int_t startlevel=0)
void LocalToMasterVect(const Double_t *local, Double_t *master) const
Local vector converted to master frame defined by current matrix.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void CdDown(Int_t index)
Make a daughter of current node current.
Bool_t IsIdentity() const
virtual TGeoMatrix * GetMatrix() const =0
Special pool of reusable nodes.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
Bool_t PopState(Int_t &nmany, Double_t *point=0)
Pop next state/point from heap.
Int_t * fNodeIdArray
State info for the parallel world.
TGeoHMatrix ** fMatrixBranch
void ReleaseInfo()
Release last used state info pointer.
void GetBranchNames(Int_t *names) const
Fill names with current branch volume names (4 char - used by GEANT3 interface).
TGeoNode * GetDaughter(Int_t ind) const
void MasterToLocal(const Double_t *master, Double_t *local) const
Point in master frame defined by current matrix converted to local one.
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TGeoNode * GetTopNode() const
virtual ~TGeoCacheState()
Dtor.
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
TGeoNode * GetNode() const
R__EXTERN TGeoManager * gGeoManager
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Bool_t GetState(Int_t &level, Int_t &nmany, Double_t *point) const
Restore a modeler state.
const char * GetPath()
Returns the current geometry path.
void CdTop()
Make top level node the current node.
void FillIdArray(Int_t &ifree, Int_t &nodeid, Int_t *array) const
Fill array with node id. Recursive on node branch.
Int_t PushState(Bool_t ovlp, Int_t ntmany=0, Int_t startlevel=0, Double_t *point=0)
Push current state into heap.
void MasterToLocalVect(const Double_t *master, Double_t *local) const
Vector in master frame defined by current matrix converted to local one.
Mother of all ROOT objects.
Bool_t CdDown(Int_t index)
Make daughter INDEX of current node the active state. Compute global matrix.
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoHMatrix ** fMatrixBranch
Bool_t HasIdArray() const
void MasterToLocalBomb(const Double_t *master, Double_t *local) const
Point in master frame defined by current matrix converted to local one and rescaled with bomb factor...
void BuildIdArray()
Builds node id array.
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
Class storing the state of the cache at a given moment.
TGeoNodeCache()
Dummy constructor.
Int_t GetNdaughters() const
void LocalToMaster(const Double_t *local, Double_t *master) const
Local point converted to master frame defined by current matrix.
void CdUp()
Make mother of current node the active state.
void GetBranchOnlys(Int_t *isonly) const
Fill copy numbers of current branch nodes.
virtual void LocalToMasterBomb(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void SetState(Int_t level, Int_t startlevel, Int_t nmany, Bool_t ovlp, Double_t *point=0)
Fill current modeller state.
TGeoCacheState & operator=(const TGeoCacheState &)
assignment operator
TGeoVolume * GetVolume() const
void BuildInfoBranch()
Builds info branch. Navigation is possible only after this step.
Bool_t RestoreState(Int_t &nmany, TGeoCacheState *state, Double_t *point=0)
Pop next state/point from a backed-up state.
TGeoHMatrix * fMatrix
current node
const char * Data() const