00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOT_TGeoMCGeometry
00014 #define ROOT_TGeoMCGeometry
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "TVirtualMCGeometry.h"
00024
00025 class TGeoManager;
00026 class TGeoHMatrix;
00027 class TArrayD;
00028 class TString;
00029
00030 class TGeoMCGeometry : public TVirtualMCGeometry {
00031
00032 public:
00033 TGeoMCGeometry(const char* name, const char* title,
00034 Bool_t g3CompatibleVolumeNames = false);
00035 TGeoMCGeometry();
00036 virtual ~TGeoMCGeometry();
00037
00038
00039 virtual void Material(Int_t& kmat, const char* name, Double_t a,
00040 Double_t z, Double_t dens, Double_t radl, Double_t absl,
00041 Float_t* buf, Int_t nwbuf);
00042 virtual void Material(Int_t& kmat, const char* name, Double_t a,
00043 Double_t z, Double_t dens, Double_t radl, Double_t absl,
00044 Double_t* buf, Int_t nwbuf);
00045 virtual void Mixture(Int_t& kmat, const char *name, Float_t *a,
00046 Float_t *z, Double_t dens, Int_t nlmat, Float_t *wmat);
00047 virtual void Mixture(Int_t& kmat, const char *name, Double_t *a,
00048 Double_t *z, Double_t dens, Int_t nlmat, Double_t *wmat);
00049 virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
00050 Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
00051 Double_t stemax, Double_t deemax, Double_t epsil,
00052 Double_t stmin, Float_t* ubuf, Int_t nbuf);
00053 virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
00054 Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd,
00055 Double_t stemax, Double_t deemax, Double_t epsil,
00056 Double_t stmin, Double_t* ubuf, Int_t nbuf);
00057 virtual void Matrix(Int_t& krot, Double_t thetaX, Double_t phiX,
00058 Double_t thetaY, Double_t phiY, Double_t thetaZ,
00059 Double_t phiZ);
00060
00061
00062 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
00063 Float_t *upar, Int_t np);
00064 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
00065 Double_t *upar, Int_t np);
00066 virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv,
00067 Int_t iaxis);
00068 virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv,
00069 Int_t iaxis, Double_t c0i, Int_t numed);
00070 virtual void Gsdvt(const char *name, const char *mother, Double_t step,
00071 Int_t iaxis, Int_t numed, Int_t ndvmx);
00072 virtual void Gsdvt2(const char *name, const char *mother, Double_t step,
00073 Int_t iaxis, Double_t c0, Int_t numed, Int_t ndvmx);
00074 virtual void Gsord(const char *name, Int_t iax);
00075 virtual void Gspos(const char *name, Int_t nr, const char *mother,
00076 Double_t x, Double_t y, Double_t z, Int_t irot,
00077 const char *konly);
00078 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
00079 Double_t x, Double_t y, Double_t z, Int_t irot,
00080 const char *konly, Float_t *upar, Int_t np);
00081 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
00082 Double_t x, Double_t y, Double_t z, Int_t irot,
00083 const char *konly, Double_t *upar, Int_t np);
00084 virtual void Gsbool(const char* , const char* ) {}
00085
00086
00087
00088
00089
00090
00091 virtual Bool_t GetTransformation(const TString& volumePath,
00092 TGeoHMatrix& matrix);
00093
00094
00095
00096 virtual Bool_t GetShape(const TString& volumePath,
00097 TString& shapeType, TArrayD& par);
00098
00099
00100
00101 virtual Bool_t GetMaterial(const TString& volumeName,
00102 TString& name, Int_t& imat,
00103 Double_t& a, Double_t& z, Double_t& density,
00104 Double_t& radl, Double_t& inter, TArrayD& par);
00105
00106
00107
00108 virtual Bool_t GetMedium(const TString& volumeName,
00109 TString& name, Int_t& imed,
00110 Int_t& nmat, Int_t& isvol, Int_t& ifield,
00111 Double_t& fieldm, Double_t& tmaxfd, Double_t& stemax,
00112 Double_t& deemax, Double_t& epsil, Double_t& stmin,
00113 TArrayD& par);
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 virtual Int_t VolId(const char* volName) const;
00126 virtual const char* VolName(Int_t id) const;
00127 virtual Int_t MediumId(const char* mediumName) const;
00128 virtual Int_t NofVolumes() const;
00129 virtual Int_t NofVolDaughters(const char* volName) const;
00130 virtual const char* VolDaughterName(const char* volName, Int_t i) const;
00131 virtual Int_t VolDaughterCopyNo(const char* volName, Int_t i) const;
00132 virtual Int_t VolId2Mate(Int_t id) const;
00133
00134 private:
00135 TGeoMCGeometry(const TGeoMCGeometry& );
00136 TGeoMCGeometry& operator=(const TGeoMCGeometry& );
00137
00138 TGeoManager* GetTGeoManager() const;
00139
00140 Double_t* CreateDoubleArray(Float_t* array, Int_t size) const;
00141 void Vname(const char *name, char *vname) const;
00142
00143 Bool_t fG3CompatibleVolumeNames;
00144
00145
00146 static TGeoMCGeometry* fgInstance;
00147
00148 ClassDef(TGeoMCGeometry,2)
00149 };
00150
00151 #endif