00001 #ifndef BDSLensFacet_h 00002 #define BDSLensFacet_h 00003 00004 #include "globals.hh" 00005 #include "G4LogicalVolume.hh" 00006 00007 #include "G4UserLimits.hh" 00008 #include "G4VisAttributes.hh" 00009 #include "G4VSolid.hh" 00010 #include "G4TwoVector.hh" 00011 00012 class BDSLensFacet 00013 { 00014 public: 00015 BDSLensFacet(G4String name, G4TwoVector size, G4double angle, G4double baseHeight, G4String material); 00016 ~BDSLensFacet(); 00017 inline G4LogicalVolume* log(){return _log;} 00018 inline G4String name(){return _name;} 00019 inline G4TwoVector size(){return _size;} //The x-y size of the facet. 00020 inline G4double angle(){return _angle;} 00021 inline G4double totalHeight(){return _totalHeight;} //The total height (z size) of the facet. 00022 inline G4double baseHeight(){return _baseHeight;} //The thickness of the base. 00023 inline G4RotationMatrix* rotation(){return _rotation;} //A rotation to rotate the facet to the correct coordinate system. 00024 00025 private: 00026 void computeDimensions(); 00027 void build(); 00028 void visAtt(); 00029 00030 G4String _name; 00031 G4TwoVector _size; 00032 G4double _angle; 00033 G4double _totalHeight; 00034 G4double _baseHeight; 00035 G4RotationMatrix* _rotation; 00036 G4String _logName; 00037 G4String _solidName; 00038 G4String _material; 00039 // Geometrical objects: 00040 G4LogicalVolume* _log; 00041 G4VSolid* _solid; 00042 G4VisAttributes* _visAtt; 00043 std::vector<G4ThreeVector> _facetPos; 00044 }; 00045 00046 #endif