TGeoMCGeometry.h

Go to the documentation of this file.
00001 // @(#)root/vmc:$Id: TGeoMCGeometry.h 34810 2010-08-13 13:36:26Z ivana $
00002 // Authors: Al;ice collaboration 25/06/2002
00003 
00004 /*************************************************************************
00005  * Copyright (C) 2006, Rene Brun and Fons Rademakers.                    *
00006  * Copyright (C) 2002, ALICE Experiment at CERN.                         *
00007  * All rights reserved.                                                  *
00008  *                                                                       *
00009  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00010  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00011  *************************************************************************/
00012 
00013 #ifndef ROOT_TGeoMCGeometry
00014 #define ROOT_TGeoMCGeometry
00015 
00016 //
00017 // Class TGeoMCGeometry
00018 // --------------------
00019 // Implementation of the TVirtualMCGeometry interface
00020 // for building TGeo geometry.
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    // detector composition
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    // functions from GGEOM
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* /*onlyVolName*/, const char* /*manyVolName*/) {}
00085 
00086 
00087    // functions for access to geometry
00088    //
00089    // Return the Transformation matrix between the volume specified by
00090    // the path volumePath and the top or master volume.
00091    virtual Bool_t GetTransformation(const TString& volumePath,
00092                         TGeoHMatrix& matrix);
00093 
00094    // Return the name of the shape and its parameters for the volume
00095    // specified by the volume name.
00096    virtual Bool_t GetShape(const TString& volumePath,
00097                          TString& shapeType, TArrayD& par);
00098 
00099    // Returns the material parameters for the volume specified by
00100    // the volume name.
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    // Returns the medium parameters for the volume specified by the
00107    // volume name.
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    // functions for drawing
00115    //virtual void  DrawOneSpec(const char* name);
00116    //virtual void  Gsatt(const char* name, const char* att, Int_t val);
00117    //virtual void  Gdraw(const char*,Double_t theta, Double_t phi,
00118    //                   Double_t psi, Double_t u0, Double_t v0,
00119    //                   Double_t ul, Double_t vl);
00120 
00121    // Euclid
00122    //virtual void  WriteEuclid(const char*, const char*, Int_t, Int_t);
00123 
00124    // get methods
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& /*rhs*/);
00136    TGeoMCGeometry& operator=(const TGeoMCGeometry& /*rhs*/);
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;   // option to convert volumes names to
00144                                         // be compatible with G3
00145 
00146    static TGeoMCGeometry*  fgInstance; // singleton instance
00147 
00148    ClassDef(TGeoMCGeometry,2)  // VMC TGeo Geometry builder
00149 };
00150 
00151 #endif

Generated on Tue Jul 5 14:26:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1