103 fMaterialPointer = 0;
111 fIsReflection[fGeomLevel] =
kFALSE;
131 gROOT->GetListOfGeometries()->Add(
this);
222 if (gGeometry ==
this) {
224 if (gGeometry ==
this)
225 gGeometry = (
TGeometry*)
gROOT->GetListOfGeometries()->After(gGeometry);
227 gROOT->GetListOfGeometries()->Remove(
this);
257 if (node1) node1->
Draw(option);
266 Error(
"FindObject",
"Not yet implemented");
276 if (loc)
return loc->
At(0);
293 if (!gGeometry)
return &loc;
310 temp = gGeometry->
GetNode(name);
337 if (mat->
GetNumber() == number)
return mat;
371 if (matrix->
GetNumber() == number)
return matrix;
393 while ((shape = (
TShape*) next())) {
394 if (shape->
GetNumber() == number)
return shape;
416 + local[2]*matrix[6];
421 + local[2]*matrix[7];
426 + local[2]*matrix[8];
427 master[0] =
x; master[1] =
y; master[2] =
z;
430 for (
Int_t i=0;i<3;i++) master[i] = local[i];
452 + local[2]*matrix[6];
457 + local[2]*matrix[7];
462 + local[2]*matrix[8];
464 master[0] =
x; master[1] =
y; master[2] =
z;
467 for (
Int_t i=0;i<3;i++) master[i] = local[i];
478 Printf(
"=================List of Materials================");
482 Printf(
"=================List of RotationMatrices================");
486 Printf(
"=================List of Shapes==========================");
490 Printf(
"=================List of Nodes===========================");
514 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
515 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
516 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
518 local[0] =
x; local[1] =
y; local[2] =
z;
544 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
545 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
546 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
548 local[0] =
x; local[1] =
y; local[2] =
z;
559 new TNode(name,title,shapename,x,y,z,matrixname,option);
573 void TGeometry::Streamer(
TBuffer &
b)
600 while ((onemat = (
TMaterial*) nextmat())) {
609 while ((onematrix = (
TRotMatrix*) nextmatrix())) {
618 while ((oneshape = (
TShape*) nextshape())) {
623 gROOT->GetListOfGeometries()->Add(
this);
665 if (rotMatrix && rotMatrix->
GetType()) {
714 dxnew[0] = dx[0] + x*rmat[0] + y*rmat[3] + z*rmat[6];
715 dxnew[1] = dx[1] + x*rmat[1] + y*rmat[4] + z*rmat[7];
716 dxnew[2] = dx[2] + x*rmat[2] + y*rmat[5] + z*rmat[8];
718 rmatnew[0] = rmat[0]*matrix[0] + rmat[3]*matrix[1] + rmat[6]*matrix[2];
719 rmatnew[1] = rmat[1]*matrix[0] + rmat[4]*matrix[1] + rmat[7]*matrix[2];
720 rmatnew[2] = rmat[2]*matrix[0] + rmat[5]*matrix[1] + rmat[8]*matrix[2];
721 rmatnew[3] = rmat[0]*matrix[3] + rmat[3]*matrix[4] + rmat[6]*matrix[5];
722 rmatnew[4] = rmat[1]*matrix[3] + rmat[4]*matrix[4] + rmat[7]*matrix[5];
723 rmatnew[5] = rmat[2]*matrix[3] + rmat[5]*matrix[4] + rmat[8]*matrix[5];
724 rmatnew[6] = rmat[0]*matrix[6] + rmat[3]*matrix[7] + rmat[6]*matrix[8];
725 rmatnew[7] = rmat[1]*matrix[6] + rmat[4]*matrix[7] + rmat[7]*matrix[8];
726 rmatnew[8] = rmat[2]*matrix[6] + rmat[5]*matrix[7] + rmat[8]*matrix[8];
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
virtual Double_t * GetMatrix()
virtual void Draw(Option_t *option="")
Draw Referenced node with current parameters.
virtual Int_t GetNumber() const
object has not been deleted
virtual void Browse(TBrowser *b)
Browse.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual TRotMatrix * GetMatrix() const
virtual TNode * GetParent() const
Double_t fZ
The global translation of the current node.
virtual Int_t GetNumber() const
Bool_t TestBit(UInt_t f) const
virtual TObject * FindObject(const char *name) const
Search object identified by name in the geometry tree.
TMaterial ** fMaterialPointer
Pointer to current node.
Buffer base class used for serializing objects.
Double_t fRotMatrix[kMAXLEVELS][kMatrixSize]
void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
void ToLower()
Change string to lower-case.
virtual Double_t GetX() const
TObject * At(Int_t idx) const
TObject * FindObject(const char *name) const
Find object using its name.
THashList * GetListOfMaterials() const
virtual Bool_t IsReflection() const
virtual ~TGeometry()
Geometry default destructor.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
The TNamed class is the base class for all named ROOT classes.
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
virtual void Node(const char *name, const char *title, const char *shapename, Double_t x=0, Double_t y=0, Double_t z=0, const char *matrixname="", Option_t *option="")
Add a node to the current node in this geometry.
virtual Int_t GetType() const
Bool_t fIsReflection[kMAXLEVELS]
Manages a detector material.
virtual TNode * GetNode(const char *name) const
Return pointer to node with name in the node tree.
TNode * fCurrentNode
Pointers to current rotation matrices.
virtual void ls(Option_t *option="rsn2") const
List this geometry.
virtual void UpdateMatrix(TNode *node)
Update global rotation matrix/translation vector for this node this function must be called before in...
Using a TBrowser one can browse all ROOT objects.
TGeometry & operator=(const TGeometry &)
assignment operator
This is the base class for all geometry shapes.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Manages a detector rotation matrix.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
TRotMatrix * GetRotMatrixByNumber(Int_t number) const
Return pointer to RotMatrix with number.
TMaterial * GetMaterialByNumber(Int_t number) const
Return pointer to Material with number.
Float_t fBomb
Pointers to shapes.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TMaterial * GetMaterial(const char *name) const
Return pointer to Material with name.
TList * GetListOfNodes() const
TShape ** fShapePointer
Pointers to rotation matrices.
TShape * GetShapeByNumber(Int_t number) const
Return pointer to Shape with number.
TRotMatrix ** fMatrixPointer
Pointers to materials.
virtual void Draw(Option_t *option="")
Draw this Geometry.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TGeometry()
Geometry default constructor.
THashList * GetListOfMatrices() const
TNode * GetNode(const char *name) const
Return pointer to node with name in the geometry tree.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual Double_t GetY() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
THashList * GetListOfShapes() const
virtual Int_t GetNumber() const
Double_t fTranslation[kMAXLEVELS][kVectorSize]
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
static TObjArray * Get(const char *name)
Static function called by TROOT to search name in the geometry.
virtual void cd(const char *path=0)
Change Current Geometry to this.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void Master2Local(Double_t *master, Double_t *local)
Convert one point from master system to local reference system.
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 GetSize() const
virtual Double_t GetZ() const
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a Geometry list.