#include <TGeant3TGeo.h>
Inheritance diagram for TGeant3TGeo:

Public Member Functions | |
| TGeant3TGeo () | |
| TGeant3TGeo (const char *title, Int_t nwgeant=0) | |
| virtual void | LoadAddress () |
| virtual | ~TGeant3TGeo () |
| virtual Bool_t | IsRootGeometrySupported () const |
| void | GeomIter () |
| Int_t | NextVolUp (Text_t *name, Int_t ©) |
| Int_t | CurrentVolID (Int_t ©) const |
| Int_t | CurrentVolOffID (Int_t off, Int_t ©) const |
| const char * | CurrentVolName () const |
| const char * | CurrentVolOffName (Int_t off) const |
| const char * | CurrentVolPath () |
| Int_t | VolId (const Text_t *name) const |
| const char * | VolName (Int_t id) const |
| Int_t | NofVolumes () const |
| Int_t | NofVolDaughters (const char *volName) const |
| const char * | VolDaughterName (const char *volName, Int_t i) const |
| Int_t | VolDaughterCopyNo (const char *volName, Int_t i) const |
| Int_t | VolId2Mate (Int_t id) const |
| const char * | GetPath () |
| const char * | GetNodeName () |
| virtual void | Material (Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Float_t *buf=0, Int_t nwbuf=0) |
| virtual void | Material (Int_t &kmat, const char *name, Double_t a, Double_t z, Double_t dens, Double_t radl, Double_t absl, Double_t *buf, Int_t nwbuf) |
| virtual void | Mixture (Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat) |
| virtual void | Mixture (Int_t &kmat, const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat) |
| virtual void | Medium (Int_t &kmed, const char *name, 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, Float_t *ubuf=0, Int_t nbuf=0) |
| virtual void | Medium (Int_t &kmed, const char *name, 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, Double_t *ubuf, Int_t nbuf) |
| virtual void | Matrix (Int_t &krot, Double_t thex, Double_t phix, Double_t they, Double_t phiy, Double_t thez, Double_t phiz) |
| virtual void | SetRootGeometry () |
| virtual Gcvol1_t * | Gcvol1 () const |
| virtual void | Ggclos () |
| virtual void | Gprint (const char *name) |
| virtual void | Gsmate (Int_t imat, const char *name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl) |
| virtual void | Gsmixt (Int_t imat, const char *name, Float_t *a, Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat) |
| virtual void | Gstmed (Int_t numed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin) |
| virtual void | Gtreve () |
| virtual void | GtreveRoot () |
| virtual void | Gdtom (Float_t *xd, Float_t *xm, Int_t iflag) |
| virtual void | Gdtom (Double_t *xd, Double_t *xm, Int_t iflag) |
| virtual void | Gmedia (Float_t *x, Int_t &numed) |
| virtual void | Gmtod (Float_t *xm, Float_t *xd, Int_t iflag) |
| virtual void | Gmtod (Double_t *xm, Double_t *xd, Int_t iflag) |
| virtual void | Gsdvn (const char *name, const char *mother, Int_t ndiv, Int_t iaxis) |
| virtual void | Gsdvn2 (const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed) |
| virtual void | Gsdvs (const char *name, const char *mother, Float_t step, Int_t iaxis, Int_t numed) |
| virtual void | Gsdvs2 (const char *name, const char *mother, Float_t step, Int_t iaxis, Float_t c0, Int_t numed) |
| virtual void | Gsdvt (const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx) |
| virtual void | Gsdvt2 (const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx) |
| virtual void | Gsord (const char *name, Int_t iax) |
| virtual void | Gspos (const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly="ONLY") |
| virtual void | Gsposp (const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Float_t *upar, Int_t np) |
| virtual void | Gsposp (const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, const char *konly, Double_t *upar, Int_t np) |
| virtual void | Gsrotm (Int_t nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3) |
| virtual void | Gprotm (Int_t nmat=0) |
| virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np) |
| virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np) |
| virtual void | Gsatt (const char *name, const char *att, Int_t val) |
| virtual Int_t | Glvolu (Int_t nlev, Int_t *lnam, Int_t *lnum) |
| virtual Bool_t | GetTransformation (const TString &volumePath, TGeoHMatrix &matrix) |
| virtual Bool_t | GetShape (const TString &volumePath, TString &shapeType, TArrayD &par) |
| virtual Bool_t | GetMaterial (const TString &volumeName, TString &name, Int_t &imat, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, TArrayD &par) |
| virtual Bool_t | GetMedium (const TString &volumeName, TString &name, Int_t &imed, 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, TArrayD &par) |
| virtual Int_t | GetMedium () const |
| virtual void | Gdshow (Int_t view) |
| virtual void | Gdopt (const char *name, const char *value) |
| virtual void | Gdraw (const char *name, Double_t theta=30, Double_t phi=30, Double_t psi=0, Double_t u0=10, Double_t v0=10, Double_t ul=0.01, Double_t vl=0.01) |
| virtual void | Gdrawc (const char *name, Int_t axis=1, Float_t cut=0, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01) |
| virtual void | Gdrawx (const char *name, Float_t cutthe, Float_t cutphi, Float_t cutval, Float_t theta=30, Float_t phi=30, Float_t u0=10, Float_t v0=10, Float_t ul=0.01, Float_t vl=0.01) |
| virtual void | Gdspec (const char *name) |
| virtual void | DrawOneSpec (const char *name) |
| virtual void | Gdtree (const char *name, Int_t levmax=15, Int_t ispec=0) |
| virtual void | GdtreeParent (const char *name, Int_t levmax=15, Int_t ispec=0) |
| virtual void | FinishGeometry () |
| virtual void | SetColors () |
Protected Attributes | |
| TGeoMCGeometry * | fMCGeo |
| Bool_t | fImportRootGeometry |
| Gcvol1_t * | fGcvol1 |
Private Member Functions | |
| TGeant3TGeo (const TGeant3TGeo &) | |
| GCVOLU common structure. | |
| TGeant3TGeo & | operator= (const TGeant3TGeo &) |
| Int_t | ImportMaterial (const TGeoMaterial *material) |
|
|
Definition at line 539 of file TGeant3TGeo.cxx.
|
|
||||||||||||
|
Definition at line 548 of file TGeant3TGeo.cxx. References fggperp, fginvol, fglvolu, fgmedia, fgtmany, fgtmedi, fgtnext, fgtonly, fMCGeo, and LoadAddress(). 00549 : TGeant3(title,nwgeant), 00550 fImportRootGeometry(kFALSE) 00551 { 00552 // 00553 // Standard constructor for TGeant3 with ZEBRA initialisation 00554 // 00555 00556 SetName("TGeant3TGeo"); 00557 00558 fMCGeo = new TGeoMCGeometry("MCGeo", "TGeo Implementation of VirtualMCGeometry"); 00559 00560 LoadAddress(); 00561 //set pointers to tracker functions 00562 fginvol = ginvolTGeo; 00563 fgtmedi = gtmediTGeo; 00564 fgtmany = gtmanyTGeo; 00565 fgtonly = gtonlyTGeo; 00566 fgmedia = gmediaTGeo; 00567 fglvolu = glvoluTGeo; 00568 fgtnext = gtnextTGeo; 00569 fggperp = ggperpTGeo; 00570 }
|
|
|
Definition at line 573 of file TGeant3TGeo.cxx. 00574 {
00575 delete fMCGeo;
00576 }
|
|
|
GCVOLU common structure.
Definition at line 216 of file TGeant3TGeo.h. 00216 : TGeant3() {}
|
|
|
Reimplemented from TGeant3. Definition at line 622 of file TGeant3TGeo.cxx. Referenced by CurrentVolOffID(). 00623 {
00624 //
00625 // Returns the current volume ID and copy number
00626 //
00627 if (gGeoManager->IsOutside()) return 0;
00628 TGeoNode *node = gGeoManager->GetCurrentNode();
00629 copy = node->GetNumber();
00630 Int_t id = node->GetVolume()->GetNumber();
00631 return id;
00632 }
|
|
|
Reimplemented from TGeant3. Definition at line 650 of file TGeant3TGeo.cxx. Referenced by CurrentVolOffName(). 00651 {
00652 //
00653 // Returns the current volume name
00654 //
00655 if (gGeoManager->IsOutside()) return gGeoManager->GetTopVolume()->GetName();
00656 return gGeoManager->GetCurrentVolume()->GetName();
00657 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 635 of file TGeant3TGeo.cxx. References CurrentVolID(). 00636 {
00637 //
00638 // Return the current volume "off" upward in the geometrical tree
00639 // ID and copy number
00640 //
00641 if (off<0 || off>gGeoManager->GetLevel()) return 0;
00642 if (off==0) return CurrentVolID(copy);
00643 TGeoNode *node = gGeoManager->GetMother(off);
00644 if (!node) return 0;
00645 copy = node->GetNumber();
00646 return node->GetVolume()->GetNumber();
00647 }
|
|
|
Reimplemented from TGeant3. Definition at line 660 of file TGeant3TGeo.cxx. References CurrentVolName(), and Gcvolu_t::nlevel. 00661 {
00662 //
00663 // Return the current volume "off" upward in the geometrical tree
00664 // ID, name and copy number
00665 // if name=0 no name is returned
00666 //
00667 Int_t i;
00668 if( (i=fGcvolu->nlevel-off-1) < 0 ) {
00669 Warning("CurrentVolOffName",
00670 "Offset requested %d but stack depth %d\n",off,fGcvolu->nlevel);
00671 return 0;
00672 }
00673 if (off<0 || off>gGeoManager->GetLevel()) return 0;
00674 if (off==0) return CurrentVolName();
00675 TGeoNode *node = gGeoManager->GetMother(off);
00676 if (!node) return 0;
00677 return node->GetVolume()->GetName();
00678 }
|
|
|
Reimplemented from TGeant3. Definition at line 681 of file TGeant3TGeo.cxx. References GetPath(). 00682 {
00683 // Return the path in geometry tree for the current volume
00684 // ---
00685
00686 return GetPath();
00687 }
|
|
|
Reimplemented from TGeant3. Definition at line 1957 of file TGeant3TGeo.cxx. 01958 {
01959 //
01960 // Function called when one double-clicks on a volume name
01961 // in a TPavelabel drawn by Gdtree.
01962 //
01963 return;
01964 }
|
|
|
Reimplemented from TGeant3. Definition at line 2028 of file TGeant3TGeo.cxx. References TGeant3::G3Medium(), Ggclos(), ImportMaterial(), and SetColors(). 02029 {
02030 //
02031 // Finalise geometry construction
02032 //
02033
02034 //Close the geometry structure
02035 if (gDebug > 0) printf("FinishGeometry, calling ggclos\n");
02036 Ggclos();
02037
02038 if (fImportRootGeometry) {
02039
02040 // Import materials
02041 //
02042 TIter next1(gGeoManager->GetListOfMaterials());
02043 TGeoMaterial* mat;
02044 Int_t nofMaterials = 0;
02045 while ((mat=(TGeoMaterial*)next1())) {
02046 Int_t kmat = ImportMaterial(mat);
02047 mat->SetUniqueID(kmat);
02048 nofMaterials++;
02049 }
02050
02051 // Number of media
02052 Int_t nofMedia = 0;
02053 TIter next2(gGeoManager->GetListOfMedia());
02054 TGeoMedium* medx;
02055 while ((medx=(TGeoMedium*)next2())) nofMedia++;
02056
02057 // Import media
02058 //
02059 Int_t maxNofMaterials = nofMaterials + nofMedia;
02060 TArrayI usedMaterials(maxNofMaterials);
02061 for (Int_t i=0; i<maxNofMaterials; i++)
02062 usedMaterials[i] = -1;
02063
02064 TIter next3(gGeoManager->GetListOfMedia());
02065 TGeoMedium* med;
02066 while ((med=(TGeoMedium*)next3())) {
02067 Int_t kmed;
02068 Int_t nmat = med->GetMaterial()->GetUniqueID();
02069
02070 // if material is already used define a new Geant3 material
02071 // (do not reset TGeoMaterial index)
02072 if (usedMaterials[nmat] >0 )
02073 nmat = ImportMaterial(med->GetMaterial());
02074 usedMaterials[nmat] = 1;
02075
02076 Int_t isvol = (Int_t) med->GetParam(0);
02077 Int_t ifield = (Int_t) med->GetParam(1);
02078 Double_t fieldm = med->GetParam(2);
02079 Double_t tmaxfd = med->GetParam(3);
02080 Double_t stemax = med->GetParam(4);
02081 Double_t deemax = med->GetParam(5);
02082 Double_t epsil = med->GetParam(6);
02083 Double_t stmin = med->GetParam(7);
02084 G3Medium(kmed, med->GetName(), nmat, isvol, ifield, fieldm, tmaxfd,
02085 stemax,deemax, epsil, stmin);
02086 med->SetId(kmed);
02087 }
02088 if (gDebug > 0) printf("FinishGeometry, geometry retreived from file, materials/media mapped to G3\n");
02089 } else {
02090 TGeoVolume *top = (TGeoVolume*)gGeoManager->GetListOfVolumes()->First();
02091 gGeoManager->SetTopVolume(top);
02092 if (gDebug > 0) printf("FinishGeometry, calling CloseGeometry\n");
02093 gGeoManager->CloseGeometry();
02094 }
02095
02096 if (gDebug > 0) printf("FinishGeometry, calling MisalignGeometry()\n");
02097 TVirtualMCApplication::Instance()->MisalignGeometry();
02098 // gROOT->GetListOfBrowsables()->Add(gGeoManager);
02099 if (gDebug > 0) printf("FinishGeometry, calling SetColors\n");
02100
02101 //Create the color table
02102 SetColors();
02103 if (gDebug > 0) printf("FinishGeometry, returning\n");
02104 }
|
|
|
Definition at line 107 of file TGeant3TGeo.h. 00107 {return fGcvol1;}
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 1819 of file TGeant3TGeo.cxx. 01820 {
01821 //
01822 // NAME Option name
01823 // VALUE Option value
01824 //
01825 // To set/modify the drawing options.
01826 // IOPT IVAL Action
01827 //
01828 // THRZ ON Draw tracks in R vs Z
01829 // OFF (D) Draw tracks in X,Y,Z
01830 // 180
01831 // 360
01832 // PROJ PARA (D) Parallel projection
01833 // PERS Perspective
01834 // TRAK LINE (D) Trajectory drawn with lines
01835 // POIN " " with markers
01836 // HIDE ON Hidden line removal using the CG package
01837 // OFF (D) No hidden line removal
01838 // SHAD ON Fill area and shading of surfaces.
01839 // OFF (D) Normal hidden line removal.
01840 // RAYT ON Ray-tracing on.
01841 // OFF (D) Ray-tracing off.
01842 // EDGE OFF Does not draw contours when shad is on.
01843 // ON (D) Normal shading.
01844 // MAPP 1,2,3,4 Mapping before ray-tracing.
01845 // 0 (D) No mapping.
01846 // USER ON User graphics options in the raytracing.
01847 // OFF (D) Automatic graphics options.
01848 //
01849 return;
01850 }
|
|
||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1853 of file TGeant3TGeo.cxx. 01855 {
01856 //
01857 // NAME Volume name
01858 // +
01859 // THETA Viewing angle theta (for 3D projection)
01860 // PHI Viewing angle phi (for 3D projection)
01861 // PSI Viewing angle psi (for 2D rotation)
01862 // U0 U-coord. (horizontal) of volume origin
01863 // V0 V-coord. (vertical) of volume origin
01864 // SU Scale factor for U-coord.
01865 // SV Scale factor for V-coord.
01866 //
01867 // This function will draw the volumes,
01868 // selected with their graphical attributes, set by the Gsatt
01869 // facility. The drawing may be performed with hidden line removal
01870 // and with shading effects according to the value of the options HIDE
01871 // and SHAD; if the option SHAD is ON, the contour's edges can be
01872 // drawn or not. If the option HIDE is ON, the detector can be
01873 // exploded (BOMB), clipped with different shapes (CVOL), and some
01874 // of its parts can be shifted from their original
01875 // position (SHIFT). When HIDE is ON, if
01876 // the drawing requires more than the available memory, the program
01877 // will evaluate and display the number of missing words
01878 // (so that the user can increase the
01879 // size of its ZEBRA store). Finally, at the end of each drawing (with HIDE on),
01880 // the program will print messages about the memory used and
01881 // statistics on the volumes' visibility.
01882 // The following commands will produce the drawing of a green
01883 // volume, specified by NAME, without using the hidden line removal
01884 // technique, using the hidden line removal technique,
01885 // with different linewidth and colour (red), with
01886 // solid colour, with shading of surfaces, and without edges.
01887 // Finally, some examples are given for the ray-tracing. (A possible
01888 // string for the NAME of the volume can be found using the command DTREE).
01889 //
01890 return;
01891 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1894 of file TGeant3TGeo.cxx. 01896 {
01897 //
01898 // NAME Volume name
01899 // CAXIS Axis value
01900 // CUTVAL Cut plane distance from the origin along the axis
01901 // +
01902 // U0 U-coord. (horizontal) of volume origin
01903 // V0 V-coord. (vertical) of volume origin
01904 // SU Scale factor for U-coord.
01905 // SV Scale factor for V-coord.
01906 //
01907 // The cut plane is normal to caxis (X,Y,Z), corresponding to iaxis (1,2,3),
01908 // and placed at the distance cutval from the origin.
01909 // The resulting picture is seen from the the same axis.
01910 // When HIDE Mode is ON, it is possible to get the same effect with
01911 // the CVOL/BOX function.
01912 //
01913 return;
01914 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1917 of file TGeant3TGeo.cxx. 01920 {
01921 //
01922 // NAME Volume name
01923 // CUTTHE Theta angle of the line normal to cut plane
01924 // CUTPHI Phi angle of the line normal to cut plane
01925 // CUTVAL Cut plane distance from the origin along the axis
01926 // +
01927 // THETA Viewing angle theta (for 3D projection)
01928 // PHI Viewing angle phi (for 3D projection)
01929 // U0 U-coord. (horizontal) of volume origin
01930 // V0 V-coord. (vertical) of volume origin
01931 // SU Scale factor for U-coord.
01932 // SV Scale factor for V-coord.
01933 //
01934 // The cut plane is normal to the line given by the cut angles
01935 // cutthe and cutphi and placed at the distance cutval from the origin.
01936 // The resulting picture is seen from the viewing angles theta,phi.
01937 //
01938 return;
01939 }
|
|
|
Reimplemented from TGeant3. Definition at line 1808 of file TGeant3TGeo.cxx. 01809 {
01810 //
01811 // IVIEW View number
01812 //
01813 // It shows on the screen the contents of a view bank. It
01814 // can be called after a view bank has been closed.
01815 //
01816 }
|
|
|
Reimplemented from TGeant3. Definition at line 1942 of file TGeant3TGeo.cxx. 01943 {
01944 //
01945 // NAME Volume name
01946 //
01947 // Shows 3 views of the volume (two cut-views and a 3D view), together with
01948 // its geometrical specifications. The 3D drawing will
01949 // be performed according the current values of the options HIDE and
01950 // SHAD and according the current SetClipBox clipping parameters for that
01951 // volume.
01952 //
01953 return;
01954 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1322 of file TGeant3TGeo.cxx. 01323 {
01324 //
01325 // Computes coordinates XM (Master Reference System
01326 // knowing the coordinates XD (Detector Ref System)
01327 // The local reference system can be initialized by
01328 // - the tracking routines and GDTOM used in GUSTEP
01329 // - a call to GSCMED(NLEVEL,NAMES,NUMBER)
01330 // (inverse routine is GMTOD)
01331 //
01332 // If IFLAG=1 convert coordinates
01333 // IFLAG=2 convert direction cosinus
01334 //
01335
01336 if (iflag == 1) gGeoManager->LocalToMaster(xd,xm);
01337 else gGeoManager->LocalToMasterVect(xd,xm);
01338 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1300 of file TGeant3TGeo.cxx. 01301 {
01302 //
01303 // Computes coordinates XM (Master Reference System
01304 // knowing the coordinates XD (Detector Ref System)
01305 // The local reference system can be initialized by
01306 // - the tracking routines and GDTOM used in GUSTEP
01307 // - a call to GSCMED(NLEVEL,NAMES,NUMBER)
01308 // (inverse routine is GMTOD)
01309 //
01310 // If IFLAG=1 convert coordinates
01311 // IFLAG=2 convert direction cosinus
01312 //
01313 Double_t XM[3], XD[3];
01314 Int_t i;
01315 for (i=0;i<3;i++) XD[i] = xd[i];
01316 if (iflag == 1) gGeoManager->LocalToMaster(XD,XM);
01317 else gGeoManager->LocalToMasterVect(XD,XM);
01318 for (i=0;i<3;i++) xm[i]=XM[i];
01319 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1967 of file TGeant3TGeo.cxx. 01968 {
01969 //
01970 // NAME Volume name
01971 // LEVMAX Depth level
01972 // ISELT Options
01973 //
01974 // This function draws the logical tree,
01975 // Each volume in the tree is represented by a TPaveTree object.
01976 // Double-clicking on a TPaveTree draws the specs of the corresponding volume.
01977 // Use TPaveTree pop-up menu to select:
01978 // - drawing specs
01979 // - drawing tree
01980 // - drawing tree of parent
01981 //
01982 return;
01983 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1986 of file TGeant3TGeo.cxx. 01987 {
01988 //
01989 // NAME Volume name
01990 // LEVMAX Depth level
01991 // ISELT Options
01992 //
01993 // This function draws the logical tree of the parent of name.
01994 //
01995 }
|
|
|
Reimplemented from TGeant3. Definition at line 592 of file TGeant3TGeo.cxx. 00593 {
00594 //
00595 // Geometry iterator for moving upward in the geometry tree
00596 // Initialise the iterator
00597 //
00598 fNextVol=gGeoManager->GetLevel();
00599 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1032 of file TGeant3TGeo.cxx. References TGeant3::Gclink(), TGeant3::Gfmate(), Gclink_t::jmate, and TGeant3::Lq(). 01036 {
01037 // Returns the Material and its parameters for the volume specified
01038 // by volumeName.
01039 // Note, Geant3 stores and uses mixtures as an element with an effective
01040 // Z and A. Consequently, if the parameter Z is not integer, then
01041 // this material represents some sort of mixture.
01042 // Inputs:
01043 // TString& volumeName The volume name
01044 // Outputs:
01045 // TSrting &name Material name
01046 // Int_t &imat Material index number
01047 // Double_t &a Average Atomic mass of material
01048 // Double_t &z Average Atomic number of material
01049 // Double_t &dens Density of material [g/cm^3]
01050 // Double_t &radl Average radiation length of material [cm]
01051 // Double_t &inter Average interaction length of material [cm]
01052 // TArrayD &par A TArrayD of user defined parameters.
01053 // Return:
01054 // kTRUE if no errors
01055 Int_t i,jma,nbuf;
01056 Float_t af,zf,densf,radlf,interf;
01057 Float_t *ubuf;
01058 Char_t namec[20] = {20*'\0'};
01059 TGeoVolume *vol = gGeoManager->GetVolume(volumeName.Data());
01060 if (!vol) return kFALSE;
01061 TGeoMedium *med = vol->GetMedium();
01062 if (!med) return kFALSE;
01063 TGeoMaterial *mat = med->GetMaterial();
01064 imat = mat->GetUniqueID();
01065
01066 nbuf = jma = Lq()[Gclink()->jmate-imat];
01067 ubuf = new Float_t[nbuf];
01068 Gfmate(imat,namec,af,zf,densf,radlf,interf,ubuf,nbuf);
01069 name = mat->GetName();
01070 name = name.Strip(TString::kTrailing, '$');
01071 //
01072 par.Set(nbuf);
01073 for(i=0;i<nbuf;i++) par.AddAt(((Double_t)ubuf[i]),i);
01074 delete[] ubuf;
01075 a = mat->GetA();
01076 z = mat->GetZ();
01077 dens = mat->GetDensity();
01078 radl = radlf;
01079 inter = interf;
01080 return kTRUE;
01081 }
|
|
|
Reimplemented from TGeant3. Definition at line 1139 of file TGeant3TGeo.cxx. References TGeant3::GetMedium(). 01140 {
01141 // Temporary added
01142
01143 return TGeant3::GetMedium();
01144 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1084 of file TGeant3TGeo.cxx. References TGeant3::Gclink(), TGeant3::Gftmed(), Gclink_t::jtmed, and TGeant3::Lq(). 01089 {
01090 // Returns the Medium and its parameters for the volume specified
01091 // by volumeName.
01092 // Inputs:
01093 // TString& volumeName The volume name.
01094 // Outputs:
01095 // TString &name Medium name
01096 // Int_t &nmat Material number defined for this medium
01097 // Int_t &imed The medium index number
01098 // Int_t &isvol volume number defined for this medium
01099 // Int_t &iflield Magnetic field flag
01100 // Double_t &fieldm Magnetic field strength
01101 // Double_t &tmaxfd Maximum angle of deflection per step
01102 // Double_t &stemax Maximum step size
01103 // Double_t &deemax Maximum fraction of energy allowed to be lost
01104 // to continuous process.
01105 // Double_t &epsil Boundary crossing precision
01106 // Double_t &stmin Minimum step size allowed
01107 // TArrayD &par A TArrayD of user parameters with all of the
01108 // parameters of the specified medium.
01109 // Return:
01110 // kTRUE if there where no errors
01111 Int_t i,nbuf;
01112 Float_t fieldmf,tmaxfdf,stemaxf,deemaxf,epsilf,stminf;
01113 Float_t *buf;
01114 Char_t namec[25] = {25*'\0'};
01115 TGeoVolume *vol = gGeoManager->GetVolume(volumeName.Data());
01116 if (!vol) return kFALSE;
01117 TGeoMedium *med = vol->GetMedium();
01118 if (!med) return kFALSE;
01119 imed = med->GetId();
01120 nbuf = Lq()[Gclink()->jtmed-imed];
01121 buf = new Float_t[nbuf];
01122 Gftmed(imed,namec,nmat,isvol,ifield,fieldmf,tmaxfdf,stemaxf,deemaxf,
01123 epsilf,stminf,buf,&nbuf);
01124 name = med->GetName();
01125 name = name.Strip(TString::kTrailing, '$');
01126 par.Set(nbuf);
01127 for(i=0;i<nbuf;i++) par.AddAt(((Double_t)buf[i]),i);
01128 delete[] buf;
01129 fieldm = (Double_t) fieldmf;
01130 tmaxfd = (Double_t) tmaxfdf;
01131 stemax = (Double_t) stemaxf;
01132 deemax = (Double_t) deemaxf;
01133 epsil = (Double_t) epsilf;
01134 stmin = (Double_t) stminf;
01135 return kTRUE;
01136 }
|
|
|
Reimplemented from TGeant3. Definition at line 980 of file TGeant3TGeo.cxx. 00981 {
00982 // Get name of current G3 node
00983 if (gGeoManager->IsOutside()) return "";
00984 return gGeoManager->GetCurrentNode()->GetName();
00985 }
|
|
|
Reimplemented from TGeant3. Definition at line 973 of file TGeant3TGeo.cxx. Referenced by CurrentVolPath(). 00974 {
00975 // Get current path inside G3 geometry
00976 return gGeoManager->GetPath();
00977 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1014 of file TGeant3TGeo.cxx. References fMCGeo. 01016 {
01017 // Returns the shape and its parameters for the volume specified
01018 // by volumeName.
01019 // Inputs:
01020 // TString& volumeName The volume name
01021 // Outputs:
01022 // TString &shapeType Shape type
01023 // TArrayD &par A TArrayD of parameters with all of the
01024 // parameters of the specified shape.
01025 // Return:
01026 // A logical indicating whether there was an error in getting this
01027 // information
01028 return fMCGeo->GetShape(volumePath, shapeType, par);
01029 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 988 of file TGeant3TGeo.cxx. References fMCGeo. 00989 {
00990 // Returns the Transformation matrix between the volume specified
00991 // by the path volumePath and the Top or mater volume. The format
00992 // of the path volumePath is as follows (assuming ALIC is the Top volume)
00993 // "/ALIC_1/DDIP_1/S05I_2/S05H_1/S05G_3". Here ALIC is the top most
00994 // or master volume which has only 1 instance of. Of all of the daughter
00995 // volumes of ALICE, DDIP volume copy #1 is indicated. Similarly for
00996 // the daughter volume of DDIP is S05I copy #2 and so on.
00997 // Inputs:
00998 // TString& volumePath The volume path to the specific volume
00999 // for which you want the matrix. Volume name
01000 // hierarchy is separated by "/" while the
01001 // copy number is appended using a "_".
01002 // Outputs:
01003 // TGeoHMatrix &mat A matrix with its values set to those
01004 // appropriate to the Local to Master transformation
01005 // Return:
01006 // A logical value if kFALSE then an error occurred and no change to
01007 // mat was made.
01008
01009 // We have to preserve the modeler state
01010 return fMCGeo->GetTransformation(volumePath, mat);
01011 }
|
|
|
Reimplemented from TGeant3. Definition at line 1153 of file TGeant3TGeo.cxx. Referenced by FinishGeometry(). 01154 {
01155 //
01156 // Closes off the geometry setting.
01157 // Initializes the search list for the contents of each
01158 // volume following the order they have been positioned, and
01159 // inserting the content '0' when a call to GSNEXT (-1) has
01160 // been required by the user.
01161 // Performs the development of the JVOLUM structure for all
01162 // volumes with variable parameters, by calling GGDVLP.
01163 // Interprets the user calls to GSORD, through GGORD.
01164 // Computes and stores in a bank (next to JVOLUM mother bank)
01165 // the number of levels in the geometrical tree and the
01166 // maximum number of contents per level, by calling GGNLEV.
01167 // Sets status bit for CONCAVE volumes, through GGCAVE.
01168 // Completes the JSET structure with the list of volume names
01169 // which identify uniquely a given physical detector, the
01170 // list of bit numbers to pack the corresponding volume copy
01171 // numbers, and the generic path(s) in the JVOLUM tree,
01172 // through the routine GHCLOS.
01173 //
01174 fVolNames = 0;
01175 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1785 of file TGeant3TGeo.cxx. 01786 {
01787 //
01788 // nlev number of leveles deap into the volume tree
01789 // size of the arrays lnam and lnum
01790 // lnam an integer array whos 4 bytes contain the askii code for the
01791 // volume names
01792 // lnum an integer array containing the copy numbers for that specific
01793 // volume
01794 //
01795 // This routine fills the volulme paramters in common /gcvolu/ for a
01796 // physical tree, specified by the list lnam and lnum of volume names
01797 // and numbers, and for all its ascendants up to level 1. This routine
01798 // is optimsed and does not re-compute the part of the history already
01799 // available in GCVOLU. This means that if it is used in user programs
01800 // outside the usual framwork of the tracking, the user has to initilise
01801 // to zero NLEVEL in the common GCVOLU. It return 0 if there were no
01802 // problems in make the call.
01803 //
01804 return 0;
01805 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 1341 of file TGeant3TGeo.cxx. References gCurrentNode, gcvolu, Gcvolu_t::lvolum, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number. 01342 {
01343 //
01344 // Finds in which volume/medium the point X is, and updates the
01345 // common /GCVOLU/ and the structure JGPAR accordingly.
01346 //
01347 // NUMED returns the tracking medium number, or 0 if point is
01348 // outside the experimental setup.
01349 //
01350
01351 gCurrentNode = gGeoManager->FindNode(x[0],x[1],x[2]);
01352 if (gGeoManager->IsOutside()) {
01353 numed=0;
01354 } else {
01355 gcvolu->nlevel = 1 + gGeoManager->GetLevel();
01356 gGeoManager->GetBranchNames(gcvolu->names);
01357 gGeoManager->GetBranchNumbers(gcvolu->number,gcvolu->lvolum);
01358 TGeoVolume *vol = gCurrentNode->GetVolume();
01359 if (vol) {
01360 TGeoMedium *medium = vol->GetMedium();
01361 if (medium) numed = medium->GetId();
01362 } else {
01363 printf("ERROR: gmedia: NULL volume\n");
01364 }
01365 }
01366 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1392 of file TGeant3TGeo.cxx. 01393 {
01394 //
01395 // Computes coordinates XD (in DRS)
01396 // from known coordinates XM in MRS
01397 // The local reference system can be initialized by
01398 // - the tracking routines and GMTOD used in GUSTEP
01399 // - a call to GMEDIA(XM,NUMED,CHECK)
01400 // - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
01401 // (inverse routine is GDTOM)
01402 //
01403 // If IFLAG=1 convert coordinates
01404 // IFLAG=2 convert direction cosinus
01405 //
01406
01407
01408 if (iflag == 1) gGeoManager->MasterToLocal(xm,xd);
01409 else gGeoManager->MasterToLocalVect(xm,xd);
01410 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1369 of file TGeant3TGeo.cxx. 01370 {
01371 //
01372 // Computes coordinates XD (in DRS)
01373 // from known coordinates XM in MRS
01374 // The local reference system can be initialized by
01375 // - the tracking routines and GMTOD used in GUSTEP
01376 // - a call to GMEDIA(XM,NUMED,CHECK)
01377 // - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
01378 // (inverse routine is GDTOM)
01379 //
01380 // If IFLAG=1 convert coordinates
01381 // IFLAG=2 convert direction cosinus
01382 //
01383 Double_t XM[3], XD[3];
01384 Int_t i;
01385 for (i=0;i<3;i++) XM[i]=xm[i];
01386 if (iflag == 1) gGeoManager->MasterToLocal(XM,XD);
01387 else gGeoManager->MasterToLocalVect(XM,XD);
01388 for (i=0;i<3;i++) xd[i] = XD[i];
01389 }
|
|
|
Reimplemented from TGeant3. Definition at line 1178 of file TGeant3TGeo.cxx. 01179 {
01180 //
01181 // Routine to print data structures
01182 // CHNAME name of a data structure
01183 //
01184 }
|
|
|
Reimplemented from TGeant3. Definition at line 1586 of file TGeant3TGeo.cxx. References Error. 01587 {
01588 //
01589 // To print rotation matrices structure JROTM
01590 // nmat Rotation matrix number
01591 //
01592 TIter next(gGeoManager->GetListOfMatrices());
01593 TGeoMatrix *matrix;
01594 while ((matrix = (TGeoMatrix*)next())) {
01595 if (UInt_t(nmat) == matrix->GetUniqueID()) {
01596 matrix->Print();
01597 return;
01598 }
01599 }
01600 Error("Gprotm","Rotation with id=%i not found", nmat);
01601 }
|
|
||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1696 of file TGeant3TGeo.cxx. 01697 {
01698 //
01699 // NAME Volume name
01700 // IOPT Name of the attribute to be set
01701 // IVAL Value to which the attribute is to be set
01702 //
01703 // name= "*" stands for all the volumes.
01704 // iopt can be chosen among the following :
01705 //
01706 // WORK 0=volume name is inactive for the tracking
01707 // 1=volume name is active for the tracking (default)
01708 //
01709 // SEEN 0=volume name is invisible
01710 // 1=volume name is visible (default)
01711 // -1=volume invisible with all its descendants in the tree
01712 // -2=volume visible but not its descendants in the tree
01713 //
01714 // LSTY line style 1,2,3,... (default=1)
01715 // LSTY=7 will produce a very precise approximation for
01716 // revolution bodies.
01717 //
01718 // LWID line width -7,...,1,2,3,..7 (default=1)
01719 // LWID<0 will act as abs(LWID) was set for the volume
01720 // and for all the levels below it. When SHAD is 'ON', LWID
01721 // represent the linewidth of the scan lines filling the surfaces
01722 // (whereas the FILL value represent their number). Therefore
01723 // tuning this parameter will help to obtain the desired
01724 // quality/performance ratio.
01725 //
01726 // COLO colour code -166,...,1,2,..166 (default=1)
01727 // n=1=black
01728 // n=2=red; n=17+m, m=0,25, increasing luminosity according to 'm';
01729 // n=3=green; n=67+m, m=0,25, increasing luminosity according to 'm';
01730 // n=4=blue; n=117+m, m=0,25, increasing luminosity according to 'm';
01731 // n=5=yellow; n=42+m, m=0,25, increasing luminosity according to 'm';
01732 // n=6=violet; n=142+m, m=0,25, increasing luminosity according to 'm';
01733 // n=7=lightblue; n=92+m, m=0,25, increasing luminosity according to 'm';
01734 // colour=n*10+m, m=1,2,...9, will produce the same colour
01735 // as 'n', but with increasing luminosity according to 'm';
01736 // COLO<0 will act as if abs(COLO) was set for the volume
01737 // and for all the levels below it.
01738 // When for a volume the attribute FILL is > 1 (and the
01739 // option SHAD is on), the ABS of its colour code must be < 8
01740 // because an automatic shading of its faces will be
01741 // performed.
01742 //
01743 // FILL (1992) fill area -7,...,0,1,...7 (default=0)
01744 // when option SHAD is "on" the FILL attribute of any
01745 // volume can be set different from 0 (normal drawing);
01746 // if it is set to 1, the faces of such volume will be filled
01747 // with solid colours; if ABS(FILL) is > 1, then a light
01748 // source is placed along the observer line, and the faces of
01749 // such volumes will be painted by colours whose luminosity
01750 // will depend on the amount of light reflected;
01751 // if ABS(FILL) = 1, then it is possible to use all the 166
01752 // colours of the colour table, becouse the automatic shading
01753 // is not performed;
01754 // for increasing values of FILL the drawing will be performed
01755 // with higher and higher resolution improving the quality (the
01756 // number of scan lines used to fill the faces increases with FILL);
01757 // it is possible to set different values of FILL
01758 // for different volumes, in order to optimize at the same time
01759 // the performance and the quality of the picture;
01760 // FILL<0 will act as if abs(FILL) was set for the volume
01761 // and for all the levels below it.
01762 // This kind of drawing can be saved in 'picture files'
01763 // or in view banks.
01764 // 0=drawing without fill area
01765 // 1=faces filled with solid colours and resolution = 6
01766 // 2=lowest resolution (very fast)
01767 // 3=default resolution
01768 // 4=.................
01769 // 5=.................
01770 // 6=.................
01771 // 7=max resolution
01772 // Finally, if a coloured background is desired, the FILL
01773 // attribute for the first volume of the tree must be set
01774 // equal to -abs(colo), colo being >0 and <166.
01775 //
01776 // SET set number associated to volume name
01777 // DET detector number associated to volume name
01778 // DTYP detector type (1,2)
01779 //
01780 // InitHIGZ();
01781 gGeoManager->SetVolumeAttribute(name, att, val);
01782 }
|
|
||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1413 of file TGeant3TGeo.cxx. References fMCGeo. 01415 {
01416 //
01417 // Create a new volume by dividing an existing one
01418 //
01419 // NAME Volume name
01420 // MOTHER Mother volume name
01421 // NDIV Number of divisions
01422 // IAXIS Axis value
01423 //
01424 // X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS.
01425 // It divides a previously defined volume.
01426 //
01427 fMCGeo->Gsdvn(name, mother, ndiv, iaxis);
01428 }
|
|
||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1431 of file TGeant3TGeo.cxx. References fMCGeo. 01433 {
01434 //
01435 // Create a new volume by dividing an existing one
01436 //
01437 // Divides mother into ndiv divisions called name
01438 // along axis iaxis starting at coordinate value c0.
01439 // the new volume created will be medium number numed.
01440 //
01441 fMCGeo->Gsdvn2(name, mother, ndiv, iaxis, c0i, numed);
01442 }
|
|
||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1445 of file TGeant3TGeo.cxx. 01447 {
01448 //
01449 // Create a new volume by dividing an existing one
01450 //
01451 gGeoManager->Division(name,mother,iaxis,0,0,step,numed,"s");
01452 }
|
|
||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1455 of file TGeant3TGeo.cxx. 01457 {
01458 //
01459 // Create a new volume by dividing an existing one
01460 //
01461 gGeoManager->Division(name,mother,iaxis,0,c0,step,numed,"sx");
01462 }
|
|
||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1465 of file TGeant3TGeo.cxx. References fMCGeo. 01467 {
01468 //
01469 // Create a new volume by dividing an existing one
01470 //
01471 // Divides MOTHER into divisions called NAME along
01472 // axis IAXIS in steps of STEP. If not exactly divisible
01473 // will make as many as possible and will centre them
01474 // with respect to the mother. Divisions will have medium
01475 // number NUMED. If NUMED is 0, NUMED of MOTHER is taken.
01476 // NDVMX is the expected maximum number of divisions
01477 // (If 0, no protection tests are performed)
01478 //
01479 fMCGeo->Gsdvt(name, mother, step, iaxis, numed, ndvmx);
01480 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1483 of file TGeant3TGeo.cxx. References fMCGeo. 01485 {
01486 //
01487 // Create a new volume by dividing an existing one
01488 //
01489 // Divides MOTHER into divisions called NAME along
01490 // axis IAXIS starting at coordinate value C0 with step
01491 // size STEP.
01492 // The new volume created will have medium number NUMED.
01493 // If NUMED is 0, NUMED of mother is taken.
01494 // NDVMX is the expected maximum number of divisions
01495 // (If 0, no protection tests are performed)
01496 //
01497 fMCGeo->Gsdvt2(name, mother, step, iaxis, c0, numed, ndvmx);
01498 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1193 of file TGeant3TGeo.cxx. References g3smate, PASSCHARD, and PASSCHARL. 01195 {
01196 //
01197 // Defines a Material
01198 //
01199 // kmat number assigned to the material
01200 // name material name
01201 // a atomic mass in au
01202 // z atomic number
01203 // dens density in g/cm3
01204 // absl absorbtion length in cm
01205 // if >=0 it is ignored and the program
01206 // calculates it, if <0. -absl is taken
01207 // radl radiation length in cm
01208 // if >=0 it is ignored and the program
01209 // calculates it, if <0. -radl is taken
01210 // buf pointer to an array of user words
01211 // nbuf number of user words
01212 //
01213 Float_t *ubuf=0;
01214 Int_t nbuf=0;
01215 if (dens <= 0 && a != 0 && z != 0) {
01216 Warning("Gsmate","Density was o, set to 0.01 for imat=%d, name=%s",imat,name);
01217 dens = 0.01;
01218 }
01219 g3smate(imat,PASSCHARD(name), a, z, dens, radl, absl, ubuf, nbuf
01220 PASSCHARL(name));
01221
01222 gGeoManager->Material(name,a,z,dens,imat);
01223 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1226 of file TGeant3TGeo.cxx. References fMCGeo, g3smixt, PASSCHARD, and PASSCHARL. 01228 {
01229 //
01230 // Defines mixture OR COMPOUND IMAT as composed by
01231 // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
01232 //
01233 // If NLMAT.GT.0 then WMAT contains the PROPORTION BY
01234 // WEIGTHS OF EACH BASIC MATERIAL IN THE MIXTURE.
01235 //
01236 // If NLMAT.LT.0 then WMAT contains the number of atoms
01237 // of a given kind into the molecule of the COMPOUND
01238 // In this case, WMAT in output is changed to relative
01239 // weigths.
01240 //
01241 g3smixt(imat,PASSCHARD(name),a,z,dens,nlmat,wmat PASSCHARL(name));
01242 fMCGeo->Mixture(imat, name, a, z, dens, TMath::Abs(nlmat), wmat);
01243 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 1501 of file TGeant3TGeo.cxx. 01502 {
01503 //
01504 // Flags volume CHNAME whose contents will have to be ordered
01505 // along axis IAX, by setting the search flag to -IAX
01506 // IAX = 1 X axis
01507 // IAX = 2 Y axis
01508 // IAX = 3 Z axis
01509 // IAX = 4 Rxy (static ordering only -> GTMEDI)
01510 // IAX = 14 Rxy (also dynamic ordering -> GTNEXT)
01511 // IAX = 5 Rxyz (static ordering only -> GTMEDI)
01512 // IAX = 15 Rxyz (also dynamic ordering -> GTNEXT)
01513 // IAX = 6 PHI (PHI=0 => X axis)
01514 // IAX = 7 THETA (THETA=0 => Z axis)
01515 //
01516
01517 }
|
|
||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1520 of file TGeant3TGeo.cxx. References fMCGeo. 01522 {
01523 //
01524 // Position a volume into an existing one
01525 //
01526 // NAME Volume name
01527 // NUMBER Copy number of the volume
01528 // MOTHER Mother volume name
01529 // X X coord. of the volume in mother ref. sys.
01530 // Y Y coord. of the volume in mother ref. sys.
01531 // Z Z coord. of the volume in mother ref. sys.
01532 // IROT Rotation matrix number w.r.t. mother ref. sys.
01533 // ONLY ONLY/MANY flag
01534 //
01535 // It positions a previously defined volume in the mother.
01536 //
01537 fMCGeo->Gspos(name, nr, mother, x, y, z, irot, konly);
01538 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1554 of file TGeant3TGeo.cxx. References fMCGeo. 01557 {
01558 //
01559 // Place a copy of generic volume NAME with user number
01560 // NR inside MOTHER, with its parameters UPAR(1..NP)
01561 //
01562
01563 fMCGeo->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
01564 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1541 of file TGeant3TGeo.cxx. References fMCGeo. 01544 {
01545 //
01546 // Place a copy of generic volume NAME with user number
01547 // NR inside MOTHER, with its parameters UPAR(1..NP)
01548 //
01549
01550 fMCGeo->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
01551 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1567 of file TGeant3TGeo.cxx. 01569 {
01570 //
01571 // nmat Rotation matrix number
01572 // THETA1 Polar angle for axis I
01573 // PHI1 Azimuthal angle for axis I
01574 // THETA2 Polar angle for axis II
01575 // PHI2 Azimuthal angle for axis II
01576 // THETA3 Polar angle for axis III
01577 // PHI3 Azimuthal angle for axis III
01578 //
01579 // It defines the rotation matrix number IROT.
01580 //
01581
01582 gGeoManager->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
01583 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1246 of file TGeant3TGeo.cxx. References g3stmed, PASSCHARD, and PASSCHARL. 01250 {
01251 //
01252 // NTMED Tracking medium number
01253 // NAME Tracking medium name
01254 // NMAT Material number
01255 // ISVOL Sensitive volume flag
01256 // IFIELD Magnetic field
01257 // FIELDM Max. field value (Kilogauss)
01258 // TMAXFD Max. angle due to field (deg/step)
01259 // STEMAX Max. step allowed
01260 // DEEMAX Max. fraction of energy lost in a step
01261 // EPSIL Tracking precision (cm)
01262 // STMIN Min. step due to continuous processes (cm)
01263 //
01264 // IFIELD = 0 if no magnetic field; IFIELD = -1 if user decision in GUSWIM;
01265 // IFIELD = 1 if tracking performed with G3RKUTA; IFIELD = 2 if tracking
01266 // performed with G3HELIX; IFIELD = 3 if tracking performed with G3HELX3.
01267 //
01268 Float_t *ubuf=0;
01269 Int_t nbuf=0;
01270 g3stmed(numed,PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
01271 deemax, epsil, stmin, ubuf, nbuf PASSCHARL(name));
01272
01273 gGeoManager->Medium(name,numed,nmat, isvol, ifield, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
01274 }
|
|
||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1624 of file TGeant3TGeo.cxx. References fMCGeo. 01626 {
01627 //
01628 // NAME Volume name
01629 // SHAPE Volume type
01630 // NUMED Tracking medium number
01631 // NPAR Number of shape parameters
01632 // UPAR Vector containing shape parameters
01633 //
01634 // It creates a new volume in the JVOLUM data structure.
01635 //
01636
01637
01638 Int_t ivolu = 0;
01639 ivolu = fMCGeo->Gsvolu(name, shape, nmed, upar, npar);
01640 return ivolu;
01641 }
|
|
||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 1604 of file TGeant3TGeo.cxx. References fMCGeo. 01606 {
01607 //
01608 // NAME Volume name
01609 // SHAPE Volume type
01610 // NUMED Tracking medium number
01611 // NPAR Number of shape parameters
01612 // UPAR Vector containing shape parameters
01613 //
01614 // It creates a new volume in the JVOLUM data structure.
01615 //
01616
01617 Int_t ivolu = 0;
01618 ivolu = fMCGeo->Gsvolu(name, shape, nmed, upar, npar);
01619 return ivolu;
01620
01621 }
|
|
|
Reimplemented from TGeant3. Definition at line 1276 of file TGeant3TGeo.cxx. References g3treve. 01277 {
01278 //
01279 // Controls tracking of all particles belonging to the current event
01280 //
01281 g3treve();
01282 }
|
|
|
Reimplemented from TGeant3. Definition at line 1285 of file TGeant3TGeo.cxx. References gtreveroot. 01286 {
01287 //
01288 // Controls tracking of all particles belonging to the current event
01289 //
01290 gtreveroot();
01291 }
|
|
|
Definition at line 1998 of file TGeant3TGeo.cxx. References TGeant3::CreateFloatArray(), TGeant3::G3Material(), and TGeant3::G3Mixture(). Referenced by FinishGeometry(). 01999 {
02000 // Imports the Root material in Geant3 and returns its Geant3 index
02001 // ---
02002
02003 Int_t kmat;
02004 const TGeoMixture* mixt = dynamic_cast<const TGeoMixture*>(mat);
02005 if (mixt) {
02006 // TGeo stores only proportions by weigth
02007 Int_t nlmat = mixt->GetNelements();
02008 Float_t* fa = CreateFloatArray(mixt->GetAmixt(), TMath::Abs(nlmat));
02009 Float_t* fz = CreateFloatArray(mixt->GetZmixt(), TMath::Abs(nlmat));
02010 Float_t* fwmat = CreateFloatArray(mixt->GetWmixt(), TMath::Abs(nlmat));
02011 G3Mixture(kmat, mixt->GetName(), fa, fz, mixt->GetDensity(), TMath::Abs(nlmat), fwmat);
02012 delete [] fa;
02013 delete [] fz;
02014 delete [] fwmat;
02015 }
02016 else {
02017 Float_t* buf = 0;
02018 // Inject radlen with negative sign to be stored in G3
02019 Double_t radlen = mat->GetRadLen();
02020 // Ignore abslen from TGeo and let G3 compute it
02021 G3Material(kmat, mat->GetName(), mat->GetA(), mat->GetZ(),
02022 mat->GetDensity(), -radlen, 0, buf, 0);
02023 }
02024 return kmat;
02025 }
|
|
|
Reimplemented from TGeant3. Definition at line 41 of file TGeant3TGeo.h. 00041 {return kTRUE;}
|
|
|
Reimplemented from TGeant3. Definition at line 579 of file TGeant3TGeo.cxx. References fGcvol1, gcomad, gcvol1, PASSCHARD, and PASSCHARL. Referenced by TGeant3TGeo(). 00580 {
00581 //
00582 // Assigns the address of the GEANT common blocks to the structures
00583 // that allow their access from C++
00584 //
00585 // printf("LoadAddress\n");
00586 // TGeant3::LoadAddress();
00587 gcomad(PASSCHARD("GCVOL1"),(int*&) fGcvol1 PASSCHARL("GCVOL1"));
00588 gcvol1 = fGcvol1;
00589 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 792 of file TGeant3TGeo.cxx. References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Material(). 00795 {
00796 //
00797 // Defines a Material
00798 //
00799 // kmat number assigned to the material
00800 // name material name
00801 // a atomic mass in au
00802 // z atomic number
00803 // dens density in g/cm3
00804 // absl absorbtion length in cm
00805 // if >=0 it is ignored and the program
00806 // calculates it, if <0. -absl is taken
00807 // radl radiation length in cm
00808 // if >=0 it is ignored and the program
00809 // calculates it, if <0. -radl is taken
00810 // buf pointer to an array of user words
00811 // nbuf number of user words
00812 //
00813
00814
00815 Float_t* fbuf = CreateFloatArray(buf, nwbuf);
00816 G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
00817 delete [] fbuf;
00818
00819 fMCGeo->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
00820 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 762 of file TGeant3TGeo.cxx. References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Material(). 00765 {
00766 //
00767 // Defines a Material
00768 //
00769 // kmat number assigned to the material
00770 // name material name
00771 // a atomic mass in au
00772 // z atomic number
00773 // dens density in g/cm3
00774 // absl absorbtion length in cm
00775 // if >=0 it is ignored and the program
00776 // calculates it, if <0. -absl is taken
00777 // radl radiation length in cm
00778 // if >=0 it is ignored and the program
00779 // calculates it, if <0. -radl is taken
00780 // buf pointer to an array of user words
00781 // nbuf number of user words
00782 //
00783
00784 Float_t* fbuf = CreateFloatArray(buf, nwbuf);
00785 G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
00786 delete [] fbuf;
00787
00788 fMCGeo->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
00789 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 943 of file TGeant3TGeo.cxx. References fMCGeo. 00945 {
00946 //
00947 // krot rotation matrix number assigned
00948 // theta1 polar angle for axis i
00949 // phi1 azimuthal angle for axis i
00950 // theta2 polar angle for axis ii
00951 // phi2 azimuthal angle for axis ii
00952 // theta3 polar angle for axis iii
00953 // phi3 azimuthal angle for axis iii
00954 //
00955 // it defines the rotation matrix number irot.
00956 //
00957 krot = -1;
00958 fMCGeo->Matrix(krot, thex, phix, they, phiy, thez, phiz);
00959 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 910 of file TGeant3TGeo.cxx. References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Medium(). 00914 {
00915 //
00916 // kmed tracking medium number assigned
00917 // name tracking medium name
00918 // nmat material number
00919 // isvol sensitive volume flag
00920 // ifield magnetic field
00921 // fieldm max. field value (kilogauss)
00922 // tmaxfd max. angle due to field (deg/step)
00923 // stemax max. step allowed
00924 // deemax max. fraction of energy lost in a step
00925 // epsil tracking precision (cm)
00926 // stmin min. step due to continuos processes (cm)
00927 //
00928 // ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
00929 // ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
00930 // performed with g3helix; ifield = 3 if tracking performed with g3helx3.
00931 //
00932
00933 Float_t* fubuf = CreateFloatArray(ubuf, nbuf);
00934 G3Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
00935 stmin, fubuf, nbuf);
00936 delete [] fubuf;
00937
00938 fMCGeo->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
00939 epsil, stmin, ubuf, nbuf);
00940 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 879 of file TGeant3TGeo.cxx. References fMCGeo, and TGeant3::G3Medium(). 00883 {
00884 //
00885 // kmed tracking medium number assigned
00886 // name tracking medium name
00887 // nmat material number
00888 // isvol sensitive volume flag
00889 // ifield magnetic field
00890 // fieldm max. field value (kilogauss)
00891 // tmaxfd max. angle due to field (deg/step)
00892 // stemax max. step allowed
00893 // deemax max. fraction of energy lost in a step
00894 // epsil tracking precision (cm)
00895 // stmin min. step due to continuous processes (cm)
00896 //
00897 // ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
00898 // ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
00899 // performed with g3helix; ifield = 3 if tracking performed with g3helx3.
00900 //
00901
00902 G3Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
00903 stmin, ubuf, nbuf);
00904
00905 fMCGeo->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
00906 epsil, stmin, ubuf, nbuf);
00907 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 845 of file TGeant3TGeo.cxx. References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Mixture(). 00847 {
00848 //
00849 // Defines mixture OR COMPOUND IMAT as composed by
00850 // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
00851 //
00852 // If NLMAT > 0 then wmat contains the proportion by
00853 // weights of each basic material in the mixture.
00854 //
00855 // If nlmat < 0 then WMAT contains the number of atoms
00856 // of a given kind into the molecule of the COMPOUND
00857 // In this case, WMAT in output is changed to relative
00858 // weigths.
00859 //
00860
00861 Float_t* fa = CreateFloatArray(a, TMath::Abs(nlmat));
00862 Float_t* fz = CreateFloatArray(z, TMath::Abs(nlmat));
00863 Float_t* fwmat = CreateFloatArray(wmat, TMath::Abs(nlmat));
00864
00865 G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
00866 Int_t i;
00867 for (i=0; i<TMath::Abs(nlmat); i++) {
00868 a[i] = fa[i]; z[i] = fz[i]; wmat[i] = fwmat[i];
00869 }
00870
00871 delete [] fa;
00872 delete [] fz;
00873 delete [] fwmat;
00874
00875 fMCGeo->Mixture(kmat, name, a, z, dens, TMath::Abs(nlmat), wmat);
00876 }
|
|
||||||||||||||||||||||||||||||||
|
Reimplemented from TGeant3. Definition at line 823 of file TGeant3TGeo.cxx. References fMCGeo, and TGeant3::G3Mixture(). 00825 {
00826 //
00827 // Defines mixture OR COMPOUND IMAT as composed by
00828 // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
00829 //
00830 // If NLMAT > 0 then wmat contains the proportion by
00831 // weights of each basic material in the mixture.
00832 //
00833 // If nlmat < 0 then WMAT contains the number of atoms
00834 // of a given kind into the molecule of the COMPOUND
00835 // In this case, WMAT in output is changed to relative
00836 // weigths.
00837 //
00838
00839 G3Mixture(kmat, name, a, z, dens, nlmat, wmat);
00840
00841 fMCGeo->Mixture(kmat, name, a, z, dens, TMath::Abs(nlmat), wmat);
00842 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 602 of file TGeant3TGeo.cxx. 00603 {
00604 //
00605 // Geometry iterator for moving upward in the geometry tree
00606 // Return next volume up
00607 //
00608 fNextVol--;
00609 if (fNextVol>=0) {
00610 Int_t level = gGeoManager->GetLevel();
00611 if (level<=fNextVol) return 0;
00612 TGeoNode *mother = gGeoManager->GetMother(level-fNextVol);
00613 if (!mother) return 0;
00614 sprintf(name, "%s", mother->GetVolume()->GetName());
00615 copy = mother->GetNumber();
00616 return mother->GetVolume()->GetNumber();
00617 }
00618 return 0;
00619 }
|
|
|
Reimplemented from TGeant3. Definition at line 713 of file TGeant3TGeo.cxx. References fMCGeo. 00714 {
00715 // Return number of daughters of the volume specified by volName
00716 // According to A. Morsch' G3toRoot class
00717 // ---
00718
00719 return fMCGeo->NofVolDaughters(volName);
00720 }
|
|
|
Reimplemented from TGeant3. Definition at line 704 of file TGeant3TGeo.cxx. References fMCGeo. 00705 {
00706 //
00707 // Return total number of volumes in the geometry
00708 //
00709 return fMCGeo->NofVolumes();
00710 }
|
|
|
Definition at line 217 of file TGeant3TGeo.h. 00217 {return *this;}
|
|
|
Reimplemented from TGeant3. Definition at line 2107 of file TGeant3TGeo.cxx. Referenced by FinishGeometry(). 02108 {
02109 //
02110 // Set the colors for all the volumes
02111 // this is done sequentially for all volumes
02112 // based on the number of their medium
02113 //
02114 TIter next(gGeoManager->GetListOfVolumes());
02115 TGeoVolume *volume;
02116 while ((volume = (TGeoVolume*)next())) {
02117 if (volume->IsAssembly()) continue;
02118 TGeoMedium *medium = (TGeoMedium*)volume->GetMedium();
02119 Int_t icol = medium->GetId()%6+2;
02120 volume->SetLineColor(icol);
02121 }
02122 }
|
|
|
Reimplemented from TGeant3. Definition at line 962 of file TGeant3TGeo.cxx. References fImportRootGeometry. 00963 {
00964 // Notify Geant3 about use of TGeo geometry.
00965 // The materials and tracking medias will be imported from
00966 // TGeo at FinishGeometry().
00967
00968
00969 fImportRootGeometry = kTRUE;
00970 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 734 of file TGeant3TGeo.cxx. References fMCGeo. 00735 {
00736 // Return the copyNo of i-th daughters of the volume specified by volName
00737 // According to A. Morsch' G3toRoot class
00738 // ---
00739
00740 return fMCGeo->VolDaughterCopyNo(volName, i);
00741 }
|
|
||||||||||||
|
Reimplemented from TGeant3. Definition at line 723 of file TGeant3TGeo.cxx. References fMCGeo. 00724 {
00725 // Return the name of i-th daughters of the volume specified by volName
00726 // According to A. Morsch' G3toRoot class
00727 // ---
00728
00729 return fMCGeo->VolDaughterName(volName, i);
00730 }
|
|
|
Reimplemented from TGeant3. Definition at line 690 of file TGeant3TGeo.cxx. 00691 {
00692 //
00693 // Return the unique numeric identifier for volume name
00694 //
00695 char sname[20];
00696 Int_t len = strlen(name)-1;
00697 if (name[len] != ' ') return fMCGeo->VolId(name);
00698 strncpy(sname, name, len);
00699 sname[len] = 0;
00700 return fMCGeo->VolId(sname);
00701 }
|
|
|
Reimplemented from TGeant3. Definition at line 744 of file TGeant3TGeo.cxx. References fMCGeo. 00745 {
00746 //
00747 // Return material number for a given volume id
00748 //
00749 return fMCGeo->VolId2Mate(id);
00750 }
|
|
|
Reimplemented from TGeant3. Definition at line 753 of file TGeant3TGeo.cxx. References fMCGeo. 00754 {
00755 //
00756 // Return the volume name given the volume identifier
00757 //
00758 return fMCGeo->VolName(id);
00759 }
|
|
|
Definition at line 212 of file TGeant3TGeo.h. Referenced by LoadAddress(). |
|
|
Reimplemented from TGeant3. Definition at line 210 of file TGeant3TGeo.h. Referenced by SetRootGeometry(). |
|
|
Reimplemented from TGeant3. Definition at line 209 of file TGeant3TGeo.h. Referenced by GetShape(), GetTransformation(), Gsdvn(), Gsdvn2(), Gsdvt(), Gsdvt2(), Gsmixt(), Gspos(), Gsposp(), Gsvolu(), Material(), Matrix(), Medium(), Mixture(), NofVolDaughters(), NofVolumes(), TGeant3TGeo(), VolDaughterCopyNo(), VolDaughterName(), VolId(), VolId2Mate(), and VolName(). |
1.3.9.1