#ifndef HGEOBASICSHAPES_H #define HGEOBASICSHAPES_H // // baseclass for all shapes // // The routines readPoints(...) read 8 points (x,y,z) from database ore file and // are used to read a BOX, TRAP or TRD1. (These shapes have 8 corners in the // technical drawings. The enumeration starts at the lower left corner of the // bottom plane and reads the points in clockwise direction.) The values are // stored in the vector vol of class HGeoParam. // All other shapes have their own routines readPoints(...) both for reading // from file or database. // // Every derived shapeclass have their own routines calcShape(...) and // posShape(...). // In the function calcShape(...) of the derived classes the shape-parameters for // Geant are calculated and stored in the vector volPar of class HGeoShapePar. // In the function posShape(...) of the derived classes different functions are // called position a volume in a mothers depending on their shapes. These // informations are stored in the class HGeoShapePar. // #include "hgeoparam.h" #include "hgeoshapepar.h" #include "hgeoinfo.h" #include "hadexitcodes.h" #include #include "hmathfnt.h" #if defined (WITHGEANT) || (WITHFORTRAN) #include "cfortran.h" #endif #ifdef WITHGEANT #include "geant321.h" #endif class HGeoBasicShapes { public: HGeoBasicShapes(){} ~HGeoBasicShapes(){} // reads 8 points (x,y,z) from database virtual int readPoints(HGeoInfo & geoInfo, HString & volName, HGeoParam & ele); // reads 8 points (x,y,z) from file virtual int readPoints(HGeoInfo & geoInfo, HGeoParam & ele); // purely virtual function to calculate shape-parameters for Geant virtual void calcShape(HGeoParam & ele, HGeoShapePar & shapePar){}; // purely virtual function to call different functions depending on the // the shapes of the volume (ele) and its mother (mo). In these functions // the position of the volume inside its mother is calculated. virtual int posShape(HGeoParam & ele, HGeoParam & mo, HGeoShapePar & shapePar) { return HFAILURE; } }; #endif