VMC Version 2.0
|
Implementation of the TVirtualMCGeometry interface for building TGeo geometry. More...
#include <TGeoMCGeometry.h>
Public Member Functions | |
TGeoMCGeometry (const char *name, const char *title, Bool_t g3CompatibleVolumeNames=false) | |
Standard constructor. | |
TGeoMCGeometry () | |
Default constructor. | |
virtual | ~TGeoMCGeometry () |
Destructor. | |
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, Int_t nwbuf) |
Define a material. | |
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) |
Define a material. | |
virtual void | Mixture (Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat) |
Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and 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) |
Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and 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, Int_t nbuf) |
Define a medium. | |
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) |
Define a medium. | |
virtual void | Matrix (Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ) |
Define a rotation matrix. | |
virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np) |
Create a new volume. | |
virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np) |
Create a new volume. | |
virtual void | Gsdvn (const char *name, const char *mother, Int_t ndiv, Int_t iaxis) |
Create a new volume by dividing an existing one. | |
virtual void | Gsdvn2 (const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed) |
Create a new volume by dividing an existing one. | |
virtual void | Gsdvt (const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx) |
Create a new volume by dividing an existing one. | |
virtual void | Gsdvt2 (const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx) |
Create a new volume by dividing an existing one. | |
virtual void | Gsord (const char *name, Int_t iax) |
Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to -iax (Geant3 only) | |
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) |
Position a volume into an existing one. | |
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) |
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..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) |
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..np) | |
virtual void | Gsbool (const char *, const char *) |
Helper function for resolving MANY. | |
virtual Bool_t | GetTransformation (const TString &volumePath, TGeoHMatrix &matrix) |
Return the transformation matrix between the volume specified by the path volumePath and the Top or mater volume. | |
virtual Bool_t | GetShape (const TString &volumePath, TString &shapeType, TArrayD &par) |
Returns the shape and its parameters for the volume specified by volumeName. | |
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) |
Returns the Material and its parameters for the volume specified by volumeName. | |
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) |
Returns the Medium and its parameters for the volume specified by volumeName. | |
virtual Int_t | VolId (const char *volName) const |
Return the unique numeric identifier for volume name. | |
virtual const char * | VolName (Int_t id) const |
Return the volume name given the volume identifier. | |
virtual Int_t | MediumId (const char *mediumName) const |
Return the unique numeric identifier for medium name. | |
virtual Int_t | NofVolumes () const |
Return total number of volumes in the geometry. | |
virtual Int_t | NofVolDaughters (const char *volName) const |
Return number of daughters of the volume specified by volName According to A. | |
virtual const char * | VolDaughterName (const char *volName, Int_t i) const |
Return the name of i-th daughters of the volume specified by volName According to A. | |
virtual Int_t | VolDaughterCopyNo (const char *volName, Int_t i) const |
Return the copyNo of i-th daughters of the volume specified by volName According to A. | |
virtual Int_t | VolId2Mate (Int_t id) const |
Return material number for a given volume id. | |
Public Member Functions inherited from TVirtualMCGeometry | |
TVirtualMCGeometry (const char *name, const char *title) | |
Standard constructor. | |
TVirtualMCGeometry () | |
Default constructor. | |
virtual | ~TVirtualMCGeometry () |
Destructor. | |
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, Int_t nwbuf)=0 |
Define a material. | |
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)=0 |
The same as previous but in double precision. | |
virtual void | Mixture (Int_t &kmat, const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat)=0 |
Define mixture or compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and 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)=0 |
The same as previous but in double precision. | |
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, Int_t nbuf)=0 |
Define a medium. | |
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)=0 |
The same as previous but in double precision. | |
virtual void | Matrix (Int_t &krot, Double_t thetaX, Double_t phiX, Double_t thetaY, Double_t phiY, Double_t thetaZ, Double_t phiZ)=0 |
Define a rotation matrix. | |
virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)=0 |
Create a new volume. | |
virtual Int_t | Gsvolu (const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t np)=0 |
The same as previous but in double precision. | |
virtual void | Gsdvn (const char *name, const char *mother, Int_t ndiv, Int_t iaxis)=0 |
Create a new volume by dividing an existing one. | |
virtual void | Gsdvn2 (const char *name, const char *mother, Int_t ndiv, Int_t iaxis, Double_t c0i, Int_t numed)=0 |
Create a new volume by dividing an existing one. | |
virtual void | Gsdvt (const char *name, const char *mother, Double_t step, Int_t iaxis, Int_t numed, Int_t ndvmx)=0 |
Create a new volume by dividing an existing one Divide mother into divisions called name along axis iaxis in steps of step. | |
virtual void | Gsdvt2 (const char *name, const char *mother, Double_t step, Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx)=0 |
Create a new volume by dividing an existing one Divides mother into divisions called name along axis iaxis starting at coordinate value c0 with step size step. | |
virtual void | Gsord (const char *name, Int_t iax)=0 |
Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to -iax (Geant3 only) | |
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")=0 |
Position a volume into an existing one. | |
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)=0 |
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..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)=0 |
The same as previous but in double precision. | |
virtual void | Gsbool (const char *onlyVolName, const char *manyVolName)=0 |
Helper function for resolving MANY. | |
virtual Bool_t | GetTransformation (const TString &volumePath, TGeoHMatrix &matrix)=0 |
Return the transformation matrix between the volume specified by the path volumePath and the top or master volume. | |
virtual Bool_t | GetShape (const TString &volumePath, TString &shapeType, TArrayD &par)=0 |
Return the name of the shape (shapeType) and its parameters par for the volume specified by the path volumePath . | |
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)=0 |
Return the material parameters for the volume specified by the volumeName. | |
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)=0 |
Return the medium parameters for the volume specified by the volumeName. | |
virtual Int_t | VolId (const char *volName) const =0 |
Return the unique numeric identifier for volume name volName. | |
virtual const char * | VolName (Int_t id) const =0 |
Return the volume name for a given volume identifier id. | |
virtual Int_t | MediumId (const char *mediumName) const =0 |
Return the unique numeric identifier for medium name mediumName. | |
virtual Int_t | NofVolumes () const =0 |
Return total number of volumes in the geometry. | |
virtual Int_t | NofVolDaughters (const char *volName) const =0 |
Return number of daughters of the volume specified by volName. | |
virtual const char * | VolDaughterName (const char *volName, Int_t i) const =0 |
Return the name of i-th daughter of the volume specified by volName. | |
virtual Int_t | VolDaughterCopyNo (const char *volName, Int_t i) const =0 |
Return the copyNo of i-th daughter of the volume specified by volName. | |
virtual Int_t | VolId2Mate (Int_t id) const =0 |
Return material number for a given volume id. | |
Private Member Functions | |
TGeoMCGeometry (const TGeoMCGeometry &) | |
TGeoMCGeometry & | operator= (const TGeoMCGeometry &) |
TGeoManager * | GetTGeoManager () const |
Return TGeoManager global pointer. | |
Double_t * | CreateDoubleArray (Float_t *array, Int_t size) const |
Convert Float_t* array to Double_t*, !! The new array has to be deleted by user. | |
void | Vname (const char *name, char *vname) const |
Convert name to upper case. | |
Private Attributes | |
Bool_t | fG3CompatibleVolumeNames |
Option to convert volumes names to be compatible with G3. | |
Static Private Attributes | |
static TGeoMCGeometry * | fgInstance = 0 |
Singleton instance. | |
Additional Inherited Members | |
Protected Member Functions inherited from TVirtualMCGeometry | |
TVirtualMCGeometry (const TVirtualMCGeometry &) | |
TVirtualMCGeometry & | operator= (const TVirtualMCGeometry &) |
Implementation of the TVirtualMCGeometry interface for building TGeo geometry.
Definition at line 38 of file TGeoMCGeometry.h.
TGeoMCGeometry::TGeoMCGeometry | ( | const char * | name, |
const char * | title, | ||
Bool_t | g3CompatibleVolumeNames = false |
||
) |
Standard constructor.
Definition at line 56 of file TGeoMCGeometry.cxx.
TGeoMCGeometry::TGeoMCGeometry | ( | ) |
Default constructor.
Definition at line 66 of file TGeoMCGeometry.cxx.
|
virtual |
Destructor.
Definition at line 73 of file TGeoMCGeometry.cxx.
|
private |
|
virtual |
Define a material.
Implements TVirtualMCGeometry.
Definition at line 160 of file TGeoMCGeometry.cxx.
Referenced by Material().
|
virtual |
Define a material.
Implements TVirtualMCGeometry.
Definition at line 186 of file TGeoMCGeometry.cxx.
|
virtual |
Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and wmat.
If nlmat > 0 then wmat contains the proportion by weights of each basic material in the mixture.
If nlmat < 0 then wmat contains the number of atoms of a given kind into the molecule of the compound. In this case, wmat in output is changed to relative weights.
Implements TVirtualMCGeometry.
Definition at line 206 of file TGeoMCGeometry.cxx.
Referenced by Mixture().
|
virtual |
Define a mixture or a compound with a number kmat composed by the basic nlmat materials defined by arrays a, z and wmat.
If nlmat > 0 then wmat contains the proportion by weights of each basic material in the mixture.
If nlmat < 0 then wmat contains the number of atoms of a given kind into the molecule of the compound. In this case, wmat in output is changed to relative weights.
Implements TVirtualMCGeometry.
Definition at line 239 of file TGeoMCGeometry.cxx.
|
virtual |
Define a medium.
Implements TVirtualMCGeometry.
Definition at line 279 of file TGeoMCGeometry.cxx.
Referenced by Medium().
|
virtual |
Define a medium.
Implements TVirtualMCGeometry.
Definition at line 312 of file TGeoMCGeometry.cxx.
|
virtual |
Define a rotation matrix.
Implements TVirtualMCGeometry.
Definition at line 331 of file TGeoMCGeometry.cxx.
|
virtual |
Create a new volume.
Implements TVirtualMCGeometry.
Definition at line 348 of file TGeoMCGeometry.cxx.
Referenced by Gsvolu().
|
virtual |
Create a new volume.
Implements TVirtualMCGeometry.
Definition at line 366 of file TGeoMCGeometry.cxx.
|
virtual |
Create a new volume by dividing an existing one.
It divides a previously defined volume
Implements TVirtualMCGeometry.
Definition at line 392 of file TGeoMCGeometry.cxx.
|
virtual |
Create a new volume by dividing an existing one.
Divide mother into ndiv divisions called name along axis iaxis starting at coordinate value c0. the new volume created will be medium number numed.
Implements TVirtualMCGeometry.
Definition at line 410 of file TGeoMCGeometry.cxx.
|
virtual |
Create a new volume by dividing an existing one.
Divide mother into divisions called name along axis iaxis in steps of step. If not exactly divisible will make as many as possible and will center them with respect to the mother. Divisions will have medium number numed. If numed is 0, numed of mother is taken. ndvmx is the expected maximum number of divisions (If 0, no protection tests are performed in Geant3)
Implements TVirtualMCGeometry.
Definition at line 431 of file TGeoMCGeometry.cxx.
|
virtual |
Create a new volume by dividing an existing one.
Divides mother into divisions called name along axis iaxis starting at coordinate value c0 with step size step. The new volume created will have medium number numed. If numed is 0, numed of mother is taken. ndvmx is the expected maximum number of divisions (If 0, no protection tests are performed in Geant3)
Implements TVirtualMCGeometry.
Definition at line 454 of file TGeoMCGeometry.cxx.
|
virtual |
Flag volume name whose contents will have to be ordered along axis iax, by setting the search flag to -iax (Geant3 only)
Implements TVirtualMCGeometry.
Definition at line 481 of file TGeoMCGeometry.cxx.
|
virtual |
Position a volume into an existing one.
It positions a previously defined volume in the mother.
Implements TVirtualMCGeometry.
Definition at line 501 of file TGeoMCGeometry.cxx.
|
virtual |
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..np)
Implements TVirtualMCGeometry.
Definition at line 523 of file TGeoMCGeometry.cxx.
Referenced by Gsposp().
|
virtual |
Place a copy of generic volume name with user number nr inside mother, with its parameters upar(1..np)
Implements TVirtualMCGeometry.
Definition at line 536 of file TGeoMCGeometry.cxx.
|
inlinevirtual |
Helper function for resolving MANY.
Specify the ONLY volume that overlaps with the specified MANY and has to be substracted. (Geant4 only)
Implements TVirtualMCGeometry.
Definition at line 78 of file TGeoMCGeometry.h.
|
virtual |
Return the transformation matrix between the volume specified by the path volumePath and the Top or mater volume.
The format of the path volumePath is as follows (assuming ALIC is the Top volume) "/ALIC_1/DDIP_1/S05I_2/S05H_1/S05G_3". Here ALIC is the top most or master volume which has only 1 instance of. Of all of the daughter volumes of ALICE, DDIP volume copy #1 is indicated. Similarly for the daughter volume of DDIP is S05I copy #2 and so on.
Implements TVirtualMCGeometry.
Definition at line 703 of file TGeoMCGeometry.cxx.
|
virtual |
Returns the shape and its parameters for the volume specified by volumeName.
Implements TVirtualMCGeometry.
Definition at line 728 of file TGeoMCGeometry.cxx.
|
virtual |
Returns the Material and its parameters for the volume specified by volumeName.
Note, Geant3 stores and uses mixtures as an element with an effective Z and A. Consequently, if the parameter Z is not integer, then this material represents some sort of mixture.
Implements TVirtualMCGeometry.
Definition at line 994 of file TGeoMCGeometry.cxx.
|
virtual |
Returns the Medium and its parameters for the volume specified by volumeName.
Implements TVirtualMCGeometry.
Definition at line 1040 of file TGeoMCGeometry.cxx.
|
virtual |
Return the unique numeric identifier for volume name.
Implements TVirtualMCGeometry.
Definition at line 556 of file TGeoMCGeometry.cxx.
|
virtual |
Return the volume name given the volume identifier.
Implements TVirtualMCGeometry.
Definition at line 584 of file TGeoMCGeometry.cxx.
|
virtual |
Return the unique numeric identifier for medium name.
Implements TVirtualMCGeometry.
Definition at line 570 of file TGeoMCGeometry.cxx.
|
virtual |
Return total number of volumes in the geometry.
Implements TVirtualMCGeometry.
Definition at line 598 of file TGeoMCGeometry.cxx.
|
virtual |
Return number of daughters of the volume specified by volName According to A.
Morsch' G3toRoot class (by A. Morsch)
Implements TVirtualMCGeometry.
Definition at line 607 of file TGeoMCGeometry.cxx.
|
virtual |
Return the name of i-th daughters of the volume specified by volName According to A.
Morsch' G3toRoot class.
Implements TVirtualMCGeometry.
Definition at line 623 of file TGeoMCGeometry.cxx.
|
virtual |
Return the copyNo of i-th daughters of the volume specified by volName According to A.
Morsch' G3toRoot class.
Implements TVirtualMCGeometry.
Definition at line 646 of file TGeoMCGeometry.cxx.
|
virtual |
Return material number for a given volume id.
Implements TVirtualMCGeometry.
Definition at line 669 of file TGeoMCGeometry.cxx.
|
private |
|
private |
Return TGeoManager global pointer.
Create a new TGeoManager object if it does not yet exist.
Definition at line 86 of file TGeoMCGeometry.cxx.
Referenced by GetMaterial(), GetMedium(), GetShape(), GetTransformation(), Gsdvn(), Gsdvn2(), Gsdvt(), Gsdvt2(), Gspos(), Gsposp(), Gsvolu(), Material(), Matrix(), Medium(), MediumId(), Mixture(), NofVolDaughters(), NofVolumes(), VolDaughterCopyNo(), VolDaughterName(), VolId(), VolId2Mate(), and VolName().
|
private |
Convert Float_t* array to Double_t*, !! The new array has to be deleted by user.
Definition at line 98 of file TGeoMCGeometry.cxx.
Referenced by Gsposp(), Gsvolu(), Material(), Medium(), and Mixture().
|
private |
|
private |
Option to convert volumes names to be compatible with G3.
Definition at line 130 of file TGeoMCGeometry.h.
Referenced by Vname().
|
staticprivate |
Singleton instance.
Definition at line 132 of file TGeoMCGeometry.h.
Referenced by ~TGeoMCGeometry().