CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DetectorDescription/Parser/src/DDDividedGeometryObject.h

Go to the documentation of this file.
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 #include "DetectorDescription/Core/interface/DDCompactView.h"
00012 
00013 #include "DetectorDescription/Base/interface/DDRotationMatrix.h"
00014 #include "DetectorDescription/Base/interface/DDTranslation.h"
00015 
00016 enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH };
00017 
00018 class DDLogicalPart;
00019 class DDRotation;
00020 class DDSolid;
00021 
00022 class DDDividedGeometryObject
00023 { 
00024 public:
00025   
00026   DDDividedGeometryObject( const DDDivision& div, DDCompactView* cpv );
00027   
00028   virtual ~DDDividedGeometryObject( void );
00029   
00030   virtual DDTranslation makeDDTranslation( const int copyNo ) const;
00031   virtual DDRotation    makeDDRotation   ( const int copyNo ) const ;
00032   virtual DDLogicalPart makeDDLogicalPart( const int copyNo ) const;
00033 
00034   virtual const std::string& getType( void ) const;
00035 
00036   virtual void setType( const std::string& type );
00037 
00038   int volumeFirstCopyNo( void ) const;
00039 
00040   virtual void execute( void );
00041 
00042   static const double tolerance( void );
00043   
00044 protected:
00045   
00046   DDRotationMatrix* changeRotMatrix( double rotZ = 0. ) const;
00047   int calculateNDiv( double motherDim, double width,
00048                      double offset ) const;
00049   double calculateWidth( double motherDim, int nDiv,
00050                          double offset ) const;
00051 
00052   virtual void checkParametersValidity( void );
00053 
00054   void checkOffset( double maxPar );
00055   void checkNDivAndWidth( double maxPar );
00056 
00057   virtual double getMaxParameter( void ) const;
00058 
00059 protected:
00060   DDDivision div_;
00061   std::string ftype_;
00062   int compNDiv_;
00063   double compWidth_;
00064   DivisionType divisionType_;
00065   int theVoluFirstCopyNo_;
00066   DDCompactView* cpv_;
00067 };
00068 
00069 #endif