50 Bool_t g3CompatibleVolumeNames)
52 fG3CompatibleVolumeNames(g3CompatibleVolumeNames)
102 for (
Int_t i=0; i<size; i++) doubleArray[i] = array[i];
121 for (i=0;i<
l;i++) vname[i] = toupper(name[i]);
122 for (i=l;i<4;i++) vname[i] =
' ';
127 for (
Int_t i=0;i<
l;i++) vname[i] = name[i];
159 Material(kmat, name, a, z, dens, radl, absl, dbuf, nwbuf);
209 Mixture(kmat, name, da, dz, dens, nlmat, dwmat);
210 for (
Int_t i=0; i<nlmat; i++) {
211 a[i] = da[i]; z[i] = dz[i]; wmat[i] = dwmat[i];
240 for (i=0;i<nlmat;i++) {
241 amol += a[i]*wmat[i];
243 for (i=0;i<nlmat;i++) {
244 wmat[i] *= a[i]/amol;
280 Medium(kmed, name, nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil,
313 GetTGeoManager()->
Medium(name,kmed,nmat, isvol, ifield, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
374 Fatal(
"Gsvolu",
"Could not create volume %s", name);
397 Vname(mother,vmother);
416 Vname(mother,vmother);
438 Vname(mother,vmother);
461 Vname(mother,vmother);
512 Vname(mother,vmother);
528 Gsposp(name, nr, mother, x, y, z, irot, konly, dupar, np);
548 Vname(mother,vmother);
561 printf(
"VolId: Volume %s not found\n",name);
574 if (medium)
return medium->
GetId();
576 printf(
"MediumId: Medium %s not found\n",name);
588 Error(
"VolName",
"volume with id=%d does not exist",
id);
612 Error(
"NofVolDaughters",
"Volume %s not found.", volName);
628 Error(
"VolDaughterName",
"Volume %s not found.", volName);
634 Error(
"VolDaughterName",
"Volume %s Index out of limits", volName);
651 Error(
"VolDaughterName",
"Volume %s not found.", volName);
657 Error(
"VolDaughterName",
"Volume %s Index out of limits", volName);
673 Error(
"VolId2Mate",
"volume with id=%d does not exist",
id);
740 TClass *class_type = shape->IsA();
880 for (
Int_t i=0; i<nz; i++) {
881 par.
AddAt(z[i], 4+3*i);
882 par.
AddAt(rmin[i], 4+3*i+1);
883 par.
AddAt(rmax[i], 4+3*i+2);
899 for (
Int_t i=0; i<nz; i++) {
900 par.
AddAt(z[i], 3+3*i);
901 par.
AddAt(rmin[i], 3+3*i+1);
902 par.
AddAt(rmax[i], 3+3*i+2);
969 Error(
"GetShape",
"Getting shape parameters for shape %s not implemented", shape->
ClassName());
1052 imed = med->
GetId();
virtual const char * GetName() const
Returns name of object.
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 UInt_t GetUniqueID() const
Return the unique object id.
Double_t GetTheta() const
virtual ~TGeoMCGeometry()
Destructor.
Double_t GetAlpha2() const
The manager class for any TGeo geometry.
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 Bool_t GetShape(const TString &volumePath, TString &shapeType, TArrayD &par)
Returns the shape and its parameters for the volume specified by volumeName.
virtual Double_t GetDX() const
virtual Double_t GetDensity() const
Gtra is a twisted trapezoid.
TGeoMaterial * Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid)
Create mixture OR COMPOUND IMAT as composed by THE BASIC nelem materials defined by arrays A...
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
TGeoMaterial * GetMaterial() const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
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 Double_t GetB() const
virtual Double_t GetRmax() const
void Vname(const char *name, char *vname) const
Convert name to upper case.
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.
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
const Double_t * GetNlow() const
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
Matrix class used for computing global transformations Should NOT be used for node definition...
Base class describing materials.
void ToLower()
Change string to lower-case.
Interface to Monte Carlo geometry construction.
virtual Double_t GetRmin2() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
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 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.
A trapezoid with only x length varying with z.
Int_t PushPath(Int_t startlevel=0)
Int_t GetNdaughters() const
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 Double_t GetRmax() const
Double_t GetStOut() const
virtual Int_t VolId2Mate(Int_t id) const
Return material number for a given volume id.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
A phi segment of a conical tube.
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.
Implementation of the TVirtualMCGeometry interface for building TGeo geometry.
constexpr Double_t DegToRad()
TGeoMedium * GetMedium() const
virtual Double_t GetA() const
virtual Double_t GetIntLen() const
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...
TRAP is a general trapezoid, i.e.
virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t np)
Create a new volume.
virtual Double_t GetZ() const
virtual Double_t GetDz() const
Int_t GetUID(const char *volname) const
Retrieve unique id for a volume name. Return -1 if name not found.
A trapezoid with both x and y lengths varying with z.
Double_t * GetRmax() const
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...
Double_t * GetRmin() const
virtual Int_t MediumId(const char *mediumName) const
Return the unique numeric identifier for medium name.
virtual Double_t GetRmin1() const
Double_t GetTheta1() const
virtual Int_t NofVolDaughters(const char *volName) const
Return number of daughters of the volume specified by volName According to A.
Base abstract class for all shapes.
void Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3)
Create rotation matrix named 'mat<index>'.
TGeoMedium * Medium(const char *name, Int_t numed, 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)
Create tracking medium.
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.
virtual Int_t NofVolumes() const
Return total number of volumes in the geometry.
Double_t RadiusHypeSq(Double_t z, Bool_t inner) const
Compute r^2 = x^2 + y^2 at a given z coordinate, for either inner or outer hyperbolas.
virtual Double_t GetRmax1() const
TGeoVolume * GetCurrentVolume() const
Hyperboloid class defined by 5 parameters.
Int_t GetEntriesFast() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TGeoHMatrix * GetCurrentMatrix() const
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
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...
The ROOT global object gROOT contains a list of all defined classes.
TGeoVolume * Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Create a new volume by dividing an existing one (GEANT3 like)
virtual Double_t GetDY() const
TObjArray * GetListOfMatrices() const
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
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.
TGeoMaterial * Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen=0, Double_t intlen=0)
Create material with given A, Z and density, having an unique id.
A tube segment cut with 2 planes.
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 m...
R__EXTERN TGeoManager * gGeoManager
TGeoManager * GetTGeoManager() const
Return TGeoManager global pointer.
virtual const char * VolName(Int_t id) const
Return the volume name given the volume identifier.
virtual Int_t VolId(const char *volName) const
Return the unique numeric identifier for volume name.
const Double_t * GetNhigh() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static TGeoMCGeometry * fgInstance
Singleton instance.
TObjArray * GetListOfUVolumes() const
Media are used to store properties related to tracking and which are useful only when using geometry ...
virtual Double_t GetRmax2() const
Array of doubles (64 bits per element).
Double_t GetTwistAngle() const
you should not use this method at all Int_t Int_t z
void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, Bool_t isOnly, Float_t *upar, Int_t npar=0)
Create a node called <name_nr> pointing to the volume called <name> as daughter of the volume called ...
void AddAt(Double_t c, Int_t i)
Set the double c value at position i in the array.
virtual Double_t GetRmin() const
TGeoMCGeometry()
Default constructor.
Double_t GetAlpha1() const
virtual Double_t GetA() const
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 ar...
Double_t Sqrt(Double_t x)
Bool_t fG3CompatibleVolumeNames
Option to convert volumes names to be compatible with G3.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Double_t GetParam(Int_t i) const
virtual Double_t GetRadLen() const
TGeoShape * GetShape() const
void Set(Int_t n)
Set size of this array to n doubles.
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.
TGeoVolume * GetVolume() const
virtual Double_t GetRmin() const
virtual Double_t GetDz() const
virtual Double_t GetDZ() const
const char * Data() const
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...
Double_t GetTheta2() const