00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoBuilder
00013 #define ROOT_TGeoBuilder
00014
00015 #ifndef ROOT_TObject
00016 #include "TObject.h"
00017 #endif
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class TGeoMaterial;
00028 class TGeoMatrix;
00029 class TGeoMedium;
00030 class TGeoShape;
00031 class TGeoVolume;
00032 class TGeoVolumeAssembly;
00033 class TGeoVolumeMulti;
00034 class TGeoManager;
00035
00036 class TGeoBuilder : public TObject
00037 {
00038 protected:
00039 static TGeoBuilder *fgInstance;
00040
00041 TGeoBuilder();
00042 TGeoBuilder(const TGeoBuilder&);
00043 TGeoBuilder& operator=(const TGeoBuilder&);
00044
00045 private :
00046 TGeoManager *fGeometry;
00047
00048 void SetGeometry(TGeoManager *geom) {fGeometry = geom;}
00049
00050 public :
00051 virtual ~TGeoBuilder();
00052
00053 static TGeoBuilder *Instance(TGeoManager *geom);
00054
00055 Int_t AddMaterial(TGeoMaterial *material);
00056 Int_t AddTransformation(TGeoMatrix *matrix);
00057 Int_t AddShape(TGeoShape *shape);
00058 void RegisterMatrix(TGeoMatrix *matrix);
00059
00060 TGeoVolume *MakeArb8(const char *name, TGeoMedium *medium,
00061 Double_t dz, Double_t *vertices=0);
00062 TGeoVolume *MakeBox(const char *name, TGeoMedium *medium,
00063 Double_t dx, Double_t dy, Double_t dz);
00064 TGeoVolume *MakeCone(const char *name, TGeoMedium *medium,
00065 Double_t dz, Double_t rmin1, Double_t rmax1,
00066 Double_t rmin2, Double_t rmax2);
00067 TGeoVolume *MakeCons(const char *name, TGeoMedium *medium,
00068 Double_t dz, Double_t rmin1, Double_t rmax1,
00069 Double_t rmin2, Double_t rmax2,
00070 Double_t phi1, Double_t phi2);
00071 TGeoVolume *MakeCtub(const char *name, TGeoMedium *medium,
00072 Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2,
00073 Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
00074 TGeoVolume *MakeEltu(const char *name, TGeoMedium *medium,
00075 Double_t a, Double_t b, Double_t dz);
00076 TGeoVolume *MakeGtra(const char *name, TGeoMedium *medium,
00077 Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1,
00078 Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2,
00079 Double_t tl2, Double_t alpha2);
00080 TGeoVolume *MakePara(const char *name, TGeoMedium *medium,
00081 Double_t dx, Double_t dy, Double_t dz,
00082 Double_t alpha, Double_t theta, Double_t phi);
00083 TGeoVolume *MakePcon(const char *name, TGeoMedium *medium,
00084 Double_t phi, Double_t dphi, Int_t nz);
00085 TGeoVolume *MakeParaboloid(const char *name, TGeoMedium *medium,
00086 Double_t rlo, Double_t rhi, Double_t dz);
00087 TGeoVolume *MakeHype(const char *name, TGeoMedium *medium,
00088 Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
00089 TGeoVolume *MakePgon(const char *name, TGeoMedium *medium,
00090 Double_t phi, Double_t dphi, Int_t nedges, Int_t nz);
00091 TGeoVolume *MakeSphere(const char *name, TGeoMedium *medium,
00092 Double_t rmin, Double_t rmax,
00093 Double_t themin=0, Double_t themax=180,
00094 Double_t phimin=0, Double_t phimax=360);
00095 TGeoVolume *MakeTorus(const char *name, TGeoMedium *medium, Double_t r,
00096 Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360);
00097 TGeoVolume *MakeTrap(const char *name, TGeoMedium *medium,
00098 Double_t dz, Double_t theta, Double_t phi, Double_t h1,
00099 Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2,
00100 Double_t tl2, Double_t alpha2);
00101 TGeoVolume *MakeTrd1(const char *name, TGeoMedium *medium,
00102 Double_t dx1, Double_t dx2, Double_t dy, Double_t dz);
00103 TGeoVolume *MakeTrd2(const char *name, TGeoMedium *medium,
00104 Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2,
00105 Double_t dz);
00106 TGeoVolume *MakeTube(const char *name, TGeoMedium *medium,
00107 Double_t rmin, Double_t rmax, Double_t dz);
00108 TGeoVolume *MakeTubs(const char *name, TGeoMedium *medium,
00109 Double_t rmin, Double_t rmax, Double_t dz,
00110 Double_t phi1, Double_t phi2);
00111 TGeoVolume *MakeXtru(const char *name, TGeoMedium *medium,
00112 Int_t nz);
00113 TGeoVolumeAssembly *MakeVolumeAssembly(const char *name);
00114 TGeoVolumeMulti *MakeVolumeMulti(const char *name, TGeoMedium *medium);
00115
00116
00117 TGeoVolume *Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv,
00118 Double_t start, Double_t step, Int_t numed=0, Option_t *option="");
00119 void Matrix(Int_t index, Double_t theta1, Double_t phi1,
00120 Double_t theta2, Double_t phi2,
00121 Double_t theta3, Double_t phi3);
00122 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);
00123 TGeoMaterial *Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens,
00124 Int_t nelem, Float_t *wmat, Int_t uid);
00125 TGeoMaterial *Mixture(const char *name, Double_t *a, Double_t *z, Double_t dens,
00126 Int_t nelem, Double_t *wmat, Int_t uid);
00127 TGeoMedium *Medium(const char *name, Int_t numed, Int_t nmat, Int_t isvol,
00128 Int_t ifield, Double_t fieldm, Double_t tmaxfd,
00129 Double_t stemax, Double_t deemax, Double_t epsil,
00130 Double_t stmin);
00131 void Node(const char *name, Int_t nr, const char *mother,
00132 Double_t x, Double_t y, Double_t z, Int_t irot,
00133 Bool_t isOnly, Float_t *upar, Int_t npar=0);
00134 void Node(const char *name, Int_t nr, const char *mother,
00135 Double_t x, Double_t y, Double_t z, Int_t irot,
00136 Bool_t isOnly, Double_t *upar, Int_t npar=0);
00137 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed,
00138 Float_t *upar, Int_t npar=0);
00139 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed,
00140 Double_t *upar, Int_t npar=0);
00141
00142 ClassDef(TGeoBuilder, 0)
00143 };
00144
00145 #endif
00146