00001 #ifndef DD_DividedGeometryObject_H 00002 #define DD_DividedGeometryObject_H 00003 // 00004 // ******************************************************************** 00005 // 25.04.04 - M.Case ported algorithm from G4VDivisionParameterisation.hh. to 00006 // DDD version 00007 //--------------------------------------------------------------------- 00008 00009 #include "DetectorDescription/Core/interface/DDAxes.h" 00010 #include "DetectorDescription/Core/interface/DDDivision.h" 00011 00012 #include "DetectorDescription/Base/interface/DDRotationMatrix.h" 00013 #include "DetectorDescription/Base/interface/DDTranslation.h" 00014 00015 enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH }; 00016 00017 class DDLogicalPart; 00018 class DDRotation; 00019 class DDSolid; 00020 class DDPosPart; 00021 00022 00023 class DDDividedGeometryObject //: public DDDivision 00024 { 00025 public: 00026 00027 DDDividedGeometryObject( const DDDivision & div ); 00028 00029 virtual ~DDDividedGeometryObject(); 00030 00031 virtual DDTranslation makeDDTranslation( const int copyNo ) const; 00032 virtual DDRotation makeDDRotation ( const int copyNo ) const ; 00033 virtual DDLogicalPart makeDDLogicalPart( const int copyNo ) const; 00034 00035 virtual const std::string& getType() const; 00036 00037 virtual void setType(const std::string& type); 00038 00039 int volumeFirstCopyNo() const; 00040 00041 virtual void execute(); 00042 00043 static const double tolerance(); 00044 00045 protected: 00046 00047 DDRotationMatrix* changeRotMatrix( double rotZ = 0. ) const; 00048 int calculateNDiv( double motherDim, double width, 00049 double offset ) const; 00050 double calculateWidth( double motherDim, int nDiv, 00051 double offset ) const; 00052 00053 virtual void checkParametersValidity(); 00054 00055 void checkOffset( double maxPar ); 00056 void checkNDivAndWidth( double maxPar ); 00057 00058 virtual double getMaxParameter() const; 00059 00060 protected: 00061 DDDivision div_; 00062 std::string ftype_; 00063 int compNDiv_; 00064 double compWidth_; 00065 DivisionType divisionType_; 00066 int theVoluFirstCopyNo_; 00067 }; 00068 00069 #endif