File indexing completed on 2024-04-06 12:22:30
0001 #ifndef MagneticField_GeomBuilder_DD4hep_volumeHandle_h
0002 #define MagneticField_GeomBuilder_DD4hep_volumeHandle_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "BaseVolumeHandle.h"
0014
0015 #include "DataFormats/GeometrySurface/interface/Surface.h"
0016 #include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
0017 #include "MagneticField/VolumeGeometry/interface/VolumeSide.h"
0018
0019 namespace magneticfield {
0020
0021 typedef const char* ShapeType;
0022
0023 class volumeHandle : public BaseVolumeHandle {
0024 public:
0025 volumeHandle(const cms::DDFilteredView& fv, bool expand2Pi = false, bool debugVal = false);
0026
0027
0028
0029 volumeHandle(const volumeHandle& v) = delete;
0030 volumeHandle operator=(const volumeHandle& v) = delete;
0031
0032
0033 DDSolidShape shape() const override { return (theShape); }
0034
0035
0036 std::vector<VolumeSide> sides() const override;
0037
0038 private:
0039
0040 void referencePlane(const cms::DDFilteredView& fv);
0041
0042
0043 void buildBox(double halfX, double halfY, double halfZ);
0044
0045 void buildTrap(double x1,
0046 double x2,
0047 double x3,
0048 double x4,
0049 double y1,
0050 double y2,
0051 double theta,
0052 double phi,
0053 double halfZ,
0054 double alpha1,
0055 double alpha2);
0056
0057 void buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi);
0058
0059 void buildCons(double zhalf,
0060 double rInMinusZ,
0061 double rOutMinusZ,
0062 double rInPlusZ,
0063 double rOutPlusZ,
0064 double startPhi,
0065 double deltaPhi);
0066
0067
0068 void buildPseudoTrap(double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ);
0069
0070 void buildTruncTubs(double zhalf,
0071 double rIn,
0072 double rOut,
0073 double startPhi,
0074 double deltaPhi,
0075 double cutAtStart,
0076 double cutAtDelta,
0077 bool cutInside);
0078
0079
0080 const DDSolidShape theShape;
0081 const cms::DDFilteredView& solid;
0082
0083 };
0084 }
0085
0086 #endif