Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:31

0001 #ifndef DETECTOR_DESCRIPTION_PARSER_DD_DIVIDED_GEOMETRY_OBJECT_H
0002 #define DETECTOR_DESCRIPTION_PARSER_DD_DIVIDED_GEOMETRY_OBJECT_H
0003 
0004 #include <string>
0005 
0006 #include "DetectorDescription/Core/interface/DDRotationMatrix.h"
0007 #include "DetectorDescription/Core/interface/DDTranslation.h"
0008 #include "DetectorDescription/Core/interface/DDAxes.h"
0009 #include "DetectorDescription/Core/interface/DDCompactView.h"
0010 #include "DetectorDescription/Core/interface/DDDivision.h"
0011 
0012 class DDCompactView;
0013 
0014 enum DivisionType { DivNDIVandWIDTH, DivNDIV, DivWIDTH };
0015 
0016 class DDLogicalPart;
0017 class DDRotation;
0018 class DDSolid;
0019 
0020 class DDDividedGeometryObject {
0021 public:
0022   DDDividedGeometryObject(const DDDivision& div, DDCompactView* cpv);
0023 
0024   virtual ~DDDividedGeometryObject(void) = default;  // inline
0025 
0026   virtual DDTranslation makeDDTranslation(int copyNo) const;
0027   virtual DDRotation makeDDRotation(int copyNo) const;
0028   virtual DDLogicalPart makeDDLogicalPart(int copyNo) const;
0029 
0030   virtual const std::string& getType(void) const;
0031 
0032   virtual void setType(const std::string& type);
0033 
0034   int volumeFirstCopyNo(void) const;
0035 
0036   virtual void execute(void);
0037 
0038   static const double tolerance(void);
0039 
0040 protected:
0041   std::unique_ptr<DDRotationMatrix> changeRotMatrix(double rotZ = 0.) const;
0042   int calculateNDiv(double motherDim, double width, double offset) const;
0043   double calculateWidth(double motherDim, int nDiv, double offset) const;
0044 
0045   virtual void checkParametersValidity(void);
0046 
0047   void checkOffset(double maxPar);
0048   void checkNDivAndWidth(double maxPar);
0049 
0050   virtual double getMaxParameter(void) const;
0051 
0052 protected:
0053   DDDivision div_;
0054   std::string ftype_;
0055   int compNDiv_;
0056   double compWidth_;
0057   DivisionType divisionType_;
0058   int theVoluFirstCopyNo_;
0059   DDCompactView* cpv_;
0060 };
0061 
0062 #endif