00001 #ifndef StiVMCToolKit_h
00002 #define StiVMCToolKit_h
00003
00004 #include "TString.h"
00005 #include "TGeoManager.h"
00006 #include "TGeoPhysicalNode.h"
00007 #include "TGeoVolume.h"
00008 #include "TGeoShape.h"
00009 #include "TGeoMaterial.h"
00010 #include "TGeoMedium.h"
00011 #include "TGeoMatrix.h"
00012 #include "TGeoCone.h"
00013
00014 #include "TGeoPara.h"
00015 #include "TGeoArb8.h"
00016 #include "TGeoPatternFinder.h"
00017 #include "TGeoPcon.h"
00018 #include "TGeoPgon.h"
00019 #include "TGeoPolygon.h"
00020 #include "TGeoSphere.h"
00021 #include "TGeoTorus.h"
00022 #include "TGeoTrd1.h"
00023 #include "TGeoTrd2.h"
00024 #include "TGeoTube.h"
00025 #include "TGeoXtru.h"
00026 #include "TGeoEltu.h"
00027 class Elem_t;
00028 struct VolumeMap_t {
00029 const Char_t *name;
00030 const Char_t *comment;
00031 const Char_t *path;
00032 const Char_t *set;
00033 const Char_t *det;
00034 };
00035
00036 namespace StiVMCToolKit {
00037 void PrintShape(TGeoShape *shape);
00038 Int_t Add2ElementList(Int_t NElem,const TGeoMaterial *mat, Elem_t *ElementList);
00039 Int_t Merge2ElementList(Int_t NElem, Elem_t *ElementList,
00040 Int_t NElemD, Elem_t *ElementListD, Double_t weight);
00041 Int_t NormolizeElementList(Int_t NElem, Elem_t *ElementList);
00042 Double_t GetWeight(TGeoNode *nodeT = 0, const TString &pathT = "HALL_1/CAVE_1/SVTT_1",
00043 Int_t *NElem = 0, Elem_t *ElementList = 0);
00044 Double_t GetVolumeWeight(TGeoVolume *volT, Int_t *NElem = 0, Elem_t *ElementList = 0);
00045 void MakeAverageVolume(TGeoVolume *volT, TGeoShape *&newshape, TGeoMedium *&newmed,
00046 Double_t *xyzM=0);
00047 TGeoManager *GetVMC();
00048 TGeoPhysicalNode *Alignment(const TGeoNode *nodeT,const Char_t *pathT, TGeoVolume *volT,
00049 TGeoShape *newshape, TGeoMedium* newmed);
00050 TGeoPhysicalNode *LoopOverNodes(const TGeoNode *nodeT, const Char_t *pathT, const Char_t *name = 0, void ( *callback)(TGeoPhysicalNode *nodeP)=0);
00051 void TestVMC4Reconstruction();
00052 void GetVMC4Reconstruction(const Char_t *pathT=0, const Char_t *nameT=0);
00053 Double_t GetShapeVolume(TGeoShape *shape);
00054 void MakeVolume(TGeoPhysicalNode *nodeP);
00055 Double_t GetPotI(const TGeoMaterial *mat);
00056 Double_t Nice(Double_t phi);
00057 void SetDebug(Int_t m);
00058 Int_t Debug();
00059 }
00060 #endif