TGeant3TGeo Class Reference

#include <TGeant3TGeo.h>

Inheritance diagram for TGeant3TGeo:
TGeant3

List of all members.

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 &copy)
Int_t CurrentVolID (Int_t &copy) const
Int_t CurrentVolOffID (Int_t off, Int_t &copy) const
const char * CurrentVolName () const
const char * CurrentVolOffName (Int_t off) const
const char * CurrentVolPath ()
Bool_t CurrentBoundaryNormal (Double_t &x, Double_t &y, Double_t &z) const
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 ()
Bool_t IsComputeNextMatrix () const
void SetComputeNextMatrix (Bool_t flag=kTRUE)
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_tGcvol1 () 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)
Bool_t GetMaterial (Int_t imat, TString &name, Double_t &a, Double_t &z, Double_t &density, Double_t &radl, Double_t &inter, 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 ()
virtual void SetCollectTracks (Bool_t flag=kTRUE)
Bool_t IsCollectTracks () const

Protected Attributes

TGeoMCGeometry * fMCGeo
Bool_t fImportRootGeometry
Bool_t fCollectTracks
Bool_t fIsComputeNextMatrix
 Tracks get collected via TGeoTrack.
Gcvol1_tfGcvol1
 Compute systematically the matrix to the next crossed node.

Private Member Functions

 TGeant3TGeo (const TGeant3TGeo &)
 GCVOLU common structure.
TGeant3TGeooperator= (const TGeant3TGeo &)
Int_t ImportMaterial (const TGeoMaterial *material)

Detailed Description

Definition at line 34 of file TGeant3TGeo.h.


Constructor & Destructor Documentation

TGeant3TGeo::TGeant3TGeo (  ) 

Definition at line 540 of file TGeant3TGeo.cxx.

00541   : TGeant3(),
00542     fMCGeo(0),
00543     fImportRootGeometry(kFALSE),
00544     fCollectTracks(kFALSE),
00545     fIsComputeNextMatrix(kFALSE),                                                          
00546     fGcvol1(0)
00547 {
00548   //
00549   // Default constructor
00550   geant3tgeo = this;                                                                       
00551 }

TGeant3TGeo::TGeant3TGeo ( const char *  title,
Int_t  nwgeant = 0 
)

Definition at line 554 of file TGeant3TGeo.cxx.

References fggperp, fginvol, fglvolu, fgmedia, fgtmany, fgtmedi, fgtnext, fgtonly, fMCGeo, ggperpTGeo(), ginvolTGeo(), glvoluTGeo(), gmediaTGeo(), gtmanyTGeo(), gtmediTGeo(), gtnextTGeo(), gtonlyTGeo(), and LoadAddress().

00555        : TGeant3(title,nwgeant),
00556          fImportRootGeometry(kFALSE),
00557          fCollectTracks(kFALSE),
00558          fIsComputeNextMatrix(kFALSE),                                                     
00559          fGcvol1(0)
00560 {
00561   //
00562   // Standard constructor for TGeant3 with ZEBRA initialisation
00563   //
00564 
00565   SetName("TGeant3TGeo");
00566   geant3tgeo = this;                                                                       
00567 
00568   fMCGeo = new TGeoMCGeometry("MCGeo", "TGeo Implementation of VirtualMCGeometry");
00569 
00570   LoadAddress();
00571   //set pointers to tracker functions
00572   fginvol = ginvolTGeo;
00573   fgtmedi = gtmediTGeo;
00574   fgtmany = gtmanyTGeo;
00575   fgtonly = gtonlyTGeo;
00576   fgmedia = gmediaTGeo;
00577   fglvolu = glvoluTGeo;
00578   fgtnext = gtnextTGeo;
00579   fggperp = ggperpTGeo;
00580 }

TGeant3TGeo::~TGeant3TGeo (  )  [virtual]

Definition at line 583 of file TGeant3TGeo.cxx.

References fMCGeo.

00584 {
00585    delete fMCGeo;
00586    geant3tgeo = 0;                                                                         
00587 }

TGeant3TGeo::TGeant3TGeo ( const TGeant3TGeo  )  [inline, private]

GCVOLU common structure.

Definition at line 229 of file TGeant3TGeo.h.

00229 : TGeant3() {}


Member Function Documentation

Bool_t TGeant3TGeo::CurrentBoundaryNormal ( Double_t &  x,
Double_t &  y,
Double_t &  z 
) const

Reimplemented from TGeant3.

Definition at line 701 of file TGeant3TGeo.cxx.

References fIsComputeNextMatrix, gGeoManager, TGeant3::IsTrackEntering(), TGeant3::IsTrackExiting(), and TGeant3::TrackPosition().

00702 {                                                                                          
00703 // Return the normal vector of the surface of the last volume exited                       
00704 
00705   if ( ! fIsComputeNextMatrix ) {
00706     Fatal("CurrentBoundaryNormal",
00707           "The option SetComputeNextMatrix has not been activated." );
00708   }    
00709 
00710   if ( ! IsTrackEntering() && ! IsTrackExiting() ) return kFALSE;                          
00711                                                                                            
00712   Double_t pt[3];                                                                          
00713   TrackPosition(pt[0], pt[1], pt[2]);                                                      
00714   gGeoManager->SetCurrentPoint(pt);                                                        
00715   const Double_t* norm = gGeoManager->FindNormalFast();                                    
00716   if (!norm) return kFALSE;                                                                
00717   x = norm[0];                                                                             
00718   y = norm[1];                                                                             
00719   z = norm[2];                                                                             
00720   return kTRUE;                                                                            
00721 }                                                                                          

Int_t TGeant3TGeo::CurrentVolID ( Int_t &  copy  )  const

Reimplemented from TGeant3.

Definition at line 633 of file TGeant3TGeo.cxx.

References gGeoManager.

Referenced by CurrentVolOffID().

00634 {
00635   //
00636   // Returns the current volume ID and copy number
00637   //
00638   if (gGeoManager->IsOutside()) return 0;
00639   TGeoNode *node = gGeoManager->GetCurrentNode();
00640   copy = node->GetNumber();
00641   Int_t id = node->GetVolume()->GetNumber();
00642   return id;
00643 }

const char * TGeant3TGeo::CurrentVolName (  )  const

Reimplemented from TGeant3.

Definition at line 661 of file TGeant3TGeo.cxx.

References gGeoManager.

Referenced by CurrentVolOffName().

00662 {
00663   //
00664   // Returns the current volume name
00665   //
00666   if (gGeoManager->IsOutside()) return gGeoManager->GetTopVolume()->GetName();
00667   return gGeoManager->GetCurrentVolume()->GetName();
00668 }

Int_t TGeant3TGeo::CurrentVolOffID ( Int_t  off,
Int_t &  copy 
) const

Reimplemented from TGeant3.

Definition at line 646 of file TGeant3TGeo.cxx.

References CurrentVolID(), and gGeoManager.

00647 {
00648   //
00649   // Return the current volume "off" upward in the geometrical tree
00650   // ID and copy number
00651   //
00652   if (off<0 || off>gGeoManager->GetLevel()) return 0;
00653   if (off==0) return CurrentVolID(copy);
00654   TGeoNode *node = gGeoManager->GetMother(off);
00655   if (!node) return 0;
00656   copy = node->GetNumber();
00657   return node->GetVolume()->GetNumber();
00658 }

const char * TGeant3TGeo::CurrentVolOffName ( Int_t  off  )  const

Reimplemented from TGeant3.

Definition at line 671 of file TGeant3TGeo.cxx.

References CurrentVolName(), TGeant3::fGcvolu, gGeoManager, and Gcvolu_t::nlevel.

00672 {
00673   //
00674   // Return the current volume "off" upward in the geometrical tree
00675   // ID, name and copy number
00676   // if name=0 no name is returned
00677   //
00678   Int_t i;
00679   if( (i=fGcvolu->nlevel-off-1) < 0 ) {
00680     Warning("CurrentVolOffName",
00681             "Offset requested %d but stack depth %d\n",off,fGcvolu->nlevel);
00682     return 0;
00683   }
00684   if (off<0 || off>gGeoManager->GetLevel()) return 0;
00685   if (off==0) return CurrentVolName();
00686   TGeoNode *node = gGeoManager->GetMother(off);
00687   if (!node) return 0;
00688   return node->GetVolume()->GetName();
00689 }

const char * TGeant3TGeo::CurrentVolPath (  ) 

Reimplemented from TGeant3.

Definition at line 692 of file TGeant3TGeo.cxx.

References GetPath().

00693 {
00694 // Return the path in geometry tree for the current volume
00695 // ---
00696 
00697   return GetPath();
00698 }

void TGeant3TGeo::DrawOneSpec ( const char *  name  )  [virtual]

Reimplemented from TGeant3.

Definition at line 2004 of file TGeant3TGeo.cxx.

02005 {
02006   //
02007   //  Function called when one double-clicks on a volume name
02008   //  in a TPavelabel drawn by Gdtree.
02009   //
02010   return;
02011 }

void TGeant3TGeo::FinishGeometry (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 2075 of file TGeant3TGeo.cxx.

References fImportRootGeometry, TGeant3::G3Medium(), Ggclos(), gGeoManager, ImportMaterial(), and SetColors().

02076 {
02077   //
02078   // Finalise geometry construction
02079   //
02080 
02081   //Close the geometry structure
02082   if (gDebug > 0) printf("FinishGeometry, calling ggclos\n");
02083   Ggclos();
02084 
02085   if (fImportRootGeometry) {
02086 
02087     // Import materials
02088     //
02089     TIter next1(gGeoManager->GetListOfMaterials());
02090     TGeoMaterial* mat;
02091     Int_t nofMaterials = 0;
02092     while ((mat=(TGeoMaterial*)next1())) {
02093       Int_t kmat = ImportMaterial(mat);
02094       mat->SetUniqueID(kmat);
02095       nofMaterials++;
02096     }            
02097 
02098     // Number of media
02099     Int_t nofMedia = 0;
02100     TIter next2(gGeoManager->GetListOfMedia());
02101     TGeoMedium* medx;
02102     while ((medx=(TGeoMedium*)next2())) nofMedia++;
02103 
02104     // Import media
02105     //
02106     Int_t  maxNofMaterials = nofMaterials + nofMedia;
02107     TArrayI usedMaterials(maxNofMaterials);
02108     for (Int_t i=0; i<maxNofMaterials; i++)
02109       usedMaterials[i] = -1;
02110 
02111     TIter next3(gGeoManager->GetListOfMedia());
02112     TGeoMedium* med;
02113     while ((med=(TGeoMedium*)next3())) {
02114       Int_t kmed;
02115       Int_t nmat = med->GetMaterial()->GetUniqueID();
02116 
02117       // if material is already used define a new Geant3 material
02118       // (do not reset TGeoMaterial index)
02119       if (usedMaterials[nmat] >0 )
02120         nmat = ImportMaterial(med->GetMaterial());
02121       usedMaterials[nmat] = 1;        
02122 
02123       Int_t isvol  = (Int_t) med->GetParam(0);
02124       Int_t ifield = (Int_t) med->GetParam(1);
02125       Double_t fieldm = med->GetParam(2);
02126       Double_t tmaxfd = med->GetParam(3);
02127       Double_t stemax = med->GetParam(4);
02128       Double_t deemax = med->GetParam(5);
02129       Double_t epsil  = med->GetParam(6);
02130       Double_t stmin  = med->GetParam(7);
02131       G3Medium(kmed, med->GetName(), nmat, isvol, ifield, fieldm, tmaxfd,
02132                stemax,deemax, epsil, stmin);
02133       med->SetId(kmed);
02134     }
02135     if (gDebug > 0) printf("FinishGeometry, geometry retreived from file, materials/media mapped to G3\n");
02136   } else {
02137     TGeoVolume *top = (TGeoVolume*)gGeoManager->GetListOfVolumes()->First();
02138     gGeoManager->SetTopVolume(top);
02139     if (gDebug > 0) printf("FinishGeometry, calling CloseGeometry\n");
02140     gGeoManager->CloseGeometry();
02141   }
02142 
02143   if (gDebug > 0) printf("FinishGeometry, calling MisalignGeometry()\n");
02144   TVirtualMCApplication::Instance()->MisalignGeometry();
02145   //  gROOT->GetListOfBrowsables()->Add(gGeoManager);
02146   if (gDebug > 0) printf("FinishGeometry, calling SetColors\n");
02147 
02148   //Create the color table
02149   SetColors();
02150   if (gDebug > 0) printf("FinishGeometry, returning\n");
02151 }

virtual Gcvol1_t* TGeant3TGeo::Gcvol1 (  )  const [inline, virtual]

Definition at line 110 of file TGeant3TGeo.h.

References fGcvol1.

00110 {return fGcvol1;}

void TGeant3TGeo::Gdopt ( const char *  name,
const char *  value 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1866 of file TGeant3TGeo.cxx.

01867 {
01868   //
01869   //  NAME   Option name
01870   //  VALUE  Option value
01871   //
01872   //  To set/modify the drawing options.
01873   //     IOPT   IVAL      Action
01874   //
01875   //     THRZ    ON       Draw tracks in R vs Z
01876   //             OFF (D)  Draw tracks in X,Y,Z
01877   //             180
01878   //             360
01879   //     PROJ    PARA (D) Parallel projection
01880   //             PERS     Perspective
01881   //     TRAK    LINE (D) Trajectory drawn with lines
01882   //             POIN       " " with markers
01883   //     HIDE    ON       Hidden line removal using the CG package
01884   //             OFF (D)  No hidden line removal
01885   //     SHAD    ON       Fill area and shading of surfaces.
01886   //             OFF (D)  Normal hidden line removal.
01887   //     RAYT    ON       Ray-tracing on.
01888   //             OFF (D)  Ray-tracing off.
01889   //     EDGE    OFF      Does not draw contours when shad is on.
01890   //             ON  (D)  Normal shading.
01891   //     MAPP    1,2,3,4  Mapping before ray-tracing.
01892   //             0   (D)  No mapping.
01893   //     USER    ON       User graphics options in the raytracing.
01894   //             OFF (D)  Automatic graphics options.
01895   //
01896   return;
01897 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1900 of file TGeant3TGeo.cxx.

01902 {
01903   //
01904   //  NAME   Volume name
01905   //  +
01906   //  THETA  Viewing angle theta (for 3D projection)
01907   //  PHI    Viewing angle phi (for 3D projection)
01908   //  PSI    Viewing angle psi (for 2D rotation)
01909   //  U0     U-coord. (horizontal) of volume origin
01910   //  V0     V-coord. (vertical) of volume origin
01911   //  SU     Scale factor for U-coord.
01912   //  SV     Scale factor for V-coord.
01913   //
01914   //  This function will draw the volumes,
01915   //  selected with their graphical attributes, set by the Gsatt
01916   //  facility. The drawing may be performed with hidden line removal
01917   //  and with shading effects according to the value of the options HIDE
01918   //  and SHAD; if the option SHAD is ON, the contour's edges can be
01919   //  drawn or not. If the option HIDE is ON, the detector can be
01920   //  exploded (BOMB), clipped with different shapes (CVOL), and some
01921   //  of its parts can be shifted from their original
01922   //  position (SHIFT). When HIDE is ON, if
01923   //  the drawing requires more than the available memory, the program
01924   //  will evaluate and display the number of missing words
01925   //  (so that the user can increase the
01926   //  size of its ZEBRA store). Finally, at the end of each drawing (with HIDE on),
01927   //  the program will print messages about the memory used and
01928   //  statistics on the volumes' visibility.
01929   //  The following commands will produce the drawing of a green
01930   //  volume, specified by NAME, without using the hidden line removal
01931   //  technique, using the hidden line removal technique,
01932   //  with different linewidth and colour (red), with
01933   //  solid colour, with shading of surfaces, and without edges.
01934   //  Finally, some examples are given for the ray-tracing. (A possible
01935   //  string for the NAME of the volume can be found using the command DTREE).
01936   //
01937   return;
01938 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1941 of file TGeant3TGeo.cxx.

01943 {
01944   //
01945   //  NAME   Volume name
01946   //  CAXIS  Axis value
01947   //  CUTVAL Cut plane distance from the origin along the axis
01948   //  +
01949   //  U0     U-coord. (horizontal) of volume origin
01950   //  V0     V-coord. (vertical) of volume origin
01951   //  SU     Scale factor for U-coord.
01952   //  SV     Scale factor for V-coord.
01953   //
01954   //  The cut plane is normal to caxis (X,Y,Z), corresponding to iaxis (1,2,3),
01955   //  and placed at the distance cutval from the origin.
01956   //  The resulting picture is seen from the the same axis.
01957   //  When HIDE Mode is ON, it is possible to get the same effect with
01958   //  the CVOL/BOX function.
01959   //
01960   return;
01961 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1964 of file TGeant3TGeo.cxx.

01967 {
01968   //
01969   //  NAME   Volume name
01970   //  CUTTHE Theta angle of the line normal to cut plane
01971   //  CUTPHI Phi angle of the line normal to cut plane
01972   //  CUTVAL Cut plane distance from the origin along the axis
01973   //  +
01974   //  THETA  Viewing angle theta (for 3D projection)
01975   //  PHI    Viewing angle phi (for 3D projection)
01976   //  U0     U-coord. (horizontal) of volume origin
01977   //  V0     V-coord. (vertical) of volume origin
01978   //  SU     Scale factor for U-coord.
01979   //  SV     Scale factor for V-coord.
01980   //
01981   //  The cut plane is normal to the line given by the cut angles
01982   //  cutthe and cutphi and placed at the distance cutval from the origin.
01983   //  The resulting picture is seen from the viewing angles theta,phi.
01984   //
01985   return;
01986 }

void TGeant3TGeo::Gdshow ( Int_t  view  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1855 of file TGeant3TGeo.cxx.

01856 {
01857   //
01858   //  IVIEW  View number
01859   //
01860   //  It shows on the screen the contents of a view bank. It
01861   //  can be called after a view bank has been closed.
01862   //
01863 }

void TGeant3TGeo::Gdspec ( const char *  name  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1989 of file TGeant3TGeo.cxx.

01990 {
01991   //
01992   //  NAME   Volume name
01993   //
01994   //  Shows 3 views of the volume (two cut-views and a 3D view), together with
01995   //  its geometrical specifications. The 3D drawing will
01996   //  be performed according the current values of the options HIDE and
01997   //  SHAD and according the current SetClipBox clipping parameters for that
01998   //  volume.
01999   //
02000   return;
02001 }

void TGeant3TGeo::Gdtom ( Double_t *  xd,
Double_t *  xm,
Int_t  iflag 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1369 of file TGeant3TGeo.cxx.

References gGeoManager.

01370 {
01371   //
01372   //  Computes coordinates XM (Master Reference System
01373   //  knowing the coordinates XD (Detector Ref System)
01374   //  The local reference system can be initialized by
01375   //    - the tracking routines and GDTOM used in GUSTEP
01376   //    - a call to GSCMED(NLEVEL,NAMES,NUMBER)
01377   //        (inverse routine is GMTOD)
01378   //
01379   //   If IFLAG=1  convert coordinates
01380   //      IFLAG=2  convert direction cosinus
01381   //
01382 
01383    if (iflag == 1) gGeoManager->LocalToMaster(xd,xm);
01384    else            gGeoManager->LocalToMasterVect(xd,xm);
01385 }

void TGeant3TGeo::Gdtom ( Float_t *  xd,
Float_t *  xm,
Int_t  iflag 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1347 of file TGeant3TGeo.cxx.

References gGeoManager.

01348 {
01349   //
01350   //  Computes coordinates XM (Master Reference System
01351   //  knowing the coordinates XD (Detector Ref System)
01352   //  The local reference system can be initialized by
01353   //    - the tracking routines and GDTOM used in GUSTEP
01354   //    - a call to GSCMED(NLEVEL,NAMES,NUMBER)
01355   //        (inverse routine is GMTOD)
01356   //
01357   //   If IFLAG=1  convert coordinates
01358   //      IFLAG=2  convert direction cosinus
01359   //
01360    Double_t XM[3], XD[3];
01361    Int_t i;
01362    for (i=0;i<3;i++) XD[i] = xd[i];
01363    if (iflag == 1) gGeoManager->LocalToMaster(XD,XM);
01364    else            gGeoManager->LocalToMasterVect(XD,XM);
01365    for (i=0;i<3;i++) xm[i]=XM[i];
01366 }

void TGeant3TGeo::Gdtree ( const char *  name,
Int_t  levmax = 15,
Int_t  ispec = 0 
) [virtual]

Reimplemented from TGeant3.

Definition at line 2014 of file TGeant3TGeo.cxx.

02015 {
02016   //
02017   //  NAME   Volume name
02018   //  LEVMAX Depth level
02019   //  ISELT  Options
02020   //
02021   //  This function draws the logical tree,
02022   //  Each volume in the tree is represented by a TPaveTree object.
02023   //  Double-clicking on a TPaveTree draws the specs of the corresponding volume.
02024   //  Use TPaveTree pop-up menu to select:
02025   //    - drawing specs
02026   //    - drawing tree
02027   //    - drawing tree of parent
02028   //
02029   return;
02030 }

void TGeant3TGeo::GdtreeParent ( const char *  name,
Int_t  levmax = 15,
Int_t  ispec = 0 
) [virtual]

Reimplemented from TGeant3.

Definition at line 2033 of file TGeant3TGeo.cxx.

02034 {
02035   //
02036   //  NAME   Volume name
02037   //  LEVMAX Depth level
02038   //  ISELT  Options
02039   //
02040   //  This function draws the logical tree of the parent of name.
02041   //
02042 }

void TGeant3TGeo::GeomIter (  ) 

Reimplemented from TGeant3.

Definition at line 603 of file TGeant3TGeo.cxx.

References TGeant3::fNextVol, and gGeoManager.

00604 {
00605   //
00606   // Geometry iterator for moving upward in the geometry tree
00607   // Initialise the iterator
00608   //
00609   fNextVol=gGeoManager->GetLevel();
00610 }

Bool_t TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1079 of file TGeant3TGeo.cxx.

References TGeant3::Gclink(), TGeant3::Gfmate(), gGeoManager, Gclink_t::jmate, TGeant3::Lq(), and nbuf.

01083 {
01084     // Returns the Material and its parameters for the volume specified
01085     // by volumeName.
01086     // Note, Geant3 stores and uses mixtures as an element with an effective
01087     // Z and A. Consequently, if the parameter Z is not integer, then
01088     // this material represents some sort of mixture.
01089     // Inputs:
01090     //   TString& volumeName  The volume name
01091     // Outputs:
01092     //   TSrting   &name       Material name
01093     //   Int_t     &imat       Material index number
01094     //   Double_t  &a          Average Atomic mass of material
01095     //   Double_t  &z          Average Atomic number of material
01096     //   Double_t  &dens       Density of material [g/cm^3]
01097     //   Double_t  &radl       Average radiation length of material [cm]
01098     //   Double_t  &inter      Average interaction length of material [cm]
01099     //   TArrayD   &par        A TArrayD of user defined parameters.
01100     // Return:
01101     //   kTRUE if no errors
01102    Int_t i,jma,nbuf;
01103    Float_t af,zf,densf,radlf,interf;
01104    Float_t *ubuf;
01105    Char_t namec[20] = {20*'\0'};
01106    TGeoVolume *vol = gGeoManager->GetVolume(volumeName.Data());
01107    if (!vol) return kFALSE;
01108    TGeoMedium *med = vol->GetMedium();
01109    if (!med) return kFALSE;
01110    TGeoMaterial *mat = med->GetMaterial();
01111    imat = mat->GetUniqueID();   
01112 
01113    nbuf = jma = Lq()[Gclink()->jmate-imat];
01114    ubuf = new Float_t[nbuf];
01115    Gfmate(imat,namec,af,zf,densf,radlf,interf,ubuf,nbuf);
01116    name = mat->GetName();
01117    name = name.Strip(TString::kTrailing, '$');
01118    //
01119    par.Set(nbuf);
01120    for(i=0;i<nbuf;i++) par.AddAt(((Double_t)ubuf[i]),i);
01121    delete[] ubuf;
01122    a      = mat->GetA();
01123    z      = mat->GetZ();
01124    dens   = mat->GetDensity();
01125    radl   = radlf;
01126    inter  = interf;
01127    return kTRUE;
01128 }

Bool_t TGeant3TGeo::GetMaterial ( Int_t  imat,
TString &  name,
Double_t &  a,
Double_t &  z,
Double_t &  density,
Double_t &  radl,
Double_t &  inter,
TArrayD &  par 
)

Reimplemented from TGeant3.

Definition at line 1066 of file TGeant3TGeo.cxx.

01069 {
01070   //
01071   // Return parameters for material IMAT
01072   // (previously called Gfmate)
01073   //
01074   
01075   return TGeant3::GetMaterial(imat, name, a, z, density, radl, inter, par);
01076 }  

Int_t TGeant3TGeo::GetMedium (  )  const [virtual]

Reimplemented from TGeant3.

Definition at line 1186 of file TGeant3TGeo.cxx.

01187 {
01188 // Temporary added 
01189 
01190   return TGeant3::GetMedium();
01191 }

Bool_t TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1131 of file TGeant3TGeo.cxx.

References TGeant3::Gclink(), TGeant3::Gftmed(), gGeoManager, Gclink_t::jtmed, TGeant3::Lq(), and nbuf.

01136 {
01137     // Returns the Medium and its parameters for the volume specified
01138     // by volumeName.
01139     // Inputs:
01140     //   TString& volumeName  The volume name.
01141     // Outputs:
01142     //   TString  &name       Medium name
01143     //   Int_t    &nmat       Material number defined for this medium
01144     //   Int_t    &imed       The medium index number
01145     //   Int_t    &isvol      volume number defined for this medium
01146     //   Int_t    &iflield    Magnetic field flag
01147     //   Double_t &fieldm     Magnetic field strength
01148     //   Double_t &tmaxfd     Maximum angle of deflection per step
01149     //   Double_t &stemax     Maximum step size
01150     //   Double_t &deemax     Maximum fraction of energy allowed to be lost
01151     //                        to continuous process.
01152     //   Double_t &epsil      Boundary crossing precision
01153     //   Double_t &stmin      Minimum step size allowed
01154     //   TArrayD  &par        A TArrayD of user parameters with all of the
01155     //                        parameters of the specified medium.
01156     // Return:
01157     //   kTRUE if there where no errors
01158    Int_t i,nbuf;
01159    Float_t fieldmf,tmaxfdf,stemaxf,deemaxf,epsilf,stminf;
01160    Float_t *buf;
01161    Char_t namec[25] = {25*'\0'};
01162    TGeoVolume *vol = gGeoManager->GetVolume(volumeName.Data());
01163    if (!vol) return kFALSE;
01164    TGeoMedium *med = vol->GetMedium();
01165    if (!med) return kFALSE;
01166    imed = med->GetId();
01167    nbuf = Lq()[Gclink()->jtmed-imed];
01168    buf  = new Float_t[nbuf];
01169    Gftmed(imed,namec,nmat,isvol,ifield,fieldmf,tmaxfdf,stemaxf,deemaxf,
01170           epsilf,stminf,buf,&nbuf);
01171    name = med->GetName();
01172    name = name.Strip(TString::kTrailing, '$');
01173    par.Set(nbuf);
01174    for(i=0;i<nbuf;i++) par.AddAt(((Double_t)buf[i]),i);
01175    delete[] buf;
01176    fieldm = (Double_t) fieldmf;
01177    tmaxfd = (Double_t) tmaxfdf;
01178    stemax = (Double_t) stemaxf;
01179    deemax = (Double_t) deemaxf;
01180    epsil  = (Double_t) epsilf;
01181    stmin  = (Double_t) stminf;
01182    return kTRUE;
01183 }         

const char * TGeant3TGeo::GetNodeName (  ) 

Reimplemented from TGeant3.

Definition at line 1014 of file TGeant3TGeo.cxx.

References gGeoManager.

01015 {
01016 // Get name of current G3 node
01017    if (gGeoManager->IsOutside()) return "";
01018    return gGeoManager->GetCurrentNode()->GetName();
01019 }

const char * TGeant3TGeo::GetPath (  ) 

Reimplemented from TGeant3.

Definition at line 1007 of file TGeant3TGeo.cxx.

References gGeoManager.

Referenced by CurrentVolPath().

01008 {
01009 // Get current path inside G3 geometry
01010    return gGeoManager->GetPath();
01011 }

Bool_t TGeant3TGeo::GetShape ( const TString &  volumePath,
TString &  shapeType,
TArrayD &  par 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1048 of file TGeant3TGeo.cxx.

References fMCGeo.

01050 {
01051     // Returns the shape and its parameters for the volume specified
01052     // by volumeName.
01053     // Inputs:
01054     //   TString& volumeName  The volume name
01055     // Outputs:
01056     //   TString &shapeType   Shape type
01057     //   TArrayD &par         A TArrayD of parameters with all of the
01058     //                        parameters of the specified shape.
01059     // Return:
01060     //   A logical indicating whether there was an error in getting this
01061     //   information
01062    return fMCGeo->GetShape(volumePath, shapeType, par);
01063 }

Bool_t TGeant3TGeo::GetTransformation ( const TString &  volumePath,
TGeoHMatrix &  matrix 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1022 of file TGeant3TGeo.cxx.

References fMCGeo.

01023 {
01024     // Returns the Transformation matrix between the volume specified
01025     // by the path volumePath and the Top or mater volume. The format
01026     // of the path volumePath is as follows (assuming ALIC is the Top volume)
01027     // "/ALIC_1/DDIP_1/S05I_2/S05H_1/S05G_3". Here ALIC is the top most
01028     // or master volume which has only 1 instance of. Of all of the daughter
01029     // volumes of ALICE, DDIP volume copy #1 is indicated. Similarly for
01030     // the daughter volume of DDIP is S05I copy #2 and so on.
01031     // Inputs:
01032     //   TString& volumePath  The volume path to the specific volume
01033     //                        for which you want the matrix. Volume name
01034     //                        hierarchy is separated by "/" while the
01035     //                        copy number is appended using a "_".
01036     // Outputs:
01037     //  TGeoHMatrix &mat      A matrix with its values set to those
01038     //                        appropriate to the Local to Master transformation
01039     // Return:
01040     //   A logical value if kFALSE then an error occurred and no change to
01041     //   mat was made.
01042 
01043    // We have to preserve the modeler state
01044    return fMCGeo->GetTransformation(volumePath, mat);
01045 }   

void TGeant3TGeo::Ggclos (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1200 of file TGeant3TGeo.cxx.

References TGeant3::fVolNames.

Referenced by FinishGeometry().

01201 {
01202   //
01203   //   Closes off the geometry setting.
01204   //   Initializes the search list for the contents of each
01205   //   volume following the order they have been positioned, and
01206   //   inserting the content '0' when a call to GSNEXT (-1) has
01207   //   been required by the user.
01208   //   Performs the development of the JVOLUM structure for all
01209   //   volumes with variable parameters, by calling GGDVLP.
01210   //   Interprets the user calls to GSORD, through GGORD.
01211   //   Computes and stores in a bank (next to JVOLUM mother bank)
01212   //   the number of levels in the geometrical tree and the
01213   //   maximum number of contents per level, by calling GGNLEV.
01214   //   Sets status bit for CONCAVE volumes, through GGCAVE.
01215   //   Completes the JSET structure with the list of volume names
01216   //   which identify uniquely a given physical detector, the
01217   //   list of bit numbers to pack the corresponding volume copy
01218   //   numbers, and the generic path(s) in the JVOLUM tree,
01219   //   through the routine GHCLOS.
01220   //
01221   fVolNames = 0;
01222 }

Int_t TGeant3TGeo::Glvolu ( Int_t  nlev,
Int_t *  lnam,
Int_t *  lnum 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1832 of file TGeant3TGeo.cxx.

01833 {
01834   //
01835   //  nlev   number of leveles deap into the volume tree
01836   //         size of the arrays lnam and lnum
01837   //  lnam   an integer array whos 4 bytes contain the askii code for the
01838   //         volume names
01839   //  lnum   an integer array containing the copy numbers for that specific
01840   //         volume
01841   //
01842   //  This routine fills the volulme paramters in common /gcvolu/ for a
01843   //  physical tree, specified by the list lnam and lnum of volume names
01844   //  and numbers, and for all its ascendants up to level 1. This routine
01845   //  is optimsed and does not re-compute the part of the history already
01846   //  available in GCVOLU. This means that if it is used in user programs
01847   //  outside the usual framwork of the tracking, the user has to initilise
01848   //  to zero NLEVEL in the common GCVOLU. It return 0 if there were no
01849   //  problems in make the call.
01850   //
01851   return 0;
01852 }

void TGeant3TGeo::Gmedia ( Float_t *  x,
Int_t &  numed 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1388 of file TGeant3TGeo.cxx.

References gCurrentNode, gcvolu, gGeoManager, Gcvolu_t::lvolum, medium, Gcvolu_t::names, Gcvolu_t::nlevel, and Gcvolu_t::number.

01389 {
01390   //
01391   //   Finds in which volume/medium the point X is, and updates the
01392   //    common /GCVOLU/ and the structure JGPAR accordingly.
01393   //
01394   //   NUMED returns the tracking medium number, or 0 if point is
01395   //         outside the experimental setup.
01396   //
01397 
01398    gCurrentNode = gGeoManager->FindNode(x[0],x[1],x[2]);
01399    if (gGeoManager->IsOutside()) {
01400       numed=0;
01401    } else {
01402       gcvolu->nlevel = 1 + gGeoManager->GetLevel();
01403       gGeoManager->GetBranchNames(gcvolu->names);
01404       gGeoManager->GetBranchNumbers(gcvolu->number,gcvolu->lvolum);
01405       TGeoVolume *vol = gCurrentNode->GetVolume();
01406       if (vol) {
01407          TGeoMedium *medium = vol->GetMedium();
01408          if (medium) numed = medium->GetId();
01409       } else {
01410          printf("ERROR: gmedia: NULL volume\n");
01411       }
01412    }
01413 }

void TGeant3TGeo::Gmtod ( Double_t *  xm,
Double_t *  xd,
Int_t  iflag 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1439 of file TGeant3TGeo.cxx.

References gGeoManager.

01440 {
01441   //
01442   //       Computes coordinates XD (in DRS)
01443   //       from known coordinates XM in MRS
01444   //       The local reference system can be initialized by
01445   //         - the tracking routines and GMTOD used in GUSTEP
01446   //         - a call to GMEDIA(XM,NUMED,CHECK)
01447   //         - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
01448   //             (inverse routine is GDTOM)
01449   //
01450   //        If IFLAG=1  convert coordinates
01451   //           IFLAG=2  convert direction cosinus
01452   //
01453 
01454 
01455    if (iflag == 1) gGeoManager->MasterToLocal(xm,xd);
01456    else            gGeoManager->MasterToLocalVect(xm,xd);
01457 }

void TGeant3TGeo::Gmtod ( Float_t *  xm,
Float_t *  xd,
Int_t  iflag 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1416 of file TGeant3TGeo.cxx.

References gGeoManager.

01417 {
01418   //
01419   //       Computes coordinates XD (in DRS)
01420   //       from known coordinates XM in MRS
01421   //       The local reference system can be initialized by
01422   //         - the tracking routines and GMTOD used in GUSTEP
01423   //         - a call to GMEDIA(XM,NUMED,CHECK)
01424   //         - a call to GLVOLU(NLEVEL,NAMES,NUMBER,IER)
01425   //             (inverse routine is GDTOM)
01426   //
01427   //        If IFLAG=1  convert coordinates
01428   //           IFLAG=2  convert direction cosinus
01429   //
01430    Double_t XM[3], XD[3];
01431    Int_t i;
01432    for (i=0;i<3;i++) XM[i]=xm[i];
01433    if (iflag == 1) gGeoManager->MasterToLocal(XM,XD);
01434    else            gGeoManager->MasterToLocalVect(XM,XD);
01435    for (i=0;i<3;i++) xd[i] = XD[i];
01436 }

void TGeant3TGeo::Gprint ( const char *  name  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1225 of file TGeant3TGeo.cxx.

01226 {
01227   //
01228   // Routine to print data structures
01229   // CHNAME   name of a data structure
01230   //
01231 }

void TGeant3TGeo::Gprotm ( Int_t  nmat = 0  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1633 of file TGeant3TGeo.cxx.

References Error, and gGeoManager.

01634 {
01635   //
01636   //    To print rotation matrices structure JROTM
01637   //     nmat     Rotation matrix number
01638   //
01639   TIter next(gGeoManager->GetListOfMatrices());
01640   TGeoMatrix *matrix;
01641   while ((matrix = (TGeoMatrix*)next())) {
01642      if (UInt_t(nmat) == matrix->GetUniqueID()) {
01643         matrix->Print();
01644         return;
01645      }
01646   }     
01647   Error("Gprotm","Rotation with id=%i not found", nmat);
01648  }

void TGeant3TGeo::Gsatt ( const char *  name,
const char *  att,
Int_t  val 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1743 of file TGeant3TGeo.cxx.

References gGeoManager.

01744 {
01745   //
01746   //  NAME   Volume name
01747   //  IOPT   Name of the attribute to be set
01748   //  IVAL   Value to which the attribute is to be set
01749   //
01750   //  name= "*" stands for all the volumes.
01751   //  iopt can be chosen among the following :
01752   //
01753   //     WORK   0=volume name is inactive for the tracking
01754   //            1=volume name is active for the tracking (default)
01755   //
01756   //     SEEN   0=volume name is invisible
01757   //            1=volume name is visible (default)
01758   //           -1=volume invisible with all its descendants in the tree
01759   //           -2=volume visible but not its descendants in the tree
01760   //
01761   //     LSTY   line style 1,2,3,... (default=1)
01762   //            LSTY=7 will produce a very precise approximation for
01763   //            revolution bodies.
01764   //
01765   //     LWID   line width -7,...,1,2,3,..7 (default=1)
01766   //            LWID<0 will act as abs(LWID) was set for the volume
01767   //            and for all the levels below it. When SHAD is 'ON', LWID
01768   //            represent the linewidth of the scan lines filling the surfaces
01769   //            (whereas the FILL value represent their number). Therefore
01770   //            tuning this parameter will help to obtain the desired
01771   //            quality/performance ratio.
01772   //
01773   //     COLO   colour code -166,...,1,2,..166 (default=1)
01774   //            n=1=black
01775   //            n=2=red;    n=17+m, m=0,25, increasing luminosity according to 'm';
01776   //            n=3=green;  n=67+m, m=0,25, increasing luminosity according to 'm';
01777   //            n=4=blue;   n=117+m, m=0,25, increasing luminosity according to 'm';
01778   //            n=5=yellow; n=42+m, m=0,25, increasing luminosity according to 'm';
01779   //            n=6=violet; n=142+m, m=0,25, increasing luminosity according to 'm';
01780   //            n=7=lightblue; n=92+m, m=0,25, increasing luminosity according to 'm';
01781   //            colour=n*10+m, m=1,2,...9, will produce the same colour
01782   //            as 'n', but with increasing luminosity according to 'm';
01783   //            COLO<0 will act as if abs(COLO) was set for the volume
01784   //            and for all the levels below it.
01785   //            When for a volume the attribute FILL is > 1 (and the
01786   //            option SHAD is on), the ABS of its colour code must be < 8
01787   //            because an automatic shading of its faces will be
01788   //            performed.
01789   //
01790   //     FILL  (1992) fill area  -7,...,0,1,...7 (default=0)
01791   //            when option SHAD is "on" the FILL attribute of any
01792   //            volume can be set different from 0 (normal drawing);
01793   //            if it is set to 1, the faces of such volume will be filled
01794   //            with solid colours; if ABS(FILL) is > 1, then a light
01795   //            source is placed along the observer line, and the faces of
01796   //            such volumes will be painted by colours whose luminosity
01797   //            will depend on the amount of light reflected;
01798   //            if ABS(FILL) = 1, then it is possible to use all the 166
01799   //            colours of the colour table, becouse the automatic shading
01800   //            is not performed;
01801   //            for increasing values of FILL the drawing will be performed
01802   //            with higher and higher resolution improving the quality (the
01803   //            number of scan lines used to fill the faces increases with FILL);
01804   //            it is possible to set different values of FILL
01805   //            for different volumes, in order to optimize at the same time
01806   //            the performance and the quality of the picture;
01807   //            FILL<0 will act as if abs(FILL) was set for the volume
01808   //            and for all the levels below it.
01809   //            This kind of drawing can be saved in 'picture files'
01810   //            or in view banks.
01811   //            0=drawing without fill area
01812   //            1=faces filled with solid colours and resolution = 6
01813   //            2=lowest resolution (very fast)
01814   //            3=default resolution
01815   //            4=.................
01816   //            5=.................
01817   //            6=.................
01818   //            7=max resolution
01819   //            Finally, if a coloured background is desired, the FILL
01820   //            attribute for the first volume of the tree must be set
01821   //            equal to -abs(colo), colo being >0 and <166.
01822   //
01823   //     SET   set number associated to volume name
01824   //     DET   detector number associated to volume name
01825   //     DTYP  detector type (1,2)
01826   //
01827 //  InitHIGZ();
01828   gGeoManager->SetVolumeAttribute(name, att, val);
01829 }

void TGeant3TGeo::Gsdvn ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1460 of file TGeant3TGeo.cxx.

References fMCGeo.

01462 {
01463   //
01464   // Create a new volume by dividing an existing one
01465   //
01466   //  NAME   Volume name
01467   //  MOTHER Mother volume name
01468   //  NDIV   Number of divisions
01469   //  IAXIS  Axis value
01470   //
01471   //  X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS.
01472   //  It divides a previously defined volume.
01473   //
01474   fMCGeo->Gsdvn(name, mother, ndiv, iaxis);
01475 }

void TGeant3TGeo::Gsdvn2 ( const char *  name,
const char *  mother,
Int_t  ndiv,
Int_t  iaxis,
Double_t  c0i,
Int_t  numed 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1478 of file TGeant3TGeo.cxx.

References fMCGeo.

01480 {
01481   //
01482   // Create a new volume by dividing an existing one
01483   //
01484   // Divides mother into ndiv divisions called name
01485   // along axis iaxis starting at coordinate value c0.
01486   // the new volume created will be medium number numed.
01487   //
01488   fMCGeo->Gsdvn2(name, mother, ndiv, iaxis, c0i, numed);
01489 }

void TGeant3TGeo::Gsdvs ( const char *  name,
const char *  mother,
Float_t  step,
Int_t  iaxis,
Int_t  numed 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1492 of file TGeant3TGeo.cxx.

References gGeoManager.

01494 {
01495   //
01496   // Create a new volume by dividing an existing one
01497   //
01498   gGeoManager->Division(name,mother,iaxis,0,0,step,numed,"s");
01499 }

void TGeant3TGeo::Gsdvs2 ( const char *  name,
const char *  mother,
Float_t  step,
Int_t  iaxis,
Float_t  c0,
Int_t  numed 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1502 of file TGeant3TGeo.cxx.

References gGeoManager.

01504 {
01505   //
01506   // Create a new volume by dividing an existing one
01507   //
01508   gGeoManager->Division(name,mother,iaxis,0,c0,step,numed,"sx");
01509 }

void TGeant3TGeo::Gsdvt ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Int_t  numed,
Int_t  ndvmx 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1512 of file TGeant3TGeo.cxx.

References fMCGeo.

01514 {
01515   //
01516   // Create a new volume by dividing an existing one
01517   //
01518   //       Divides MOTHER into divisions called NAME along
01519   //       axis IAXIS in steps of STEP. If not exactly divisible
01520   //       will make as many as possible and will centre them
01521   //       with respect to the mother. Divisions will have medium
01522   //       number NUMED. If NUMED is 0, NUMED of MOTHER is taken.
01523   //       NDVMX is the expected maximum number of divisions
01524   //          (If 0, no protection tests are performed)
01525   //
01526   fMCGeo->Gsdvt(name, mother, step, iaxis, numed, ndvmx);
01527 }

void TGeant3TGeo::Gsdvt2 ( const char *  name,
const char *  mother,
Double_t  step,
Int_t  iaxis,
Double_t  c0,
Int_t  numed,
Int_t  ndvmx 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1530 of file TGeant3TGeo.cxx.

References fMCGeo.

01532 {
01533   //
01534   // Create a new volume by dividing an existing one
01535   //
01536   //           Divides MOTHER into divisions called NAME along
01537   //            axis IAXIS starting at coordinate value C0 with step
01538   //            size STEP.
01539   //           The new volume created will have medium number NUMED.
01540   //           If NUMED is 0, NUMED of mother is taken.
01541   //           NDVMX is the expected maximum number of divisions
01542   //             (If 0, no protection tests are performed)
01543   //
01544   fMCGeo->Gsdvt2(name, mother, step, iaxis, c0, numed, ndvmx);
01545 }

void TGeant3TGeo::Gsmate ( Int_t  imat,
const char *  name,
Float_t  a,
Float_t  z,
Float_t  dens,
Float_t  radl,
Float_t  absl 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1240 of file TGeant3TGeo.cxx.

References g3smate, gGeoManager, nbuf, PASSCHARD, and PASSCHARL.

01242 {
01243   //
01244   // Defines a Material
01245   //
01246   //  kmat               number assigned to the material
01247   //  name               material name
01248   //  a                  atomic mass in au
01249   //  z                  atomic number
01250   //  dens               density in g/cm3
01251   //  absl               absorbtion length in cm
01252   //                     if >=0 it is ignored and the program
01253   //                     calculates it, if <0. -absl is taken
01254   //  radl               radiation length in cm
01255   //                     if >=0 it is ignored and the program
01256   //                     calculates it, if <0. -radl is taken
01257   //  buf                pointer to an array of user words
01258   //  nbuf               number of user words
01259   //
01260   Float_t *ubuf=0;
01261   Int_t   nbuf=0;
01262   if (dens <= 0 && a != 0 && z != 0) {
01263      Warning("Gsmate","Density was o, set to 0.01 for imat=%d, name=%s",imat,name);
01264      dens = 0.01;
01265   }
01266   g3smate(imat,PASSCHARD(name), a, z, dens, radl, absl, ubuf, nbuf
01267          PASSCHARL(name));
01268 
01269   gGeoManager->Material(name,a,z,dens,imat);
01270 }

void TGeant3TGeo::Gsmixt ( Int_t  imat,
const char *  name,
Float_t *  a,
Float_t *  z,
Float_t  dens,
Int_t  nlmat,
Float_t *  wmat 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1273 of file TGeant3TGeo.cxx.

References fMCGeo, g3smixt, PASSCHARD, and PASSCHARL.

01275 {
01276   //
01277   //       Defines mixture OR COMPOUND IMAT as composed by
01278   //       THE BASIC NLMAT materials defined by arrays A,Z and WMAT
01279   //
01280   //       If NLMAT.GT.0 then WMAT contains the PROPORTION BY
01281   //       WEIGTHS OF EACH BASIC MATERIAL IN THE MIXTURE.
01282   //
01283   //       If NLMAT.LT.0 then WMAT contains the number of atoms
01284   //       of a given kind into the molecule of the COMPOUND
01285   //       In this case, WMAT in output is changed to relative
01286   //       weigths.
01287   //
01288   g3smixt(imat,PASSCHARD(name),a,z,dens,nlmat,wmat PASSCHARL(name));
01289   fMCGeo->Mixture(imat, name, a, z, dens, TMath::Abs(nlmat), wmat);
01290 }

void TGeant3TGeo::Gsord ( const char *  name,
Int_t  iax 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1548 of file TGeant3TGeo.cxx.

01549 {
01550   //
01551   //    Flags volume CHNAME whose contents will have to be ordered
01552   //    along axis IAX, by setting the search flag to -IAX
01553   //           IAX = 1    X axis
01554   //           IAX = 2    Y axis
01555   //           IAX = 3    Z axis
01556   //           IAX = 4    Rxy (static ordering only  -> GTMEDI)
01557   //           IAX = 14   Rxy (also dynamic ordering -> GTNEXT)
01558   //           IAX = 5    Rxyz (static ordering only -> GTMEDI)
01559   //           IAX = 15   Rxyz (also dynamic ordering -> GTNEXT)
01560   //           IAX = 6    PHI   (PHI=0 => X axis)
01561   //           IAX = 7    THETA (THETA=0 => Z axis)
01562   //
01563 
01564 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1567 of file TGeant3TGeo.cxx.

References fMCGeo.

01569 {
01570   //
01571   // Position a volume into an existing one
01572   //
01573   //  NAME   Volume name
01574   //  NUMBER Copy number of the volume
01575   //  MOTHER Mother volume name
01576   //  X      X coord. of the volume in mother ref. sys.
01577   //  Y      Y coord. of the volume in mother ref. sys.
01578   //  Z      Z coord. of the volume in mother ref. sys.
01579   //  IROT   Rotation matrix number w.r.t. mother ref. sys.
01580   //  ONLY   ONLY/MANY flag
01581   //
01582   //  It positions a previously defined volume in the mother.
01583   //
01584   fMCGeo->Gspos(name, nr, mother, x, y, z, irot, konly);
01585 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1601 of file TGeant3TGeo.cxx.

References fMCGeo.

01604 {
01605   //
01606   //      Place a copy of generic volume NAME with user number
01607   //      NR inside MOTHER, with its parameters UPAR(1..NP)
01608   //
01609 
01610  fMCGeo->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
01611 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1588 of file TGeant3TGeo.cxx.

References fMCGeo.

01591 {
01592   //
01593   //      Place a copy of generic volume NAME with user number
01594   //      NR inside MOTHER, with its parameters UPAR(1..NP)
01595   //
01596 
01597   fMCGeo->Gsposp(name, nr, mother, x, y, z, irot, konly, upar, np);
01598 }

void TGeant3TGeo::Gsrotm ( Int_t  nmat,
Float_t  theta1,
Float_t  phi1,
Float_t  theta2,
Float_t  phi2,
Float_t  theta3,
Float_t  phi3 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1614 of file TGeant3TGeo.cxx.

References gGeoManager.

01616 {
01617   //
01618   //  nmat   Rotation matrix number
01619   //  THETA1 Polar angle for axis I
01620   //  PHI1   Azimuthal angle for axis I
01621   //  THETA2 Polar angle for axis II
01622   //  PHI2   Azimuthal angle for axis II
01623   //  THETA3 Polar angle for axis III
01624   //  PHI3   Azimuthal angle for axis III
01625   //
01626   //  It defines the rotation matrix number IROT.
01627   //
01628 
01629   gGeoManager->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
01630 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 1293 of file TGeant3TGeo.cxx.

References g3stmed, gGeoManager, nbuf, PASSCHARD, and PASSCHARL.

01297 {
01298   //
01299   //  NTMED  Tracking medium number
01300   //  NAME   Tracking medium name
01301   //  NMAT   Material number
01302   //  ISVOL  Sensitive volume flag
01303   //  IFIELD Magnetic field
01304   //  FIELDM Max. field value (Kilogauss)
01305   //  TMAXFD Max. angle due to field (deg/step)
01306   //  STEMAX Max. step allowed
01307   //  DEEMAX Max. fraction of energy lost in a step
01308   //  EPSIL  Tracking precision (cm)
01309   //  STMIN  Min. step due to continuous processes (cm)
01310   //
01311   //  IFIELD = 0 if no magnetic field; IFIELD = -1 if user decision in GUSWIM;
01312   //  IFIELD = 1 if tracking performed with G3RKUTA; IFIELD = 2 if tracking
01313   //  performed with G3HELIX; IFIELD = 3 if tracking performed with G3HELX3.
01314   //
01315   Float_t *ubuf=0;
01316   Int_t   nbuf=0;
01317   g3stmed(numed,PASSCHARD(name), nmat, isvol, ifield, fieldm, tmaxfd, stemax,
01318          deemax, epsil, stmin, ubuf, nbuf PASSCHARL(name));
01319 
01320   gGeoManager->Medium(name,numed,nmat, isvol, ifield, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
01321 }

Int_t TGeant3TGeo::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Double_t *  upar,
Int_t  np 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1671 of file TGeant3TGeo.cxx.

References fMCGeo.

01673 {
01674   //
01675   //  NAME   Volume name
01676   //  SHAPE  Volume type
01677   //  NUMED  Tracking medium number
01678   //  NPAR   Number of shape parameters
01679   //  UPAR   Vector containing shape parameters
01680   //
01681   //  It creates a new volume in the JVOLUM data structure.
01682   //
01683 
01684 
01685   Int_t ivolu = 0;
01686   ivolu = fMCGeo->Gsvolu(name, shape, nmed, upar, npar);
01687   return ivolu;
01688 }

Int_t TGeant3TGeo::Gsvolu ( const char *  name,
const char *  shape,
Int_t  nmed,
Float_t *  upar,
Int_t  np 
) [virtual]

Reimplemented from TGeant3.

Definition at line 1651 of file TGeant3TGeo.cxx.

References fMCGeo.

01653 {
01654   //
01655   //  NAME   Volume name
01656   //  SHAPE  Volume type
01657   //  NUMED  Tracking medium number
01658   //  NPAR   Number of shape parameters
01659   //  UPAR   Vector containing shape parameters
01660   //
01661   //  It creates a new volume in the JVOLUM data structure.
01662   //
01663 
01664   Int_t ivolu = 0;
01665   ivolu = fMCGeo->Gsvolu(name, shape, nmed, upar, npar);
01666   return ivolu;
01667 
01668 }

void TGeant3TGeo::Gtreve (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1323 of file TGeant3TGeo.cxx.

References g3treve.

01324 {
01325   //
01326   //   Controls tracking of all particles belonging to the current event
01327   //
01328   g3treve();
01329 }

void TGeant3TGeo::GtreveRoot (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 1332 of file TGeant3TGeo.cxx.

References gtreveroot.

01333 {
01334   //
01335   //   Controls tracking of all particles belonging to the current event
01336   //
01337   gtreveroot();
01338 }

Int_t TGeant3TGeo::ImportMaterial ( const TGeoMaterial *  material  )  [private]

Definition at line 2045 of file TGeant3TGeo.cxx.

References TGeant3::CreateFloatArray(), TGeant3::G3Material(), and TGeant3::G3Mixture().

Referenced by FinishGeometry().

02046 {
02047 // Imports the Root material in Geant3 and returns its Geant3 index
02048 // ---
02049 
02050   Int_t kmat;
02051   const TGeoMixture* mixt = dynamic_cast<const TGeoMixture*>(mat);
02052   if (mixt) {
02053     // TGeo stores only proportions by weigth
02054     Int_t nlmat = mixt->GetNelements();
02055     Float_t* fa = CreateFloatArray(mixt->GetAmixt(), TMath::Abs(nlmat));
02056     Float_t* fz = CreateFloatArray(mixt->GetZmixt(), TMath::Abs(nlmat));
02057     Float_t* fwmat = CreateFloatArray(mixt->GetWmixt(), TMath::Abs(nlmat));
02058     G3Mixture(kmat, mixt->GetName(), fa, fz, mixt->GetDensity(), TMath::Abs(nlmat), fwmat);
02059     delete [] fa;
02060     delete [] fz;
02061     delete [] fwmat;
02062   }
02063   else {
02064     Float_t* buf = 0;
02065     // Inject radlen with negative sign to be stored in G3
02066     Double_t radlen = mat->GetRadLen();
02067     // Ignore abslen from TGeo and let G3 compute it
02068     G3Material(kmat, mat->GetName(), mat->GetA(), mat->GetZ(),
02069                mat->GetDensity(), -radlen, 0, buf, 0);
02070   }
02071   return kmat;
02072 }

Bool_t TGeant3TGeo::IsCollectTracks (  )  const [inline]

Reimplemented from TGeant3.

Definition at line 217 of file TGeant3TGeo.h.

References fCollectTracks.

00217 {return fCollectTracks;}

Bool_t TGeant3TGeo::IsComputeNextMatrix (  )  const [inline]

Definition at line 70 of file TGeant3TGeo.h.

References fIsComputeNextMatrix.

Referenced by gtnextTGeo().

00070 {return fIsComputeNextMatrix;}

virtual Bool_t TGeant3TGeo::IsRootGeometrySupported (  )  const [inline, virtual]

Reimplemented from TGeant3.

Definition at line 41 of file TGeant3TGeo.h.

00041 {return kTRUE;}

void TGeant3TGeo::LoadAddress (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 590 of file TGeant3TGeo.cxx.

References fGcvol1, gcomad, PASSCHARD, and PASSCHARL.

Referenced by TGeant3TGeo().

00591 {
00592   //
00593   // Assigns the address of the GEANT common blocks to the structures
00594   // that allow their access from C++
00595   //
00596 //   printf("LoadAddress\n");
00597 //   TGeant3::LoadAddress();
00598    gcomad(PASSCHARD("GCVOL1"),(int*&) fGcvol1  PASSCHARL("GCVOL1"));
00599    gcvol1 = fGcvol1;
00600 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 826 of file TGeant3TGeo.cxx.

References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Material().

00829 {
00830   //
00831   // Defines a Material
00832   //
00833   //  kmat               number assigned to the material
00834   //  name               material name
00835   //  a                  atomic mass in au
00836   //  z                  atomic number
00837   //  dens               density in g/cm3
00838   //  absl               absorbtion length in cm
00839   //                     if >=0 it is ignored and the program
00840   //                     calculates it, if <0. -absl is taken
00841   //  radl               radiation length in cm
00842   //                     if >=0 it is ignored and the program
00843   //                     calculates it, if <0. -radl is taken
00844   //  buf                pointer to an array of user words
00845   //  nbuf               number of user words
00846   //
00847 
00848 
00849   Float_t* fbuf = CreateFloatArray(buf, nwbuf);
00850   G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
00851   delete [] fbuf;
00852 
00853   fMCGeo->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
00854 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 796 of file TGeant3TGeo.cxx.

References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Material().

00799 {
00800   //
00801   // Defines a Material
00802   //
00803   //  kmat               number assigned to the material
00804   //  name               material name
00805   //  a                  atomic mass in au
00806   //  z                  atomic number
00807   //  dens               density in g/cm3
00808   //  absl               absorbtion length in cm
00809   //                     if >=0 it is ignored and the program
00810   //                     calculates it, if <0. -absl is taken
00811   //  radl               radiation length in cm
00812   //                     if >=0 it is ignored and the program
00813   //                     calculates it, if <0. -radl is taken
00814   //  buf                pointer to an array of user words
00815   //  nbuf               number of user words
00816   //
00817 
00818   Float_t* fbuf = CreateFloatArray(buf, nwbuf);
00819   G3Material(kmat, name, a, z, dens, radl, absl, fbuf, nwbuf);
00820   delete [] fbuf;
00821 
00822   fMCGeo->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf);
00823 }

void TGeant3TGeo::Matrix ( Int_t &  krot,
Double_t  thex,
Double_t  phix,
Double_t  they,
Double_t  phiy,
Double_t  thez,
Double_t  phiz 
) [virtual]

Reimplemented from TGeant3.

Definition at line 977 of file TGeant3TGeo.cxx.

References fMCGeo.

00979 {
00980   //
00981   //  krot     rotation matrix number assigned
00982   //  theta1   polar angle for axis i
00983   //  phi1     azimuthal angle for axis i
00984   //  theta2   polar angle for axis ii
00985   //  phi2     azimuthal angle for axis ii
00986   //  theta3   polar angle for axis iii
00987   //  phi3     azimuthal angle for axis iii
00988   //
00989   //  it defines the rotation matrix number irot.
00990   //
00991   krot = -1;
00992   fMCGeo->Matrix(krot, thex, phix, they, phiy, thez, phiz);
00993 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 944 of file TGeant3TGeo.cxx.

References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Medium().

00948 {
00949   //
00950   //  kmed      tracking medium number assigned
00951   //  name      tracking medium name
00952   //  nmat      material number
00953   //  isvol     sensitive volume flag
00954   //  ifield    magnetic field
00955   //  fieldm    max. field value (kilogauss)
00956   //  tmaxfd    max. angle due to field (deg/step)
00957   //  stemax    max. step allowed
00958   //  deemax    max. fraction of energy lost in a step
00959   //  epsil     tracking precision (cm)
00960   //  stmin     min. step due to continuos processes (cm)
00961   //
00962   //  ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
00963   //  ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
00964   //  performed with g3helix; ifield = 3 if tracking performed with g3helx3.
00965   //
00966 
00967   Float_t* fubuf = CreateFloatArray(ubuf, nbuf);
00968   G3Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
00969            stmin, fubuf, nbuf);
00970   delete [] fubuf;
00971 
00972   fMCGeo->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
00973                  epsil, stmin, ubuf, nbuf);
00974 }

void TGeant3TGeo::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]

Reimplemented from TGeant3.

Definition at line 913 of file TGeant3TGeo.cxx.

References fMCGeo, and TGeant3::G3Medium().

00917 {
00918   //
00919   //  kmed      tracking medium number assigned
00920   //  name      tracking medium name
00921   //  nmat      material number
00922   //  isvol     sensitive volume flag
00923   //  ifield    magnetic field
00924   //  fieldm    max. field value (kilogauss)
00925   //  tmaxfd    max. angle due to field (deg/step)
00926   //  stemax    max. step allowed
00927   //  deemax    max. fraction of energy lost in a step
00928   //  epsil     tracking precision (cm)
00929   //  stmin     min. step due to continuous processes (cm)
00930   //
00931   //  ifield = 0 if no magnetic field; ifield = -1 if user decision in guswim;
00932   //  ifield = 1 if tracking performed with g3rkuta; ifield = 2 if tracking
00933   //  performed with g3helix; ifield = 3 if tracking performed with g3helx3.
00934   //
00935 
00936   G3Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
00937            stmin, ubuf, nbuf);
00938 
00939   fMCGeo->Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax,
00940                  epsil, stmin, ubuf, nbuf);
00941 }

void TGeant3TGeo::Mixture ( Int_t &  kmat,
const char *  name,
Double_t *  a,
Double_t *  z,
Double_t  dens,
Int_t  nlmat,
Double_t *  wmat 
) [virtual]

Reimplemented from TGeant3.

Definition at line 879 of file TGeant3TGeo.cxx.

References TGeant3::CreateFloatArray(), fMCGeo, and TGeant3::G3Mixture().

00881 {
00882   //
00883   // Defines mixture OR COMPOUND IMAT as composed by
00884   // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
00885   //
00886   // If NLMAT > 0 then wmat contains the proportion by
00887   // weights of each basic material in the mixture.
00888   //
00889   // If nlmat < 0 then WMAT contains the number of atoms
00890   // of a given kind into the molecule of the COMPOUND
00891   // In this case, WMAT in output is changed to relative
00892   // weigths.
00893   //
00894 
00895   Float_t* fa = CreateFloatArray(a, TMath::Abs(nlmat));
00896   Float_t* fz = CreateFloatArray(z, TMath::Abs(nlmat));
00897   Float_t* fwmat = CreateFloatArray(wmat, TMath::Abs(nlmat));
00898 
00899   G3Mixture(kmat, name, fa, fz, dens, nlmat, fwmat);
00900   Int_t i;
00901   for (i=0; i<TMath::Abs(nlmat); i++) {
00902     a[i] = fa[i]; z[i] = fz[i]; wmat[i] = fwmat[i];
00903   }
00904 
00905   delete [] fa;
00906   delete [] fz;
00907   delete [] fwmat;
00908 
00909   fMCGeo->Mixture(kmat, name, a, z, dens, TMath::Abs(nlmat), wmat);
00910 }

void TGeant3TGeo::Mixture ( Int_t &  kmat,
const char *  name,
Float_t *  a,
Float_t *  z,
Double_t  dens,
Int_t  nlmat,
Float_t *  wmat 
) [virtual]

Reimplemented from TGeant3.

Definition at line 857 of file TGeant3TGeo.cxx.

References fMCGeo, and TGeant3::G3Mixture().

00859 {
00860   //
00861   // Defines mixture OR COMPOUND IMAT as composed by
00862   // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
00863   //
00864   // If NLMAT > 0 then wmat contains the proportion by
00865   // weights of each basic material in the mixture.
00866   //
00867   // If nlmat < 0 then WMAT contains the number of atoms
00868   // of a given kind into the molecule of the COMPOUND
00869   // In this case, WMAT in output is changed to relative
00870   // weigths.
00871   //
00872 
00873   G3Mixture(kmat, name, a, z, dens, nlmat, wmat);
00874 
00875   fMCGeo->Mixture(kmat, name, a, z, dens, TMath::Abs(nlmat), wmat);
00876 }

Int_t TGeant3TGeo::NextVolUp ( Text_t *  name,
Int_t &  copy 
)

Reimplemented from TGeant3.

Definition at line 613 of file TGeant3TGeo.cxx.

References TGeant3::fNextVol, and gGeoManager.

00614 {
00615   //
00616   // Geometry iterator for moving upward in the geometry tree
00617   // Return next volume up
00618   //
00619   fNextVol--;
00620   if (fNextVol>=0) {
00621      Int_t level = gGeoManager->GetLevel();
00622      if (level<=fNextVol) return 0;
00623      TGeoNode *mother = gGeoManager->GetMother(level-fNextVol);
00624      if (!mother) return 0;
00625      sprintf(name, "%s", mother->GetVolume()->GetName());
00626      copy = mother->GetNumber();
00627      return mother->GetVolume()->GetNumber();
00628   }
00629   return 0;
00630 }

Int_t TGeant3TGeo::NofVolDaughters ( const char *  volName  )  const

Reimplemented from TGeant3.

Definition at line 747 of file TGeant3TGeo.cxx.

References fMCGeo.

00748 {
00749 // Return number of daughters of the volume specified by volName
00750 // According to A. Morsch' G3toRoot class
00751 // ---
00752 
00753   return fMCGeo->NofVolDaughters(volName);
00754 }

Int_t TGeant3TGeo::NofVolumes (  )  const

Reimplemented from TGeant3.

Definition at line 738 of file TGeant3TGeo.cxx.

References fMCGeo.

00739 {
00740   //
00741   // Return total number of volumes in the geometry
00742   //
00743   return fMCGeo->NofVolumes();
00744 }

TGeant3TGeo& TGeant3TGeo::operator= ( const TGeant3TGeo  )  [inline, private]

Reimplemented from TGeant3.

Definition at line 230 of file TGeant3TGeo.h.

00230 {return *this;}

virtual void TGeant3TGeo::SetCollectTracks ( Bool_t  flag = kTRUE  )  [inline, virtual]

Reimplemented from TGeant3.

Definition at line 216 of file TGeant3TGeo.h.

References fCollectTracks.

00216 {fCollectTracks = flag;}

void TGeant3TGeo::SetColors (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 2154 of file TGeant3TGeo.cxx.

References gGeoManager, and medium.

Referenced by FinishGeometry().

02155 {
02156   //
02157   // Set the colors for all the volumes
02158   // this is done sequentially for all volumes
02159   // based on the number of their medium
02160   //
02161   TIter next(gGeoManager->GetListOfVolumes());
02162   TGeoVolume *volume;
02163   while ((volume = (TGeoVolume*)next())) {
02164      if (volume->IsAssembly()) continue;
02165      TGeoMedium *medium = (TGeoMedium*)volume->GetMedium();
02166      Int_t icol = medium->GetId()%6+2;
02167      volume->SetLineColor(icol);
02168   }
02169 }

void TGeant3TGeo::SetComputeNextMatrix ( Bool_t  flag = kTRUE  )  [inline]

Definition at line 71 of file TGeant3TGeo.h.

References fIsComputeNextMatrix.

00071 {fIsComputeNextMatrix = flag;}

void TGeant3TGeo::SetRootGeometry (  )  [virtual]

Reimplemented from TGeant3.

Definition at line 996 of file TGeant3TGeo.cxx.

References fImportRootGeometry.

00997 {
00998 // Notify Geant3 about use of TGeo geometry.
00999 // The materials and tracking medias will be imported from
01000 // TGeo at FinishGeometry().
01001 
01002 
01003   fImportRootGeometry = kTRUE;
01004 }  

Int_t TGeant3TGeo::VolDaughterCopyNo ( const char *  volName,
Int_t  i 
) const

Reimplemented from TGeant3.

Definition at line 768 of file TGeant3TGeo.cxx.

References fMCGeo.

00769 {
00770 // Return the copyNo of i-th daughters of the volume specified by volName
00771 // According to A. Morsch' G3toRoot class
00772 // ---
00773 
00774   return fMCGeo->VolDaughterCopyNo(volName, i);
00775 }

const char * TGeant3TGeo::VolDaughterName ( const char *  volName,
Int_t  i 
) const

Reimplemented from TGeant3.

Definition at line 757 of file TGeant3TGeo.cxx.

References fMCGeo.

00758 {
00759 // Return the name of i-th daughters of the volume specified by volName
00760 // According to A. Morsch' G3toRoot class
00761 // ---
00762 
00763   return fMCGeo->VolDaughterName(volName, i);
00764 }

Int_t TGeant3TGeo::VolId ( const Text_t *  name  )  const

Reimplemented from TGeant3.

Definition at line 724 of file TGeant3TGeo.cxx.

References fMCGeo, and len.

00725 {
00726   //
00727   // Return the unique numeric identifier for volume name
00728   //
00729   char sname[20];
00730   Int_t len = strlen(name)-1;
00731   if (name[len] != ' ') return fMCGeo->VolId(name);
00732   strncpy(sname, name, len);
00733   sname[len] = 0;
00734   return fMCGeo->VolId(sname);
00735 }

Int_t TGeant3TGeo::VolId2Mate ( Int_t  id  )  const

Reimplemented from TGeant3.

Definition at line 778 of file TGeant3TGeo.cxx.

References fMCGeo.

00779 {
00780   //
00781   // Return material number for a given volume id
00782   //
00783   return fMCGeo->VolId2Mate(id);
00784 }

const char * TGeant3TGeo::VolName ( Int_t  id  )  const

Reimplemented from TGeant3.

Definition at line 787 of file TGeant3TGeo.cxx.

References fMCGeo.

00788 {
00789   //
00790   // Return the volume name given the volume identifier
00791   //
00792   return fMCGeo->VolName(id);
00793 }


Member Data Documentation

Bool_t TGeant3TGeo::fCollectTracks [protected]

Definition at line 223 of file TGeant3TGeo.h.

Referenced by IsCollectTracks(), and SetCollectTracks().

Compute systematically the matrix to the next crossed node.

Definition at line 225 of file TGeant3TGeo.h.

Referenced by Gcvol1(), and LoadAddress().

Reimplemented from TGeant3.

Definition at line 221 of file TGeant3TGeo.h.

Referenced by FinishGeometry(), and SetRootGeometry().

Tracks get collected via TGeoTrack.

Definition at line 224 of file TGeant3TGeo.h.

Referenced by CurrentBoundaryNormal(), IsComputeNextMatrix(), and SetComputeNextMatrix().

TGeoMCGeometry* TGeant3TGeo::fMCGeo [protected]

The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1